get_similar_geneset

besca.tl.sig.get_similar_geneset(request, BASE_URL, similarity_coefficient=0.5, method='overlap', outputGeneset=False)[source]

Encapsulating small similary research. Will look for simalirity within GeMs and the mongoDB collections and returns the associated geneseets. :param request: request specificity, if the hosted collection is large, one might need to specify more into details the geneset. :type request: string :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_similar_geneset(request='?setName=dz:770_UP&source=CREEDS&user=Public&subtype=disease',
        BASE_URL =  'http://' + cred['hostname'] + ':' +  cred['localport'], outputGeneset = True)
>>> # this code is only displayed not executed