コード例 #1
0
     RETURN
         gwas {.id, .trait},
         gwas_to_variant {.se, .pval, .samplesize, .beta},
         variant {.name},
         gene {.name},
         protein {.uniprot_id},
         pathway {.reactome_id, .name}
     ORDER BY gwas_to_variant.pval ;
 """,
 query_type=GalleryQueryType.cypher,
 schema=GallerySchema(
     nodes=[
         NetworkNodeSchema(
             meta_node="Gwas",
             id_col="gwas.id",
             label_formatter=gwas_label_formatter(),
         ),
         NetworkNodeSchema(
             meta_node="Variant",
             id_col="variant.name",
             label_col="variant.name",
         ),
         NetworkNodeSchema(
             meta_node="Gene",
             id_col="gene.name",
             label_col="gene.name",
             match_node_by="name",
         ),
         NetworkNodeSchema(
             meta_node="Protein",
             id_col="protein.uniprot_id",
コード例 #2
0
ファイル: graph.py プロジェクト: MRCIEU/epigraphdb_web
from app.funcs.network_graph import NetworkEdgeSchema, NetworkNodeSchema
from app.utils.meta_graph import gwas_label_formatter

node_schemas = [
    NetworkNodeSchema(
        meta_node="Gwas",
        id_col="trait.id",
        label_formatter=gwas_label_formatter(node_name=None,
                                             id_col="trait.id",
                                             trait_col="trait.trait"),
    ),
    NetworkNodeSchema(
        meta_node="Gwas",
        id_col="assoc_trait.id",
        label_formatter=gwas_label_formatter(
            node_name=None,
            id_col="assoc_trait.id",
            trait_col="assoc_trait.trait",
        ),
    ),
]

edge_schemas = [
    NetworkEdgeSchema(
        from_col="trait.id",
        to_col="assoc_trait.id",
        from_meta_node="Gwas",
        arrows=False,
        meta_rel="GENETIC_COR",
        hover_title_formatter=lambda row: None,
    )
コード例 #3
0
from app.funcs.network_graph import NetworkEdgeSchema, NetworkNodeSchema
from app.utils.meta_graph import gwas_label_formatter, mr_eve_title_formatter

node_schemas = [
    NetworkNodeSchema(
        meta_node="GwasExposure",
        id_col="trait.id",
        label_formatter=gwas_label_formatter(node_name="trait"),
    ),
    NetworkNodeSchema(
        meta_node="Gwas",
        id_col="assoc_trait.id",
        label_formatter=gwas_label_formatter(node_name="assoc_trait"),
    ),
    NetworkNodeSchema(meta_node="Variant", id_col="variant.name"),
    NetworkNodeSchema(
        meta_node="Gene", id_col="gene.name", match_node_by="name"
    ),
    NetworkNodeSchema(meta_node="Drug", id_col="drug.label"),
]

edge_schemas = [
    NetworkEdgeSchema(
        from_col="assoc_trait.id",
        to_col="trait.id",
        from_meta_node="Gwas",
        hover_title_formatter=mr_eve_title_formatter(
            exposure_id="assoc_trait.id",
            outcome_id="trait.id",
            estimate="mr.b",
            se="mr.se",
コード例 #4
0
         disease_gwas {.id, .trait},
         risk_factor_gwas {.id, .trait},
         variant {.name},
         gene {.name},
         drug {.label},
         obs_cor {.cor},
         mr {.b, .se, .pval, .selection, .method, .moescore}
     ORDER BY mr.pval ;
 """,
 query_type=GalleryQueryType.cypher,
 schema=GallerySchema(
     nodes=[
         NetworkNodeSchema(
             meta_node="GwasPrimary",
             id_col="disease_gwas.id",
             label_formatter=gwas_label_formatter(node_name="disease_gwas"),
         ),
         NetworkNodeSchema(
             meta_node="Gwas",
             id_col="risk_factor_gwas.id",
             label_formatter=gwas_label_formatter(
                 node_name="risk_factor_gwas"
             ),
         ),
         NetworkNodeSchema(meta_node="Variant", id_col="variant.name"),
         NetworkNodeSchema(
             meta_node="Gene", id_col="gene.name", match_node_by="name"
         ),
         NetworkNodeSchema(meta_node="Drug", id_col="drug.label"),
     ],
     edges=[
コード例 #5
0
ファイル: graph.py プロジェクト: MRCIEU/epigraphdb_web
from app.funcs.network_graph import NetworkEdgeSchema, NetworkNodeSchema
from app.utils.meta_graph import gwas_label_formatter

node_schemas = [
    NetworkNodeSchema(
        id_col="gwas.id",
        label_formatter=gwas_label_formatter(node_name="gwas"),
        meta_node="Gwas",
    ),
    NetworkNodeSchema(id_col="triple.id", meta_node="LiteratureTriple"),
    NetworkNodeSchema(id_col="lit.id", meta_node="Literature"),
]

edge_schemas = [
    NetworkEdgeSchema(from_col="gwas.id",
                      to_col="triple.id",
                      from_meta_node="Gwas"),
    NetworkEdgeSchema(
        from_col="gwas.id",
        to_col="lit.id",
        from_meta_node="Gwas",
        arrows=False,
        dashes=True,
    ),
    NetworkEdgeSchema(
        from_col="triple.id",
        to_col="lit.id",
        from_meta_node="LiteratureTriple",
    ),
]
コード例 #6
0
from app.funcs.network_graph import NetworkEdgeSchema, NetworkNodeSchema
from app.utils.meta_graph import gwas_label_formatter, mr_eve_title_formatter

node_schemas = [
    NetworkNodeSchema(
        meta_node="GwasExposure",
        id_col="exposure.id",
        label_formatter=gwas_label_formatter(node_name="exposure"),
    ),
    NetworkNodeSchema(
        meta_node="GwasOutcome",
        id_col="outcome.id",
        label_formatter=gwas_label_formatter(node_name="outcome"),
    ),
    NetworkNodeSchema(
        meta_node="Gwas",
        id_col="cf.id",
        label_formatter=gwas_label_formatter(node_name="cf"),
    ),
]

edge_confounder_exposure = {
    "confounder":
    NetworkEdgeSchema(
        from_col="cf.id",
        to_col="exposure.id",
        from_meta_node="Gwas",
        dashes=True,
        hover_title_formatter=mr_eve_title_formatter(
            exposure_id="cf.id",
            outcome_id="exposure.id",
コード例 #7
0
ファイル: graph.py プロジェクト: MRCIEU/epigraphdb_web
from app.funcs.network_graph import NetworkEdgeSchema, NetworkNodeSchema
from app.utils.meta_graph import gwas_label_formatter, mr_eve_title_formatter

# NOTE: it is impossible to specify a study to be exposure or outcome
#       in the current api spec, as a study can be both exposure or outcome
#       each time.
node_schemas = [
    NetworkNodeSchema(
        meta_node="Gwas",
        id_col="exposure.id",
        label_formatter=gwas_label_formatter(
            node_name=None, id_col="exposure.id", trait_col="exposure.trait"
        ),
    ),
    NetworkNodeSchema(
        meta_node="Gwas",
        id_col="outcome.id",
        label_formatter=gwas_label_formatter(
            node_name=None, id_col="outcome.id", trait_col="outcome.trait"
        ),
    ),
]

edge_schemas = [
    NetworkEdgeSchema(
        from_col="exposure.id",
        to_col="outcome.id",
        from_meta_node="Gwas",
        hover_title_formatter=mr_eve_title_formatter(
            exposure_id="exposure.id", outcome_id="outcome.id"
        ),