This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Order by length sequence

Hi everyone.

I want to order a fasta file where i have 35000 sequences with different length in nucleotides. But i don't know how to do it.

Examples:

>contig_1
AAATCGAAACTAGACCATAGC
>contig_2
AAAAAACGTACAGAC
>contig_3
TTTTCGACAAACGAAAACGATTAGCCCAGAC

i want to ordering like this (from shorter to larger length):

>contig_1
AAAAAACGTACAGAC
>contig_2
AAATCGAAACTAGACCATAGC
>contig_3
TTTTCGACAAACGAAAACGATTAGCCCAGAC

I already red another post how to rearrange fasta file according to its length and there is a script but i think that is bad because doesn't run when a ran it.

Please help.

rna-seq rna-seq next-gen sequence

You can also use SEDA. The Sort operation (under Choose operation / Reformatting) allows you to order by sequence length.

1 answer

Please use the search function, this has been adressed before:

how to rearrange fasta file according to its length

How To Filter Multi Fasta By Length??

Order contig by size

Log in to answer this question.