ebi-gene-expression-group / scanpy-scripts

Scripts for using scanpy
Apache License 2.0
30 stars 13 forks source link

Fix mito calculations #106

Closed pinin4fjords closed 3 years ago

pinin4fjords commented 3 years ago

This is a fix to https://github.com/ebi-gene-expression-group/scanpy-scripts/pull/104

That PR addressed the case where the mito column was pre-populated but mito filtering was NOT activated. Unfortunately when the mito column is pre-populated and the filtering by pct_counts_mito IS activated things fail because the column is not available yet (I hadn't understood that logic correctly). This fixes thing call sc.pp.calculate_qc_metrics() early in the process so the column becomes available for filtering at the time the columns are checked.

pinin4fjords commented 3 years ago

Closing. This was actually due the mito column being non-boolean due to https://github.com/ebi-gene-expression-group/atlas-gene-annotation-manipulation/pull/3.