This is a test version of Biostars. For the public version, visit https://www.biostars.org.
GFF3 to fasta (error)

Hi im trying to extract some sequences from my GFF3 file to fasta but when I run this:

$   bedtools getfasta -fi Muschr4.fsa -bed Muschr4.fsa.mod.pass.list.gff3 -fo ERVCom.fa

I get

WARNING. chromosome (seq0) was not found in the FASTA file. Skipping.
WARNING. chromosome (seq0) was not found in the FASTA file. Skipping.
WARNING. chromosome (seq0) was not found in the FASTA file. Skipping.
WARNING. chromosome (seq0) was not found in the FASTA file. Skipping.
gff3 fasta

Do chromosome identifiers match in fasta and GFF files? That is the first thing to check. These are warnings so they may be benign.

Paste the output of these commands here

grep ">" Muschr4.fsa | head -10

AND

grep ">" Muschr4.fsa | grep "seq0"
intirules@Biointi:~/Desktop/Tesis/Secuencias/PruebaRetriever$ grep ">" Muschr4.fsa | head -10

>NC_000070.6 Mus musculus strain C57BL/6J chromosome 4, GRCm38.p4 C57BL/6J

intirules@Biointi:~/Desktop/Tesis/Secuencias/PruebaRetriever$ grep ">" Muschr4.fsa | grep "seq0"

intirules@Biointi:~/Desktop/Tesis/Secuencias/PruebaRetriever$

Then i tried with bed but still no working

It looks like you have things named seq0 in your GFF file but not in fasta file. Can you confirm by grep "seq0" your_gff | head -5

Please use ADD COMMENT/ADD REPLY when responding to existing posts to keep threads logically organized.

1 answer

awk '{if ($1~/[0-9]+/) print $10"\t"$1}' Muschr4.fsa.mod.pass.list > Muschr4.fsa.mod.pass.list.extract
perl $path/LTR_retriever/bin/call_seq_by_list.pl Muschr4.fsa.mod.pass.list.extract -C Muschr4.fsa.mod > Muschr4.fsa.mod.pass.list.extract.fa

This solved it

Log in to answer this question.