Skip to content
Snippets Groups Projects
Commit 79526d57 authored by Venkat Malladi's avatar Venkat Malladi
Browse files

Fix output.

parent f545947d
No related merge requests found
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
import os import os
import argparse import argparse
import shutil import shutil
import shlex
import logging import logging
from multiprocessing import cpu_count from multiprocessing import cpu_count
import utils import utils
...@@ -60,17 +59,17 @@ def check_tools(): ...@@ -60,17 +59,17 @@ def check_tools():
def xcor(tag, paired): def xcor(tag, paired):
'''Use spp to calculate cross-correlation stats.''' '''Use spp to calculate cross-correlation stats.'''
tag_basename = tag.rstrip('.gz') tag_basename = os.path.basename(utils.strip_extensions(tag, ['.gz']))
uncompressed_tag_filename = tag_basename uncompressed_tag_filename = tag_basename
out, err = utils.run_pipe(['gzip -d %s' % (tag_basename)]) out, err = utils.run_pipe([
'gzip -dc %s > ' % (tag)], outfile=uncompressed_tag_filename)
# Subsample tagAlign file # Subsample tagAlign file
NREADS = 15000000 NREADS = 15000000
subsampled_tag_filename = \ subsampled_tag_filename = \
tag_basename + \ tag_basename + ".%d.tagAlign.gz" % (NREADS/1000000)
".%d.tagAlign.gz" % (NREADS/1000000)
steps = [ steps = [
'grep -v "chrM" %s' % (uncompressed_tag_filename), 'grep -v "chrM" %s' % (uncompressed_tag_filename),
'shuf -n %d --random-source=%s' % (NREADS, uncompressed_tag_filename) 'shuf -n %d --random-source=%s' % (NREADS, uncompressed_tag_filename)
......
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