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

I am using Homo_sapiens.GRCh38.84.gtf from ENSEMBL for mapping. For post alignment QC using RseQC I need bed file. From where can I get one? I tried using BEDOps but the gtf file doesnot match with the format gtf2bed file uses.

rna-seq bed ngs

1 answer

It's expecting a BED12 file. Here's the rule I use in my Makefile to do the gtf to bed12 conversion:

%.bed: %.gtf
        awk '{if ($$3 != "gene") print $$0;}' $< \
        | grep -v "^#" \
        | /package/UCSCtools/gtfToGenePred /dev/stdin /dev/stdout \
        | /package/UCSCtools/genePredToBed stdin $@

gtfToGenePred and genePredToBed can be downloaded from UCSC. The removal of gene entries are due to them breaking these tools (likewise, you have to remove any comment lines).

Log in to answer this question.