extract sequences from a fasta file and save into different files
3
1
Entering edit mode
8.9 years ago
Eva_Maria ▴ 190

Hey I have a fasta file which contains more than 80 sequences. I want to take each sequences in different files and the file name should be header of corresponding sequence.

perl sequence awk fasta • 3.5k views
ADD COMMENT
0
Entering edit mode

That's simple but the header should not contain illegal characters for a filename i.e. \ / : * ? " < > |

a simple loop will do that if one takes care of these chars.

ADD REPLY
0
Entering edit mode

yup header like this only GCF_000196095n.fasta_2 ..

ADD REPLY
0
Entering edit mode

duplicate of : Splitting A Fasta File

ADD REPLY
3
Entering edit mode
8.9 years ago
$ pip install pyfaidx
$ faidx --split-files in.fasta
ADD COMMENT
2
Entering edit mode
ADD COMMENT
1
Entering edit mode
ADD COMMENT
0
Entering edit mode

thank u sir... its working

ADD REPLY

Login before adding your answer.

Traffic: 2628 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6