Question: extract sequences from a fasta file and save into different files
1
gravatar for akhilvbioinfo
3.4 years ago by
akhilvbioinfo140
India, chennai
akhilvbioinfo140 wrote:

 

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.

awk sequence perl fasta • 1.4k views
ADD COMMENTlink modified 3.4 years ago by HG1.1k • written 3.4 years ago by akhilvbioinfo140

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 REPLYlink written 3.4 years ago by Nari870

yup header like this only  GCF_000196095n.fasta_2 ..

ADD REPLYlink written 3.4 years ago by akhilvbioinfo140

duplicate of : Splitting A Fasta File

ADD REPLYlink written 3.4 years ago by Pierre Lindenbaum120k
3
gravatar for Matt Shirley
3.4 years ago by
Matt Shirley9.0k
Cambridge, MA
Matt Shirley9.0k wrote:
$ pip install pyfaidx
$ faidx --split-files in.fasta
ADD COMMENTlink written 3.4 years ago by Matt Shirley9.0k
2
gravatar for HG
3.4 years ago by
HG1.1k
Germany
HG1.1k wrote:

http://emboss.sourceforge.net/apps/release/6.6/emboss/apps/seqretsplit.html

seqretsplit <input_fasta>

ADD COMMENTlink written 3.4 years ago by HG1.1k
1
gravatar for geek_y
3.4 years ago by
geek_y9.6k
Barcelona/CRG/London/Imperial
geek_y9.6k wrote:
curl https://raw.githubusercontent.com/gouthamatla/fasta_File_Manipulation/master/SplitFastaFile.py | python - <in.fasta>
ADD COMMENTlink written 3.4 years ago by geek_y9.6k

thank u sir... its working

ADD REPLYlink written 3.4 years ago by akhilvbioinfo140
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1766 users visited in the last hour