Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENA fixes #109

Merged
merged 2 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading