dipper.sources.MyDrug module¶
-
class
dipper.sources.MyDrug.
MyDrug
(graph_type, are_bnodes_skolemized, data_release_version=None)¶ Bases:
dipper.sources.Source.Source
Drugs and Compounds stored in the BioThings database
-
MY_DRUG_API
= 'http://c.biothings.io/v1/query'¶
-
check_if_remote_is_newer
(localfile)¶ Need to figure out how biothings records releases, for now if the file exists we will assume it is a fully downloaded cache :param localfile: str file path :return: boolean True if remote file is newer else False
-
fetch
(is_dl_forced=False)¶ Note there is a unpublished mydrug client that works like this: from mydrug import MyDrugInfo md = MyDrugInfo() r = list(md.query(‘_exists_:aeolus’, fetch_all=True))
Parameters: is_dl_forced – boolean, force download Returns:
-
files
= {'aeolus': {'file': 'aeolus.json'}}¶
-
parse
(limit=None, or_limit=1)¶ Parse mydrug files :param limit: int limit json docs processed :param or_limit: int odds ratio limit :return: None
-