I know for the reverse procedure, there are lots of methods available. But how can I change my fasta file with sequences like:
>gi|189094002
MDDAELNAIRQARLAELQRNAAGGGSSTNPSSSSSGGAQDSAQENMTITILNRVLTNEARERLSRQQTKITFNRKNIAADDDEDDDDFFD
>gi|68485955
MDDAELNAIRQARLAELQRNAAGGGSSTNPSSSSSGGAQDSAQENMTITILNRVLTNEARERLSRVKIVRRDSQQKQQTKITFNRKNIAGDDEDDDDFFD
to like:
>gi|189094002
MDDAELNAIRQARLAELQRNAAGGGSSTNPSSSSSGGAQDSAQENMTITILNRVLTNEARERLSR
QQTKITFNRKNIAADDDEDDDDFFD
>gi|68485955
MDDAELNAIRQARLAELQRNAAGGGSSTNPSSSSSGGAQDSAQENMTITILNRVLTNEARERLSR
VKIVRRDSQQKQQTKITFNRKNIAGDDEDDDDFFD
I know its just about inserting line breaks in each sequence, but is there any way that I can check whether the fasta file is single line fasta or not, and if is, add line breaks in each sequence..
Ps. I am using windows..
Thanks for your consideration
If you plan to do more bioinformatics, do yourself (and us) a favor a switch to linux. Things will get so much easier then.
fasta_formatter from fastx tookit can do this (http://hannonlab.cshl.edu/fastx_toolkit/) -w specifies the width
Venu, I want exactly the equivalent of fold command for windows.. may be in perl or python script
Is this a homework question (since you keep asking for perl or python solution)? If all you need is a viable solution then you have plenty to choose from already.
Will this work?
https://en.wikipedia.org/wiki/Fold_(Unix)
Maybe, but not guaranteed: it might also 'fold' the description/fasta identifier and that's definitely not what you want.
See this reaction in this same thread: C: single line fasta to mult line fasta