diff options
author | Justin Lecher <jlec@gentoo.org> | 2014-05-07 11:00:43 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2014-05-07 11:00:43 +0000 |
commit | d3c6c3b1506d3fa775e9e97ec58c8883ab3a0741 (patch) | |
tree | d07ae163b88b878395dcc40a5861b5f5f076958f /sci-biology/biopython/files | |
parent | arm stable wrt bug #509684 (diff) | |
download | gentoo-2-d3c6c3b1506d3fa775e9e97ec58c8883ab3a0741.tar.gz gentoo-2-d3c6c3b1506d3fa775e9e97ec58c8883ab3a0741.tar.bz2 gentoo-2-d3c6c3b1506d3fa775e9e97ec58c8883ab3a0741.zip |
sci-biology/biopython: Import changes from sci overlay
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key B9D4F231BD1558AB!)
Diffstat (limited to 'sci-biology/biopython/files')
-rw-r--r-- | sci-biology/biopython/files/SffIO_broken_padding.patch | 27 | ||||
-rw-r--r-- | sci-biology/biopython/files/SffIO_error_in_check_eof.patch | 14 |
2 files changed, 41 insertions, 0 deletions
diff --git a/sci-biology/biopython/files/SffIO_broken_padding.patch b/sci-biology/biopython/files/SffIO_broken_padding.patch new file mode 100644 index 000000000000..a009c58cbd04 --- /dev/null +++ b/sci-biology/biopython/files/SffIO_broken_padding.patch @@ -0,0 +1,27 @@ +diff --git a/Bio/SeqIO/SffIO.py b/Bio/SeqIO/SffIO.py +index 735d55b..b89cf41 100644 +--- a/Bio/SeqIO/SffIO.py ++++ b/Bio/SeqIO/SffIO.py +@@ -933,12 +933,20 @@ def _check_eof(handle, index_offset, index_length): + "null padding region ended '.sff' which could " + "be the start of a concatenated SFF file? " + "See offset %i" % (padding, offset)) ++ if padding and not extra: ++ #TODO - Is this error harmless enough to just ignore? ++ import warnings ++ from Bio import BiopythonParserWarning ++ warnings.warn("Your SFF file is technically invalid as it is missing " ++ "a terminal %i byte null padding region." % padding, ++ BiopythonParserWarning) ++ return + if extra.count(_null) != padding: + import warnings + from Bio import BiopythonParserWarning + warnings.warn("Your SFF file is invalid, post index %i byte " +- "null padding region contained data." % padding, +- BiopythonParserWarning) ++ "null padding region contained data: %r" ++ % (padding, extra), BiopythonParserWarning) + + offset = handle.tell() + assert offset % 8 == 0, \ diff --git a/sci-biology/biopython/files/SffIO_error_in_check_eof.patch b/sci-biology/biopython/files/SffIO_error_in_check_eof.patch new file mode 100644 index 000000000000..9059604f6faa --- /dev/null +++ b/sci-biology/biopython/files/SffIO_error_in_check_eof.patch @@ -0,0 +1,14 @@ +diff --git a/Bio/SeqIO/SffIO.py b/Bio/SeqIO/SffIO.py +index 2bb0dac..735d55b 100644 +--- a/Bio/SeqIO/SffIO.py ++++ b/Bio/SeqIO/SffIO.py +@@ -941,7 +941,8 @@ def _check_eof(handle, index_offset, index_length): + BiopythonParserWarning) + + offset = handle.tell() +- assert offset % 8 == 0 ++ assert offset % 8 == 0, \ ++ "Wanted offset %i %% 8 = %i to be zero" % (offset, offset % 8) + # Should now be at the end of the file... + extra = handle.read(4) + if extra == _sff: |