Nanopublications templates
NanopubClaim
Bases: Nanopub
Quickly claim a statement.
Constructs statement triples around the provided text following the Hypotheses and Claims Ontology (http://purl.org/petapico/o/hycl).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
conf |
NanopubConf
|
config for the nanopub |
required |
claim |
str
|
the text of the statement, example: ‘All cats are grey’ |
required |
Source code in nanopub/templates/nanopub_claim.py
NanopubRetract
Bases: Nanopub
Retract a nanopublication.
Publish a retraction nanpublication that declares retraction of the nanopublication that corresponds to the ‘uri’ argument.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
conf |
NanopubConf
|
config for the nanopub |
required |
uri |
str
|
The uri pointing to the to-be-retracted nanopublication |
required |
force |
bool
|
Toggle using force to retract, this will even retract the nanopublication if it is signed with a different public key than the one in the user profile. |
False
|
Source code in nanopub/templates/nanopub_retract.py
NanopubIndex
Bases: Nanopub
Publish a list of nanopub URIs in a Nanopub Index
Parameters:
Name | Type | Description | Default |
---|---|---|---|
conf |
NanopubConf
|
config for the nanopub |
required |
np_list |
Union[List[str], List[Nanopub]]
|
List of nanopub URIs |
required |
title |
str
|
Title of the Nanopub Index |
required |
description |
str
|
Description of the Nanopub Index |
required |
creation_time |
str
|
Creation time of the Nanopub Index, in format YYYY-MM-DDThh-mm-ss |
required |
creators |
List[str]
|
List of the ORCID of the creators of the Nanopub Index |
required |
see_also |
str
|
A URL to a page with further information on the Nanopub Index |
None
|
Source code in nanopub/templates/nanopub_index.py
create_nanopub_index(conf, np_list, title, description, creation_time, creators, see_also=None)
Create a Nanopub index.
Publish a list of nanopub URIs in a Nanopub Index
Parameters:
Name | Type | Description | Default |
---|---|---|---|
np_list |
Union[List[str], List[Nanopub]]
|
List of nanopub URIs |
required |
title |
str
|
Title of the Nanopub Index |
required |
description |
str
|
Description of the Nanopub Index |
required |
creation_time |
str
|
Creation time of the Nanopub Index, in format YYYY-MM-DDThh-mm-ss |
required |
creators |
List[str]
|
List of the ORCID of the creators of the Nanopub Index |
required |
see_also |
str
|
A URL to a page with further information on the Nanopub Index |
None
|
Source code in nanopub/templates/nanopub_index.py
NanopubIntroduction
Bases: Nanopub
Publish a Nanopub introduction to introduce a key pair for an ORCID
Parameters:
Name | Type | Description | Default |
---|---|---|---|
conf |
NanopubConf
|
config for the nanopub |
required |
host |
Optional[str]
|
the service where the keypair are hosted |
None
|