MetaData
A representation of the MetaData element of the GA4GH Phenopacket Schema
Parameters:
Name | Type | Description | Default |
---|---|---|---|
created_by
|
str
|
identifier (such as ORCID id) of the person who created this Phenopacket |
required |
citation
|
Citation
|
PubMed identifier of the article from which the data for the phenopacket was taken, optional |
None
|
Source code in pyphetools/creation/metadata.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 |
|
__init__(created_by, citation=None)
Constructor
Source code in pyphetools/creation/metadata.py
default_versions_with_hpo(version)
Add resources for HPO (with specified version), GENO, HGNC, and OMIM (with default versions) The HPO version can be easily obtained from the HpoParser using the get_version() function
Parameters:
Name | Type | Description | Default |
---|---|---|---|
version
|
str
|
version of the Human Phenotype Ontology (HPO) used to create this phenopacket |
required |
pmid
|
str
|
PubMed identifier of the article from which the data for the phenopacket was taken, optional |
required |
pubmed_title
|
str
|
title of the article (if any), for use in the Resource section |
required |
Source code in pyphetools/creation/metadata.py
geno(version=default_versions.get('geno'))
summary GENO is used for three terms: homozygous, heterozygous, hemizygous For this reason, we use a default version, since we assume these terms will not change. Args: version (str, optional): GENO version. Defaults to "2022-03-05".
Returns: type: Resource object representing GENO
Source code in pyphetools/creation/metadata.py
get_pmid()
Returns:
Type | Description |
---|---|
str:
|
The PubMed identifier |
Raises:
Type | Description |
---|---|
ValueError
|
Throw an error if no PMID is available |
Source code in pyphetools/creation/metadata.py
hpo(version)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
version
|
str
|
version of the Human Phenotype Ontology (HPO) used to create this phenopacket |
required |
Source code in pyphetools/creation/metadata.py
mondo(version=default_versions.get('mondo'))
Add a resource for Mondo to the current MetaData object
Parameters:
Name | Type | Description | Default |
---|---|---|---|
version
|
the Mondo version |
get('mondo')
|
Source code in pyphetools/creation/metadata.py
set_external_reference(pmid, pubmed_title)
Set the external reference for this phenopacket/individual to be the PubMed identifier and title of an article
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pmid
|
str
|
The PubMed identifier of the publication from which the data was derived |
required |
pubmed_title
|
str
|
The title of the publication |
required |
Source code in pyphetools/creation/metadata.py
to_ga4gh()
Use a time stamp for the current instant
Returns:
Type | Description |
---|---|
PPkt.MetaData
|
A MetaData formated as a GA4GH Phenopacket Schema message |