Bastien
Chevreux
bach@chevreux.org

> Solomon Short

> Just when you think it's finally settled, it isn't.

# Bits and pieces

## Using SSAHA2 / SMALT to screen for vector sequence

If your sequencing provider gave you data which was NOT pre-clipped for vector sequence, you can do this yourself in a pretty robust manner using SSAHA2 -- or the successor, SMALT -- from the Sanger Centre. You just need to know which sequencing vector the provider used and have its sequence in FASTA format (ask your provider).

This screening is a valid method for any type of Sanger sequencing vectors, 454 adaptors, Illumina adaptors and paired-end adaptors etc. However, you probably want to use it only for Sanger type data as MIRA already knows all standard 454, Ion Torrent and Illumina adaptors.

SSAHA2 and SMALT need their input data to be in FASTA format, so for these to run you will need them also in FASTA format. For MIRA however you can load your original data in whatever format it was present.

For SSAHA2 follow these steps (most are the same as in the example above):

    $ ssaha2 -output ssaha2
      -kmer 8 -skip 1 -seeds 1 -score 12 -cmatch 9 -ckmer 6
      /path/where/the/vector/data/resides/vector.fasta
      yourinputsequences.fasta > screendataforyoursequences.ssaha2

Then, in your manifest file, add the following line in the readgroup which contains the sequences you screened:

    readgroup
    ...
    data = yourinputsequences_inwhateverformat_thisexamplehasfastq.fastq
    data = screendataforyoursequences.ssaha2
    ...

For SMALT, the only difference is that you use SMALT for generating the vector-screen file and ask SMALT to generate it in SSAHA2 format. As SMALT works in two steps (indexing and then mapping), you also need to perform it in two steps and then call MIRA. E.g.:

    $ smalt index -k 7 -s 1 smaltidxdb /path/where/the/vector/data/resides/vector.fasta
    $ smalt map -f ssaha -d -1 -m 7 smaltidxdb yourinputsequences.fasta > screendataforyoursequences.smalt

Please note that, due to subtle differences between output of SSAHA2 (in ssaha2 format) and SMALT (in ssaha2 format), MIRA identifies the source of the screening (and the parsing method it needs) by the name of the screen file. Therefore, screens done with SSAHA2 need to have the postfix `.ssaha2` in the file name and screens done with SMALT need `*.smalt`.