conseguiR is an R package for integrative prioritization of genes and
regulatory elements using germline association signal, somatic mutation signal,
and epigenomic regulatory signal in a graph-based framework.
The package is designed for analyses where no single modality is sufficient on
its own. Instead of treating GWAS hits, somatic signals, and regulatory
activity as disconnected results, conseguiR maps them into a shared
gene-regulatory context, propagates signal through that context, and returns
interpretable locus-level and network-level outputs.
At a high level, conseguiR supports the following workflow:
- score germline signal with MAGMA at genes and regulatory elements
- score somatic signal with
dndscvat genes andfishHookat regulatory elements - score epigenomic regulatory activity from bigWig tracks
- impose all modality-specific scores onto a backend gene-regulatory graph
- run diffusion to integrate regulatory evidence into gene-level support
- call a compact selected subgraph on a gene-gene network
- visualize scores, loci, and the final selected subgraph
The package returns structured R objects by default. Disk output is optional.
The package exposes both stage-wise functions and a top-level wrapper.
prepare_germline_scores()prepare_somatic_scores()prepare_epigenomic_scores()build_scored_gene_reg_graph()run_gene_reg_diffusion()call_selected_subgraph()plot_scores()plot_locus_context()plot_selected_subgraph()
run_conseguiR()
The package also exports several lower-level branch-specific wrappers such as
run_germline_gene_scoring() and run_somatic_regulatory_scoring(). Those are
useful when a user wants direct branch-level control, but the functions above
are the main user-facing workflow.
result <- run_conseguiR(
gwas_sumstats = "<path-or-table>",
somatic_maf = "<path-or-table>",
reference_bfile = "<plink-reference-prefix>",
dndscv_refdb = "<dndscv-reference-db>",
epigenomic_tracks = c("<track1.bw>", "<track2.bw>", "<track3.bw>"),
target_genes = 50L,
candidate_pool_size = 400L, # must be >= target_genes
verbose = TRUE
)candidate_pool_size controls how many top diffusion-ranked genes are handed
to the final subgraph solver. It must be at least as large as
target_genes, and larger values generally increase solver runtime.
This returns a pipeline bundle containing:
- germline score bundle
- somatic score bundle
- epigenomic score bundle
- scored gene-regulatory graph
- diffusion output
- selected subgraph
- final selected-subgraph plot bundle
By default, conseguiR uses its backend-owned ENCODE-derived regulatory
universe for regulatory scoring and graph imposition. In the common workflow,
you do not need to supply reg_ref_path manually.
germline <- prepare_germline_scores(
gwas_sumstats = "<path-or-table>",
reference_bfile = "<plink-reference-prefix>"
)
somatic <- prepare_somatic_scores(
maf = "<path-or-table>",
refdb = "<dndscv-reference-db>"
)
epigenomic <- prepare_epigenomic_scores(
bw_files = c("<track1.bw>", "<track2.bw>", "<track3.bw>")
)
scored_graph <- build_scored_gene_reg_graph(
germline_scores = germline,
somatic_scores = somatic,
epigenomic_scores = epigenomic
)
diffusion <- run_gene_reg_diffusion(scored_graph = scored_graph)
selected_subgraph <- call_selected_subgraph(
diffusion = diffusion,
target_genes = 50L
)
selected_plot <- plot_selected_subgraph(
selected_subgraph = selected_subgraph,
save_plot = FALSE
)conseguiR supports three main plotting layers.
Use plot_scores() for generic score plots.
plot_scores(
scores = germline,
which = "gene_scores",
plot_mode = "rank",
save_plot = FALSE
)
plot_scores(
scores = somatic,
which = "gene_scores",
plot_mode = "volcano",
save_plot = FALSE
)plot_mode controls geometry:
plot_mode = "rank"for ranked feature plotsplot_mode = "volcano"for z-score versus-log10(p)plots
Use plot_locus_context() to inspect a genomic region.
plot_locus_context(
chromosome = "8",
start = 127200000,
end = 128200000,
scored_graph = scored_graph,
diffusion = diffusion,
selected_subgraph = selected_subgraph,
gwas_sumstats = "<path-or-table>",
genes_to_plot = c("MYC"),
label_top_lit_snps = 3L,
snp_keywords = c("lymphoma", "autoimmune"),
save_plot = FALSE
)This plot can show:
- GWAS locus SNPs
- regulatory-element input scores by modality
- regulatory-to-gene links in the locus
- post-diffusion gene support
- optional SNP labels and highlighted genes
When genes_to_plot is supplied, locus plots focus on those genes and their
linked regulatory elements. SNP literature labels can be made phenotype-aware
with snp_keywords; conseguiR tries PMC full-text keyword matching first and
falls back to PubMed title/abstract matching when full text is unavailable.
Use plot_validated_locus_context() for phenotype-supported regulatory-element
follow-up. It plots the focused genes' top K linked regulatory elements by
combined score, then marks regulatory elements with Ensembl PMID-backed
phenotype support using red boxes. The support layer can be filtered with
reg_elem_keywords, and the returned bundle includes regulatory-element-to-PMID
tables for manual review.
Use plot_selected_subgraph() for the final network view.
plot_selected_subgraph(
selected_subgraph = selected_subgraph,
title = "Selected disease subgraph",
save_plot = FALSE
)All plotting functions return editable ggplot objects inside the returned
bundle.
conseguiR ships backend seed resources with the package under
inst/extdata/backend.
These resources support:
- the gene-regulatory graph
- the gene-gene graph
- gene and regulatory annotations needed by the workflow
In a source-checkout or development workflow, the package may materialize or
reuse working backend files in data/processed. In an installed-package
workflow, users interact with the package-owned backend resources rather than
rebuilding those graphs from scratch.
conseguiR depends on a small number of nontrivial scientific tools.
MAGMA is required for germline scoring and must be available externally.
The package looks for MAGMA in this order:
- the explicit
magma_pathargument options(conseguiR.magma_path = "/path/to/magma")Sys.getenv("CONSEGUIR_MAGMA_PATH")magmaonPATH
These settings should point to the MAGMA executable itself, not just its
folder. The PATH fallback only works when MAGMA can already be invoked by
typing magma in the shell environment seen by R. This makes autodiscovery a
useful convenience on standard installs, but explicit configuration is often
safer on HPC or project-local setups.
Diffusion and selected-subgraph calling use Python-backed stages managed
internally through basilisk. Users do not normally need to wire up a Python
interpreter by hand just to run the package, although developer and HPC
workflows may still use a project-specific conda environment for convenience.
For practical setup instructions, see:
The package documentation is currently centered on the function-level help pages and installation guide. A refreshed installed-package vignette will be added back after the public release cleanup.
conseguiR is a research package under active development rather than a CRAN
release. The main public workflow is in place, and the installed package is
designed to ship the backend seeds needed for normal use.