def _find_sequence_files(self): if "amplicon_analysis.fastq" in os.listdir(self._data_dir): return {"all": os.path.join(self._data_dir, "amplicon_analysis.fastq")} elif "amplicon_analysis_fastq" in os.listdir(self._data_dir): fastq_dir = os.path.join(self._data_dir, "amplicon_analysis_fastq") filepaths = [os.path.join(fastq_dir, f) for f in os.listdir(fastq_dir)] return {sample_from_file(f): f for f in filepaths} else: raise IOError("No valid sequence files found!")
def _find_sequence_files(self): if 'amplicon_analysis.fastq' in os.listdir(self._data_dir): return { 'all': os.path.join(self._data_dir, 'amplicon_analysis.fastq') } elif 'amplicon_analysis_fastq' in os.listdir(self._data_dir): fastq_dir = os.path.join(self._data_dir, 'amplicon_analysis_fastq') filepaths = [ os.path.join(fastq_dir, f) for f in os.listdir(fastq_dir) ] return {sample_from_file(f): f for f in filepaths} else: raise IOError("No valid sequence files found!")
def __init__(self, filename): self._filename = filename self._barcodes = [sample_from_file(filename)] self._records = self._parse_records() self._types_by_name = {r.name: r.type for r in self._records} self._loci = sorted_set([r.gtype.split('*')[0] for r in self._records])