NAME

SortFastaByCount.pl - Sort a preprocessed fasta file by their counts, showing the most abundant sequeces at the top


SYNOPSIS

 # call of the script, specifying all required + possible parameters.
 SortFastaByCount.pl --input fastafile.fa --output trimmedsequences.fa


OPTIONS

--input

The input file. Has to be a multiple fasta file. Fasta entries must have the 'count' property. Mandatory parameter

--output

The output file. Will be a fasta file. Mandatory parameter

--help

Display the help pages


DESCRIPTION

General

This script sorts the fasta entries of a preprocessed file according to the count property. The most abundant sequences will be shown on top. Remember that preprocessing aggregates identical reads and tallies the counts.

Input

Multiple fasta files. For example:

 >43||Count=12
 GAAATTTAAGAAACAATTATAATCCAC
 >44||Count=1
 ATTCGCGTTCAGCTGAGGCAGAGTGATGGT
 >45||Count=2
 TCCCTGTGGTCTATTGTTTATGATTCGGCT
 >46||Count=23
 TCCCGGGGCGTCTAGTGGTTAGGGTTTGGCG
 >47||Count=6
 TTCCTGTTGTCTAGTGGTTAGG

Output

A sorted multiple fasta file. For example:

 >46||Count=23
 TCCCGGGGCGTCTAGTGGTTAGGGTTTGGCG
 >43||Count=12
 GAAATTTAAGAAACAATTATAATCCAC
 >47||Count=6
 TTCCTGTTGTCTAGTGGTTAGG
 >45||Count=2
 TCCCTGTGGTCTATTGTTTATGATTCGGCT
 >44||Count=1
 ATTCGCGTTCAGCTGAGGCAGAGTGATGGT


REQUIREMENTS

Perl 5.8 or higher


AUTHORS

Robert Kofler

Heinz Himmelbauer


CONTACT

robert.kofler at crg.es