Skip to content

Commit

Permalink
#34 : add compact parameter that was added in COPASI 4.36
Browse files Browse the repository at this point in the history
  • Loading branch information
fbergmann committed Jul 6, 2023
1 parent cf619c9 commit 6ddf2cc
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 54 deletions.
7 changes: 5 additions & 2 deletions basico/model_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -3932,9 +3932,12 @@ def have_miriam_resources():
return False


def get_miriam_resources():
def get_miriam_resources(compact=True):
"""Retrieves the current MIRIAM resources from the configuration
:param compact: whether to return a compact version of the resources (default: True)
:type compact: bool
:return: dataframe with the list of current miriam resources
:rtype: pandas.DataFrame
"""
Expand All @@ -3948,7 +3951,7 @@ def get_miriam_resources():
resources.append({
'resource': res.getMIRIAMDisplayName(),
'is_citation': res.getMIRIAMCitation(),
'uri': res.getIdentifiersOrgURL()
'uri': res.getIdentifiersOrgURL(compact)
})
except AttributeError:
logger.error("Couldn't retrieve list of miriam resources, please update the python-copasi version")
Expand Down
104 changes: 52 additions & 52 deletions docs/notebooks/Working_with_Annotations.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -119,42 +119,42 @@
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>2D-PAGE protein</th>\n",
" <th>BIND</th>\n",
" <td>False</td>\n",
" <td>http://identifiers.org/2d-page.protein</td>\n",
" <td>http://identifiers.org/bind</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3DMET</th>\n",
" <th>ChEBI</th>\n",
" <td>False</td>\n",
" <td>http://identifiers.org/3dmet</td>\n",
" <td>http://identifiers.org/CHEBI</td>\n",
" </tr>\n",
" <tr>\n",
" <th>ABS</th>\n",
" <th>Ensembl</th>\n",
" <td>False</td>\n",
" <td>http://identifiers.org/abs</td>\n",
" <td>http://identifiers.org/ensembl</td>\n",
" </tr>\n",
" <tr>\n",
" <th>AFTOL</th>\n",
" <th>Enzyme Nomenclature</th>\n",
" <td>False</td>\n",
" <td>http://identifiers.org/aftol.taxonomy</td>\n",
" <td>http://identifiers.org/ec-code</td>\n",
" </tr>\n",
" <tr>\n",
" <th>AGD</th>\n",
" <th>UniProt Knowledgebase</th>\n",
" <td>False</td>\n",
" <td>http://identifiers.org/agd</td>\n",
" <td>http://identifiers.org/uniprot</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" is_citation uri\n",
"resource \n",
"2D-PAGE protein False http://identifiers.org/2d-page.protein\n",
"3DMET False http://identifiers.org/3dmet\n",
"ABS False http://identifiers.org/abs\n",
"AFTOL False http://identifiers.org/aftol.taxonomy\n",
"AGD False http://identifiers.org/agd"
" is_citation uri\n",
"resource \n",
"BIND False http://identifiers.org/bind\n",
"ChEBI False http://identifiers.org/CHEBI\n",
"Ensembl False http://identifiers.org/ensembl\n",
"Enzyme Nomenclature False http://identifiers.org/ec-code\n",
"UniProt Knowledgebase False http://identifiers.org/uniprot"
]
},
"execution_count": 4,
Expand Down Expand Up @@ -210,24 +210,24 @@
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>DOI</th>\n",
" <th>PubMed</th>\n",
" <td>True</td>\n",
" <td>http://identifiers.org/doi</td>\n",
" <td>http://identifiers.org/pubmed</td>\n",
" </tr>\n",
" <tr>\n",
" <th>ISBN</th>\n",
" <th>DOI</th>\n",
" <td>True</td>\n",
" <td>http://identifiers.org/isbn</td>\n",
" <td>http://identifiers.org/doi</td>\n",
" </tr>\n",
" <tr>\n",
" <th>PubMed</th>\n",
" <th>arXiv</th>\n",
" <td>True</td>\n",
" <td>http://identifiers.org/pubmed</td>\n",
" <td>http://identifiers.org/arxiv</td>\n",
" </tr>\n",
" <tr>\n",
" <th>arXiv</th>\n",
" <th>ISBN</th>\n",
" <td>True</td>\n",
" <td>http://identifiers.org/arxiv</td>\n",
" <td>http://identifiers.org/isbn</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
Expand All @@ -236,10 +236,10 @@
"text/plain": [
" is_citation uri\n",
"resource \n",
"DOI True http://identifiers.org/doi\n",
"ISBN True http://identifiers.org/isbn\n",
"PubMed True http://identifiers.org/pubmed\n",
"arXiv True http://identifiers.org/arxiv"
"DOI True http://identifiers.org/doi\n",
"arXiv True http://identifiers.org/arxiv\n",
"ISBN True http://identifiers.org/isbn"
]
},
"execution_count": 5,
Expand Down Expand Up @@ -284,7 +284,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "0dd5435610744bf39e4219311017c9b5",
"model_id": "059e35d03a4c4144a06529c105d6150f",
"version_major": 2,
"version_minor": 0
},
Expand Down Expand Up @@ -315,37 +315,37 @@
{
"data": {
"text/plain": [
"{'creators': [{'first_name': 'Harish',\n",
"{'creators': [{'first_name': 'Lukas',\n",
" 'last_name': 'Endler',\n",
" 'email': '[email protected]',\n",
" 'organization': 'EMBL-EBI'},\n",
" {'first_name': 'Harish',\n",
" 'last_name': 'Dharuri',\n",
" 'email': '[email protected]',\n",
" 'organization': 'California Institute of Technology'},\n",
" {'first_name': 'Jacky L',\n",
" 'last_name': 'Snoep',\n",
" 'email': '[email protected]',\n",
" 'organization': 'Stellenbosh University'},\n",
" {'first_name': 'Lukas',\n",
" 'last_name': 'Endler',\n",
" 'email': '[email protected]',\n",
" 'organization': 'EMBL-EBI'}],\n",
" 'organization': 'Stellenbosh University'}],\n",
" 'references': [{'id': '10951190',\n",
" 'uri': 'http://identifiers.org/pubmed/10951190',\n",
" 'resource': 'PubMed',\n",
" 'description': ''}],\n",
" 'descriptions': [{'id': 'sce00010',\n",
" 'qualifier': 'is',\n",
" 'uri': 'http://identifiers.org/kegg.pathway/sce00010',\n",
" 'resource': 'KEGG Pathway'},\n",
" {'id': 'BIOMD0000000064',\n",
" 'descriptions': [{'id': 'MODEL6623915522',\n",
" 'qualifier': 'is',\n",
" 'uri': 'http://identifiers.org/biomodels.db/BIOMD0000000064',\n",
" 'uri': 'http://identifiers.org/biomodels.db/MODEL6623915522',\n",
" 'resource': 'BioModels Database'},\n",
" {'id': 'GO:0006096',\n",
" 'qualifier': 'is',\n",
" 'uri': 'http://identifiers.org/go/GO:0006096',\n",
" 'uri': 'http://identifiers.org/GO:0006096',\n",
" 'resource': 'Gene Ontology'},\n",
" {'id': 'MODEL6623915522',\n",
" {'id': 'sce00010',\n",
" 'qualifier': 'is',\n",
" 'uri': 'http://identifiers.org/biomodels.db/MODEL6623915522',\n",
" 'uri': 'http://identifiers.org/kegg.pathway/sce00010',\n",
" 'resource': 'KEGG Pathway'},\n",
" {'id': 'BIOMD0000000064',\n",
" 'qualifier': 'is',\n",
" 'uri': 'http://identifiers.org/biomodels.db/BIOMD0000000064',\n",
" 'resource': 'BioModels Database'},\n",
" {'id': 'REACT_723',\n",
" 'qualifier': 'is homolog to',\n",
Expand Down Expand Up @@ -389,7 +389,7 @@
" 'resource': 'KEGG Compound'},\n",
" {'id': 'CHEBI:16908',\n",
" 'qualifier': 'is',\n",
" 'uri': 'http://identifiers.org/chebi/CHEBI:16908',\n",
" 'uri': 'http://identifiers.org/CHEBI:16908',\n",
" 'resource': 'ChEBI'}]}"
]
},
Expand Down Expand Up @@ -460,7 +460,7 @@
" 'last_name': 'Bergmann',\n",
" 'email': '[email protected]',\n",
" 'organization': 'Heidelberg University'}],\n",
" 'created': datetime.datetime(2021, 5, 11, 10, 20, 12, tzinfo=tzutc())}"
" 'created': datetime.datetime(2023, 7, 6, 9, 20, 43, tzinfo=tzutc())}"
]
},
"execution_count": 12,
Expand Down Expand Up @@ -503,7 +503,7 @@
" 'qualifier': 'is',\n",
" 'uri': 'http://identifiers.org/biomodels.db/MODEL6623915522',\n",
" 'resource': 'BioModels Database'}],\n",
" 'created': datetime.datetime(2021, 5, 11, 10, 20, 12, tzinfo=tzutc())}"
" 'created': datetime.datetime(2023, 7, 6, 9, 20, 43, tzinfo=tzutc())}"
]
},
"execution_count": 14,
Expand Down Expand Up @@ -549,7 +549,7 @@
" 'qualifier': 'is',\n",
" 'uri': 'http://identifiers.org/biomodels.db/MODEL6623915522',\n",
" 'resource': 'BioModels Database'}],\n",
" 'created': datetime.datetime(2021, 5, 11, 10, 20, 12, tzinfo=tzutc())}"
" 'created': datetime.datetime(2023, 7, 6, 9, 20, 43, tzinfo=tzutc())}"
]
},
"execution_count": 16,
Expand Down Expand Up @@ -592,8 +592,8 @@
" 'qualifier': 'is',\n",
" 'uri': 'http://identifiers.org/biomodels.db/MODEL6623915522',\n",
" 'resource': 'BioModels Database'}],\n",
" 'modifications': [datetime.datetime(2021, 5, 11, 10, 20, 12, 853419, tzinfo=tzutc())],\n",
" 'created': datetime.datetime(2021, 5, 11, 10, 20, 12, tzinfo=tzutc())}"
" 'modifications': [datetime.datetime(2023, 7, 6, 9, 20, 43, 723553, tzinfo=tzutc())],\n",
" 'created': datetime.datetime(2023, 7, 6, 9, 20, 43, tzinfo=tzutc())}"
]
},
"execution_count": 18,
Expand All @@ -608,7 +608,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -622,7 +622,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
"version": "3.11.3"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 6ddf2cc

Please sign in to comment.