mygene

Python Client for MyGene.Info services
Download

mygene Ranking & Summary

Advertisement

  • Rating:
  • License:
  • BSD License
  • Price:
  • FREE
  • Publisher Name:
  • Chunlei Wu
  • Publisher web site:
  • https://bitbucket.org/newgene/

mygene Tags


mygene Description

MyGene.Info provides simple-to-use REST web services to query/retrieve gene annotation data. It's designed with simplicity and performance emphasized. mygene is an easy-to-use Python wrapper to access MyGene.Info services.Installation Option 1 pip install mygene Options 2 download/extract the source code and run:: python setup install Option 3 install the latest code directly from the repository:: pip install -e hg+https://bitbucket.org/newgene/mygene#egg=mygeneUsageIn : import mygeneIn : mg = mygene.MyGeneInfo()In : mg.getgene(1017)Out: {'_id': '1017', 'name': 'cyclin-dependent kinase 2', 'symbol': 'CDK2'}In : mg.getgene(1017, 'name,symbol,refseq')Out:{'_id': '1017', 'name': 'cyclin-dependent kinase 2', 'refseq': {'genomic': , 'protein': , 'rna': }, 'symbol': 'CDK2'}In : mg.getgene(1017, 'name,symbol,refseq.rna')Out:{'_id': '1017', 'name': 'cyclin-dependent kinase 2', 'refseq': {'rna': }, 'symbol': 'CDK2'}In : mg.getgenes()Out:In : mg.query('cdk2', limit=5)Out:{'etag': '1358e787924ddb', 'limit': 5, 'rows': , 'skip': 0, 'total_rows': 29}In : mg.query('reporter:1000_at')Out:{'etag': '13574eee908e81', 'limit': 25, 'rows': , , , , , ], 'id': 55682}, 'id': '5595', 'name': 'mitogen-activated protein kinase 3', 'score': 8.231849670410156, 'symbol': 'MAPK3', 'taxid': 9606}], 'skip': 0, 'total_rows': 1}In : mg.query('symbol:cdk2 AND species:human')Out:{'etag': '1358e787924ddb', 'limit': 25, 'rows': , , , , , ], 'id': 74409}, 'id': '1017', 'name': 'cyclin-dependent kinase 2', 'score': 71.34159851074219, 'symbol': 'CDK2', 'taxid': 9606}], 'skip': 0, 'total_rows': 1}In : mg.findgenes(, scope='entrezgene', species='human')querying 1-2...Finished.Out:In : mg.findgenes(, scope='entrezgene', species=9606)querying 1-2...Finished.Out:In : mg.findgenes(, scope='entrezgene', species='human')querying 1-3...Finished.1 input ids found no hit: Out:In : mg.findgenes(, scope='entrezgene', species='human', raw=True)querying 1-3...Finished.Out:, , , , , ], 'id': 74409}, 'id': '1017', 'key': , 'name': 'cyclin-dependent kinase 2', 'symbol': 'CDK2', 'taxid': 9606}, {'homologene': {'genes': , , , ], 'id': 30953}, 'id': '695', 'key': , 'name': 'Bruton agammaglobulinemia tyrosine kinase', 'symbol': 'BTK', 'taxid': 9606}]Product's homepage


mygene Related Software