dipper.sources.GWASCatalog module

class dipper.sources.GWASCatalog.GWASCatalog(graph_type, are_bnodes_skolemized)

Bases: dipper.sources.Source.Source

The NHGRI-EBI Catalog of published genome-wide association studies.

We link the variants recorded here to the curated EFO-classes using a “contributes_to” linkage because the only thing we know is that the SNPs are associated with the trait/disease, but we don’t know if it is actually causative.

Description of the GWAS catalog is here: http://www.ebi.ac.uk/gwas/docs/fileheaders#_file_headers_for_catalog_version_1_0_1

GWAS also pulishes Owl files described here http://www.ebi.ac.uk/gwas/docs/ontology

Status: IN PROGRESS

GWASFILE = 'gwas-catalog-associations_ontology-annotated.tsv'
GWASFTP = 'ftp://ftp.ebi.ac.uk/pub/databases/gwas/releases/latest'
fetch(is_dl_forced=False)
Parameters:is_dl_forced
Returns:
files = {'catalog': {'url': 'ftp://ftp.ebi.ac.uk/pub/databases/gwas/releases/latest/gwas-catalog-associations_ontology-annotated.tsv', 'file': 'gwas-catalog-associations_ontology-annotated.tsv'}, 'efo': {'url': 'http://www.ebi.ac.uk/efo/efo.owl', 'file': 'efo.owl'}, 'so': {'url': 'http://purl.obolibrary.org/obo/so.owl', 'file': 'so.owl'}}
getTestSuite()

An abstract method that should be overwritten with tests appropriate for the specific source. :return:

parse(limit=None)

abstract method to parse all data from an external resource, that was fetched in fetch() this should be overridden by subclasses :return: None

process_catalog(limit=None)
Parameters:limit
Returns:
terms = {'age': 'EFO:0000246', 'cell_line_repository': 'CLO:0000008', 'collection': 'ERO:0002190', 'ethnic_group': 'EFO:0001799', 'race': 'SIO:001015', 'sampling_time': 'EFO:0000689'}