This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Create A Consensus Of Very Short Sequences

Imagine I have a set of sequences in fastq format where the actual sequence look like this:

TAGGGTTGGGCCTGACAAGTCAT
TAGGGTTGGGCCTGACAAGTCAT
TAGGGTTGGGCCTGACAAGTCAT
TAGGGTTGGGCCTGACAAGTCAT
TAGGGTTGGGCCTGACAAGTCAT
TAGGGTTGGGCCTGACAAGTCAT
TAGGGTTGGGCCTGACAAGTCAG

Imagine these little tags all stem (theoretically speaking) from the same template. The last G in the last sequence is likely to be a sequencing error. Is there a way to go:

./magicalprogram in.fastq > out.fastq

where out.fastq would contain: TAGGGTTGGGCCTGACAAGTCAT as this is the consensus

Thanks !

consensus sequence sequencing alignment

In theory, yes, in practice, no

3 answers

CD-Hit or Usearch are good programs for this

Take a look at the biopython section entitled: 18.3.2 Calculating a quick consensus sequence

It should be very easy to use it in a simple script to achieve your objective

Thank you ! Does someone happen to have a ready made script ?

If you're looking to correct sequencing errors, you might try the soon-to-be published Blue software package. It takes FASTQ or FASTA as input.

There are other tools available too; "sequence error correction software" are your search terms.

Log in to answer this question.