Skip to content

Commit

Permalink
Merge pull request #109 from martinghunt/ena_fixes
Browse files Browse the repository at this point in the history
ENA fixes
  • Loading branch information
martinghunt authored Mar 18, 2024
2 parents 2900674 + 9262bcc commit c988995
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
10 changes: 2 additions & 8 deletions viridian/ena.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 2 additions & 3 deletions viridian/one_sample_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit c988995

Please sign in to comment.