Mercurial > repos > greg > pima_report
comparison pima_report.py @ 14:95b1d1a9497d draft
Uploaded
author | greg |
---|---|
date | Fri, 17 Mar 2023 17:23:43 +0000 |
parents | f03c80bb22e9 |
children | 02283aa193c3 |
comparison
equal
deleted
inserted
replaced
13:f03c80bb22e9 | 14:95b1d1a9497d |
---|---|
7 import sys | 7 import sys |
8 | 8 |
9 from Bio import SeqIO | 9 from Bio import SeqIO |
10 from datetime import date | 10 from datetime import date |
11 from mdutils.mdutils import MdUtils | 11 from mdutils.mdutils import MdUtils |
12 # FIXME: TableOfContents doesn't work. | |
13 # from mdutils.tools import TableOfContents | |
12 | 14 |
13 CDC_ADVISORY = 'The analysis and report presented here should be treated as preliminary. Please contact the CDC/BDRD with any results regarding _Bacillus anthracis_.' | 15 CDC_ADVISORY = 'The analysis and report presented here should be treated as preliminary. Please contact the CDC/BDRD with any results regarding _Bacillus anthracis_.' |
14 | 16 |
15 | 17 |
16 class PimaReport: | 18 class PimaReport: |
17 | 19 |
18 def __init__(self, analysis_name=None, amr_deletions_file=None, amr_matrix_files=None, assembly_fasta_file=None, | 20 def __init__(self, analysis_name=None, amr_deletions_file=None, amr_matrix_files=None, assembly_fasta_file=None, |
19 assembly_name=None, bedtools_version=None, blastn_version=None, circos_files=None, | 21 assembly_name=None, bedtools_version=None, blastn_version=None, circos_files=None, |
20 compute_sequence_length_file=None, contig_coverage_file=None, dbkey=None, dnadiff_snps_file=None, | 22 compute_sequence_length_file=None, contig_coverage_file=None, dbkey=None, dnadiff_snps_file=None, |
21 dnadiff_version=None, feature_bed_files=None, feature_png_files=None, flye_assembly_info_file=None, | 23 dnadiff_version=None, feature_bed_files=None, feature_png_files=None, flye_assembly_info_file=None, |
22 flye_version=None, genome_insertions_file=None, gzipped=None, illumina_fastq_file=None, | 24 flye_version=None, genome_insertions_file=None, gzipped=None, kraken2_report_file=None, |
23 kraken2_report_file=None, kraken2_version=None, minimap2_version=None, mutation_regions_bed_file=None, | 25 kraken2_version=None, minimap2_version=None, mutation_regions_bed_file=None, mutation_regions_tsv_files=None, |
24 mutation_regions_tsv_files=None, pima_css=None, plasmids_file=None, quast_report_file=None, | 26 ont_fastq_file=None, pima_css=None, plasmids_file=None, quast_report_file=None, reference_insertions_file=None, |
25 reference_insertions_file=None, samtools_version=None, varscan_version=None): | 27 samtools_version=None, varscan_version=None): |
26 self.ofh = open("process_log.txt", "w") | 28 self.ofh = open("process_log.txt", "w") |
27 | 29 |
28 self.ofh.write("amr_deletions_file: %s\n" % str(amr_deletions_file)) | 30 self.ofh.write("amr_deletions_file: %s\n" % str(amr_deletions_file)) |
29 self.ofh.write("amr_matrix_files: %s\n" % str(amr_matrix_files)) | 31 self.ofh.write("amr_matrix_files: %s\n" % str(amr_matrix_files)) |
30 self.ofh.write("analysis_name: %s\n" % str(analysis_name)) | 32 self.ofh.write("analysis_name: %s\n" % str(analysis_name)) |
42 self.ofh.write("feature_png_files: %s\n" % str(feature_png_files)) | 44 self.ofh.write("feature_png_files: %s\n" % str(feature_png_files)) |
43 self.ofh.write("flye_assembly_info_file: %s\n" % str(flye_assembly_info_file)) | 45 self.ofh.write("flye_assembly_info_file: %s\n" % str(flye_assembly_info_file)) |
44 self.ofh.write("flye_version: %s\n" % str(flye_version)) | 46 self.ofh.write("flye_version: %s\n" % str(flye_version)) |
45 self.ofh.write("gzipped: %s\n" % str(gzipped)) | 47 self.ofh.write("gzipped: %s\n" % str(gzipped)) |
46 self.ofh.write("genome_insertions_file: %s\n" % str(genome_insertions_file)) | 48 self.ofh.write("genome_insertions_file: %s\n" % str(genome_insertions_file)) |
47 self.ofh.write("illumina_fastq_file: %s\n" % str(illumina_fastq_file)) | |
48 self.ofh.write("kraken2_report_file: %s\n" % str(kraken2_report_file)) | 49 self.ofh.write("kraken2_report_file: %s\n" % str(kraken2_report_file)) |
49 self.ofh.write("kraken2_version: %s\n" % str(kraken2_version)) | 50 self.ofh.write("kraken2_version: %s\n" % str(kraken2_version)) |
50 self.ofh.write("minimap2_version: %s\n" % str(minimap2_version)) | 51 self.ofh.write("minimap2_version: %s\n" % str(minimap2_version)) |
51 self.ofh.write("mutation_regions_bed_file: %s\n" % str(mutation_regions_bed_file)) | 52 self.ofh.write("mutation_regions_bed_file: %s\n" % str(mutation_regions_bed_file)) |
52 self.ofh.write("mutation_regions_tsv_files: %s\n" % str(mutation_regions_tsv_files)) | 53 self.ofh.write("mutation_regions_tsv_files: %s\n" % str(mutation_regions_tsv_files)) |
54 self.ofh.write("ont_fastq_file: %s\n" % str(ont_fastq_file)) | |
53 self.ofh.write("pima_css: %s\n" % str(pima_css)) | 55 self.ofh.write("pima_css: %s\n" % str(pima_css)) |
54 self.ofh.write("plasmids_file: %s\n" % str(plasmids_file)) | 56 self.ofh.write("plasmids_file: %s\n" % str(plasmids_file)) |
55 self.ofh.write("quast_report_file: %s\n" % str(quast_report_file)) | 57 self.ofh.write("quast_report_file: %s\n" % str(quast_report_file)) |
56 self.ofh.write("reference_insertions_file: %s\n" % str(reference_insertions_file)) | 58 self.ofh.write("reference_insertions_file: %s\n" % str(reference_insertions_file)) |
57 self.ofh.write("samtools_version: %s\n" % str(samtools_version)) | 59 self.ofh.write("samtools_version: %s\n" % str(samtools_version)) |
92 self.flye_version = 'flye (version unknown)' | 94 self.flye_version = 'flye (version unknown)' |
93 else: | 95 else: |
94 self.flye_version = re.sub('_', '.', flye_version.rstrip(' _assembly info_')) | 96 self.flye_version = re.sub('_', '.', flye_version.rstrip(' _assembly info_')) |
95 self.gzipped = gzipped | 97 self.gzipped = gzipped |
96 self.genome_insertions_file = genome_insertions_file | 98 self.genome_insertions_file = genome_insertions_file |
97 self.illumina_fastq_file = illumina_fastq_file | |
98 self.kraken2_report_file = kraken2_report_file | 99 self.kraken2_report_file = kraken2_report_file |
99 if kraken2_version is None: | 100 if kraken2_version is None: |
100 self.kraken2_version = 'kraken2 (version unknown)' | 101 self.kraken2_version = 'kraken2 (version unknown)' |
101 else: | 102 else: |
102 self.kraken2_version = re.sub('_', '.', kraken2_version.rstrip(' _report_')) | 103 self.kraken2_version = re.sub('_', '.', kraken2_version.rstrip(' _report_')) |
104 self.minimap2_version = 'minimap2 (version unknown)' | 105 self.minimap2_version = 'minimap2 (version unknown)' |
105 else: | 106 else: |
106 self.minimap2_version = re.sub('_', '.', minimap2_version) | 107 self.minimap2_version = re.sub('_', '.', minimap2_version) |
107 self.mutation_regions_bed_file = mutation_regions_bed_file | 108 self.mutation_regions_bed_file = mutation_regions_bed_file |
108 self.mutation_regions_tsv_files = mutation_regions_tsv_files | 109 self.mutation_regions_tsv_files = mutation_regions_tsv_files |
109 self.read_type = 'Illumina' | |
110 self.ont_bases = None | |
111 self.ont_n50 = None | |
112 self.ont_read_count = None | |
113 self.pima_css = pima_css | 110 self.pima_css = pima_css |
114 self.plasmids_file = plasmids_file | 111 self.plasmids_file = plasmids_file |
115 self.quast_report_file = quast_report_file | 112 self.quast_report_file = quast_report_file |
113 self.read_type = 'ONT' | |
116 self.reference_insertions_file = reference_insertions_file | 114 self.reference_insertions_file = reference_insertions_file |
117 self.reference_insertions_file = reference_insertions_file | 115 self.reference_insertions_file = reference_insertions_file |
118 if samtools_version is None: | 116 if samtools_version is None: |
119 self.samtools_version = 'samtools (version unknown)' | 117 self.samtools_version = 'samtools (version unknown)' |
120 else: | 118 else: |
164 # Values | 162 # Values |
165 self.assembly_size = 0 | 163 self.assembly_size = 0 |
166 self.contig_info = None | 164 self.contig_info = None |
167 self.did_medaka_ont_assembly = False | 165 self.did_medaka_ont_assembly = False |
168 self.feature_hits = pandas.Series(dtype='float64') | 166 self.feature_hits = pandas.Series(dtype='float64') |
169 self.illumina_length_mean = 0 | 167 self.illumina_fastq_file = None |
170 self.illumina_read_count = 0 | 168 self.illumina_length_mean = None |
171 self.illumina_bases = 0 | 169 self.illumina_read_count = None |
172 # TODO: should the following 2 values be passed as parameters? | 170 self.illumina_bases = None |
171 self.ont_bases = None | |
172 # TODO: should the following be passed as a parameter? | |
173 self.ont_coverage_min = 30 | |
174 self.ont_fast5 = None | |
175 self.ont_fastq_file = ont_fastq_file | |
176 self.ont_n50 = None | |
177 # TODO: should the following be passed as a parameter? | |
173 self.ont_n50_min = 2500 | 178 self.ont_n50_min = 2500 |
174 self.ont_coverage_min = 30 | 179 self.ont_raw_fastq = self.analysis_name |
180 self.ont_read_count = None | |
175 | 181 |
176 # Actions | 182 # Actions |
177 self.did_guppy_ont_fast5 = False | 183 self.did_guppy_ont_fast5 = False |
178 self.did_qcat_ont_fastq = False | 184 self.did_qcat_ont_fastq = False |
185 self.info_ont_fastq(self.ont_fastq_file) | |
179 self.info_illumina_fastq() | 186 self.info_illumina_fastq() |
180 self.load_contig_info() | 187 self.load_contig_info() |
181 | 188 |
182 def run_command(self, command): | 189 def run_command(self, command): |
183 self.ofh.write("\nXXXXXX In run_command, command:\n%s\n\n" % str(command)) | 190 self.ofh.write("\nXXXXXX In run_command, command:\n%s\n\n" % str(command)) |
235 self.assembly_size += len(i.seq) | 242 self.assembly_size += len(i.seq) |
236 self.assembly_size = self.format_kmg(self.assembly_size, decimals=1) | 243 self.assembly_size = self.format_kmg(self.assembly_size, decimals=1) |
237 | 244 |
238 def info_illumina_fastq(self): | 245 def info_illumina_fastq(self): |
239 self.ofh.write("\nXXXXXX In info_illumina_fastq\n\n") | 246 self.ofh.write("\nXXXXXX In info_illumina_fastq\n\n") |
247 if self.illumina_length_mean is None: | |
248 return | |
240 if self.gzipped: | 249 if self.gzipped: |
241 opener = 'gunzip -c' | 250 opener = 'gunzip -c' |
242 else: | 251 else: |
243 opener = 'cat' | 252 opener = 'cat' |
244 command = ' '.join([opener, | 253 command = ' '.join([opener, |
245 self.illumina_fastq_file, | 254 self.ont_fastq_file, |
246 '| awk \'{getline;s += length($1);getline;getline;}END{print s/(NR/4)"\t"(NR/4)"\t"s}\'']) | 255 '| awk \'{getline;s += length($1);getline;getline;}END{print s/(NR/4)"\t"(NR/4)"\t"s}\'']) |
247 output = self.run_command(command) | 256 output = self.run_command(command) |
248 self.ofh.write("output:\n%s\n" % str(output)) | 257 self.ofh.write("output:\n%s\n" % str(output)) |
249 self.ofh.write("re.split('\\t', self.run_command(command)[0]:\n%s\n" % str(re.split('\\t', self.run_command(command)[0]))) | 258 self.ofh.write("re.split('\\t', self.run_command(command)[0]:\n%s\n" % str(re.split('\\t', self.run_command(command)[0]))) |
250 values = [] | 259 values = [] |
258 self.illumina_length_mean += values[0] | 267 self.illumina_length_mean += values[0] |
259 self.ofh.write("values[1]:\n%s\n" % str(values[1])) | 268 self.ofh.write("values[1]:\n%s\n" % str(values[1])) |
260 self.illumina_read_count += int(values[1]) | 269 self.illumina_read_count += int(values[1]) |
261 self.ofh.write("values[2]:\n%s\n" % str(values[2])) | 270 self.ofh.write("values[2]:\n%s\n" % str(values[2])) |
262 self.illumina_bases += int(values[2]) | 271 self.illumina_bases += int(values[2]) |
263 # The original PIMA code inserts self.illumina_fastq into | 272 # The original PIMA code inserts self.illumina_fastq_file into |
264 # a list for no apparent reason. We don't do that here. | 273 # a list for no apparent reason. We don't do that here. |
265 # self.illumina_length_mean /= len(self.illumina_fastq) | 274 # self.illumina_length_mean /= len(self.illumina_fastq_file) |
266 self.illumina_length_mean /= 1 | 275 self.illumina_length_mean /= 1 |
267 self.illumina_bases = self.format_kmg(self.illumina_bases, decimals=1) | 276 self.illumina_bases = self.format_kmg(self.illumina_bases, decimals=1) |
268 | 277 |
269 def start_doc(self): | 278 def start_doc(self): |
270 header_text = 'Analysis of ' + self.analysis_name | 279 header_text = 'Analysis of ' + self.analysis_name |
271 self.doc = MdUtils(file_name=self.report_md, title=header_text) | 280 self.doc = MdUtils(file_name=self.report_md, title=header_text) |
281 | |
282 def add_table_of_contents(self): | |
283 self.doc.create_marker(text_marker="TableOfContents") | |
284 self.doc.new_line() | |
285 self.doc.new_line('<div style="page-break-after: always;"></div>') | |
286 self.doc.new_line() | |
272 | 287 |
273 def add_run_information(self): | 288 def add_run_information(self): |
274 self.ofh.write("\nXXXXXX In add_run_information\n\n") | 289 self.ofh.write("\nXXXXXX In add_run_information\n\n") |
275 self.doc.new_line() | 290 self.doc.new_line() |
276 self.doc.new_header(1, 'Run information') | 291 self.doc.new_header(1, 'Run information') |
279 "Category", | 294 "Category", |
280 "Information", | 295 "Information", |
281 "Date", | 296 "Date", |
282 date.today(), | 297 date.today(), |
283 "ONT FAST5", | 298 "ONT FAST5", |
284 "N/A", | 299 self.wordwrap_markdown(self.ont_fast5), |
285 "ONT FASTQ", | 300 "ONT FASTQ", |
286 "N/A", | 301 self.wordwrap_markdown(self.ont_raw_fastq), |
287 "Illumina FASTQ", | 302 "Illumina FASTQ", |
288 self.wordwrap_markdown(self.analysis_name), | 303 self.wordwrap_markdown(self.illumina_fastq_file), |
289 "Assembly", | 304 "Assembly", |
290 self.wordwrap_markdown(self.assembly_name), | 305 self.wordwrap_markdown(self.assembly_name), |
291 "Reference", | 306 "Reference", |
292 self.wordwrap_markdown(self.dbkey), | 307 self.wordwrap_markdown(self.dbkey), |
293 ] | 308 ] |
294 self.doc.new_table(columns=2, rows=7, text=Table_list, text_align='left') | 309 self.doc.new_table(columns=2, rows=7, text=Table_list, text_align='left') |
295 self.doc.new_line() | 310 self.doc.new_line() |
311 # FIXME: the following doesn't work. | |
312 # self.add_table_of_contents() | |
296 self.doc.new_line() | 313 self.doc.new_line() |
297 | 314 |
298 def add_ont_library_information(self): | 315 def add_ont_library_information(self): |
299 self.ofh.write("\nXXXXXX In add_ont_library_information\n\n") | 316 self.ofh.write("\nXXXXXX In add_ont_library_information\n\n") |
300 if self.ont_n50 is None: | 317 if self.ont_n50 is None: |
309 "ONT reads", | 326 "ONT reads", |
310 '{:,}'.format(self.ont_read_count), | 327 '{:,}'.format(self.ont_read_count), |
311 "ONT bases", | 328 "ONT bases", |
312 '{:s}'.format(self.ont_bases), | 329 '{:s}'.format(self.ont_bases), |
313 "Illumina FASTQ", | 330 "Illumina FASTQ", |
314 self.wordwrap_markdown(self.illumina_fastq_file), | 331 self.wordwrap_markdown(self.ont_fastq_file), |
315 "Assembly", | 332 "Assembly", |
316 self.wordwrap_markdown(self.assembly_name), | 333 self.wordwrap_markdown(self.assembly_name), |
317 "Reference", | 334 "Reference", |
318 self.wordwrap_markdown(self.dbkey), | 335 self.wordwrap_markdown(self.dbkey), |
319 ] | 336 ] |
320 self.doc.new_table(columns=2, rows=7, text=Table_List, text_align='left') | 337 self.doc.new_table(columns=2, rows=7, text=Table_List, text_align='left') |
321 self.doc.new_line() | 338 self.doc.new_line() |
322 | 339 |
323 def add_illumina_library_information(self): | 340 def add_illumina_library_information(self): |
324 self.ofh.write("\nXXXXXX In add_illumina_library_information\n\n") | 341 self.ofh.write("\nXXXXXX In add_illumina_library_information\n\n") |
325 if self.illumina_length_mean == 0: | 342 if self.illumina_length_mean is None: |
326 return | 343 return |
327 self.doc.new_line() | 344 self.doc.new_line() |
328 self.doc.new_header(2, 'Illumina library statistics') | 345 self.doc.new_header(2, 'Illumina library statistics') |
329 Table_List = [ | 346 Table_List = [ |
330 "Illumina Info.", | 347 "Illumina Info.", |
384 '{if(NR == 1){sub(/+/, "", $1);s=$1}else{bp += $1;if(bp > s / 2 && f == 0){n50 = $1;f = 1}}}', | 401 '{if(NR == 1){sub(/+/, "", $1);s=$1}else{bp += $1;if(bp > s / 2 && f == 0){n50 = $1;f = 1}}}', |
385 'END{printf "%d\\t%d\\t%d\\n", n50, (NR - 1), s;exit}\'']) | 402 'END{printf "%d\\t%d\\t%d\\n", n50, (NR - 1), s;exit}\'']) |
386 result = list(re.split('\\t', self.run_command(command)[0])) | 403 result = list(re.split('\\t', self.run_command(command)[0])) |
387 if result[1] == '0': | 404 if result[1] == '0': |
388 self.error_out('No ONT reads found') | 405 self.error_out('No ONT reads found') |
389 ont_n50, ont_read_count, ont_raw_bases = [int(i) for i in result] | 406 self.ont_n50, self.ont_read_count, ont_raw_bases = [int(i) for i in result] |
390 command = ' '.join([opener, | 407 command = ' '.join([opener, |
391 fastq_file, | 408 fastq_file, |
392 '| awk \'{getline;print length($0);getline;getline;}\'']) | 409 '| awk \'{getline;print length($0);getline;getline;}\'']) |
393 result = self.run_command(command) | 410 result = self.run_command(command) |
394 result = list(filter(lambda x: x != '', result)) | 411 result = list(filter(lambda x: x != '', result)) |
395 # TODO: the following are not yet used... | 412 self.ont_bases = self.format_kmg(ont_raw_bases, decimals=1) |
396 # ont_read_lengths = [int(i) for i in result] | 413 if self.ont_n50 <= self.ont_n50_min: |
397 # ont_bases = self.format_kmg(ont_raw_bases, decimals=1) | 414 warning = 'ONT N50 (%s) is less than the recommended minimum (%s)' % (str(self.ont_n50), str(self.ont_n50_min)) |
398 if ont_n50 <= self.ont_n50_min: | |
399 warning = 'ONT N50 (%s) is less than the recommended minimum (%s)' % (str(ont_n50), str(self.ont_n50_min)) | |
400 self.assembly_notes = self.assembly_notes.append(pandas.Series(warning)) | 415 self.assembly_notes = self.assembly_notes.append(pandas.Series(warning)) |
401 | 416 |
402 def wordwrap_markdown(self, string): | 417 def wordwrap_markdown(self, string): |
403 if string: | 418 if string: |
404 if len(string) < 35: | 419 if len(string) < 35: |
765 if self.did_guppy_ont_fast5: | 780 if self.did_guppy_ont_fast5: |
766 methods += ['ONT reads were basecalled using guppy'] | 781 methods += ['ONT reads were basecalled using guppy'] |
767 if self.did_qcat_ont_fastq: | 782 if self.did_qcat_ont_fastq: |
768 methods += ['ONT reads were demultiplexed and trimmed using qcat'] | 783 methods += ['ONT reads were demultiplexed and trimmed using qcat'] |
769 self.methods[self.basecalling_methods_title] = pandas.Series(methods) | 784 self.methods[self.basecalling_methods_title] = pandas.Series(methods) |
770 self.add_illumina_library_information() | 785 # self.add_illumina_library_information() |
771 self.add_contig_info() | 786 self.add_contig_info() |
772 self.evaluate_assembly() | 787 self.evaluate_assembly() |
773 self.add_assembly_information() | 788 self.add_assembly_information() |
774 if self.flye_assembly_info_file is not None: | 789 if self.flye_assembly_info_file is not None: |
775 method = 'ONT reads were assembled using %s' % self.flye_version.rstrip('assembly info') | 790 method = 'ONT reads were assembled using %s' % self.flye_version.rstrip('assembly info') |
783 warning = 'Flye reported {:d} open contigs ({:s}); assembly may be incomplete.'.format(open_contigs.shape[0], ', '.join(open_contig_ids)) | 798 warning = 'Flye reported {:d} open contigs ({:s}); assembly may be incomplete.'.format(open_contigs.shape[0], ', '.join(open_contig_ids)) |
784 self.assembly_notes = self.assembly_notes.append(pandas.Series(warning)) | 799 self.assembly_notes = self.assembly_notes.append(pandas.Series(warning)) |
785 if self.did_medaka_ont_assembly: | 800 if self.did_medaka_ont_assembly: |
786 method = 'the genome assembly was polished using ont reads and medaka.' | 801 method = 'the genome assembly was polished using ont reads and medaka.' |
787 self.methods[self.assembly_methods_title] = self.methods[self.assembly_methods_title].append(pandas.series(method)) | 802 self.methods[self.assembly_methods_title] = self.methods[self.assembly_methods_title].append(pandas.series(method)) |
788 self.info_ont_fastq(self.illumina_fastq_file) | |
789 self.add_assembly_notes() | 803 self.add_assembly_notes() |
790 | 804 |
791 def make_tex(self): | 805 def make_tex(self): |
792 self.doc.new_table_of_contents(table_title='detailed run information', depth=2, marker="tableofcontents") | 806 self.doc.new_table_of_contents(table_title='detailed run information', depth=2, marker="tableofcontents") |
793 text = self.doc.file_data_text | 807 text = self.doc.file_data_text |
842 parser.add_argument('--feature_png_dir', action='store', dest='feature_png_dir', help='Directory of best feature hits png files') | 856 parser.add_argument('--feature_png_dir', action='store', dest='feature_png_dir', help='Directory of best feature hits png files') |
843 parser.add_argument('--flye_assembly_info_file', action='store', dest='flye_assembly_info_file', default=None, help='Flye assembly info tabular file') | 857 parser.add_argument('--flye_assembly_info_file', action='store', dest='flye_assembly_info_file', default=None, help='Flye assembly info tabular file') |
844 parser.add_argument('--flye_version', action='store', dest='flye_version', default=None, help='Flye version string') | 858 parser.add_argument('--flye_version', action='store', dest='flye_version', default=None, help='Flye version string') |
845 parser.add_argument('--genome_insertions_file', action='store', dest='genome_insertions_file', help='Genome insertions BED file') | 859 parser.add_argument('--genome_insertions_file', action='store', dest='genome_insertions_file', help='Genome insertions BED file') |
846 parser.add_argument('--gzipped', action='store_true', dest='gzipped', default=False, help='Input sample is gzipped') | 860 parser.add_argument('--gzipped', action='store_true', dest='gzipped', default=False, help='Input sample is gzipped') |
847 parser.add_argument('--illumina_fastq_file', action='store', dest='illumina_fastq_file', help='Input sample') | 861 parser.add_argument('--ont_fastq_file', action='store', dest='ont_fastq_file', help='Input sample') |
848 parser.add_argument('--kraken2_report_file', action='store', dest='kraken2_report_file', default=None, help='kraken2 report file') | 862 parser.add_argument('--kraken2_report_file', action='store', dest='kraken2_report_file', default=None, help='kraken2 report file') |
849 parser.add_argument('--kraken2_version', action='store', dest='kraken2_version', default=None, help='kraken2 version string') | 863 parser.add_argument('--kraken2_version', action='store', dest='kraken2_version', default=None, help='kraken2 version string') |
850 parser.add_argument('--minimap2_version', action='store', dest='minimap2_version', default=None, help='minimap2 version string') | 864 parser.add_argument('--minimap2_version', action='store', dest='minimap2_version', default=None, help='minimap2 version string') |
851 parser.add_argument('--mutation_regions_bed_file', action='store', dest='mutation_regions_bed_file', help='AMR mutation regions BRD file') | 865 parser.add_argument('--mutation_regions_bed_file', action='store', dest='mutation_regions_bed_file', help='AMR mutation regions BRD file') |
852 parser.add_argument('--mutation_regions_dir', action='store', dest='mutation_regions_dir', help='Directory of mutation regions TSV files') | 866 parser.add_argument('--mutation_regions_dir', action='store', dest='mutation_regions_dir', help='Directory of mutation regions TSV files') |
902 feature_png_files, | 916 feature_png_files, |
903 args.flye_assembly_info_file, | 917 args.flye_assembly_info_file, |
904 args.flye_version, | 918 args.flye_version, |
905 args.genome_insertions_file, | 919 args.genome_insertions_file, |
906 args.gzipped, | 920 args.gzipped, |
907 args.illumina_fastq_file, | |
908 args.kraken2_report_file, | 921 args.kraken2_report_file, |
909 args.kraken2_version, | 922 args.kraken2_version, |
910 args.minimap2_version, | 923 args.minimap2_version, |
911 args.mutation_regions_bed_file, | 924 args.mutation_regions_bed_file, |
912 mutation_regions_files, | 925 mutation_regions_files, |
926 args.ont_fastq_file, | |
913 args.pima_css, | 927 args.pima_css, |
914 args.plasmids_file, | 928 args.plasmids_file, |
915 args.quast_report_file, | 929 args.quast_report_file, |
916 args.reference_insertions_file, | 930 args.reference_insertions_file, |
917 args.samtools_version, | 931 args.samtools_version, |