[med-svn] [fastqc] 01/01: use new htsjdk API
Sascha Steinbiss
satta at debian.org
Thu Dec 8 15:49:56 UTC 2016
This is an automated email from the git hooks/post-receive script.
satta pushed a commit to branch master
in repository fastqc.
commit 19b42d0cd0d79c8b298e19b160cb7aa0c79ea13d
Author: Sascha Steinbiss <satta at debian.org>
Date: Thu Dec 8 15:49:39 2016 +0000
use new htsjdk API
---
debian/changelog | 7 ++++++
debian/patches/htsjdk-api.patch | 48 +++++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 56 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index f70200d..ee1abe7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+fastqc (0.11.5+dfsg-6) UNRELEASED; urgency=medium
+
+ * Team upload.
+ * Avoid use of SAMFileReader to fix FTBFS.
+
+ -- Sascha Steinbiss <satta at debian.org> Thu, 08 Dec 2016 15:40:00 +0000
+
fastqc (0.11.5+dfsg-5) unstable; urgency=medium
[ Gilles Filippini ]
diff --git a/debian/patches/htsjdk-api.patch b/debian/patches/htsjdk-api.patch
new file mode 100644
index 0000000..8d12b18
--- /dev/null
+++ b/debian/patches/htsjdk-api.patch
@@ -0,0 +1,48 @@
+Description: use correct SamReader API
+Author: Sascha Steinbiss <satta at debian.org>
+--- a/uk/ac/babraham/FastQC/Sequence/BAMFile.java
++++ b/uk/ac/babraham/FastQC/Sequence/BAMFile.java
+@@ -27,7 +27,8 @@
+
+ import htsjdk.samtools.CigarElement;
+ import htsjdk.samtools.CigarOperator;
+-import htsjdk.samtools.SAMFileReader;
++import htsjdk.samtools.SamReader;
++import htsjdk.samtools.SamReaderFactory;
+ import htsjdk.samtools.SAMFormatException;
+ import htsjdk.samtools.SAMRecord;
+ import htsjdk.samtools.ValidationStringency;
+@@ -44,7 +45,7 @@
+ // only way to access the file pointer.
+ private FileInputStream fis;
+
+- private SAMFileReader br;
++ private SamReader br;
+ private String name;
+ private Sequence nextSequence = null;
+ Iterator<SAMRecord> it;
+@@ -55,12 +56,10 @@
+ fileSize = file.length();
+ name = file.getName();
+ this.onlyMapped = onlyMapped;
+-
+- SAMFileReader.setDefaultValidationStringency(ValidationStringency.SILENT);
+-
+- fis = new FileInputStream(file);
+
+- br = new SAMFileReader(fis);
++ SamReaderFactory srf = SamReaderFactory.makeDefault().validationStringency(ValidationStringency.SILENT);
++
++ br = srf.open(file);
+
+ it = br.iterator();
+ readNext();
+@@ -135,7 +134,7 @@
+ // through the file.
+ if (recordSize == 0) {
+ recordSize = (record.getReadLength()*2)+150;
+- if (br.isBinary()) {
++ if (br.type() == SamReader.Type.BAM_TYPE || br.type() == SamReader.Type.CRAM_TYPE) {
+ recordSize /= 4;
+ }
+ }
diff --git a/debian/patches/series b/debian/patches/series
index 6f96f87..3cd2634 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@ fix-help-call.patch
set_configuration_path.patch
adapt_to_htslib.patch
drop-fast5.patch
+htsjdk-api.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/fastqc.git
More information about the debian-med-commit
mailing list