Skip to content

Commit

Permalink
Catch cases where numbers include commas (#7)
Browse files Browse the repository at this point in the history
* Catch cases where numbers include commas

* bump version
  • Loading branch information
dfornika authored Nov 27, 2023
1 parent 6dd79ed commit 9dd1a85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions bin/qualimap_bamqc_genome_results_to_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,16 @@ def main(args):
general_error_rate = line.split('=')[1].strip()
output_data['error_rate'] = round(float(general_error_rate), 2)
if line.startswith('number of mismatches'):
number_of_mismatches = line.split('=')[1].strip()
number_of_mismatches = line.split('=')[1].strip().replace(',', '')
output_data['number_of_mismatches'] = int(number_of_mismatches)
if line.startswith('number of insertions'):
number_of_insertions = line.split('=')[1].strip()
number_of_insertions = line.split('=')[1].strip().replace(',', '')
output_data['number_of_insertions'] = int(number_of_insertions)
if line.startswith('mapped reads with insertion percentage'):
mapped_reads_with_insertion_percentage = line.split('=')[1].strip().replace('%', '')
output_data['mapped_reads_with_insertion_percentage'] = round(float(mapped_reads_with_insertion_percentage), 2)
if line.startswith('number of deletions'):
number_of_deletions = line.split('=')[1].strip()
number_of_deletions = line.split('=')[1].strip().replace(',', '')
output_data['number_of_deletions'] = int(number_of_deletions)
if line.startswith('mapped reads with deletion percentage'):
mapped_reads_with_deletion_percentage = line.split('=')[1].strip().replace('%', '')
Expand Down
2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ manifest {
description = 'Alignment and variant calling pipeline'
mainScript = 'main.nf'
nextflowVersion = '>=20.01.0'
version = '0.1.2'
version = '0.1.3'
}

params {
Expand Down

0 comments on commit 9dd1a85

Please sign in to comment.