all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] gnu: bedtools: Update to 2.24.0.
@ 2015-07-24 15:07 Ben Woodcroft
  2015-07-24 15:11 ` Ricardo Wurmus
  2015-07-25  4:03 ` Mark H Weaver
  0 siblings, 2 replies; 10+ messages in thread
From: Ben Woodcroft @ 2015-07-24 15:07 UTC (permalink / raw)
  To: guix-devel@gnu.org

[-- Attachment #1: Type: text/plain, Size: 213 bytes --]

There was some discussion of this on the bio-packaging list re changes 
in usage with Ricardo, but I think it breaks any dependent packages.
http://lists.open-bio.org/pipermail/bio-packaging/2015-July/000113.html

[-- Attachment #2: 0001-gnu-bedtools-Update-to-2.24.0.patch --]
[-- Type: text/x-patch, Size: 1285 bytes --]

From 3fd0b0c655c5f4f4317636f05d8242e2de9ae075 Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrustben@gmail.com>
Date: Fri, 24 Jul 2015 23:11:31 +1000
Subject: [PATCH] gnu: bedtools: Update to 2.24.0.

* gnu/packages/bioinformatics.scm (bedtools): Update to 2.24.0.
---
 gnu/packages/bioinformatics.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 78cd3ce..9cd661b 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -148,7 +148,7 @@ computational cluster.")
 (define-public bedtools
   (package
     (name "bedtools")
-    (version "2.22.0")
+    (version "2.24.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://github.com/arq5x/bedtools2/archive/v"
@@ -156,7 +156,7 @@ computational cluster.")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "16aq0w3dmbd0853j32xk9jin4vb6v6fgakfyvrsmsjizzbn3fpfl"))))
+                "0lnxrjvs3nnmb4bmskag1wg3h2hd80przz5q3xd0bvs7vyxrvpbl"))))
     (build-system gnu-build-system)
     (native-inputs `(("python" ,python-2)))
     (inputs `(("samtools" ,samtools)
-- 
2.4.3


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] gnu: bedtools: Update to 2.24.0.
  2015-07-24 15:07 [PATCH] gnu: bedtools: Update to 2.24.0 Ben Woodcroft
@ 2015-07-24 15:11 ` Ricardo Wurmus
  2015-07-25  3:32   ` Ben Woodcroft
  2015-07-25  4:03 ` Mark H Weaver
  1 sibling, 1 reply; 10+ messages in thread
From: Ricardo Wurmus @ 2015-07-24 15:11 UTC (permalink / raw)
  To: Ben Woodcroft; +Cc: guix-devel@gnu.org


Ben Woodcroft <b.woodcroft@uq.edu.au> writes:

> There was some discussion of this on the bio-packaging list re changes 
> in usage with Ricardo, but I think it breaks any dependent packages.
> http://lists.open-bio.org/pipermail/bio-packaging/2015-July/000113.html

Did you mean “I *don’t* think it breaks any dependent packages”?
Because that’s what I think :)

Only ‘pybedtools’ uses the ‘bedtools’ package, and only ‘clipper’ uses
‘pybedtools’.  ‘pybedtools’ is unlikely to be affected by a change in
command line behaviour.

~~ Ricardo

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] gnu: bedtools: Update to 2.24.0.
  2015-07-24 15:11 ` Ricardo Wurmus
@ 2015-07-25  3:32   ` Ben Woodcroft
  0 siblings, 0 replies; 10+ messages in thread
From: Ben Woodcroft @ 2015-07-25  3:32 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel@gnu.org

On 25/07/15 01:11, Ricardo Wurmus wrote:
> Ben Woodcroft <b.woodcroft@uq.edu.au> writes:
>
>> There was some discussion of this on the bio-packaging list re changes
>> in usage with Ricardo, but I think it breaks any dependent packages.
>> http://lists.open-bio.org/pipermail/bio-packaging/2015-July/000113.html
> Did you mean “I *don’t* think it breaks any dependent packages”?
> Because that’s what I think :)
Yeh sorry was half asleep watching Le Tour.
> Only ‘pybedtools’ uses the ‘bedtools’ package, and only ‘clipper’ uses
> ‘pybedtools’.  ‘pybedtools’ is unlikely to be affected by a change in
> command line behaviour.
I built these two packages locally without incident.

ben

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] gnu: bedtools: Update to 2.24.0.
  2015-07-24 15:07 [PATCH] gnu: bedtools: Update to 2.24.0 Ben Woodcroft
  2015-07-24 15:11 ` Ricardo Wurmus
@ 2015-07-25  4:03 ` Mark H Weaver
  2015-07-25  9:02   ` Andreas Enge
  1 sibling, 1 reply; 10+ messages in thread
From: Mark H Weaver @ 2015-07-25  4:03 UTC (permalink / raw)
  To: Ben Woodcroft; +Cc: guix-devel

Ben Woodcroft <b.woodcroft@uq.edu.au> writes:

> From 3fd0b0c655c5f4f4317636f05d8242e2de9ae075 Mon Sep 17 00:00:00 2001
> From: Ben Woodcroft <donttrustben@gmail.com>
> Date: Fri, 24 Jul 2015 23:11:31 +1000
> Subject: [PATCH] gnu: bedtools: Update to 2.24.0.

Pushed, thanks!

     Mark

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] gnu: bedtools: Update to 2.24.0.
  2015-07-25  4:03 ` Mark H Weaver
@ 2015-07-25  9:02   ` Andreas Enge
  2015-07-25 12:57     ` Ben Woodcroft
  0 siblings, 1 reply; 10+ messages in thread
From: Andreas Enge @ 2015-07-25  9:02 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

Hello,

unfortunately, it seems to fail in 32 bit (i686 and mips):
   http://hydra.gnu.org/eval/105733#tabs-new
   
with lots of messages of the kind
   In file included from ../../utils//general/BedtoolsTypes.h:20:0,
                 from ContextBase.h:21,
                 from ContextIntersect.h:11,
                 from ContextIntersect.cpp:8:
../../utils//general/QuickString.h:41:15: error: ‘QuickString& QuickString::operator=(size_t)’ cannot be overloaded
  QuickString &operator = (size_t);

Andreas

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] gnu: bedtools: Update to 2.24.0.
  2015-07-25  9:02   ` Andreas Enge
@ 2015-07-25 12:57     ` Ben Woodcroft
  2015-07-25 13:02       ` Ben Woodcroft
  0 siblings, 1 reply; 10+ messages in thread
From: Ben Woodcroft @ 2015-07-25 12:57 UTC (permalink / raw)
  To: Andreas Enge, Mark H Weaver; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 726 bytes --]

On 25/07/15 19:02, Andreas Enge wrote:
> Hello,
>
> unfortunately, it seems to fail in 32 bit (i686 and mips):
>     http://hydra.gnu.org/eval/105733#tabs-new
>     
> with lots of messages of the kind
>     In file included from ../../utils//general/BedtoolsTypes.h:20:0,
>                   from ContextBase.h:21,
>                   from ContextIntersect.h:11,
>                   from ContextIntersect.cpp:8:
> ../../utils//general/QuickString.h:41:15: error: ‘QuickString& QuickString::operator=(size_t)’ cannot be overloaded
>    QuickString &operator = (size_t);
Helpfully this is fixed in upstream though it hasn't yet made it to a 
release. Attached is a new patch that hopefully will help.

ben

[-- Attachment #2: 0001-gnu-bedtools-Update-to-2.24.0.patch --]
[-- Type: text/x-patch, Size: 1476 bytes --]

From 47519e0145298c00e4bfa672d92b9f700d12f5ad Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrustben@gmail.com>
Date: Sat, 25 Jul 2015 22:54:19 +1000
Subject: [PATCH] gnu: bedtools: Update to 2.24.0.

* gnu/packages/bioinformatics.scm (bedtools): Update to 2.24.0.
---
 gnu/packages/bioinformatics.scm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 78cd3ce..738d559 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -148,7 +148,7 @@ computational cluster.")
 (define-public bedtools
   (package
     (name "bedtools")
-    (version "2.22.0")
+    (version "2.24.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://github.com/arq5x/bedtools2/archive/v"
@@ -156,7 +156,10 @@ computational cluster.")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "16aq0w3dmbd0853j32xk9jin4vb6v6fgakfyvrsmsjizzbn3fpfl"))))
+                "0lnxrjvs3nnmb4bmskag1wg3h2hd80przz5q3xd0bvs7vyxrvpbl"))
+              ;; Fixed in upstream, see
+              ;; https://github.com/arq5x/bedtools2/issues/271
+              (patches (list (search-patch "bedtools-32bit-compilation.patch")))))
     (build-system gnu-build-system)
     (native-inputs `(("python" ,python-2)))
     (inputs `(("samtools" ,samtools)
-- 
2.4.3


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] gnu: bedtools: Update to 2.24.0.
  2015-07-25 12:57     ` Ben Woodcroft
@ 2015-07-25 13:02       ` Ben Woodcroft
  2015-07-25 13:10         ` Andreas Enge
  0 siblings, 1 reply; 10+ messages in thread
From: Ben Woodcroft @ 2015-07-25 13:02 UTC (permalink / raw)
  To: Andreas Enge, Mark H Weaver; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 170 bytes --]



On 25/07/15 22:57, Ben Woodcroft wrote:
> gnu: bedtools: Update to 2.24.0.
>
> * gnu/packages/bioinformatics.scm (bedtools): Update to 2.24.0.

Sorry try this instead.

[-- Attachment #2: 0001-gnu-bedtools-Update-to-2.24.0.patch --]
[-- Type: text/x-patch, Size: 7747 bytes --]

From 8220fe64f34a77a2307c9f0caca69decaf9f7b61 Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrustben@gmail.com>
Date: Sat, 25 Jul 2015 22:58:08 +1000
Subject: [PATCH] gnu: bedtools: Update to 2.24.0.

* gnu/packages/bioinformatics.scm (bedtools): Update to 2.24.0.
---
 gnu/packages/bioinformatics.scm                    |   7 +-
 .../patches/bedtools-32bit-compilation.patch       | 168 +++++++++++++++++++++
 2 files changed, 173 insertions(+), 2 deletions(-)
 create mode 100644 gnu/packages/patches/bedtools-32bit-compilation.patch

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 78cd3ce..738d559 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -148,7 +148,7 @@ computational cluster.")
 (define-public bedtools
   (package
     (name "bedtools")
-    (version "2.22.0")
+    (version "2.24.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://github.com/arq5x/bedtools2/archive/v"
@@ -156,7 +156,10 @@ computational cluster.")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "16aq0w3dmbd0853j32xk9jin4vb6v6fgakfyvrsmsjizzbn3fpfl"))))
+                "0lnxrjvs3nnmb4bmskag1wg3h2hd80przz5q3xd0bvs7vyxrvpbl"))
+              ;; Fixed in upstream, see
+              ;; https://github.com/arq5x/bedtools2/issues/271
+              (patches (list (search-patch "bedtools-32bit-compilation.patch")))))
     (build-system gnu-build-system)
     (native-inputs `(("python" ,python-2)))
     (inputs `(("samtools" ,samtools)
diff --git a/gnu/packages/patches/bedtools-32bit-compilation.patch b/gnu/packages/patches/bedtools-32bit-compilation.patch
new file mode 100644
index 0000000..0a4e710
--- /dev/null
+++ b/gnu/packages/patches/bedtools-32bit-compilation.patch
@@ -0,0 +1,168 @@
+From b47dbefcb57f8e6c4fe397f64346338620740b71 Mon Sep 17 00:00:00 2001
+From: arq5x <arq5x@virginia.edu>
+Date: Wed, 15 Jul 2015 15:15:23 -0600
+Subject: [PATCH] settle on uint32_t signature for QuickString. Resolves #267
+ and #271?
+
+---
+ src/coverageFile/coverageFile.cpp | 24 ++++++++++++------------
+ src/utils/general/QuickString.cpp | 27 ++++++++++++++-------------
+ src/utils/general/QuickString.h   |  6 +++---
+ 3 files changed, 29 insertions(+), 28 deletions(-)
+
+diff --git a/src/coverageFile/coverageFile.cpp b/src/coverageFile/coverageFile.cpp
+index 859cfdc..0fb544b 100644
+--- a/src/coverageFile/coverageFile.cpp
++++ b/src/coverageFile/coverageFile.cpp
+@@ -83,11 +83,11 @@ void CoverageFile::giveFinalReport(RecordOutputMgr *outputMgr) {
+ 		float depthPct = (float)basesAtDepth / (float)_totalQueryLen;
+ 
+ 		_finalOutput = "all\t";
+-		_finalOutput.append(depth);
++		_finalOutput.append(static_cast<uint32_t>(depth));
+ 		_finalOutput.append("\t");
+-		_finalOutput.append(basesAtDepth);
++		_finalOutput.append(static_cast<uint32_t>(basesAtDepth));
+ 		_finalOutput.append("\t");
+-		_finalOutput.append(_totalQueryLen);
++		_finalOutput.append(static_cast<uint32_t>(_totalQueryLen));
+ 		_finalOutput.append("\t");
+ 		format(depthPct);
+ 
+@@ -138,7 +138,7 @@ size_t CoverageFile::countBasesAtDepth(size_t depth) {
+ 
+ void CoverageFile::doCounts(RecordOutputMgr *outputMgr, RecordKeyVector &hits)
+ {
+-	_finalOutput = hits.size();
++	_finalOutput = static_cast<uint32_t>(hits.size());
+ 	outputMgr->printRecord(hits.getKey(), _finalOutput);
+ }
+ 
+@@ -147,9 +147,9 @@ void CoverageFile::doPerBase(RecordOutputMgr *outputMgr, RecordKeyVector &hits)
+ 	//loop through all bases in query, printing full record and metrics for each
+ 	const Record * queryRec = hits.getKey();
+ 	for (size_t i= 0; i < _queryLen; i++) {
+-		_finalOutput = i +1;
++		_finalOutput = static_cast<uint32_t>(i+1);
+ 		_finalOutput.append("\t");
+-		_finalOutput.append(_depthArray[i]);
++		_finalOutput.append(static_cast<uint32_t>(_depthArray[i]));
+ 
+ 		outputMgr->printRecord(queryRec, _finalOutput);
+ 	}
+@@ -181,11 +181,11 @@ void CoverageFile::doHist(RecordOutputMgr *outputMgr, RecordKeyVector &hits)
+ 		size_t numBasesAtDepth = iter->second;
+ 		float coveredBases = (float)numBasesAtDepth / (float)_queryLen;
+ 
+-		_finalOutput = depth;
++		_finalOutput = static_cast<uint32_t>(depth);
+ 		_finalOutput.append("\t");
+-		_finalOutput.append(numBasesAtDepth);
++		_finalOutput.append(static_cast<uint32_t>(numBasesAtDepth));
+ 		_finalOutput.append("\t");
+-		_finalOutput.append(_queryLen);
++		_finalOutput.append(static_cast<uint32_t>(_queryLen));
+ 		_finalOutput.append("\t");
+ 		format(coveredBases);
+ 
+@@ -199,11 +199,11 @@ void CoverageFile::doDefault(RecordOutputMgr *outputMgr, RecordKeyVector &hits)
+ 	size_t nonZeroBases = _queryLen - countBasesAtDepth(0);
+ 	float coveredBases = (float)nonZeroBases / (float)_queryLen;
+ 
+-	_finalOutput = hits.size();
++	_finalOutput = static_cast<uint32_t>(hits.size());
+ 	_finalOutput.append("\t");
+-	_finalOutput.append(nonZeroBases);
++	_finalOutput.append(static_cast<uint32_t>(nonZeroBases));
+ 	_finalOutput.append("\t");
+-	_finalOutput.append(_queryLen);
++	_finalOutput.append(static_cast<uint32_t>(_queryLen));
+ 	_finalOutput.append("\t");
+ 	format(coveredBases);
+ 
+diff --git a/src/utils/general/QuickString.cpp b/src/utils/general/QuickString.cpp
+index 0757009..a83263e 100644
+--- a/src/utils/general/QuickString.cpp
++++ b/src/utils/general/QuickString.cpp
+@@ -105,11 +105,11 @@ QuickString &QuickString::operator = (uint32_t val) {
+ 	return *this;
+ }
+ 
+-QuickString &QuickString::operator = (size_t val) {
+-	clear();
+-	append(val);
+-	return *this;
+-}
++// QuickString &QuickString::operator = (size_t val) {
++// 	clear();
++// 	append(val);
++// 	return *this;
++// }
+ 
+ QuickString &QuickString::operator = (float val) {
+ 	clear();
+@@ -158,10 +158,11 @@ QuickString &QuickString::operator += (uint32_t num) {
+ 	return *this;
+ }
+ 
+-QuickString &QuickString::operator += (size_t num) {
+-	append(num);
+-	return *this;
+-}
++// QuickString &QuickString::operator += (size_t num) {
++// 	append(num);
++// 	return *this;
++// }
++
+ QuickString &QuickString::operator += (float num) {
+ 	append(num);
+ 	return *this;
+@@ -273,12 +274,12 @@ void QuickString::append(int num) {
+ }
+ 
+ void QuickString::append(uint32_t num) {
+-	int2str((int)num, *this, true);
++ 	int2str((int)num, *this, true);
+ }
+ 
+-void QuickString::append(size_t num) {
+-	int2str((int)num, *this, true);
+-}
++// void QuickString::append(size_t num) {
++// 	int2str((int)num, *this, true);
++// }
+ 
+ void QuickString::append(float num) {
+ 	append(ToString(num));
+diff --git a/src/utils/general/QuickString.h b/src/utils/general/QuickString.h
+index b43fdfc..6e6fa94 100644
+--- a/src/utils/general/QuickString.h
++++ b/src/utils/general/QuickString.h
+@@ -38,7 +38,7 @@ class QuickString {
+ 	QuickString &operator = (char);
+ 	QuickString &operator = (int);
+ 	QuickString &operator = (uint32_t);
+-	QuickString &operator = (size_t);
++	//QuickString &operator = (size_t);
+ 	QuickString &operator = (float);
+ 	QuickString &operator = (double);
+ 	QuickString &operator += (const QuickString &);
+@@ -47,7 +47,7 @@ class QuickString {
+ 	QuickString &operator += (char);
+ 	QuickString &operator += (int);
+ 	QuickString &operator += (uint32_t);
+-	QuickString &operator += (size_t);
++	//QuickString &operator += (size_t);
+ 	QuickString &operator += (float);
+ 	QuickString &operator += (double);
+ 
+@@ -74,7 +74,7 @@ class QuickString {
+ 	//for better performance.
+ 	void append(int num);
+ 	void append(uint32_t num);
+-	void append(size_t num);
++	//void append(size_t num);
+ 	void append(float num);
+ 	void append(double num);
+ 
+
-- 
2.4.3


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] gnu: bedtools: Update to 2.24.0.
  2015-07-25 13:02       ` Ben Woodcroft
@ 2015-07-25 13:10         ` Andreas Enge
  2015-07-25 13:37           ` Ben Woodcroft
  0 siblings, 1 reply; 10+ messages in thread
From: Andreas Enge @ 2015-07-25 13:10 UTC (permalink / raw)
  To: Ben Woodcroft; +Cc: guix-devel

Hello Ben,

thanks for your quick reply!

On Sat, Jul 25, 2015 at 11:02:27PM +1000, Ben Woodcroft wrote:
> -    (version "2.22.0")
> +    (version "2.24.0")

Now that 2.24.0 is in git master, could you please prepare your patch with
respect to this version? In particular, the above two lines should not
appear any more, and the commit message will have to be modified.

> +              ;; Fixed in upstream, see
> +              ;; https://github.com/arq5x/bedtools2/issues/271
> +              (patches (list (search-patch "bedtools-32bit-compilation.patch")))))

You will also need to reference the patch file in gnu-system.am to include
it into the distribution.

Thanks!

Andreas

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] gnu: bedtools: Update to 2.24.0.
  2015-07-25 13:10         ` Andreas Enge
@ 2015-07-25 13:37           ` Ben Woodcroft
  2015-07-25 17:20             ` Andreas Enge
  0 siblings, 1 reply; 10+ messages in thread
From: Ben Woodcroft @ 2015-07-25 13:37 UTC (permalink / raw)
  To: Andreas Enge; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 299 bytes --]



On 25/07/15 23:10, Andreas Enge wrote:
>
> Now that 2.24.0 is in git master, could you please prepare your patch with
> respect to this version? In particular, the above two lines should not
> appear any more, and the commit message will have to be modified.

Attached. Lemme know if I messed up.

[-- Attachment #2: 0001-gnu-bedtools-settle-on-uint32_t-signature-for-QuickS.patch --]
[-- Type: text/x-patch, Size: 8164 bytes --]

From 2a09480f4ac5c02c706d39be1cdaf6e6e51f9670 Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrustben@gmail.com>
Date: Sat, 25 Jul 2015 23:32:55 +1000
Subject: [PATCH] gnu: bedtools: settle on uint32_t signature for QuickString.

* gnu/packages/patches/bedtools-32bit-compilation.patch: New file.
* gnu/packages/bioinformatics.scm (bedtools)[source]: Add patch.
---
 gnu-system.am                                      |   1 +
 gnu/packages/bioinformatics.scm                    |   5 +-
 .../patches/bedtools-32bit-compilation.patch       | 168 +++++++++++++++++++++
 3 files changed, 173 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/bedtools-32bit-compilation.patch

diff --git a/gnu-system.am b/gnu-system.am
index f4e121a..d6635fe 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -392,6 +392,7 @@ dist_patch_DATA =						\
   gnu/packages/patches/avahi-localstatedir.patch		\
   gnu/packages/patches/avrdude-fix-libusb.patch			\
   gnu/packages/patches/bash-completion-directories.patch	\
+  gnu/packages/patches/bedtools-32bit-compilation.patch         \
   gnu/packages/patches/bowtie-fix-makefile.patch		\
   gnu/packages/patches/bigloo-gc-shebangs.patch			\
   gnu/packages/patches/binutils-ld-new-dtags.patch		\
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 92b9394..e01e428 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -204,7 +204,10 @@ computational cluster.")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "0lnxrjvs3nnmb4bmskag1wg3h2hd80przz5q3xd0bvs7vyxrvpbl"))))
+                "0lnxrjvs3nnmb4bmskag1wg3h2hd80przz5q3xd0bvs7vyxrvpbl"))
+              ;; Fixed in upstream, see
+              ;; https://github.com/arq5x/bedtools2/issues/271
+              (patches (list (search-patch "bedtools-32bit-compilation.patch")))))
     (build-system gnu-build-system)
     (native-inputs `(("python" ,python-2)))
     (inputs `(("samtools" ,samtools)
diff --git a/gnu/packages/patches/bedtools-32bit-compilation.patch b/gnu/packages/patches/bedtools-32bit-compilation.patch
new file mode 100644
index 0000000..0a4e710
--- /dev/null
+++ b/gnu/packages/patches/bedtools-32bit-compilation.patch
@@ -0,0 +1,168 @@
+From b47dbefcb57f8e6c4fe397f64346338620740b71 Mon Sep 17 00:00:00 2001
+From: arq5x <arq5x@virginia.edu>
+Date: Wed, 15 Jul 2015 15:15:23 -0600
+Subject: [PATCH] settle on uint32_t signature for QuickString. Resolves #267
+ and #271?
+
+---
+ src/coverageFile/coverageFile.cpp | 24 ++++++++++++------------
+ src/utils/general/QuickString.cpp | 27 ++++++++++++++-------------
+ src/utils/general/QuickString.h   |  6 +++---
+ 3 files changed, 29 insertions(+), 28 deletions(-)
+
+diff --git a/src/coverageFile/coverageFile.cpp b/src/coverageFile/coverageFile.cpp
+index 859cfdc..0fb544b 100644
+--- a/src/coverageFile/coverageFile.cpp
++++ b/src/coverageFile/coverageFile.cpp
+@@ -83,11 +83,11 @@ void CoverageFile::giveFinalReport(RecordOutputMgr *outputMgr) {
+ 		float depthPct = (float)basesAtDepth / (float)_totalQueryLen;
+ 
+ 		_finalOutput = "all\t";
+-		_finalOutput.append(depth);
++		_finalOutput.append(static_cast<uint32_t>(depth));
+ 		_finalOutput.append("\t");
+-		_finalOutput.append(basesAtDepth);
++		_finalOutput.append(static_cast<uint32_t>(basesAtDepth));
+ 		_finalOutput.append("\t");
+-		_finalOutput.append(_totalQueryLen);
++		_finalOutput.append(static_cast<uint32_t>(_totalQueryLen));
+ 		_finalOutput.append("\t");
+ 		format(depthPct);
+ 
+@@ -138,7 +138,7 @@ size_t CoverageFile::countBasesAtDepth(size_t depth) {
+ 
+ void CoverageFile::doCounts(RecordOutputMgr *outputMgr, RecordKeyVector &hits)
+ {
+-	_finalOutput = hits.size();
++	_finalOutput = static_cast<uint32_t>(hits.size());
+ 	outputMgr->printRecord(hits.getKey(), _finalOutput);
+ }
+ 
+@@ -147,9 +147,9 @@ void CoverageFile::doPerBase(RecordOutputMgr *outputMgr, RecordKeyVector &hits)
+ 	//loop through all bases in query, printing full record and metrics for each
+ 	const Record * queryRec = hits.getKey();
+ 	for (size_t i= 0; i < _queryLen; i++) {
+-		_finalOutput = i +1;
++		_finalOutput = static_cast<uint32_t>(i+1);
+ 		_finalOutput.append("\t");
+-		_finalOutput.append(_depthArray[i]);
++		_finalOutput.append(static_cast<uint32_t>(_depthArray[i]));
+ 
+ 		outputMgr->printRecord(queryRec, _finalOutput);
+ 	}
+@@ -181,11 +181,11 @@ void CoverageFile::doHist(RecordOutputMgr *outputMgr, RecordKeyVector &hits)
+ 		size_t numBasesAtDepth = iter->second;
+ 		float coveredBases = (float)numBasesAtDepth / (float)_queryLen;
+ 
+-		_finalOutput = depth;
++		_finalOutput = static_cast<uint32_t>(depth);
+ 		_finalOutput.append("\t");
+-		_finalOutput.append(numBasesAtDepth);
++		_finalOutput.append(static_cast<uint32_t>(numBasesAtDepth));
+ 		_finalOutput.append("\t");
+-		_finalOutput.append(_queryLen);
++		_finalOutput.append(static_cast<uint32_t>(_queryLen));
+ 		_finalOutput.append("\t");
+ 		format(coveredBases);
+ 
+@@ -199,11 +199,11 @@ void CoverageFile::doDefault(RecordOutputMgr *outputMgr, RecordKeyVector &hits)
+ 	size_t nonZeroBases = _queryLen - countBasesAtDepth(0);
+ 	float coveredBases = (float)nonZeroBases / (float)_queryLen;
+ 
+-	_finalOutput = hits.size();
++	_finalOutput = static_cast<uint32_t>(hits.size());
+ 	_finalOutput.append("\t");
+-	_finalOutput.append(nonZeroBases);
++	_finalOutput.append(static_cast<uint32_t>(nonZeroBases));
+ 	_finalOutput.append("\t");
+-	_finalOutput.append(_queryLen);
++	_finalOutput.append(static_cast<uint32_t>(_queryLen));
+ 	_finalOutput.append("\t");
+ 	format(coveredBases);
+ 
+diff --git a/src/utils/general/QuickString.cpp b/src/utils/general/QuickString.cpp
+index 0757009..a83263e 100644
+--- a/src/utils/general/QuickString.cpp
++++ b/src/utils/general/QuickString.cpp
+@@ -105,11 +105,11 @@ QuickString &QuickString::operator = (uint32_t val) {
+ 	return *this;
+ }
+ 
+-QuickString &QuickString::operator = (size_t val) {
+-	clear();
+-	append(val);
+-	return *this;
+-}
++// QuickString &QuickString::operator = (size_t val) {
++// 	clear();
++// 	append(val);
++// 	return *this;
++// }
+ 
+ QuickString &QuickString::operator = (float val) {
+ 	clear();
+@@ -158,10 +158,11 @@ QuickString &QuickString::operator += (uint32_t num) {
+ 	return *this;
+ }
+ 
+-QuickString &QuickString::operator += (size_t num) {
+-	append(num);
+-	return *this;
+-}
++// QuickString &QuickString::operator += (size_t num) {
++// 	append(num);
++// 	return *this;
++// }
++
+ QuickString &QuickString::operator += (float num) {
+ 	append(num);
+ 	return *this;
+@@ -273,12 +274,12 @@ void QuickString::append(int num) {
+ }
+ 
+ void QuickString::append(uint32_t num) {
+-	int2str((int)num, *this, true);
++ 	int2str((int)num, *this, true);
+ }
+ 
+-void QuickString::append(size_t num) {
+-	int2str((int)num, *this, true);
+-}
++// void QuickString::append(size_t num) {
++// 	int2str((int)num, *this, true);
++// }
+ 
+ void QuickString::append(float num) {
+ 	append(ToString(num));
+diff --git a/src/utils/general/QuickString.h b/src/utils/general/QuickString.h
+index b43fdfc..6e6fa94 100644
+--- a/src/utils/general/QuickString.h
++++ b/src/utils/general/QuickString.h
+@@ -38,7 +38,7 @@ class QuickString {
+ 	QuickString &operator = (char);
+ 	QuickString &operator = (int);
+ 	QuickString &operator = (uint32_t);
+-	QuickString &operator = (size_t);
++	//QuickString &operator = (size_t);
+ 	QuickString &operator = (float);
+ 	QuickString &operator = (double);
+ 	QuickString &operator += (const QuickString &);
+@@ -47,7 +47,7 @@ class QuickString {
+ 	QuickString &operator += (char);
+ 	QuickString &operator += (int);
+ 	QuickString &operator += (uint32_t);
+-	QuickString &operator += (size_t);
++	//QuickString &operator += (size_t);
+ 	QuickString &operator += (float);
+ 	QuickString &operator += (double);
+ 
+@@ -74,7 +74,7 @@ class QuickString {
+ 	//for better performance.
+ 	void append(int num);
+ 	void append(uint32_t num);
+-	void append(size_t num);
++	//void append(size_t num);
+ 	void append(float num);
+ 	void append(double num);
+ 
+
-- 
2.4.3


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] gnu: bedtools: Update to 2.24.0.
  2015-07-25 13:37           ` Ben Woodcroft
@ 2015-07-25 17:20             ` Andreas Enge
  0 siblings, 0 replies; 10+ messages in thread
From: Andreas Enge @ 2015-07-25 17:20 UTC (permalink / raw)
  To: Ben Woodcroft; +Cc: guix-devel

Hi Ben,

thanks a lot!

I made a few small modifications and pushed:

On Sat, Jul 25, 2015 at 11:37:57PM +1000, Ben Woodcroft wrote:
> * gnu/packages/patches/bedtools-32bit-compilation.patch: New file.
> * gnu/packages/bioinformatics.scm (bedtools)[source]: Add patch.

gnu-system.am was also modified.

> +              ;; Fixed in upstream, see
> +              ;; https://github.com/arq5x/bedtools2/issues/271

I moved this into the patch, we usually mention its rationale there.

The package still compiles on x86_64, let us hope that this patch solves
the problem on the other architectures!

Andreas

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-07-25 17:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-24 15:07 [PATCH] gnu: bedtools: Update to 2.24.0 Ben Woodcroft
2015-07-24 15:11 ` Ricardo Wurmus
2015-07-25  3:32   ` Ben Woodcroft
2015-07-25  4:03 ` Mark H Weaver
2015-07-25  9:02   ` Andreas Enge
2015-07-25 12:57     ` Ben Woodcroft
2015-07-25 13:02       ` Ben Woodcroft
2015-07-25 13:10         ` Andreas Enge
2015-07-25 13:37           ` Ben Woodcroft
2015-07-25 17:20             ` Andreas Enge

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.