Skip to content

Commit

Permalink
qc/reporting: trap for '10x_reads_per_cell' not being integer in 'Sam…
Browse files Browse the repository at this point in the history
…pleQCReporter.get_10x_value()'.
  • Loading branch information
pjbriggs committed Dec 16, 2024
1 parent 3b17f62 commit 10fab5e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion auto_process_ngs/qc/reporting.py
Original file line number Diff line number Diff line change
Expand Up @@ -2429,7 +2429,14 @@ def get_10x_value(self,field,cellranger_data,metrics,web_summary,
# Cellranger 8.0.0 doesn't output median
# reads so fall back to mean
value = metrics.mean_reads_per_cell
value = pretty_print_reads(value)
try:
# Assume that reads per cell is an
# integer and trap if it isn't (e.g.
# '---')
value = pretty_print_reads(int(value))
except ValueError:
# Not an integer - report as a string
value = str(value)
elif field == "10x_genes_per_cell":
value = pretty_print_reads(metrics.median_genes_per_cell)
elif field == "10x_frac_reads_in_cell":
Expand Down

0 comments on commit 10fab5e

Please sign in to comment.