chengl7-lab / scape

A package for estimating alternative polyadenylation events from scRNA-seq data.
MIT License
5 stars 1 forks source link

Error in gen_utr_annotation #6

Closed Lycidas97 closed 1 month ago

Lycidas97 commented 2 months ago

Hello,

I'm experiencing an issue with the scape gen_utr_annotation command. Here's the command I used:

scape gen_utr_annotation --gff_file /root/nfsdata/REFERENCE/GENOME/MOUSE/vm25/gencode.vM25.annotation.gff3.gz --output_dir ./ --res_file_name utr

I got error:

Traceback (most recent call last): File "/root/miniconda3/envs/scape-apa/bin/scape", line 8, in sys.exit(main()) File "/root/miniconda3/envs/scape-apa/lib/python3.10/site-packages/scape/init.py", line 5, in main cli(prog_name="scape") File "/root/miniconda3/envs/scape-apa/lib/python3.10/site-packages/click/core.py", line 1157, in call return self.main(args, kwargs) File "/root/miniconda3/envs/scape-apa/lib/python3.10/site-packages/click/core.py", line 1078, in main rv = self.invoke(ctx) File "/root/miniconda3/envs/scape-apa/lib/python3.10/site-packages/click/core.py", line 1688, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/root/miniconda3/envs/scape-apa/lib/python3.10/site-packages/click/core.py", line 1434, in invoke return ctx.invoke(self.callback, ctx.params) File "/root/miniconda3/envs/scape-apa/lib/python3.10/site-packages/click/core.py", line 783, in invoke return __callback(args, **kwargs) File "/root/miniconda3/envs/scape-apa/lib/python3.10/site-packages/scape/utils.py", line 124, in gen_utr_annotation final_utr_lst += search_utr(g, gene_rna_dict[g], annot_db, output_dir) File "/root/miniconda3/envs/scape-apa/lib/python3.10/site-packages/scape/utils.py", line 298, in search_utr utr_lst += gene_utr_df[["chrom", "start", "end", "strand", "gene_id", "gene_name"]].values.tolist() File "/root/miniconda3/envs/scape-apa/lib/python3.10/site-packages/pandas/core/frame.py", line 4108, in getitem indexer = self.columns._get_indexer_strict(key, "columns")[1] File "/root/miniconda3/envs/scape-apa/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 6200, in _get_indexer_strict self._raise_if_missing(keyarr, indexer, axis_name) File "/root/miniconda3/envs/scape-apa/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 6252, in _raise_if_missing raise KeyError(f"{not_found} not in index") KeyError: "['strand'] not in index"

I download gff file directly from gencode. Is there a specific version of the GFF file that should be used, or is there a workaround for this issue? Any guidance would be appreciated.

Thank you for your help.

chengl7 commented 2 months ago

It looks similar to this issue https://github.com/chengl7-lab/scape/issues/2

could you check if this helps?

Lycidas97 commented 2 months ago

It looks similar to this issue #2

could you check if this helps?

Thank you ! It worked perfectly.

Additionally, it might be helpful to update the documentaion to include a note about package version.

chengl7 commented 2 months ago

That is great! Currently we are short of people at this stage. I will try to get people improve the software from 1.10.2024.

chengl7 commented 1 month ago

updated now, have a try!