Commit 8e4e7cf4 by Eric Coissac

Patch a bug in the creation of a new index

parent e1d2d52e
......@@ -17,6 +17,8 @@ import sys
import re
from orgasm.utils.dna import reverseComplement # @UnresolvedImport
#from orgasm.files import uopen
import zlib
from collections import Counter, deque
from sys import stderr
......@@ -456,23 +458,28 @@ def run(config):
fconvert = False
rconvert = False
# forward = uopen(forward)
#
# if reverse is not None:
# reverse = uopen(reverse)
if forward[-3:]=='.gz':
logger.info('Forward file compressed by gzip')
forward = ungzip(forward,nopipe)
if forward[-4:]=='.bz2':
logger.info('Forward file compressed by bzip2')
forward = unbzip(forward,nopipe)
if reverse is not None and reverse[-3:]=='.gz':
logger.info('Reverse file compressed by gzip')
reverse = ungzip(reverse,nopipe)
if reverse is not None and reverse[-4:]=='.bz2':
logger.info('Reverse file compressed by bzip2')
reverse = unbzip(reverse,nopipe)
cforward = readFastq(forward)
creverse = readFastq(reverse) if reverse is not None else None
......@@ -541,7 +548,7 @@ def run(config):
if not os.path.exists('%s.odx' % output ):
os.makedirs('%s.odx' % output )
command = ['orgasmi','-o %s.odx/index' % output]
command = ['orgasmi','-o','%s.odx/index' % output]
if config['index']['maxread'] is not None:
command.append('-M')
......@@ -564,6 +571,7 @@ def run(config):
if not nopipe:
os.mkfifo(reverse)
command.append(forward)
command.append(reverse)
......
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