get_gems

besca.tl.sig.get_gems(setName, BASE_URL, UP_suffix='_UP', DN_suffix='_DN', verbose=False)[source]

Connect to GEMS, dowload related geneset (specified by setName, can be a prefix/suffix) and return them This function combines genesets (signatures) scores (UP and DN) genes. Non directionaly geneset are by default considered as UP. :param setName: setName to find in GeMs (can be a subset) :type setName: str :param BASE_URL: GeMS url for the api. Should look like: ‘http://’ + hostname + ‘:’ + localport :type BASE_URL: str :param UP_suffix: str suffix indicating that the suffix indicating the signature is in UP direction.

This should be the end of the signatures names ($)

Parameters:

DN_suffix (str | default = “_DN”) – str suffix indicating that the suffix indicating the signature is in DN direction. This should be the end of the signatures names ($)

Returns:

  • a dictionnary containing the signature names as key, and subdictionnary as direction

  • (Key could then be (UP or DN). values are then the gene names.)

Example

>>> pytest.skip('Test is only for here as example and should not be executed')
>>> import yaml
>>> with open('mongocredentials/credential.yml') as f:
...     cred = yaml.safe_load(f)
>>> get_GEMS_sign('Tcell', BASE_URL =  'http://' + cred['hostname'] + ':' +  cred['localport'])