There is a newer version of this record available.

Software Open Access

althonos/pronto: 2.3.0

Martin Larralde


DataCite XML Export

<?xml version='1.0' encoding='utf-8'?>
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://datacite.org/schema/kernel-4" xsi:schemaLocation="http://datacite.org/schema/kernel-4 http://schema.datacite.org/meta/kernel-4.1/metadata.xsd">
  <identifier identifierType="DOI">10.5281/zenodo.4041642</identifier>
  <creators>
    <creator>
      <creatorName>Martin Larralde</creatorName>
      <nameIdentifier nameIdentifierScheme="ORCID" schemeURI="http://orcid.org/">0000-0002-3947-4444</nameIdentifier>
      <affiliation>EMBL, @zellerlab</affiliation>
    </creator>
  </creators>
  <titles>
    <title>althonos/pronto: 2.3.0</title>
  </titles>
  <publisher>Zenodo</publisher>
  <publicationYear>2020</publicationYear>
  <subjects>
    <subject>ontology</subject>
    <subject>bioinformatics</subject>
    <subject>obo</subject>
    <subject>owl</subject>
    <subject>python</subject>
  </subjects>
  <dates>
    <date dateType="Issued">2020-09-21</date>
  </dates>
  <resourceType resourceTypeGeneral="Software"/>
  <alternateIdentifiers>
    <alternateIdentifier alternateIdentifierType="url">https://zenodo.org/record/4041642</alternateIdentifier>
  </alternateIdentifiers>
  <relatedIdentifiers>
    <relatedIdentifier relatedIdentifierType="URL" relationType="IsSupplementTo" resourceTypeGeneral="Software">https://github.com/althonos/pronto/tree/v2.3.0</relatedIdentifier>
    <relatedIdentifier relatedIdentifierType="DOI" relationType="Cites" resourceTypeGeneral="Text">10.7490/f1000research.1117405.1</relatedIdentifier>
    <relatedIdentifier relatedIdentifierType="URL" relationType="Cites" resourceTypeGeneral="Text">http://owlcollab.github.io/oboformat/doc/obo-syntax.html</relatedIdentifier>
    <relatedIdentifier relatedIdentifierType="DOI" relationType="IsCitedBy" resourceTypeGeneral="Text">10.5281/zenodo.3492231</relatedIdentifier>
    <relatedIdentifier relatedIdentifierType="URL" relationType="IsSupplementedBy" resourceTypeGeneral="Text">https://pronto.readthedocs.io/en/v2.3.0/</relatedIdentifier>
    <relatedIdentifier relatedIdentifierType="DOI" relationType="IsVersionOf">10.5281/zenodo.595572</relatedIdentifier>
  </relatedIdentifiers>
  <version>v2.3.0</version>
  <rightsList>
    <rights rightsURI="https://opensource.org/licenses/MIT">MIT License</rights>
    <rights rightsURI="info:eu-repo/semantics/openAccess">Open Access</rights>
  </rightsList>
  <descriptions>
    <description descriptionType="Abstract">&lt;p&gt;&lt;strong&gt;&lt;code&gt;pronto&lt;/code&gt; &lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;A Python frontend to ontologies.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;๐Ÿ—บ๏ธ Overview&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Pronto is a Python library to parse, browse, create, and export ontologies, supporting several ontology languages and formats. It implement the specifications of the &lt;a href="http://owlcollab.github.io/oboformat/doc/obo-syntax.html"&gt;Open Biomedical Ontologies 1.4&lt;/a&gt; in the form of an safe high-level interface. &lt;em&gt;If you&amp;rsquo;re only interested in parsing OBO or OBO Graphs document, you may wish to consider &lt;a href="https://pypi.org/project/fastobo"&gt;&lt;code&gt;fastobo&lt;/code&gt;&lt;/a&gt; instead.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;๐Ÿณ๏ธ Supported Languages&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://owlcollab.github.io/oboformat/doc/GO.format.obo-1_4.html"&gt;Open Biomedical Ontologies 1.4&lt;/a&gt;. &lt;em&gt;Because this format is fairly new, not all OBO ontologies can be parsed at the moment. See the &lt;a href="https://github.com/orgs/fastobo/projects/2"&gt;OBO Foundry roadmap&lt;/a&gt; listing the compliant ontologies, and don&amp;rsquo;t hesitate to contact their developers to push adoption forward.&lt;/em&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="https://github.com/geneontology/obographs"&gt;OBO Graphs&lt;/a&gt; in &lt;a href="http://json.org/"&gt;JSON&lt;/a&gt; format. &lt;em&gt;The format is not yet stabilized to the results may change from file to file.&lt;/em&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="https://www.w3.org/TR/owl2-overview/%3E"&gt;Ontology Web Language 2&lt;/a&gt; in &lt;a href="https://www.w3.org/TR/2012/REC-owl2-mapping-to-rdf-20121211/"&gt;RDF/XML format&lt;/a&gt;. &lt;em&gt;OWL2 ontologies are reverse translated to OBO using the mapping defined in the &lt;a href="http://owlcollab.github.io/oboformat/doc/obo-syntax.html"&gt;OBO 1.4 Semantics&lt;/a&gt;.&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;๐Ÿ”ง Installing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Installing with &lt;code&gt;pip&lt;/code&gt; is the easiest:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# pip install pronto          # if you have the admin rights
$ pip install pronto --user   # install it in a user-site directory&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;There is also a &lt;code&gt;conda&lt;/code&gt; recipe in the &lt;code&gt;bioconda&lt;/code&gt; channel:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ conda install -c bioconda pronto&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Finally, a development version can be installed from GitHub using &lt;code&gt;setuptools&lt;/code&gt;, provided you have the right dependencies installed already:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ git clone https://github.com/althonos/pronto
$ cd pronto
# python setup.py install&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;๐Ÿ’ก Examples&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you&amp;rsquo;re only reading ontologies, you&amp;rsquo;ll only use the &lt;code&gt;Ontology&lt;/code&gt; class, which is the main entry point.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt;&amp;gt; from pronto import Ontology&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;It can be instantiated from a path to an ontology in one of the supported formats, even if the file is compressed:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt;&amp;gt; go = Ontology("tests/data/go.obo.gz")&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Loading a file from a persistent URL is also supported, although you may also want to use the &lt;code&gt;Ontology.from_obo_library&lt;/code&gt; method if you&amp;rsquo;re using persistent URLs a lot:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt;&amp;gt; cl = Ontology("http://purl.obolibrary.org/obo/cl.obo")
&amp;gt;&amp;gt;&amp;gt; stato = Ontology.from_obo_library("stato.owl")&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;em&gt;๐Ÿท๏ธ Get a term by accession&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Ontology&lt;/code&gt; objects can be used as mappings to access any entity they contain from their identifier in compact form:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt;&amp;gt; cl['CL:0002116']
Term('CL:0002116', name='B220-low CD38-positive unswitched memory B cell')&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;em&gt;๐Ÿ”Ž Get a term by alternate ID&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Retrieval of an entity by any alternate ID it was declared from is possible using the same syntax:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt;&amp;gt; hp = pronto.Ontology.from_obo_library("hp.obo")
&amp;gt;&amp;gt;&amp;gt; 'HP:0001198' in hp['HP:0009882'].alternate_ids
True
&amp;gt;&amp;gt;&amp;gt; hp['HP:0001198']
Term('HP:0009882', name='Short distal phalanx of finger')&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;em&gt;๐Ÿ–Š๏ธ Create a new term from scratch&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;We can load an ontology, and edit it locally. Here, we add a new protein class to the Protein Ontology.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt;&amp;gt; pr = Ontology.from_obo_library("pr.obo")
&amp;gt;&amp;gt;&amp;gt; brh = ms.create_term("PR:XXXXXXXX")
&amp;gt;&amp;gt;&amp;gt; brh.name = "Bacteriorhodopsin"
&amp;gt;&amp;gt;&amp;gt; brh.superclasses().add(pr["PR:000001094"])  # is a rhodopsin-like G-protein
&amp;gt;&amp;gt;&amp;gt; brh.disjoint_from.add(pr["PR:000036194"])   # disjoint from eukaryotic proteins&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;em&gt;โœ๏ธ Convert an OWL ontology to OBO format&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;Ontology.dump&lt;/code&gt; method can be used to serialize an ontology to any of the supported formats (currently OBO and OBO JSON):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt;&amp;gt; edam = Ontology("http://edamontology.org/EDAM.owl")
&amp;gt;&amp;gt;&amp;gt; with open("edam.obo", "wb") as f:
...     edam.dump(f, format="obo")&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;em&gt;๐ŸŒฟ Find ontology terms without subclasses&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;terms&lt;/code&gt; method of &lt;code&gt;Ontology&lt;/code&gt; instances can be used to iterate over all the terms in the ontology (including the ones that are imported). We can then use the &lt;code&gt;is_leaf&lt;/code&gt; method of &lt;code&gt;Term&lt;/code&gt; objects to check is the term is a leaf in the class inclusion graph.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt;&amp;gt; ms = Ontology("ms.obo")
&amp;gt;&amp;gt;&amp;gt; for term in ms.terms():
...     if term.is_leaf():
...         print(term.id)
MS:0000000
MS:1000001
...&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;&lt;strong&gt;๐Ÿ“– API Reference&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A complete API reference can be found in the &lt;a href="https://pronto.readthedocs.io/en/latest/api.html"&gt;online documentation&lt;/a&gt;, or directly from the command line using &lt;code&gt;pydoc&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ pydoc pronto.Ontology&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;๐Ÿ“œ License&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This library is provided under the open-source &lt;a href="https://choosealicense.com/licenses/mit/"&gt;MIT license&lt;/a&gt;. Please cite this library if you are using it in a scientific context using the following DOI: &lt;a href="https://doi.org/10.5281/zenodo.595572"&gt;&lt;strong&gt;10.5281/zenodo.595572&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;๐Ÿ“’ Changelog&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The format is based on &lt;a href="http://keepachangelog.com/en/1.0.0/"&gt;Keep a Changelog&lt;/a&gt; and this project adheres to &lt;a href="http://semver.org/spec/v2.0.0.html"&gt;Semantic Versioning&lt;/a&gt;.&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;a href="https://github.com/althonos/pronto/compare/v2.2.4...v2.3.0"&gt;2.3.0&lt;/a&gt; - 2020-09-21

	&lt;ul&gt;
		&lt;li&gt;&lt;em&gt;Added:&lt;/em&gt;

		&lt;ul&gt;
			&lt;li&gt;Retrieval of entities via their alternate IDs on the source &lt;code&gt;Ontology&lt;/code&gt;.&lt;/li&gt;
			&lt;li&gt;Direct edition of entity relationships via the &lt;code&gt;Relationships&lt;/code&gt; view.&lt;/li&gt;
			&lt;li&gt;&lt;code&gt;__all__&lt;/code&gt; attribute to all modules of the data model.&lt;/li&gt;
			&lt;li&gt;&lt;code&gt;RelationshipSet&lt;/code&gt; container like &lt;code&gt;TermSet&lt;/code&gt; with shortcut attributes and proxying of actual &lt;code&gt;Relationship&lt;/code&gt; instances.&lt;/li&gt;
			&lt;li&gt;&lt;code&gt;Relationship.subproperties&lt;/code&gt; and &lt;code&gt;Relationship.superproperties&lt;/code&gt; methods to add, remove, clear and iterate over the subproperties and superproperties of a &lt;code&gt;Relationship&lt;/code&gt; instance.&lt;/li&gt;
			&lt;li&gt;&lt;code&gt;Ontology.synonym_types&lt;/code&gt; method to count (via &lt;code&gt;SizedIterator&lt;/code&gt;) and iterate over the synonym types of an ontology and all of its imports.&lt;/li&gt;
			&lt;li&gt;&lt;code&gt;Ontology.get_synonym_type&lt;/code&gt; method to retrieve a single synonym type by ID from an ontology or one of its imports.&lt;/li&gt;
			&lt;li&gt;Changed&lt;/li&gt;
			&lt;li&gt;Management of sub-properties / super-properties is now consistent with the management of subclasses / superclasses.&lt;/li&gt;
			&lt;li&gt;&lt;code&gt;consider&lt;/code&gt;, &lt;code&gt;disjoint_from&lt;/code&gt;, &lt;code&gt;disjoint_over&lt;/code&gt;, &lt;code&gt;equivalent_to&lt;/code&gt;, &lt;code&gt;replaced_by&lt;/code&gt; &lt;code&gt;transitive_over&lt;/code&gt; and &lt;code&gt;union_of&lt;/code&gt; properties of &lt;code&gt;Relationship&lt;/code&gt; now return a &lt;code&gt;RelationshipSet&lt;/code&gt;.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
		&lt;li&gt;&lt;em&gt;Fixed:&lt;/em&gt;
		&lt;ul&gt;
			&lt;li&gt;Outdated documentation in &lt;code&gt;Term.subclasses&lt;/code&gt; describing the performances of the previous algorithm.&lt;/li&gt;
			&lt;li&gt;Possible &lt;code&gt;AttributeError&lt;/code&gt; with the setter of the &lt;code&gt;Entity.synonyms&lt;/code&gt; property.&lt;/li&gt;
			&lt;li&gt;Issue with synonym types declared in imported ontologies not being usable with synonyms of the actual ontology.&lt;/li&gt;
			&lt;li&gt;Various type annotations not updated since version &lt;a href="https://github.com/althonos/pronto/compare/v2.2.1...v2.2.2"&gt;2.2.2&lt;/a&gt;.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;a href="https://github.com/althonos/pronto/compare/v2.2.3...v2.2.4"&gt;2.2.4&lt;/a&gt; - 2020-09-11

	&lt;ul&gt;
		&lt;li&gt;&lt;em&gt;Changed:&lt;/em&gt;

		&lt;ul&gt;
			&lt;li&gt;Make &lt;code&gt;Entity.annotations&lt;/code&gt; return a mutable set and add a setter.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
		&lt;li&gt;&lt;em&gt;Fixed:&lt;/em&gt;
		&lt;ul&gt;
			&lt;li&gt;&lt;code&gt;Term.relationship&lt;/code&gt; erroneously updating the &lt;code&gt;Ontology._lineage&lt;/code&gt; cache.&lt;/li&gt;
			&lt;li&gt;Unneeded code in &lt;code&gt;pronto.serializers._fastobo&lt;/code&gt; handling &lt;code&gt;is_a&lt;/code&gt; clauses.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;&lt;a href="https://github.com/althonos/pronto/compare/v2.2.2...v2.2.3"&gt;2.2.3&lt;/a&gt; - 2020-07-31
	&lt;ul&gt;
		&lt;li&gt;&lt;em&gt;Changed:&lt;/em&gt;
		&lt;ul&gt;
			&lt;li&gt;Replaced &lt;code&gt;frozendict&lt;/code&gt; with &lt;code&gt;immutabledict&lt;/code&gt; (&lt;a href="https://github.com/althonos/pronto/pull/90"&gt;#90&lt;/a&gt;).&lt;/li&gt;
			&lt;li&gt;Bumped &lt;code&gt;fastobo&lt;/code&gt; dependency to &lt;code&gt;v0.9.0&lt;/code&gt; to support inline comments.&lt;/li&gt;
			&lt;li&gt;Parsers will now process their imports in parallel using a thread pool. ### Fixed&lt;/li&gt;
			&lt;li&gt;Argument type checking in view layer is now disabled during the parsing phase to reduce overhead.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;&lt;a href="https://github.com/althonos/pronto/compare/v2.2.1...v2.2.2"&gt;2.2.2&lt;/a&gt; - 2020-07-18
	&lt;ul&gt;
		&lt;li&gt;&lt;em&gt;Added:&lt;/em&gt;
		&lt;ul&gt;
			&lt;li&gt;Extraction of basic relationships from RDF/XML documents.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
		&lt;li&gt;&lt;em&gt;Fixed:&lt;/em&gt;
		&lt;ul&gt;
			&lt;li&gt;Erroneous type annotations on &lt;code&gt;Term.subclasses&lt;/code&gt; and &lt;code&gt;Term.superclasses&lt;/code&gt;.&lt;/li&gt;
			&lt;li&gt;Bug with &lt;code&gt;Term.equivalent_to&lt;/code&gt; setter crashing with a &lt;code&gt;NameError&lt;/code&gt;.&lt;/li&gt;
			&lt;li&gt;Bug with &lt;code&gt;Entity.synonyms&lt;/code&gt; setter not extracting synonym data.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;&lt;a href="https://github.com/althonos/pronto/compare/v2.2.0...v2.2.1"&gt;2.2.1&lt;/a&gt; - 2020-06-17
	&lt;ul&gt;
		&lt;li&gt;&lt;em&gt;Fixed:&lt;/em&gt;
		&lt;ul&gt;
			&lt;li&gt;Extraction of subclasses/superclasses hierarchy from nested imports.&lt;/li&gt;
			&lt;li&gt;Serialization of OBO frames not being done in order.&lt;/li&gt;
			&lt;li&gt;Parsing issue with &lt;code&gt;anti_symmetric&lt;/code&gt; clauses in OBO typedefs.&lt;/li&gt;
			&lt;li&gt;Xrefs not being extracted when declared as axioms in RDF/XML documents.&lt;/li&gt;
			&lt;li&gt;&lt;code&gt;ResourceWarning&lt;/code&gt; when creating &lt;code&gt;Ontology&lt;/code&gt; from file-handles not mapping to a filesystem location.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;&lt;a href="https://github.com/althonos/pronto/compare/v2.1.0...v2.2.0"&gt;2.2.0&lt;/a&gt; - 2020-06-17
	&lt;ul&gt;
		&lt;li&gt;&lt;em&gt;Added:&lt;/em&gt;
		&lt;ul&gt;
			&lt;li&gt;&lt;code&gt;threads&lt;/code&gt; parameter to &lt;code&gt;Ontology&lt;/code&gt; constructor to control the number of threads used by parsers supporting multithreading (OBO and OBO JSON at the moment).&lt;/li&gt;
			&lt;li&gt;Deprecation warnings for suspected uses of the &lt;code&gt;is_a&lt;/code&gt; pseudo-relationship since subclasses/superclasses is now to be handled by the owner &lt;code&gt;Ontology&lt;/code&gt;.&lt;/li&gt;
			&lt;li&gt;Support for subclass/superclass edition directly from the objects returned by &lt;code&gt;Term.subclasses()&lt;/code&gt; and &lt;code&gt;Term.superclasses()&lt;/code&gt;. (&lt;a href="https://github.com/althonos/pronto/issues/84"&gt;#84&lt;/a&gt;)&amp;nbsp;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
		&lt;li&gt;&lt;em&gt;Changed:&lt;/em&gt;
		&lt;ul&gt;
			&lt;li&gt;Updated &lt;code&gt;fastobo&lt;/code&gt; to &lt;code&gt;v0.8&lt;/code&gt;, which reduce memory footprint of identifiers, and improves the parser speed.&lt;/li&gt;
			&lt;li&gt;Improved OBO parser performance using threading plus zero-copy validation of identifiers on &lt;code&gt;Xref&lt;/code&gt; instantiation.&lt;/li&gt;
			&lt;li&gt;Improved performance in debug mode by having the typechecker only extract the wrapped function signature once.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
		&lt;li&gt;&lt;em&gt;Fixed:&lt;/em&gt;
		&lt;ul&gt;
			&lt;li&gt;OBO parser crashing on files containing &lt;code&gt;idspace&lt;/code&gt; clauses in their headers.&lt;/li&gt;
			&lt;li&gt;Reference management issue with binary operations of &lt;code&gt;TermSet&lt;/code&gt;.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
		&lt;li&gt;&lt;em&gt;Removed:&lt;/em&gt;
		&lt;ul&gt;
			&lt;li&gt;&lt;code&gt;nanoset&lt;/code&gt; depency, which was not useful anymore in Python 3.8 and caused issues with multithreading when processing OBO frames in parallel.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;&lt;a href="https://github.com/althonos/pronto/compare/v2.0.1...v2.1.0"&gt;2.1.0&lt;/a&gt; - 2020-03-23
	&lt;ul&gt;
		&lt;li&gt;&lt;em&gt;Added:&lt;/em&gt;
		&lt;ul&gt;
			&lt;li&gt;&lt;code&gt;Synonym.xrefs&lt;/code&gt; now has a setter. (&lt;a href="https://github.com/althonos/pronto/issues/70"&gt;#70&lt;/a&gt;)&lt;/li&gt;
			&lt;li&gt;&lt;code&gt;pickle&lt;/code&gt; support for &lt;code&gt;Ontology&lt;/code&gt;. (&lt;a href="https://github.com/althonos/pronto/issues/66"&gt;#66&lt;/a&gt;)&lt;/li&gt;
			&lt;li&gt;&lt;code&gt;RdfXmlParser&lt;/code&gt; support for &lt;code&gt;owl:inverseOf&lt;/code&gt; and &lt;code&gt;rdfs:subPropertyOf&lt;/code&gt;.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
		&lt;li&gt;&lt;em&gt;Changed:&lt;/em&gt;
		&lt;ul&gt;
			&lt;li&gt;&lt;code&gt;Synonym.xrefs&lt;/code&gt; now returns a mutable set that can be used to add &lt;code&gt;Xref&lt;/code&gt; to the synonym directly.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
		&lt;li&gt;&lt;em&gt;Fixed:&lt;/em&gt;
		&lt;ul&gt;
			&lt;li&gt;&lt;code&gt;SynonymType.type&lt;/code&gt; setter does not consider all synonym types as undeclared anymore. (&lt;a href="https://github.com/althonos/pronto/issues/71"&gt;#71&lt;/a&gt;)&lt;/li&gt;
			&lt;li&gt;&lt;code&gt;RdfXmlParser&lt;/code&gt; crashing on synonym types definition without a label like in Uberon. (&lt;a href="https://github.com/althonos/pronto/issues/67"&gt;#67&lt;/a&gt;)&lt;/li&gt;
			&lt;li&gt;&lt;code&gt;FastoboSerializer&lt;/code&gt; crashing when encountering a relationship with at least one &lt;code&gt;replaced_by&lt;/code&gt; clause.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;&lt;a href="https://github.com/althonos/pronto/compare/v2.0.0...v2.0.1"&gt;2.0.1&lt;/a&gt; - 2020-02-19
	&lt;ul&gt;
		&lt;li&gt;&lt;em&gt;Fixed&lt;/em&gt;
		&lt;ul&gt;
			&lt;li&gt;Internal handling of ontology data forcing an &lt;code&gt;Ontology&lt;/code&gt; to outlive all of the &lt;code&gt;Term&lt;/code&gt;s created from it.&lt;/li&gt;
			&lt;li&gt;&lt;code&gt;Term.id&lt;/code&gt; property missing a return type annotation.&lt;/li&gt;
			&lt;li&gt;&lt;code&gt;Term.equivalent_to&lt;/code&gt; not returning a &lt;code&gt;TermSet&lt;/code&gt; but a set of strings.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
		&lt;li&gt;&lt;em&gt;Changed&lt;/em&gt;
		&lt;ul&gt;
			&lt;li&gt;Refactored implementation of &lt;code&gt;SubclassesIterator&lt;/code&gt; and&lt;br&gt;
			&lt;code&gt;SuperclassesIterator&lt;/code&gt; to make both use the interal subclassing cache.&lt;/li&gt;
			&lt;li&gt;Make &lt;code&gt;Term.is_leaf&lt;/code&gt; use internal subclassing cache to make it run in constant time.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;&lt;a href="https://github.com/althonos/pronto/compare/v1.2.0...v2.0.0"&gt;2.0.0&lt;/a&gt; - 2020-02-14
	&lt;ul&gt;
		&lt;li&gt;&lt;em&gt;Added:&lt;/em&gt;
		&lt;ul&gt;
			&lt;li&gt;&lt;code&gt;TermSet.subclasses&lt;/code&gt; and &lt;code&gt;TermSet.superclasses&lt;/code&gt; methods to query all&lt;br&gt;
			the subclasses / superclasses of all &lt;code&gt;Term&lt;/code&gt;.&lt;/li&gt;
			&lt;li&gt;&lt;code&gt;TermSet&lt;/code&gt; class to the top-level &lt;code&gt;pronto&lt;/code&gt; module.&lt;/li&gt;
			&lt;li&gt;Dynamic management of subclassing cache for the &lt;code&gt;Ontology&lt;/code&gt; class.&lt;/li&gt;
			&lt;li&gt;Setters for &lt;code&gt;Term.consider&lt;/code&gt;, &lt;code&gt;Term.union_of&lt;/code&gt; and &lt;code&gt;Term.intersection_of&lt;/code&gt;.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
		&lt;li&gt;&lt;em&gt;Removed:&lt;/em&gt;
		&lt;ul&gt;
			&lt;li&gt;&lt;code&gt;cache&lt;/code&gt; keyword argument for the &lt;code&gt;Ontology&lt;/code&gt;.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
		&lt;li&gt;&lt;em&gt;Fixed:&lt;/em&gt;
		&lt;ul&gt;
			&lt;li&gt;&lt;code&gt;SuperclassesIterator.to_set&lt;/code&gt; being named &lt;code&gt;to_self&lt;/code&gt; because of a typo.&lt;/li&gt;
			&lt;li&gt;Several bugs affecting the &lt;code&gt;fastobo&lt;/code&gt;-backed serializer.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;&lt;a href="https://github.com/althonos/pronto/compare/v1.1.5...v1.2.0"&gt;1.2.0&lt;/a&gt; - 2020-02-10
	&lt;ul&gt;
		&lt;li&gt;&lt;em&gt;Added:&lt;/em&gt;
		&lt;ul&gt;
			&lt;li&gt;Parameter &lt;code&gt;with_self&lt;/code&gt; to disable reflexivity of &lt;code&gt;Term.subclasses&lt;/code&gt; and &lt;code&gt;Term.superclasses&lt;/code&gt; iterators.&lt;/li&gt;
			&lt;li&gt;&lt;code&gt;TermSet&lt;/code&gt; class which stores a set of terms efficiently while providing some useful shortcuts to access the underlying data.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
		&lt;li&gt;&lt;em&gt;Changed:&lt;/em&gt;
		&lt;ul&gt;
			&lt;li&gt;Moved code of &lt;code&gt;Term.subclasses&lt;/code&gt; and &lt;code&gt;Term.superclasses&lt;/code&gt; to a dedicated iterator class in the &lt;code&gt;pronto.logic&lt;/code&gt; submodule.&lt;/li&gt;
			&lt;li&gt;Dropped &lt;code&gt;contexter&lt;/code&gt; requirement.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
		&lt;li&gt;&lt;em&gt;Fixed:&lt;/em&gt;
		&lt;ul&gt;
			&lt;li&gt;Fix a typo in &lt;code&gt;Synonym.type&lt;/code&gt; setter leading to a potential bug when the given &lt;code&gt;type&lt;/code&gt; is &lt;code&gt;None&lt;/code&gt;.&lt;/li&gt;
			&lt;li&gt;Fix miscellaneous bugs found with &lt;code&gt;mypy&lt;/code&gt;.&lt;/li&gt;
			&lt;li&gt;&lt;code&gt;fastobo&lt;/code&gt; serializer crashing on namespace clauses because of a type issue.&lt;/li&gt;
			&lt;li&gt;&lt;code&gt;fastobo&lt;/code&gt; parsers using data version clauses as format version clauses.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;&lt;a href="https://github.com/althonos/pronto/compare/v1.1.4...v1.1.5"&gt;1.1.5&lt;/a&gt; - 2020-01-25
	&lt;ul&gt;
		&lt;li&gt;&lt;em&gt;Changed:&lt;/em&gt;
		&lt;ul&gt;
			&lt;li&gt;Bumped &lt;code&gt;fastobo&lt;/code&gt; to &lt;code&gt;v0.7.0&lt;/code&gt;, switching parser implementation to use multi-threading in order to speedup the parser process.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;&lt;a href="https://github.com/althonos/pronto/compare/v1.1.3...v1.1.4"&gt;1.1.4&lt;/a&gt; - 2020-01-21
	&lt;ul&gt;
		&lt;li&gt;&lt;em&gt;Added:&lt;/em&gt;
		&lt;ul&gt;
			&lt;li&gt;Explicit support for Python 3.8.&lt;/li&gt;
			&lt;li&gt;Support for Windows-style line endings (&lt;a href="https://github.com/althonos/pronto/issues/53"&gt;#53&lt;/a&gt;)&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;&lt;a href="https://github.com/althonos/pronto/compare/v1.1.2...v1.1.3"&gt;1.1.3&lt;/a&gt; - 2019-11-10
	&lt;ul&gt;
		&lt;li&gt;&lt;em&gt;Fixed:&lt;/em&gt;
		&lt;ul&gt;
			&lt;li&gt;Handling of some clauses in &lt;code&gt;FastoboParser&lt;/code&gt;.&lt;/li&gt;
			&lt;li&gt;&lt;code&gt;OboSerializer&lt;/code&gt; occasionaly missing lines between term and typedef frames.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
		&lt;li&gt;&lt;em&gt;Added:&lt;/em&gt;
		&lt;ul&gt;
			&lt;li&gt;Missing docstrings to some &lt;code&gt;Entity&lt;/code&gt; properties.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;&lt;a href="https://github.com/althonos/pronto/compare/v1.1.1...v1.1.2"&gt;1.1.2&lt;/a&gt; - 2019-10-30
	&lt;ul&gt;
		&lt;li&gt;&lt;em&gt;Fixed:&lt;/em&gt;
		&lt;ul&gt;
			&lt;li&gt;&lt;code&gt;RdfXMLParser&lt;/code&gt; crashing on entities with &lt;code&gt;rdf:label&lt;/code&gt; elements without literal content.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;&lt;a href="https://github.com/althonos/pronto/compare/v1.1.0...v1.1.1"&gt;1.1.1&lt;/a&gt; - 2019-10-29
	&lt;ul&gt;
		&lt;li&gt;&lt;em&gt;Fixed:&lt;/em&gt;
		&lt;ul&gt;
			&lt;li&gt;&lt;code&gt;pronto.serializers&lt;/code&gt; module not being embedded in Wheel distribution.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;&lt;a href="https://github.com/althonos/pronto/compare/v1.0.0...v1.1.0"&gt;1.1.0&lt;/a&gt; - 2019-10-24
	&lt;ul&gt;
		&lt;li&gt;&lt;em&gt;Added:&lt;/em&gt;
		&lt;ul&gt;
			&lt;li&gt;&lt;code&gt;Entity.add_synonym&lt;/code&gt; method to create a new synonym and add it to an entity.&lt;/li&gt;
			&lt;li&gt;&lt;code&gt;@roundrepr&lt;/code&gt; now adds a minimal docstring to the generated &lt;code&gt;__repr__&lt;/code&gt; method.&lt;/li&gt;
			&lt;li&gt;&lt;code&gt;Ontology&lt;/code&gt; caches subclassing relationships to greatly improve performance of &lt;code&gt;Term.subclasses&lt;/code&gt;.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
		&lt;li&gt;&lt;em&gt;Changed:&lt;/em&gt;
		&lt;ul&gt;
			&lt;li&gt;&lt;code&gt;Entity&lt;/code&gt; subclasses now store their &lt;code&gt;id&lt;/code&gt; directly to improve performance.&lt;/li&gt;
			&lt;li&gt;&lt;code&gt;Term.subclasses&lt;/code&gt; and &lt;code&gt;Term.superclasses&lt;/code&gt; use &lt;code&gt;collections.deque&lt;/code&gt; instead of &lt;code&gt;queue.Queue&lt;/code&gt; as a LIFO structure since thread-safety is not needed.&lt;/li&gt;
			&lt;li&gt;&lt;code&gt;chardet&lt;/code&gt; result is now used even when prediction confidence is under 100% to detect encoding of the handle passed to &lt;code&gt;Ontology&lt;/code&gt;.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
		&lt;li&gt;&lt;em&gt;Fixed:&lt;/em&gt;
		&lt;ul&gt;
			&lt;li&gt;&lt;code&gt;SynonymType&lt;/code&gt; comparison implementation.&lt;/li&gt;
			&lt;li&gt;&lt;code&gt;Synonym.type&lt;/code&gt; getter crashing on &lt;code&gt;type&lt;/code&gt; not being &lt;code&gt;None&lt;/code&gt;.&lt;/li&gt;
			&lt;li&gt;&lt;code&gt;RdfXMLParser&lt;/code&gt; crashing on synonymtypedefs without scope specifiers.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;&lt;a href="https://github.com/althonos/pronto/compare/v1.0.0-alpha.3...v1.0.0"&gt;1.0.0&lt;/a&gt; - 2019-10-11
	&lt;ul&gt;
		&lt;li&gt;&lt;em&gt;Fixed:&lt;/em&gt;
		&lt;ul&gt;
			&lt;li&gt;Issues with typedef serialization in &lt;code&gt;FastoboSerializer&lt;/code&gt;.&lt;/li&gt;
			&lt;li&gt;&lt;code&gt;Ontology.create_term&lt;/code&gt; and &lt;code&gt;Ontology.create_relationship&lt;/code&gt; not raising &lt;code&gt;ValueError&lt;/code&gt; when given an identifier already in the knowledge graph.&lt;/li&gt;
			&lt;li&gt;Signature of &lt;code&gt;BaseSerializer.dump&lt;/code&gt; to remove &lt;code&gt;encoding&lt;/code&gt; argument.&lt;/li&gt;
			&lt;li&gt;Missing &lt;code&gt;__slots__&lt;/code&gt; in &lt;code&gt;Entity&lt;/code&gt; in non-typechecking runtime.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
		&lt;li&gt;&lt;em&gt;Changed:&lt;/em&gt;
		&lt;ul&gt;
			&lt;li&gt;Bumped &lt;code&gt;fastobo&lt;/code&gt;</description>
  </descriptions>
</resource>
764
90
views
downloads
All versions This version
Views 76412
Downloads 900
Data volume 133.7 MB0 Bytes
Unique views 5688
Unique downloads 450

Share

Cite as