Open eduardopdev opened 4 years ago
Indeed, I can see that the wrong transcript is being picked up. I will look into this further, I suspect that its to do with this bit of code: https://github.com/cgat-developers/cgat-apps/blob/4ac9f37ea625dda0206075f9d3eced3113c30a17/cgat/tools/gtf2gtf.py#L958
Things are quite busy at the moment, but when I have time I will use this gene and set of transcripts to debug further.
Hello, I am wondering if there is an update on this issue, as I am also interested in extracting the longest transcript based on summed exon length.
Think this is fixed with the pull request here: https://github.com/cgat-developers/cgat-apps/pull/72
Haven't tested it extensively though.
First of all, i downloaded Araport11 from www.arabidopsis.org Then I used cgat-apps to generate a gtf file out of the file i downloaded
$ cat Araport11_GFF3_genes_transposons.201606.gff | cgat gff32gtf > Araport.gtf
and had no problems.I saw that input gtf files must be sorted. so i sorted Araport.gtf:
cat Araport.gtf | cgat gtf2gtf > Araport_sort.gtf --method=sort --sort-order=gene+transcript
and then, I filtered the sorted file by longest_transcript:
cat Araport_sort.gtf | cgat gtf2gtf > Araport_longest.gtf --method=filter --filter-method=longest-transcript
the problem is that gtf2gtf is not always selecting the transcript with the bigger length. On gene AT1G01030, for example, the sum of the length of all exons in transcript AT1G01030.1 is bigger than that of AT1G01030.2, but on Araport_longest.gtf the AT1G01030.2 transcript is selected.
Here is the AT1G01030 gene in the original Araport_sort.gtf:
And here is the same gene on the Araport_longest.gtf: