diff --git a/viridian/ena.py b/viridian/ena.py index c30205e..707a29e 100644 --- a/viridian/ena.py +++ b/viridian/ena.py @@ -61,18 +61,12 @@ def fastq_ftp_string_to_files(fastq_ftp_str): def wanted_reads_files(all_files, platform): - if platform == "ILLUMINA": - if len(all_files["paired"]) != 2: - raise Exception( - "Need paired files for Illumina but did not get pair of files" - ) - return None, *all_files["paired"] - elif platform == "OXFORD_NANOPORE": + if platform == "OXFORD_NANOPORE": # Just in case there were multiple files and the first two happened # to be called foo_1.fastq.gz, foo_2.fastq.gz, assume all reads # are unpaired return all_files["unpaired"] + all_files["paired"], None, None - elif platform == "ION_TORRENT": + elif platform in ["ILLUMINA", "ION_TORRENT"]: if len(all_files["paired"]) == 2: return None, *all_files["paired"] else: diff --git a/viridian/one_sample_pipeline.py b/viridian/one_sample_pipeline.py index fba8842..ca3be27 100644 --- a/viridian/one_sample_pipeline.py +++ b/viridian/one_sample_pipeline.py @@ -111,7 +111,6 @@ def __init__( if self.gzip_files: self.json_log_file += ".gz" self.final_masked_fasta += ".gz" - self.minimap_x_opt = constants.TECH2MINIMAP_X[self.tech] def set_command_line_dict(self): # Make a dict of the command line options to go in the JSON output file. @@ -328,7 +327,7 @@ def initial_read_map(self): reads2=self.reads_file2, debug=self.debug, sample_name=self.sample_name, - minimap_x_opt=self.minimap_x_opt, + minimap_x_opt=constants.TECH2MINIMAP_X[self.tech], ) return True @@ -503,7 +502,7 @@ def self_qc(self): self.pileups = self.read_sampler.pileups( self.final_unmasked_fasta, self.qc_bams_dir, - minimap_x_opt=self.minimap_x_opt, + minimap_x_opt=constants.TECH2MINIMAP_X[self.tech], debug=self.debug, ) if len(self.pileups) == 0: