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

Error in GTFupdate #30

Open
lbwfff opened this issue Nov 15, 2021 · 1 comment
Open

Error in GTFupdate #30

lbwfff opened this issue Nov 15, 2021 · 1 comment

Comments

@lbwfff
Copy link

lbwfff commented Nov 15, 2021

Hi, I want to use a special gtf file and want to process these files through GTFupdate, but I find that there will be some errors.
The following is the content of my gtf file:

chr1	Cufflinks	exon	11872	12227	.	+	.	gene_id "NONHSAG000001.2";gene_name "NONHSAG000001.2";transcript_id "NONHSAT000002.2"
chr1	Cufflinks	exon	12613	12721	.	+	.	gene_id "NONHSAG000001.2";gene_name "NONHSAG000001.2";transcript_id "NONHSAT000002.2"
chr1	Cufflinks	exon	13225	14412	.	+	.	gene_id "NONHSAG000001.2";gene_name "NONHSAG000001.2";transcript_id "NONHSAT000002.2"
chr1	Cufflinks	exon	11874	12227	.	+	.	gene_id "NONHSAG000001.2";gene_name "NONHSAG000001.2";transcript_id "NONHSAT000003.2"
chr1	Cufflinks	exon	12595	12721	.	+	.	gene_id "NONHSAG000001.2";gene_name "NONHSAG000001.2";transcript_id "NONHSAT000003.2"
chr1	Cufflinks	exon	13403	13655	.	+	.	gene_id "NONHSAG000001.2";gene_name "NONHSAG000001.2";transcript_id "NONHSAT000003.2"
chr1	Cufflinks	exon	13661	14409	.	+	.	gene_id "NONHSAG000001.2";gene_name "NONHSAG000001.2";transcript_id "NONHSAT000003.2"

I modified it with reference to the format of GTF_update.rst, but there are still the following errors;

Traceback (most recent call last):
  File "/home/leelee/miniconda3/envs/p3/bin/GTFupdate", line 10, in <module>
    sys.exit(main())
  File "/home/leelee/miniconda3/envs/p3/lib/python3.7/site-packages/RiboCode/GTF_update.py", line 117, in main
    gset,sourted_gset_keys = GroupGeneSubsets(args.gtfFile)
  File "/home/leelee/miniconda3/envs/p3/lib/python3.7/site-packages/RiboCode/GTF_update.py", line 34, in GroupGeneSubsets
    gid=field_dict["attr"]["gene_id"]
KeyError: 'gene_id'

How can i solve this problem?
Thanks,
LeeLee

@zhengtaoxiao
Copy link
Member

Hi, have you solved this problem? It seems that the "gene_id" attribute is missing in some lines of GTF file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants