This is a test version of Biostars. For the public version, visit https://www.biostars.org.
from fasta to gtf format?

Dear Biostars community,

I have a fasta file containing the sequences of a set of genes (with coordinates in the header). The fasta file is obtained after performing de novo assembly by a former colleague. I want to see if those genes are differentially expressed between two samples. Since I don't have the .gtf file of those genes, I don't know how to perform the DE analysis.

What I did:

I performed an alignment of the two samples against the reference genome (the same genome already used to obtain the fasta file containing the genes), and obtained .bam files. To get the matrix of count per read per sample, I need to provide a gtf file to htseq-count. But I don't know how to convert the fasta file to a gtf file?

Any help?

gtf de fasta

I have a fasta file containing the sequences of a set of genes (with coordinates in the header).

If your reference only contained the gene fasta you could simply use samtools idxstats to get read counts for each entry.

I have a fasta file containing the sequences of a set of genes (with coordinates in the header).

If you show some example, we can suggest how to convert them to GFF if possible

I'm going to revive this post.

Assuming that you have a fasta file called Homo_sapiens.GRCh38.dna_rm.toplevel.fa with positional information in the header of each sequence (it's a masked sequences file from ENSEMBL, fyi):

head -10000000 Homo_sapiens.GRCh38.dna_rm.toplevel.fa | sed -n '1,3p; 4149276,4149278p; 8185836, 8185838p'
>1 dna_rm:chromosome chromosome:GRCh38:1:1:248956422:1 REF
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
>2 dna_rm:chromosome chromosome:GRCh38:2:1:242193529:1 REF
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
>3 dna_rm:chromosome chromosome:GRCh38:3:1:198295559:1 REF
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN

How do I convert it to gtf/gff format?

0 answers

No answers yet.

Log in to answer this question.