This is a test version of Biostars. For the public version, visit https://www.biostars.org.
add gene names in bed file

Hi Everyone

I converted the gtf file I got from stringtie to bed. The bed still contains the stringtie gene and transcripts code (same thing if I used cufflinks instead) , is there a way to post-process this bed file to have real gene names and transcripts not stringtie nor cufflinks ids:

chrY    23451597    23451912    STRG.80985.1    0   .   23451597    23451912    0   1   315,    0,
chrY    23460655    23460996    STRG.80986.1    0   .   23460655    23460996    0   1   341,    0,
chrY    23464508    23464868    STRG.80987.1    0   .   23464508    23464868    0   1   360,    0,

Thanks

bed annotations

Intersect with gtf with known genes

Thank you cpad0112 and EagleEye, I will give this a try :)

1 answer

You could use BEDOPS bedmap to annotate regions with genes (or their names):

$ bedmap --echo --echo-map-id regions.bed genes.bed > answer.bed

If you edit your question to note the genome you're working with, I can suggest where to get annotations to build the genes.bed file.

human genome hg19 :) Thanks. it works now, I needed to convert my own transcripts to bed.

Log in to answer this question.