Our Sponsors



Download BioinformaticsOnline(BOL) Apps in your chrome browser.

Freelancer

AdvertiseWithUs

Question: Question: How to extract sequence from a multifasta file?

Neelam Jha
302 days ago

Question: How to extract sequence from a multifasta file?

Extract "Seq2" from the list below

>Seq1
GTGCACTAAGAAAAATAAAATTTGTTCTTTTAAGATAATCATTTC
CTGGACGAATATCAATAGCAATAGAATAAGTCCAATCAAATGAT
TGCCGTGATGAACGAACTTGTAATTGTTGATAACTAGAACCAT
GCTGTAAACAAAATTTTGATGACCATTGTGGTCGACCTTCTTGT
TGACGATGTAAACCATTTCCAACTCGCATAACACATGTATTATTA
CGCTGAGCATTATCGAAAGAAAGAAGAAGT
>Seq2
CAGGGCCAGCGCCGCCGACAGGCCGGTGAAGCCGCCGCCGA
CGATGGCCACGTCCACCTGCGCCGGCAGGTCTTGCGACCGCG
GCACGAAGGCGGGGGCGGAATCGGTCCAGTACGGGTCGAGCT
TCATGGCGGCGGCGAGGGGCGGGAAGGGCAGCGTTCGATCAG
GGGCCGGGGTTCAGAGACCCACCACGCCGGGCAGGCCGCCGA
TGTCCTGGATCTCGACATAGCGATAGGCCGGGTTGCCCGGGC

Answers
0

Try samtools

$ samtools faidx multifile.fa

$ samtools faidx multifile.fa Seq2 > Seq2.fa

0

I always try faSomeRecords, to extract. It is lil handy.

See BIOCONDA https://bioconda.github.io/recipes/ucsc-fasomerecords/README.html

This seems interesting tool indeed. The BIOCONDA name is funny ;)

Abhimanyu Singh 301 days ago

0

You can also try this, if you have lists of ids

grep -A1 -w -f id.txt seqFile.fasta > output.fasta