This is a test version of Biostars. For the public version, visit https://www.biostars.org.
bedtools getfasta chromosome not found

I am having the same problem as this post: Trouble with bedtools getfasta

When I run the following command, I get this warning for every chromosome and the output fasta is empty:

bedtools getfasta -fi GRCm38.p6.genome.fasta -bed e2f5_R1.seacr.peaks.stringent.bed -fo e2f5_R1.seacr.peaks.fasta
WARNING. chromosome (1) was not found in the FASTA file. Skipping.

However, here is the result of running the following code:

file GRCm38.p6.genome.fasta
GRCm38.p6.genome.fasta: ASCII text

My bed file head:

1       6213822 6215942 291.2   0.492455        1:6214772-6214794
1       9629223 9632268 339.898 0.346799        1:9630315-9630327
1       9699289 9701242 274.547 0.388415        1:9700690-9700691
1       13371903        13374929        340.765 0.575686        1:13372731-13372736
1       16103645        16107372        638.665 0.645046        1:16105565-16105568
1       23255565        23257926        358.188 0.679726        1:23256351-23256352
1       34438613        34440337        361.67  0.957165        1:34439596-34439625
1       36307174        36310195        383.227 0.582622        1:36307847-36307911
1       36469694        36472463        379.391 0.547943        1:36471579-36471580
1       36938872        36940595        357.647 1.08895 1:36939697-36939840

Thanks in advance if you are able to help.

bedtools fasta getfasta

1 answer

Check the chromosomes on the rasta have the same notation in the bed: "1" vs "chr1"

Log in to answer this question.