[Biopython-dev] Pending deprecations
Peter
biopython at maubp.freeserve.co.uk
Sat Dec 18 12:15:31 UTC 2010
On Sat, Dec 18, 2010 at 3:16 AM, Michiel de Hoon <mjldehoon at yahoo.com> wrote:
> Hi everybody,
>
> The following bits of code have a PendingDeprecationWarning in release 1.56.
> Any objections to upgrading those to BiopythonDeprecationWarnings for the
> next release? That would mean that users see a deprecation warning by
> default when using those pieces of code.
>
> Bio.Align.MultipleSeqAlignment.get_column
> Bio.Align.MultipleSeqAlignment.add_sequence
> Bio.Align.Generic.Alignment.__init__
> Bio.Align.Generic.Alignment.get_seq_by_num
Sounds fine. I hope to add some stuff for column iteration which would
help here too.
> Bio.Blast.Applications.BlastallCommandline
> Bio.Blast.Applications.BlastpgpCommandline
> Bio.Blast.Applications.RpsBlastCommandline
> Bio.Blast.NCBIStandalone
> Bio.Blast.NCBIStandalone.blastall
> Bio.Blast.NCBIStandalone.blastpgp
> Bio.Blast.NCBIStandalone.rpsblast
The NCBI are still supporting their "legacy" BLAST suite, so I think we
should keep the wrappers as "pending deprecation" for a little longer.
> Bio.Clustalw.parse_file
> Bio.Clustalw.do_alignment
> Bio.ClustalW.ClustalAlignment
> Bio.ClustalW.MultipleAlignCL
The whole of Bio.ClustalW is already deprecated, isn't it?
It looks like it currently has double warnings which was
probably just an oversight.
> Bio.File.SGMLStripper
Yep, deprecate SGMLStripper
> Bio.Nexus.Nexus._kill_comments_and_break_lines
That's a private method so we can just remove it.
> Bio.PDB.AbstractPropertyMap.AbstractPropertyMap.has_key
> Bio.PDB.FragmentMapper.FragmentMapper.has_key
The has_key thing is being deprecated in Python itself
(use in instead), I don't recall what the timeline is for that,
but it may influence us for when we remove has_key too.
> BioSQL.BioSeqDatabase.DBServer.remove_database
> BioSQL.BioSeqDatabase.BioSeqDatabase.get_all_primary_ids
> BioSQL.BioSeqDatabase.BioSeqDatabase.get_Seq_by_primary_id
The above are "obsolete" in the sense that I added dictionary
like methods instead. Adding a PendingDeprecationWarning
is probably OK.
> We were also planning to add a PendingDeprecationWarning to
> Bio.Seq.Seq.tostring, but this will require to replace all calls to
> my_seq.tostring() in Biopython by str(my_seq). It would be
> good to start doing this in your favorite Biopython module.
One reason why some code does my_seq.tostring() is it will fail
with an attribute error for a non-Seq like object, thus doubles as
a type check. Sneaky, but in some ways safer than str(my_seq).
Still, I agree in principle we should try not to use tostring().
Peter
More information about the Biopython-dev
mailing list