dipper.utils.DipperUtil module

class dipper.utils.DipperUtil.DipperUtil

Bases: object

Various utilities and quick methods used in this application

(A little too quick) Per: https://www.ncbi.nlm.nih.gov/books/NBK25497/ NCBI recommends that users post

no more than three URL requests per second and limit large jobs to either weekends or between 9:00 PM and 5:00 AM Eastern time during weekdays

restructuring to make bulk queries is less likely to result in another ban for peppering them with one offs

static get_hgnc_id_from_symbol(gene_symbol)

Get HGNC curie from symbol using monarch and mygene services :param gene_symbol: :return:

static get_homologene_by_gene_num(gene_num)
static get_ncbi_taxon_num_by_label(label)

Here we want to look up the NCBI Taxon id using some kind of label. It will only return a result if there is a unique hit.

Returns:
static is_id_in_mondo(curie, mondo_min)
Parameters:
Returns:

boolean, true if ID is in mondo and false otherwise

static remove_control_characters(string)
Filters out charcters in any of these unicode catagories [Cc] Other, Control ( 65 characters)
, …
[Cf] Other, Format (151 characters) [Cn] Other, Not Assigned ( 0 characters – none have this property) [Co] Other, Private Use ( 6 characters) [Cs] Other, Surrogate ( 6 characters)