This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Linearizing Mixed Fasta

How can I linearize mixed fasta?

 >Seq1
 ACGT
 >Seq2
 CGTAGT
 >Seq3
 CGTAGTCGTAGT
 CTA
 >Seq4
 ATGC

It should look something like this:

 sed '/^G\|A\|C\|T/s/\n//g'

But it's not working and I don't know how to command sed not to substitute one line sequnces.

linux fasta

this post was closed. Please, keep it open to redirect the future queries.

2 answers

With Biopieces:

read_fasta -i in.fna | write_tab -o out.tab -x

Concatenated fasta is sometimes also called vienna format. Here's an awk script to convert it.

Andreas

Log in to answer this question.