RiboCode
RiboCode copied to clipboard
Error in GTFupdate
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