This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Find Protein Id From Gff File For Results Of Cufflinks

I have transcripts.gtf file from cufflinks and gff file from JGI. How can I find the protein id from gff file for each transcript in transcripts.gtf?

protein id gff cufflinks

Are you saying that transcript ID appears in both files and you want to know how to match? It would help to see an example line and example IDs from each file.

1 answer

BEDOPS gtf2bed, gff2bed and bedmap could perhaps help, if the GTF and GFF inputs follow specification:

$ gtf2bed < transcripts.gtf > transcripts.bed
$ gff2bed < proteinIds.gff > proteinIds.bed
$ bedmap --echo --echo-map-id-uniq transcripts.bed proteinIds.bed > answer.bed

The file answer.bed will contain transcript elements from the GTF file, along with a semi-colon-delimited list of unique protein IDs from the GFF file, where the GFF element overlaps the Cufflinks-sourced transcript by one or more bases.

Log in to answer this question.