<p>I used <a href="http://www.biostars.org/post/show/2822/extracting-multiple-fasta-sequences-at-a-time-from-a-file-containing-many-sequences/#2823">this piece of biopython codes</a> written by <a href="http://www.biostars.org/user/profile/216/">Eric Normandeau</a> to parse several sequences from a Fasta file.  The codes worked nicely. I would like to have my parsed output from this format </p>

<pre><code>&gt;DR179241 similar to UniRef100_A5HIY3 Cluster: Thaumatin-like protein; n=1; ...... ATAATCTTTAGATCAGTCATCAATCTCAACAGTATCGCTTTCAATTCTCTTTCATATTGC ATGGAAGTGTGTAAATACAATTAGGGCATTCATTGAGTTGACTTCATTTAAGCGCT......
</code></pre>

<p>exactly like this format:</p>

<pre><code>&gt;DR179241
ATAATCTTTAGATCAGTCATCAATCTCAACAGTATCGCTTTCAATTCTCTTTCATATTGC
ATGGAAGTGTGTAAATACAATTAGGGCATTCATTGAGTTGACTTCATTTAAGCGCT......
</code></pre>

<p>Could anyone kindly please light me for example how to modify <a href="http://www.biostars.org/post/show/2822/extracting-multiple-fasta-sequences-at-a-time-from-a-file-containing-many-sequences/#2823">this piece of biopython codes</a> written by <a href="http://www.biostars.org/user/profile/216/">Eric Normandeau</a> in order to suit my purpose? </p>

<p>Thank you very much and have a nice day.</p>

You could do this in R, using <a href="http://pbil.univ-lyon1.fr/software/seqinr/">seqinR</a>:

    library(seqinr)
    x=read.fasta("yourfile.fasta")
    write.fasta(x,file="newfile.fasta",names=names(x))