Commit def04bbe by Eric Coissac

Doc of illuminapairedend

parent 75343a47
#!/usr/local/bin/python
'''
:py:mod:`solexaPairEnd` : align overlapping pair-end solexa reads and return the consensus sequence together with its quality
:py:mod:`illuminapairedend`: aligns paired end Illumina reads
=============================================================================================================================
.. codeauthor:: Eric Coissac <eric.coissac@metabarcoding.org>
:py:mod:`solexaPairEnd` aims at aligning the two reads of a pair-end library sequenced using a Solexa.
:py:mod:`illuminapairedend` aims at aligning the two reads of a pair-end library sequenced
using an Illumina platform.
The program takes for arguments one or two fastq solexa sequences reads files.
In the case where two files are given one should be associated with the -r option. Sequences corresponding to the same read pair must have the same line number in the two files.
In the case where one file is provided, sequences, which are supposed to be all of the same length, are considered to be the concatenation of the two pair end reads. Hence
the first half of a sequence is considered one extremity of the pair-end and the second half the other one.
- If the two reads overlap, it returns the consensus sequence together with its quality
- Otherwise, it concatenates sequence merging the forward read and
the reversed-complemented reverse read.
The program uses as input one or two :doc:`fastq <../fastq>` sequences reads files.
:py:mod:`solexaPairEnd` align the first sequence with the reverse complement of the second sequence and report the consensus sequence of the alignment (taking into account
the base qualities) together with the qualities for each base of the reported consensus sequence.
- If two files are used one of them must be specified using the ``-r`` option.
Sequence records corresponding to the same read pair must be in the same order
in the two files.
- If just one file is provided, sequence records are supposed to be all of the same length.
The first half of the sequence is used as forward read, the second half is used as the reverse
read.
.. code-block:: bash
:py:mod:`illuminapairedend` align the forward sequence record with the reverse complement of the
reverse sequence record. The alignment algorithm takes into account the base qualities.
> solexaPairEnd -r seq3P.fasta seq5P.fasta > seq.fasta
*Example:*
.. code-block:: bash
> illuminapairedend -r seq3P.fastq seq5P.fastq > seq.fastq
The ``seq5P.fastq`` sequence file contains the forward sequence records.
The ``seq3P.fastq`` sequence file contains the reverse sequence records.
Pairs of reads are aligned together and the consensus sequence is stored in the
`` seq.fastq`` file.
'''
......
......@@ -189,5 +189,5 @@ def buildConsensus(ali):
seq['ali_length']=len(seq)-ic.seqASingle-ic.seqBSingle
if seq['ali_length']>0:
seq['score_norm']=float(ali.score)/seq['ali_length']
seq['mode']='alignement'
seq['mode']='alignment'
return seq
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment