Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Deprecate Bio.ParserSupport & Bio.Blast.NCBIStandalone

  • Loading branch information...
commit b63a5e917e8f30d09a9fc2d271a0f72da5a95acc 1 parent fb6bc57
@peterjc peterjc authored
View
19 Bio/Blast/NCBIStandalone.py
@@ -5,7 +5,7 @@
# Patches by Mike Poidinger to support multiple databases.
# Updated by Peter Cock in 2007 to do a better job on BLAST 2.2.15
-"""Code for calling standalone BLAST and parsing plain text output (OBSOLETE).
+"""Code for calling standalone BLAST and parsing plain text output (DEPRECATED).
Rather than parsing the human readable plain text BLAST output (which seems to
change with every update to BLAST), we and the NBCI recommend you parse the
@@ -39,9 +39,9 @@
_ParametersConsumer Consumes parameters information.
Functions:
-blastall Execute blastall (OBSOLETE).
-blastpgp Execute blastpgp (OBSOLETE).
-rpsblast Execute rpsblast (OBSOLETE).
+blastall Execute blastall.
+blastpgp Execute blastpgp.
+rpsblast Execute rpsblast.
For calling the BLAST command line tools, we encourage you to use the
command line wrappers in Bio.Blast.Applications - the three functions
@@ -49,10 +49,10 @@
are likely to be deprecated and then removed in future releases.
"""
-import warnings
-warnings.warn("The plain text parser in this module still works at the time of writing, but is considered obsolete and updating it to cope with the latest versions of BLAST is not a priority for us.", PendingDeprecationWarning)
-
from Bio import BiopythonDeprecationWarning
+import warnings
+warnings.warn("This module has been deprecated. Consider Bio.SearchIO for "
+ "parsing BLAST output instead.", BiopythonDeprecationWarning)
import os
import re
@@ -1789,7 +1789,6 @@ def blastall(blastcmd, program, database, infile, align_view='7', **keywds):
'seqalign_file' : '-O',
'outfile' : '-o',
}
- warnings.warn("This function is deprecated; you are encouraged to the command line wrapper Bio.Blast.Applications.BlastallCommandline instead.", BiopythonDeprecationWarning)
from Applications import BlastallCommandline
cline = BlastallCommandline(blastcmd)
cline.set_parameter(att2param['program'], program)
@@ -1872,8 +1871,6 @@ def blastpgp(blastcmd, database, infile, align_view='7', **keywds):
align_infile Input alignment file for PSI-BLAST restart.
"""
-
- warnings.warn("This function is deprecated; you are encouraged to the command line wrapper Bio.Blast.Applications.BlastpgpCommandline instead.", BiopythonDeprecationWarning)
_security_check_parameters(keywds)
att2param = {
@@ -1992,8 +1989,6 @@ def rpsblast(blastcmd, database, infile, align_view="7", **keywds):
omitted standard output is used (which you can access
from the returned handles).
"""
-
- warnings.warn("This function is deprecated; you are encouraged to the command line wrapper Bio.Blast.Applications.BlastrpsCommandline instead.", BiopythonDeprecationWarning)
_security_check_parameters(keywds)
att2param = {
View
12 Bio/ParserSupport.py
@@ -3,16 +3,14 @@
# license. Please see the LICENSE file that should have been included
# as part of this package.
-"""Code to support writing parsers (OBSOLETE).
-
-
+"""Code to support writing parsers (DEPRECATED).
Classes:
AbstractParser Base class for parsers.
AbstractConsumer Base class of all Consumers.
TaggingConsumer Consumer that tags output with its event. For debugging
EventGenerator Generate Biopython Events from Martel XML output
- (note that Martel is now DEPRECATED)
+ (note that Martel has been removed)
Functions:
safe_readline Read a line from a handle, with check for EOF.
@@ -25,10 +23,10 @@
"""
-
+from Bio import BiopythonDeprecationWarning
import warnings
-warnings.warn("The module Bio.ParserSupport is now obsolete, and will be deprecated and removed in a future release of Biopython.", PendingDeprecationWarning)
-
+warnings.warn("Bio.ParserSupport is now deprecated will be removed in a "
+ "future release of Biopython.", BiopythonDeprecationWarning)
import sys
try:
View
10 DEPRECATED
@@ -109,8 +109,11 @@ blastall, blastpgp and rpsblast were declared obsolete in Biopython Release
Bio.Blast.Applications instead.
The remainder of this module is a parser for the plain text BLAST output,
-which was declared obsolete in Release 1.54. For some time now, both the NCBI
-and Biopython have encouraged people to parse the XML output instead.
+which was declared obsolete in Release 1.54, and deprecated in Release 1.63.
+
+For some time now, both the NCBI and Biopython have encouraged people to
+parse the XML output instead, however Bio.SearchIO will initially attempt
+to support plain text BLAST output.
Bio.Blast.Applications
======================
@@ -551,7 +554,8 @@ method get_seq_by_num were deprecated in Release 1.57.
Bio.ParserSupport
=================
-Bio.ParserSupport was declared obsolete in Release 1.59.
+Bio.ParserSupport was declared obsolete in Release 1.59, and deprecated in
+Release 1.63.
Bio.ParserSupport.SGMLStrippingConsumer was deprecated in Release 1.59, and
removed in Release 1.61.
View
7 Tests/test_NCBIStandalone.py
@@ -5,7 +5,12 @@
# as part of this package.
import unittest
-from Bio.Blast import NCBIStandalone
+
+import warnings
+from Bio import BiopythonDeprecationWarning
+with warnings.catch_warnings():
+ warnings.simplefilter('ignore', BiopythonDeprecationWarning)
+ from Bio.Blast import NCBIStandalone
class TestNCBIStandalone(unittest.TestCase):
View
7 Tests/test_NCBITextParser.py
@@ -5,7 +5,12 @@
import os
import unittest
-from Bio.Blast import NCBIStandalone
+
+import warnings
+from Bio import BiopythonDeprecationWarning
+with warnings.catch_warnings():
+ warnings.simplefilter('ignore', BiopythonDeprecationWarning)
+ from Bio.Blast import NCBIStandalone
class TestBlastRecord(unittest.TestCase):
View
7 Tests/test_ParserSupport.py
@@ -6,7 +6,12 @@
import string
from Bio._py3k import StringIO
from Bio import File
-from Bio import ParserSupport
+
+import warnings
+from Bio import BiopythonDeprecationWarning
+with warnings.catch_warnings():
+ warnings.simplefilter('ignore', BiopythonDeprecationWarning)
+ from Bio import ParserSupport
# pyUnit
Please sign in to comment.
Something went wrong with that request. Please try again.