Gentoo Archives: gentoo-commits

From: "Justin Lecher (jlec)" <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-biology/biopython/files: biopython-1.62-SffIO.patch
Date: Sun, 29 Dec 2013 00:57:02
Message-Id: 20131229005659.060012004E@flycatcher.gentoo.org
1 jlec 13/12/29 00:56:58
2
3 Added: biopython-1.62-SffIO.patch
4 Log:
5 sci-biology/biopython: Add additional patch from Martin Mokrejš
6
7 (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key B9D4F231BD1558AB!)
8
9 Revision Changes Path
10 1.1 sci-biology/biopython/files/biopython-1.62-SffIO.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-biology/biopython/files/biopython-1.62-SffIO.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-biology/biopython/files/biopython-1.62-SffIO.patch?rev=1.1&content-type=text/plain
14
15 Index: biopython-1.62-SffIO.patch
16 ===================================================================
17 --- Bio/SeqIO/SffIO.py.ori 2013-09-25 13:28:51.000000000 +0200
18 +++ Bio/SeqIO/SffIO.py 2013-09-25 13:37:44.000000000 +0200
19 @@ -383,7 +383,14 @@
20 if padding:
21 padding = 8 - padding
22 if handle.read(padding).count(_null) != padding:
23 - raise ValueError("Post quality %i byte padding region contained data"
24 + import warnings
25 + from Bio import BiopythonParserWarning
26 + warnings.warn("Your SFF file is valid but post quality %i byte "
27 + "padding region contains UNUSED data. Was the "
28 + "SFF file created by SRA sff-dump >2.1.7 and <2.1.10? "
29 + "It did not clear some internal buffer while writing "
30 + "out new data so that previous values remained in the"
31 + "output unless overwritten by new real values."
32 % padding)
33 #print read, name, record_offset
34 yield name, record_offset
35 --- Bio/SeqIO/SffIO.py.ori 2013-09-25 14:07:14.000000000 +0200
36 +++ Bio/SeqIO/SffIO.py 2013-09-25 14:08:59.000000000 +0200
37 @@ -596,7 +596,14 @@
38 if padding:
39 padding = 8 - padding
40 if handle.read(padding).count(_null) != padding:
41 - raise ValueError("Post quality %i byte padding region contained data"
42 + import warnings
43 + from Bio import BiopythonParserWarning
44 + warnings.warn("Your SFF file is valid but post quality %i byte "
45 + "padding region contains UNUSED data. Was the "
46 + "SFF file created by SRA sff-dump >2.1.7 and <2.1.10? "
47 + "It did not clear some internal buffer while writing "
48 + "out new data so that previous values remained in the"
49 + "output unless overwritten by new real values."
50 % padding)
51 #Follow Roche and apply most aggressive of qual and adapter clipping.
52 #Note Roche seems to ignore adapter clip fields when writing SFF,