Commit 8e4e7cf4 by Eric Coissac

Patch a bug in the creation of a new index

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