getfasta not working

710 views
Skip to first unread message

nikhilb...@gmail.com

unread,
Apr 16, 2018, 9:49:02 AM4/16/18
to bedtools-discuss
I have been trying to run getfasta command with bed tools.
My command is : bedtools getfasta -fi output.fasta -bed ref.bed -fo extraxted.fa.out


my Bed file looks like
NC_000962.3    0    4411532    region    0    +
NC_000962.3    0    1524    gene    0    +
NC_000962.3    0    1524    CDS    0    +
NC_000962.3    2051    3260    gene    0    +
NC_000962.3    2051    3260    CDS    0    +
NC_000962.3    3279    4437    gene    0    +
NC_000962.3    3279    4437    CDS    0    +
NC_000962.3    4433    4997    gene    0    +
NC_000962.3    4433    4997    CDS    0    +
NC_000962.3    5239    7267    gene    0    +
NC_000962.3    5239    7267    CDS    0    +
NC_000962.3    7301    9818    gene    0    +
NC_000962.3    7301    9818    CDS    0    +
NC_000962.3    9913    10828    gene    0    +
NC_000962.3    9913    10828    CDS    0    +
NC_000962.3    10886    10960    gene    0    +
NC_000962.3    10886    10960    tRNA    0    +
NC_000962.3    10886    10960    exon    0    +
NC_000962.3    11111    11184    gene    0    +
NC_000962.3    11111    11184    tRNA    0    +
NC_000962.3    11111    11184    exon    0    +
NC_000962.3    11873    12311    gene    0    -

My input fasta (named as output.fa) looks like :
>1
TTGACCGATGACCCCGGTTCAGGCTTCACCACAGTGTGGAACGCGGTCGTCTCCGAACTT
AACGGCGACCCTAAGGTTGACGACGGACCCAGCAGTGATGCTAATCTCAGCGCTCCGCTG
ACCCCTCAGCAAAGGGCTTGGCTCAATCTCGTCCAGCCATTGACCATCGTCGAGGGGTTT
GCTCTGTTATCCGTGCCGAGCAGCTTTGTCCAAAACGAAATCGAGCGCCATCTGCGGGCC
CCGATTACCGACGCTCTCAGCCGCCGACTCGGACATCAGATCCAACTCGGGGTCCGCATC
GCTCCGCCGGCGACCGACGAAGCCGACGACACTACCGTGCCGCCTTCCGAAAATCCTGCT
ACCACATCGCCAGACACCACAACCGACAACGACGAGATTGATGACAGCGCTGCGGCACGG
GGCGATAACCAGCACAGTTGGCCAAGTTACTTCACCGAGCGCCCGCACAATACCGATTCC
GCTACCGCTGGCGTAACCAGCCTTAACCGTCGCTACACCTTTGATACGTTCGTTATCGGC
GCCTCCAACCGGTTCGCGCACGCCGCCGCCTTGGCGATCGCAGAAGCACCCGCCCGCGCT
TACAACCCCCTGTTCATCTGGGGCGAGTCCGGTCTCGGCAAGACACACCTGCTACACGCG
GCAGGCAACTATGCCCAACGGTTGTTCCCGGGAATGCGGGTCAAATATGTCTCCACCGAG
GAATTCACCAACGACTTCATTAACTCGCTCCGCGATGACCGCAAGGTCGCATTCA

I am getting the following error:
WARNING. chromosome (NC_000962.3) was not found in the FASTA file. Skipping.
WARNING. chromosome (NC_000962.3) was not found in the FASTA file. Skipping.
WARNING. chromosome (NC_000962.3) was not found in the FASTA file. Skipping.
WARNING. chromosome (NC_000962.3) was not found in the FASTA file. Skipping.
WARNING. chromosome (NC_000962.3) was not found in the FASTA file. Skipping.
WARNING. chromosome (NC_000962.3) was not found in the FASTA file. Skipping.
WARNING. chromosome (NC_000962.3) was not found in the FASTA file. Skipping.
WARNING. chromosome (NC_000962.3) was not found in the FASTA file. Skipping.
WARNING. chromosome (NC_000962.3) was not found in the FASTA file. Skipping.
WARNING. chromosome (NC_000962.3) was not found in the FASTA file. Skipping.
WARNING. chromosome (NC_000962.3) was not found in the FASTA file. Skipping.

What wrong am i doing? please help asap.

Aaron Quinlan

unread,
Apr 16, 2018, 4:56:48 PM4/16/18
to nikhilb...@gmail.com, bedtools...@googlegroups.com
Hi,

The getfasta tool (and all others like it) will only work if the chromosome names in both your BED and FASTA files are the same. Situations where BED uses one format (e.g., NC_000962.3) and FASTA uses another (e.g., “1”) cannot be resolved because the tool doesn’t know how to map from one naming system to another.  Could you somehow get the BED file to use chromosome numbers rather than Refseq accession numbers?

Aaron
--
You received this message because you are subscribed to the Google Groups "bedtools-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bedtools-discu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages