Question: extract sequences from a fasta file and save into different files
1
gravatar for akhilvbioinfo
4.4 years ago by
akhilvbioinfo150
India, chennai
akhilvbioinfo150 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.7k views
ADD COMMENTlink modified 4.4 years ago by HG1.1k • written 4.4 years ago by akhilvbioinfo150

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 modified 5 months ago by RamRS27k • written 4.4 years ago by Nari880

yup header like this only GCF_000196095n.fasta_2 ..

ADD REPLYlink modified 5 months ago by RamRS27k • written 4.4 years ago by akhilvbioinfo150

duplicate of : Splitting A Fasta File

ADD REPLYlink written 4.4 years ago by Pierre Lindenbaum128k
3
gravatar for Matt Shirley
4.4 years ago by
Matt Shirley9.3k
Cambridge, MA
Matt Shirley9.3k wrote:
$ pip install pyfaidx
$ faidx --split-files in.fasta
ADD COMMENTlink modified 5 months ago by RamRS27k • written 4.4 years ago by Matt Shirley9.3k
2
gravatar for HG
4.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 modified 5 months ago by RamRS27k • written 4.4 years ago by HG1.1k
1
gravatar for geek_y
4.4 years ago by
geek_y11k
Barcelona
geek_y11k wrote:
curl https://raw.githubusercontent.com/gouthamatla/fasta_File_Manipulation/master/SplitFastaFile.py | python - <in.fasta>
ADD COMMENTlink modified 5 months ago by RamRS27k • written 4.4 years ago by geek_y11k

thank u sir... its working

ADD REPLYlink modified 5 months ago by RamRS27k • written 4.4 years ago by akhilvbioinfo150
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: 1585 users visited in the last hour