Skip to content

Commit

Permalink
Update run_scanpyQC_rna.py
Browse files Browse the repository at this point in the history
Update calc_proportions default
  • Loading branch information
wlason authored Nov 6, 2024
1 parent b36d582 commit 4d7dd15
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions panpipes/python_scripts/run_scanpyQC_rna.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
default=None,
help="path to file containing list of genes to quantify")
parser.add_argument("--calc_proportions",
default="mitochondrial,ribosomal",
default=None,
help="which list of genes to use to calc proportion of mapped reads over total,per cell?")
parser.add_argument("--score_genes",
default=None,
Expand Down Expand Up @@ -125,11 +125,12 @@
L.error("You have not provided a list of custom genes to use for QC purposes")
sys.exit("You have not provided a list of custom genes to use for QC purposes")

for kk in calc_proportions:
xname= kk
gene_list = cat_dic[kk]
rna.var[xname] = [x in gene_list for x in rna.var_names] # annotate the group of hb genes as 'hb'
qc_vars.append(xname)
if args.calc_proportions is not None and args.calc_proportions != 'None':
for kk in calc_proportions:
xname = kk
gene_list = cat_dic[kk]
rna.var[xname] = [x in gene_list for x in rna.var_names] # annotate the group of hb genes as 'hb'
qc_vars.append(xname)

qc_info = ""
if qc_vars != []:
Expand Down Expand Up @@ -173,4 +174,3 @@
mdata.write(args.outfile)

L.info("Done")

0 comments on commit 4d7dd15

Please sign in to comment.