History of changes¶
Fix in pepxml. ‘modified_peptide’ is now always available.
Fix in mass (issue #2 in the bug tracker). Improved arithmetics for Composition objects.
In fasta, decoy_db() now doesn’t write to file, but returns an iterator over FASTA records. The old decoy_db() is now called write_decoy_db(), which is equivalent to decoy_db() combined with write().
- in mgf.read(): the charges, if present, are returned as a
masked array now. Previously, an exception occurred if charges were missing for some of the fragments;
- values in mass.nist_mass corrected;
- other minor corrections.
Adjust the behavior affected by the bug fixed in 2.1.2. name attributes of <cvParam> elements in the absence of value attributes are now collected in a list under the ‘name’ key.
Add support for overlapping matches in parser.cleave().
Bugfix in XML parsers. The bug caused the mzML parser break on some files. The fix can slightly change the format of the output.
Rename keys in the dicts returned by mgf.read() to facilitate writing code working with both MGF and mzML.
The items yielded by fasta.read() now have attributes description and sequence.
New sets of retention coefficients in achrom.
mass.Composition now only stores non-zero ints.
fasta now has tools for parsing of FASTA headers.
File parsers now implement the context manager protocol. We recommend using with statements to avoid resource leaks.
- ‘pepmass’ is now a tuple in the output of mgf.read() (to allow reading
- new function fasta.parse() for convenient parsing of FASTA headers.
- fasta.std_parsers stores parsers for common UniProt header formats.
- new parameter parser in fasta.read() allows to apply parsing while
reading a FASTA file.
- close parameter removed in all functions that do file I/O. The unified behavior
is: if the parameter is a file object, it won’t be closed by the function. If a file path is given, the file object will be created and closed inside the corresponding function.
Added new class Unimod in mass. The interface is experimental and may change.
Improved iterfind() function in XML-reading modules.
mass.Composition objects now support multiplication by int.
Bugfix in auxiliary.linear_regression().
Added new function iterfind() in mzid, pepxml and mzml.
Added mzid module for parsing of mzIdentML files.
Fixed bugs, improved tests.
- top-module functions in fasta, mgf, mzml, pepxml, as well
as mzid, are now called read().
- in parser, parse_sequence() renamed to parse(). It now accepts
an optional parameter allow_unknown_modifications.
- mgf.write_mgf() and fasta.write_fasta() renamed to write().
- the output format of all read() functions has changed.
Include Apache license version 2.0: http://www.opensource.org/licenses/Apache-2.0
Minor bugfix in fasta.
Changes in mass.
- Composition objects can be created using positional first argument,
which will be treated as a sequence or (upon failure) as a formula. That means that all functions relying on Composition (calculate_mass(), most_probable_isotopic_composition(), isotopic_composition_abundance()) allow that as well. However, it’s of no use for the latter.
- Composition entries for modifications can be added to aa_comp and
used in composition and mass calculations. This way the specified group will be added to any residue bearing this modification.
- That being said, the add_modifications() function is not needed anymore
and has been removed.
- Addition and subtraction of Composition objects now produces a
Composition object, allowing addition/subtraction of multiple objects.
- Composition is now a subclass of collections.defaultdict so one
can safely retrieve values without checking if a key exists.
parser.isoforms() now allows terminal modifications.
Bugfixes in parser.parse_sequence().
New function parser.tostring() converts parsed sequences to strings. Helper function parser.is_modX() added to check modX labels.
- parser.isoforms() now returns a generator object
Bugfix in pepxml: modification info is now extracted. New optional bool argument ‘split’ in parser.parse_sequence() allows to generate a list of tuples where modifications are separated from the residues instead of a regular list of labels. In labels not only modX labels are now allowed, but also separate mod prefixes. Such modificatiuons are assumed to be applicable to any residue.
Memory usage significantly decreased when parsing large mzML and pepXML files.
Added support for Python 3. Python 2.7 is still supported, Python 2.6 is not.
New module added - pyteomics.mgf. It is intended for reading and writing files in Mascot Generic Format.
In pepxml module, now all search hits are read from file (not only the top hit).
- pepxml.read(): information specific to search hits is now stored in a list
under the ‘search_hits’ key. The list is sorted by hit rank.
Fix compatibility issues in pepxml module.