# HG changeset patch
# User bgruening
# Date 1423524281 18000
# Node ID 243e8f9fb75ba658bbdd667d4ec4e639b415d802
# Parent 91f07ff056cad410f5eeefd3365b9b40928b0507
Uploaded
diff -r 91f07ff056ca -r 243e8f9fb75b bismark_bowtie2_wrapper.xml
--- a/bismark_bowtie2_wrapper.xml Mon Apr 14 16:43:14 2014 -0400
+++ b/bismark_bowtie2_wrapper.xml Mon Feb 09 18:24:41 2015 -0500
@@ -7,14 +7,20 @@
samtools
bowtie2
-
+
+
+
+
+
+
+
@@ -213,7 +222,7 @@
-
+
- singlePaired['sPaired'] == "paired"
- params['settingsType'] == "custom"
- params['supressed_read_file'] is True
+
+ ((
+ singlePaired['sPaired'] == "paired" and
+ params['settingsType'] == "custom" and
+ params['suppressed_read_file'] is True
+ ))
+
@@ -295,9 +308,9 @@
-
+
@@ -319,18 +332,22 @@
-
+
- singlePaired['sPaired'] == "paired"
- params['settingsType'] == "custom"
- params['unmapped_read_file'] is True
+
+ ((
+ singlePaired['sPaired'] == "paired" and
+ params['settingsType'] == "custom" and
+ params['unmapped_read_file'] is True
+ ))
+
@@ -339,9 +356,9 @@
-
+
@@ -352,6 +369,7 @@
+
+
+ 10.1093/bioinformatics/btr167
+
diff -r 91f07ff056ca -r 243e8f9fb75b bismark_bowtie_wrapper.xml
--- a/bismark_bowtie_wrapper.xml Mon Apr 14 16:43:14 2014 -0400
+++ b/bismark_bowtie_wrapper.xml Mon Feb 09 18:24:41 2015 -0500
@@ -7,11 +7,17 @@
samtools
bowtie
-
+
+
+
+
+
+
+
@@ -191,7 +201,7 @@
-
+
@@ -271,9 +281,9 @@
-
+
@@ -295,9 +305,9 @@
-
+
@@ -314,21 +324,20 @@
-
+
-
-
+
+
+ 10.1093/bioinformatics/btr167
+
diff -r 91f07ff056ca -r 243e8f9fb75b bismark_methylation_extractor.xml
--- a/bismark_methylation_extractor.xml Mon Apr 14 16:43:14 2014 -0400
+++ b/bismark_methylation_extractor.xml Mon Feb 09 18:24:41 2015 -0500
@@ -9,11 +9,12 @@
+
@@ -187,11 +189,12 @@
+
diff -r 91f07ff056ca -r 243e8f9fb75b bismark_wrapper.py
--- a/bismark_wrapper.py Mon Apr 14 16:43:14 2014 -0400
+++ b/bismark_wrapper.py Mon Feb 09 18:24:41 2015 -0500
@@ -17,7 +17,6 @@
def __main__():
- print 'tempfile_location',tempfile.gettempdir()
#Parse Command Line
parser = argparse.ArgumentParser(description='Wrapper for the bismark bisulfite mapper.')
parser.add_argument( '-p', '--num-threads', dest='num_threads',
@@ -258,9 +257,6 @@
# Final bismark command:
cmd = cmd % arguments
- print 'bismark_cmd:', cmd
- #sys.stderr.write( cmd )
- #sys.exit(1)
# Run
try:
tmp_out = tempfile.NamedTemporaryFile().name
@@ -321,8 +317,8 @@
"""
#tmp_out = tempfile.NamedTemporaryFile( dir=output_dir ).name
tmp_stdout = open( tmp_out, 'wab' )
- tmp_err = tempfile.NamedTemporaryFile( dir=output_dir ).name
- tmp_stderr = open( tmp_err, 'wb' )
+ #tmp_err = tempfile.NamedTemporaryFile( dir=output_dir ).name
+ tmp_stderr = open( tmp_err, 'wab' )
tmp_res = tempfile.NamedTemporaryFile( dir= output_dir).name
@@ -338,18 +334,22 @@
if returncode != 0:
raise Exception, open( tmp_stderr.name ).read()
else:
- tmp_res = bam_files[0]
+ tmp_res = bam_files[0]
bam_path = "%s" % tmp_res
if os.path.exists( bam_path ):
- if args.sort_bam:
- cmd = 'samtools sort -@ %s %s %s' % (args.num_threads, bam_path, args.output)
- else:
- shutil.copy( bam_path, args.output )
+ if args.sort_bam:
+ cmd = 'samtools sort -@ %s %s sorted_bam' % (args.num_threads, bam_path)
+ proc = subprocess.Popen( args=shlex.split( cmd ) )
+ returncode = proc.wait()
+ if returncode != 0:
+ raise Exception("Error during '%s'" % cmd)
+ shutil.move( 'sorted_bam.bam', args.output )
+ else:
+ shutil.move( bam_path, args.output )
else:
stop_err( 'BAM file no found:\n' + str( bam_path ) )
-
# TODO: look for errors in program output.
diff -r 91f07ff056ca -r 243e8f9fb75b tool_dependencies.xml
--- a/tool_dependencies.xml Mon Apr 14 16:43:14 2014 -0400
+++ b/tool_dependencies.xml Mon Feb 09 18:24:41 2015 -0500
@@ -1,7 +1,7 @@
-
+
$REPOSITORY_INSTALL_DIR