[med-svn] [tophat] 01/01: fix tophat compatibility with recent samtools
Fabian Klötzl
kloetzl-guest at moszumanska.debian.org
Wed Dec 6 14:41:55 UTC 2017
This is an automated email from the git hooks/post-receive script.
kloetzl-guest pushed a commit to branch master
in repository tophat.
commit a7b57930efd2d93fab3e62e044a6e8c3b850c3fe
Author: Fabian Klötzl <fabian at kloetzl.info>
Date: Wed Dec 6 15:35:05 2017 +0100
fix tophat compatibility with recent samtools
---
debian/changelog | 1 +
.../fix-compatibility-with-recent-samtools.patch | 58 ++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 60 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index b6d8265..66d78fd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,7 @@ tophat (2.1.1+dfsg-5) UNRELEASED; urgency=medium
[ Fabian Klötzl ]
* remove convenience copy of samtools.
Closes: #780816
+ * adapt tophat script to recent samtools version
[ Andreas Tille ]
* Remove unused license paragraph
diff --git a/debian/patches/fix-compatibility-with-recent-samtools.patch b/debian/patches/fix-compatibility-with-recent-samtools.patch
new file mode 100644
index 0000000..5e04ead
--- /dev/null
+++ b/debian/patches/fix-compatibility-with-recent-samtools.patch
@@ -0,0 +1,58 @@
+From: =?utf-8?q?Fabian_Kl=C3=B6tzl?= <fabian at kloetzl.info>
+Date: Wed, 6 Dec 2017 15:32:12 +0100
+Subject: fix compatibility with recent samtools
+
+---
+ src/tophat.py | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/tophat.py b/src/tophat.py
+index 1eed276..4b8bbb1 100755
+--- a/src/tophat.py
++++ b/src/tophat.py
+@@ -182,7 +182,7 @@ use_BWT_FIFO = False # can only be set to True if use_zpacker is True and only w
+ unmapped_reads_fifo = None # if use_BWT_FIFO is True, this tricks bowtie into writing the
+ # unmapped reads into a compressed file
+
+-samtools_path = "samtools_0.1.18"
++samtools_path = "samtools"
+ bowtie_path = None
+ fail_str = "\t[FAILED]\n"
+ gtf_juncs = None #file name with junctions extracted from given GFF file
+@@ -1162,7 +1162,7 @@ def nonzeroFile(filepath):
+ head_cmd = ["head", "-1"]
+ head = subprocess.Popen(head_cmd, stdin=samtools_view.stdout, stdout=subprocess.PIPE)
+
+- samtools_view.stdout.close() # as per http://bugs.python.org/issue7678
++ # samtools_view.stdout.close() # as per http://bugs.python.org/issue7678
+ output = head.communicate()[0][:-1]
+
+ if len(output) > 0:
+@@ -1569,7 +1569,7 @@ def get_samtools_version():
+ def check_samtools():
+ #th_log("Checking for Samtools")
+ global samtools_path
+- samtools_path=prog_path("samtools_0.1.18")
++ samtools_path=prog_path("samtools")
+ #samtools_version_str, samtools_version_arr = get_samtools_version()
+ #if samtools_version_str == None:
+ if not samtools_path:
+@@ -2744,16 +2744,16 @@ def compile_reports(params, sam_header_filename, ref_fasta, mappings, readfiles,
+
+ if params.report_params.sort_bam:
+ pids = [0 for i in range(num_bam_parts)]
+- sorted_bam_parts = ["%s%d_sorted" % (alignments_output_filename, i) for i in range(num_bam_parts)]
++ sorted_bam_parts = ["%s%d_sorted.bam" % (alignments_output_filename, i) for i in range(num_bam_parts)]
+ #left_um_parts = ["%s%s%d_sorted" % (alignments_output_filename, i) for i in range(num_bam_parts)]
+ #right_um_parts = ["%s%d_sorted" % (alignments_output_filename, i) for i in range(num_bam_parts)]
+ for i in range(num_bam_parts):
+ bamsort_cmd = [samtools_path,
+ "sort",
+ bam_parts[i],
++ "-o",
+ sorted_bam_parts[i]]
+
+- sorted_bam_parts[i] += ".bam"
+ print >> run_log, " ".join(bamsort_cmd)
+
+ if i + 1 < num_bam_parts:
diff --git a/debian/patches/series b/debian/patches/series
index 32c87aa..da7befd 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ remove_3rd_party_code.patch
fix_includes_path.patch
fix-gcc6.patch
remove-convenience-copy-of-samtools.patch
+fix-compatibility-with-recent-samtools.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/tophat.git
More information about the debian-med-commit
mailing list