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

Hi

I have the transcript.gtf file from cufflinks. I would like to identify novel long non_coding RNA using lncRScan.

I need to convert the gtf file to bed file and bed file to fasta file.

any suggestion would be appreciated.

Thanks

bed conversion rna-seq fasta

3 answers

gtf to bed

getFastaFromBed

Based on this comment, if you want a direct gtf/gff -> fasta conversion:

gffread your_transcripts.gff -g genomic_reference.fasta -w your_transcripts.fasta​

Here's a one-liner via gtf2bed and bed2faidx:

$ gtf2bed < annotations.gtf | bed2faidx > annotations.fa

You'll need samtools and samtools-indexed FASTA files to run bed2faidx.

Log in to answer this question.