Closed marbeno closed 7 years ago
Hi- Thanks for reporting this. Setting name for GTF files is not supported (yet) and it's been on my TODO list for a while. I haven't used this feature much so I left it behind. Indeed the documentation should mention this.
GFF features should work though. For example:
ASCIIGenome ftp://ftp.ensembl.org/pub/release-89/gff3/homo_sapiens/Homo_sapiens.GRCh38.89.chromosome.Y.gff3.gz
...
[h] for help: gffNameAttr Alias .*gff
Could you post a few lines of or a link to your GFF file? (What version of ASCIIGenome are you running? Check with ASCIIGenome -v
).
Hi,
thank you for your answer. I am using ASCIIGenome 1.7.0.
I tried gffNameAttr gene_name hg19_genes.gtf .*gff
on a .gtf file since gtf and gff2 are basically the same format, as it also described here: issue #46
I'll try with a gff3.
Hi again, I created a gff3 file from the gtf, which looks like chr1 unknown exon 11874 12227 . + . gene_id=DDX11L1;transcript_id=NR_046018_1;gene_name=DDX11L1;tss_id=TSS14523 chr1 unknown exon 12613 12721 . + . gene_id=DDX11L1;transcript_id=NR_046018_1;gene_name=DDX11L1;tss_id=TSS14523 chr1 unknown exon 13221 14408 . + . gene_id=DDX11L1;transcript_id=NR_046018_1;gene_name=DDX11L1;tss_id=TSS14523 chr1 unknown exon 14362 14829 . - . gene_id=WASH7P;transcript_id=NR_024540;gene_name=WASH7P;tss_id=TSS7359 chr1 unknown exon 14970 15038 . - . gene_id=WASH7P;transcript_id=NR_024540;gene_name=WASH7P;tss_id=TSS7359 chr1 unknown exon 15796 15947 . - . gene_id=WASH7P;transcript_id=NR_024540;gene_name=WASH7P;tss_id=TSS7359 chr1 unknown exon 16607 16765 . - . gene_id=WASH7P;transcript_id=NR_024540;gene_name=WASH7P;tss_id=TSS7359 chr1 unknown exon 16858 17055 . - . gene_id=WASH7P;transcript_id=NR_024540;gene_name=WASH7P;tss_id=TSS7359 chr1 unknown exon 17233 17368 . - . gene_id=WASH7P;transcript_id=NR_024540;gene_name=WASH7P;tss_id=TSS7359 chr1 unknown exon 17606 17742 . - . gene_id=WASH7P;transcript_id=NR_024540;gene_name=WASH7P;tss_id=TSS7359
However, when I try to find a gene, I get:
java.lang.NullPointerException at tracks.TrackIntervalFeature.flatListOfPrintableFeatures(TrackIntervalFeature.java:1008) at tracks.TrackIntervalFeature.stackFeatures(TrackIntervalFeature.java:634) at tracks.TrackIntervalFeature.printToScreen(TrackIntervalFeature.java:509) at tracks.Track.concatTitleAndTrack(Track.java:723) at samTextViewer.TrackProcessor.iterateTracks(TrackProcessor.java:76) at samTextViewer.InteractiveInput.processInput(InteractiveInput.java:405) at samTextViewer.Main.main(Main.java:198) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Hi- Thanks for sharing this. I fixed this on my local code and I hope to upload soon a version with this bug fixed together with support for naming gtf features.
For the record, the reason you get the ugly error is that your GFF has only feature type "exon" in the 3rd column but no "transcript" or other feature type that can be used to group exons into transcripts.
Neither
gffNameAttr gene_name hg19_genes.gtf .*gtf
norgffNameAttr gene_name hg19_genes.gtf .*gff
works. Changing attribute (e.g. transcript_id) doesn't work either.