Commit a0621b00 by Eric Coissac

Add an option to illuminapairedend to take into account the illunima index file

parent 59f5ab4d
......@@ -6,6 +6,9 @@
.. cmdoption:: -r <FILENAME>, --reverse-reads=<FILENAME>
Filename points to the file containing the reverse reads.
.. cmdoption:: --index-file=<FILENAME>
Filename points to the file containing the illumina index reads
.. cmdoption:: --score-min=<FLOAT>
......
......@@ -54,6 +54,7 @@ from obitools.format.options import addInputFormatOption,addOutputFormatOption,\
from itertools import chain
import cPickle
import math
from obitools.fastq._fastq import fastqIterator
def addSolexaPairEndOptions(optionManager):
optionManager.add_option('-r','--reverse-reads',
......@@ -63,6 +64,14 @@ def addSolexaPairEndOptions(optionManager):
default=None,
help="Filename containing reverse solexa reads "
)
optionManager.add_option('--index-file',
action="store", dest="indexfile",
metavar="<FILENAME>",
type="str",
default=None,
help="Filename containing illumina index reads "
)
optionManager.add_option('--sanger',
action="store_const", dest="seqinformat",
default=None,
......@@ -248,6 +257,11 @@ if __name__ == '__main__':
reverse = allEntryIterator([options.reverse],options.readerIterator)
sequences=seqPairs(direct,reverse)
if options.indexfile is not None:
indexfile = fastqIterator(options.indexfile)
else:
indexfile = None
writer = sequenceWriterGenerator(options)
ba = alignmentIterator(sequences)
......@@ -265,6 +279,10 @@ if __name__ == '__main__':
consensus['sminR']=options.sminR
else:
consensus = buildConsensus(ali)
if indexfile is not None:
i = str(indexfile.next())
consensus['illumina_index']=i
writer(consensus)
......
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