Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ingest qc score fix 2 #318

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion panpipes/panpipes/pipeline_ingest/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ custom_genes_file: resources/qc_genelist_1.0.csv

# (for pipeline_ingest.py)
calc_proportions: hb,mt,rp
score_genes:
score_genes: MarkersNeutro

# cell cycle action
ccgenes: default
Expand Down
14 changes: 7 additions & 7 deletions panpipes/python_scripts/run_scanpyQC_rna.py
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch @wlason setting None in the python script will kick in if nothing is specified in the pipeline.yml. (current default in the pipeline.yml is MarkersNeutro but the change you have introduced ensures that None is the intended parameter)

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")

Loading