annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/lib/python3.8/site-packages/mygene-3.2.2.dist-info/METADATA @ 68:5028fdace37b

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 16:23:26 -0400
parents
children
rev   line source
jpayne@68 1 Metadata-Version: 2.1
jpayne@68 2 Name: mygene
jpayne@68 3 Version: 3.2.2
jpayne@68 4 Summary: Python Client for MyGene.Info services.
jpayne@68 5 Home-page: https://github.com/biothings/mygene.py
jpayne@68 6 Author: Chunlei Wu, Cyrus Afrasiabi, Sebastien Lelong
jpayne@68 7 Author-email: cwu@scripps.edu
jpayne@68 8 License: BSD
jpayne@68 9 Keywords: biology gene annotation web service client api
jpayne@68 10 Platform: UNKNOWN
jpayne@68 11 Classifier: Programming Language :: Python
jpayne@68 12 Classifier: Programming Language :: Python :: 2
jpayne@68 13 Classifier: Programming Language :: Python :: 2.7
jpayne@68 14 Classifier: Programming Language :: Python :: 3
jpayne@68 15 Classifier: Programming Language :: Python :: 3.4
jpayne@68 16 Classifier: Programming Language :: Python :: 3.5
jpayne@68 17 Classifier: Programming Language :: Python :: 3.6
jpayne@68 18 Classifier: Programming Language :: Python :: 3.7
jpayne@68 19 Classifier: Programming Language :: Python :: 3.8
jpayne@68 20 Classifier: Programming Language :: Python :: 3.9
jpayne@68 21 Classifier: Development Status :: 5 - Production/Stable
jpayne@68 22 Classifier: License :: OSI Approved :: BSD License
jpayne@68 23 Classifier: Operating System :: POSIX
jpayne@68 24 Classifier: Operating System :: MacOS :: MacOS X
jpayne@68 25 Classifier: Operating System :: Microsoft :: Windows
jpayne@68 26 Classifier: Operating System :: OS Independent
jpayne@68 27 Classifier: Intended Audience :: Science/Research
jpayne@68 28 Classifier: Intended Audience :: Developers
jpayne@68 29 Classifier: Topic :: Utilities
jpayne@68 30 Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
jpayne@68 31 Requires-Dist: biothings-client (>=0.2.6)
jpayne@68 32
jpayne@68 33 .. image:: https://pepy.tech/badge/mygene
jpayne@68 34 :target: https://pepy.tech/project/mygene
jpayne@68 35
jpayne@68 36 .. image:: https://img.shields.io/pypi/dm/mygene.svg
jpayne@68 37 :target: https://pypistats.org/packages/mygene
jpayne@68 38
jpayne@68 39 .. image:: https://badge.fury.io/py/mygene.svg
jpayne@68 40 :target: https://pypi.org/project/mygene/
jpayne@68 41
jpayne@68 42 .. image:: https://img.shields.io/pypi/pyversions/mygene.svg
jpayne@68 43 :target: https://pypi.org/project/mygene/
jpayne@68 44
jpayne@68 45 .. image:: https://img.shields.io/pypi/format/mygene.svg
jpayne@68 46 :target: https://pypi.org/project/mygene/
jpayne@68 47
jpayne@68 48 .. image:: https://img.shields.io/pypi/status/mygene.svg
jpayne@68 49 :target: https://pypi.org/project/mygene/
jpayne@68 50
jpayne@68 51 Intro
jpayne@68 52 =====
jpayne@68 53
jpayne@68 54 MyGene.Info_ provides simple-to-use REST web services to query/retrieve gene annotation data.
jpayne@68 55 It's designed with simplicity and performance emphasized. ``mygene``, is an easy-to-use Python
jpayne@68 56 wrapper to access MyGene.Info_ services.
jpayne@68 57
jpayne@68 58 .. _MyGene.Info: http://mygene.info
jpayne@68 59 .. _biothings_client: https://pypi.org/project/biothings-client/
jpayne@68 60 .. _mygene: https://pypi.org/project/mygene/
jpayne@68 61
jpayne@68 62 Since v3.1.0, mygene_ Python package has become a thin wrapper of underlying biothings_client_ package,
jpayne@68 63 a universal Python client for all `BioThings APIs <http://biothings.io>`_, including MyGene.info_.
jpayne@68 64 The installation of mygene_ will install biothings_client_ automatically. The following code snippets
jpayne@68 65 are essentially equivalent:
jpayne@68 66
jpayne@68 67
jpayne@68 68 * Continue using mygene_ package
jpayne@68 69
jpayne@68 70 .. code-block:: python
jpayne@68 71
jpayne@68 72 In [1]: import mygene
jpayne@68 73 In [2]: mg = mygene.MyGeneInfo()
jpayne@68 74
jpayne@68 75 * Use biothings_client_ package directly
jpayne@68 76
jpayne@68 77 .. code-block:: python
jpayne@68 78
jpayne@68 79 In [1]: from biothings_client import get_client
jpayne@68 80 In [2]: mg = get_client('gene')
jpayne@68 81
jpayne@68 82 After that, the use of ``mg`` instance is exactly the same, e.g. the usage examples below.
jpayne@68 83
jpayne@68 84 Requirements
jpayne@68 85 ============
jpayne@68 86 python >=2.7 (including python3)
jpayne@68 87
jpayne@68 88 (Python 2.6 might still work, but it's not supported any more since v3.1.0.)
jpayne@68 89
jpayne@68 90 biothings_client_ (>=0.2.0, install using "pip install biothings_client")
jpayne@68 91
jpayne@68 92 Optional dependencies
jpayne@68 93 ======================
jpayne@68 94 `pandas <http://pandas.pydata.org>`_ (install using "pip install pandas") is required for
jpayne@68 95 returning a list of gene objects as `DataFrame <http://pandas.pydata.org/pandas-docs/stable/dsintro.html#dataframe>`_.
jpayne@68 96
jpayne@68 97 Installation
jpayne@68 98 =============
jpayne@68 99
jpayne@68 100 Option 1
jpayne@68 101 pip install mygene
jpayne@68 102
jpayne@68 103 Option 2
jpayne@68 104 download/extract the source code and run::
jpayne@68 105
jpayne@68 106 python setup.py install
jpayne@68 107
jpayne@68 108 Option 3
jpayne@68 109 install the latest code directly from the repository::
jpayne@68 110
jpayne@68 111 pip install -e git+https://github.com/biothings/mygene.py#egg=mygene
jpayne@68 112
jpayne@68 113 Version history
jpayne@68 114 ===============
jpayne@68 115
jpayne@68 116 `CHANGES.txt <https://raw.githubusercontent.com/SuLab/mygene.py/master/CHANGES.txt>`_
jpayne@68 117
jpayne@68 118 Tutorial
jpayne@68 119 =========
jpayne@68 120
jpayne@68 121 * `ID mapping using mygene module in Python <http://nbviewer.ipython.org/6771106>`_
jpayne@68 122
jpayne@68 123 Documentation
jpayne@68 124 =============
jpayne@68 125
jpayne@68 126 http://mygene-py.readthedocs.org/
jpayne@68 127
jpayne@68 128 Usage
jpayne@68 129 =====
jpayne@68 130
jpayne@68 131 .. code-block:: python
jpayne@68 132
jpayne@68 133 In [1]: import mygene
jpayne@68 134
jpayne@68 135 In [2]: mg = mygene.MyGeneInfo()
jpayne@68 136
jpayne@68 137 In [3]: mg.getgene(1017)
jpayne@68 138 Out[3]:
jpayne@68 139 {'_id': '1017',
jpayne@68 140 'entrezgene': 1017,
jpayne@68 141 'name': 'cyclin-dependent kinase 2',
jpayne@68 142 'symbol': 'CDK2',
jpayne@68 143 'taxid': 9606,
jpayne@68 144 ...
jpayne@68 145 }
jpayne@68 146
jpayne@68 147 # use "fields" parameter to return a subset of fields
jpayne@68 148 In [4]: mg.getgene(1017, fields='name,symbol,refseq')
jpayne@68 149 Out[4]:
jpayne@68 150 {'_id': '1017',
jpayne@68 151 'name': 'cyclin-dependent kinase 2',
jpayne@68 152 'refseq': {'genomic': ['AC_000144.1',
jpayne@68 153 'NC_000012.11',
jpayne@68 154 'NG_028086.1',
jpayne@68 155 'NT_029419.12',
jpayne@68 156 'NW_001838059.1'],
jpayne@68 157 'protein': ['NP_001789.2', 'NP_439892.2'],
jpayne@68 158 'rna': ['NM_001798.3', 'NM_052827.2']},
jpayne@68 159 'symbol': 'CDK2'}
jpayne@68 160
jpayne@68 161 In [5]: mg.getgene(1017, fields=['name', 'symbol', 'refseq.rna'])
jpayne@68 162 Out[5]:
jpayne@68 163 {'_id': '1017',
jpayne@68 164 'name': 'cyclin-dependent kinase 2',
jpayne@68 165 'refseq': {'rna': ['NM_001798.5', 'NM_052827.3']},
jpayne@68 166 'symbol': 'CDK2'}
jpayne@68 167
jpayne@68 168
jpayne@68 169 In [6]: mg.getgenes([1017,1018,'ENSG00000148795'], fields='name,symbol,entrezgene,taxid')
jpayne@68 170 Out[6]:
jpayne@68 171 [{'_id': '1017',
jpayne@68 172 'entrezgene': 1017,
jpayne@68 173 'name': 'cyclin-dependent kinase 2',
jpayne@68 174 'query': '1017',
jpayne@68 175 'symbol': 'CDK2',
jpayne@68 176 'taxid': 9606},
jpayne@68 177 {'_id': '1018',
jpayne@68 178 'entrezgene': 1018,
jpayne@68 179 'name': 'cyclin-dependent kinase 3',
jpayne@68 180 'query': '1018',
jpayne@68 181 'symbol': 'CDK3',
jpayne@68 182 'taxid': 9606},
jpayne@68 183 {'_id': '1586',
jpayne@68 184 'entrezgene': 1586,
jpayne@68 185 'name': 'cytochrome P450, family 17, subfamily A, polypeptide 1',
jpayne@68 186 'query': 'ENSG00000148795',
jpayne@68 187 'symbol': 'CYP17A1',
jpayne@68 188 'taxid': 9606}]
jpayne@68 189
jpayne@68 190 # return results in Pandas DataFrame
jpayne@68 191 In [7]: mg.getgenes([1017,1018,'ENSG00000148795'], fields='name,symbol,entrezgene,taxid', as_dataframe=True)
jpayne@68 192 Out[7]:
jpayne@68 193 _id entrezgene \
jpayne@68 194 query
jpayne@68 195 1017 1017 1017
jpayne@68 196 1018 1018 1018
jpayne@68 197 ENSG00000148795 1586 1586
jpayne@68 198
jpayne@68 199 name symbol \
jpayne@68 200 query
jpayne@68 201 1017 cyclin-dependent kinase 2 CDK2
jpayne@68 202 1018 cyclin-dependent kinase 3 CDK3
jpayne@68 203 ENSG00000148795 cytochrome P450, family 17, subfamily A, polyp... CYP17A1
jpayne@68 204
jpayne@68 205 taxid
jpayne@68 206 query
jpayne@68 207 1017 9606
jpayne@68 208 1018 9606
jpayne@68 209 ENSG00000148795 9606
jpayne@68 210
jpayne@68 211 [3 rows x 5 columns]
jpayne@68 212
jpayne@68 213 In [8]: mg.query('cdk2', size=5)
jpayne@68 214 Out[8]:
jpayne@68 215 {'hits': [{'_id': '1017',
jpayne@68 216 '_score': 373.24667,
jpayne@68 217 'entrezgene': 1017,
jpayne@68 218 'name': 'cyclin-dependent kinase 2',
jpayne@68 219 'symbol': 'CDK2',
jpayne@68 220 'taxid': 9606},
jpayne@68 221 {'_id': '12566',
jpayne@68 222 '_score': 353.90176,
jpayne@68 223 'entrezgene': 12566,
jpayne@68 224 'name': 'cyclin-dependent kinase 2',
jpayne@68 225 'symbol': 'Cdk2',
jpayne@68 226 'taxid': 10090},
jpayne@68 227 {'_id': '362817',
jpayne@68 228 '_score': 264.88477,
jpayne@68 229 'entrezgene': 362817,
jpayne@68 230 'name': 'cyclin dependent kinase 2',
jpayne@68 231 'symbol': 'Cdk2',
jpayne@68 232 'taxid': 10116},
jpayne@68 233 {'_id': '52004',
jpayne@68 234 '_score': 21.221401,
jpayne@68 235 'entrezgene': 52004,
jpayne@68 236 'name': 'CDK2-associated protein 2',
jpayne@68 237 'symbol': 'Cdk2ap2',
jpayne@68 238 'taxid': 10090},
jpayne@68 239 {'_id': '143384',
jpayne@68 240 '_score': 18.617256,
jpayne@68 241 'entrezgene': 143384,
jpayne@68 242 'name': 'CDK2-associated, cullin domain 1',
jpayne@68 243 'symbol': 'CACUL1',
jpayne@68 244 'taxid': 9606}],
jpayne@68 245 'max_score': 373.24667,
jpayne@68 246 'took': 10,
jpayne@68 247 'total': 28}
jpayne@68 248
jpayne@68 249 In [9]: mg.query('reporter:1000_at')
jpayne@68 250 Out[9]:
jpayne@68 251 {'hits': [{'_id': '5595',
jpayne@68 252 '_score': 11.163337,
jpayne@68 253 'entrezgene': 5595,
jpayne@68 254 'name': 'mitogen-activated protein kinase 3',
jpayne@68 255 'symbol': 'MAPK3',
jpayne@68 256 'taxid': 9606}],
jpayne@68 257 'max_score': 11.163337,
jpayne@68 258 'took': 6,
jpayne@68 259 'total': 1}
jpayne@68 260
jpayne@68 261 In [10]: mg.query('symbol:cdk2', species='human')
jpayne@68 262 Out[10]:
jpayne@68 263 {'hits': [{'_id': '1017',
jpayne@68 264 '_score': 84.17707,
jpayne@68 265 'entrezgene': 1017,
jpayne@68 266 'name': 'cyclin-dependent kinase 2',
jpayne@68 267 'symbol': 'CDK2',
jpayne@68 268 'taxid': 9606}],
jpayne@68 269 'max_score': 84.17707,
jpayne@68 270 'took': 27,
jpayne@68 271 'total': 1}
jpayne@68 272
jpayne@68 273 In [11]: mg.querymany([1017, '695'], scopes='entrezgene', species='human')
jpayne@68 274 Finished.
jpayne@68 275 Out[11]:
jpayne@68 276 [{'_id': '1017',
jpayne@68 277 'entrezgene': 1017,
jpayne@68 278 'name': 'cyclin-dependent kinase 2',
jpayne@68 279 'query': '1017',
jpayne@68 280 'symbol': 'CDK2',
jpayne@68 281 'taxid': 9606},
jpayne@68 282 {'_id': '695',
jpayne@68 283 'entrezgene': 695,
jpayne@68 284 'name': 'Bruton agammaglobulinemia tyrosine kinase',
jpayne@68 285 'query': '695',
jpayne@68 286 'symbol': 'BTK',
jpayne@68 287 'taxid': 9606}]
jpayne@68 288
jpayne@68 289 In [12]: mg.querymany([1017, '695'], scopes='entrezgene', species=9606)
jpayne@68 290 Finished.
jpayne@68 291 Out[12]:
jpayne@68 292 [{'_id': '1017',
jpayne@68 293 'entrezgene': 1017,
jpayne@68 294 'name': 'cyclin-dependent kinase 2',
jpayne@68 295 'query': '1017',
jpayne@68 296 'symbol': 'CDK2',
jpayne@68 297 'taxid': 9606},
jpayne@68 298 {'_id': '695',
jpayne@68 299 'entrezgene': 695,
jpayne@68 300 'name': 'Bruton agammaglobulinemia tyrosine kinase',
jpayne@68 301 'query': '695',
jpayne@68 302 'symbol': 'BTK',
jpayne@68 303 'taxid': 9606}]
jpayne@68 304
jpayne@68 305 In [13]: mg.querymany([1017, '695'], scopes='entrezgene', species=9606, as_dataframe=True)
jpayne@68 306 Finished.
jpayne@68 307 Out[13]:
jpayne@68 308 _id entrezgene name symbol \
jpayne@68 309 query
jpayne@68 310 1017 1017 1017 cyclin-dependent kinase 2 CDK2
jpayne@68 311 695 695 695 Bruton agammaglobulinemia tyrosine kinase BTK
jpayne@68 312
jpayne@68 313 taxid
jpayne@68 314 query
jpayne@68 315 1017 9606
jpayne@68 316 695 9606
jpayne@68 317
jpayne@68 318 [2 rows x 5 columns]
jpayne@68 319
jpayne@68 320 In [14]: mg.querymany([1017, '695', 'NA_TEST'], scopes='entrezgene', species='human')
jpayne@68 321 Finished.
jpayne@68 322 Out[14]:
jpayne@68 323 [{'_id': '1017',
jpayne@68 324 'entrezgene': 1017,
jpayne@68 325 'name': 'cyclin-dependent kinase 2',
jpayne@68 326 'query': '1017',
jpayne@68 327 'symbol': 'CDK2',
jpayne@68 328 'taxid': 9606},
jpayne@68 329 {'_id': '695',
jpayne@68 330 'entrezgene': 695,
jpayne@68 331 'name': 'Bruton agammaglobulinemia tyrosine kinase',
jpayne@68 332 'query': '695',
jpayne@68 333 'symbol': 'BTK',
jpayne@68 334 'taxid': 9606},
jpayne@68 335 {'notfound': True, 'query': 'NA_TEST'}]
jpayne@68 336
jpayne@68 337 # query all human kinases using fetch_all parameter:
jpayne@68 338 In [15]: kinases = mg.query('name:kinase', species='human', fetch_all=True)
jpayne@68 339 In [16]: kinases
jpayne@68 340 Out [16]" <generator object _fetch_all at 0x7fec027d2eb0>
jpayne@68 341
jpayne@68 342 # kinases is a Python generator, now you can loop through it to get all 1073 hits:
jpayne@68 343 In [16]: for gene in kinases:
jpayne@68 344 ....: print gene['_id'], gene['symbol']
jpayne@68 345 Out [16]: <output omitted here>
jpayne@68 346
jpayne@68 347
jpayne@68 348 Contact
jpayne@68 349 ========
jpayne@68 350 Drop us any question or feedback:
jpayne@68 351 * biothings@googlegroups.com (public discussion)
jpayne@68 352 * help@mygene.info (reach devs privately)
jpayne@68 353 * `Github issues <https://github.com/biothings/mygene.info/issues>`_
jpayne@68 354 * on twitter `@mygeneinfo <https://twitter.com/mygeneinfo>`_
jpayne@68 355 * Post a question on `BioStars.org <https://www.biostars.org/p/new/post/?tag_val=mygene>`_ with tag #mygene.
jpayne@68 356
jpayne@68 357
jpayne@68 358