| Title: | Isoform-Level Protein Interaction Network Analysis |
|---|---|
| Description: | Compares predicted protein-interaction neighbourhoods of transcript isoforms. The user supplies isoform seeds labelled "up" or "down", for example the isoforms that gain or lose usage in a differential transcript usage analysis. Each seed set is expanded in a bundled isoform-resolved predicted interaction network, or in a user-supplied igraph network, and the resulting neighbourhoods are compared per gene and summarised across genes. The package also provides connected-component analysis, network diagnostics, plots, and over-representation and gene set enrichment analysis of neighbourhood statistics. Protein-identical transcripts are resolved to shared representatives, and annotated nonsense-mediated and non-stop decay transcripts are excluded by default. Statistical testing of isoform usage remains upstream of the package. |
| Authors: | Dimitrios S. Kanakoglou [aut, cre] (ORCID: <https://orcid.org/0000-0001-7735-2029>), Nikolas A. Mumm [aut] (ORCID: <https://orcid.org/0009-0009-5751-0291>), Isabella Østerlund [ctb, ths] (Isoform interaction model; protein-identical isoform map), Kristoffer Vitting-Seerup [cph, ths], Isoform Analysis Group [cph] |
| Maintainer: | Dimitrios S. Kanakoglou <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.99.0 |
| Built: | 2026-11-03 19:51:54 UTC |
| Source: | https://github.com/BiocStaging/IsoNetAnalyzeR |
Sums raw count rows into the kept transcript representative for each protein-identical group. This transformation must be performed before differential expression or transcript-usage model fitting.
aggregate_duplicate_counts( x, feature_data = NULL, assay = "counts", duplicate_map = NULL )aggregate_duplicate_counts( x, feature_data = NULL, assay = "counts", duplicate_map = NULL )
x |
A numeric matrix/data frame of raw counts, or a single-assay
|
feature_data |
Optional data frame aligned to matrix rows, containing
at least |
assay |
Assay name used for a |
duplicate_map |
Optional validated custom map. |
An object of class DuplicateCountAggregation: a list with
object, feature_data, audit, and summary.
map <- isonet_duplicate_map() counts <- matrix( c(10L, 4L, 7L, 2L, 1L, 3L, 5L, 5L, 5L), nrow = 3, byrow = TRUE, dimnames = list(c(map$kept_ENST[1], map$redundant_ENST[1], map$kept_ENST[2]), paste0("sample", seq_len(3))) ) features <- data.frame( gene_id = c(map$kept_ENSG[1], map$redundant_ENSG[1], map$kept_ENSG[2]), isoform_id = rownames(counts) ) res <- aggregate_duplicate_counts(counts, features) res$object res$summarymap <- isonet_duplicate_map() counts <- matrix( c(10L, 4L, 7L, 2L, 1L, 3L, 5L, 5L, 5L), nrow = 3, byrow = TRUE, dimnames = list(c(map$kept_ENST[1], map$redundant_ENST[1], map$kept_ENST[2]), paste0("sample", seq_len(3))) ) features <- data.frame( gene_id = c(map$kept_ENSG[1], map$redundant_ENSG[1], map$kept_ENSG[2]), isoform_id = rownames(counts) ) res <- aggregate_duplicate_counts(counts, features) res$object res$summary
Returns node-level statistics for every vertex in a virtual pulldown
subgraph. When multiple seed vertices are present, distance_from_seed
is the average shortest-path distance across all seeds.
analyze_subgraph(graph)analyze_subgraph(graph)
graph |
An igraph object with a |
Pi statistics (mean_pi, pi_entropy) are computed only for
seed vertices (order == 0), where they characterise the confidence profile
of the interactions that anchored the pulldown. For non-seed vertices these
columns are NA — their edges were pulled in by BFS expansion and the
pi values reflect the network globally rather than any seed-specific signal.
A data frame with one row per vertex and the following columns:
Vertex name (transcript ID).
Logical flag copied directly from the graph's
order == 0 annotation.
Number of edges connected to the vertex.
Local clustering coefficient.
Average shortest-path distance from all seeds.
Inf indicates the vertex is unreachable from the seed(s).
Mean of the pi edge-attribute values across all
incident edges. NA for non-seed vertices.
Shannon entropy of the normalised pi values
across all incident edges (bits). Measures how evenly interaction
confidence is spread across a seed's partners: low entropy indicates a
few high-confidence interactions; high entropy indicates many edges of
similar moderate confidence. NA for non-seed vertices and for
seed vertices with only one incident edge.
obj <- IsoNetAnalyzeR("example") g <- virtual_pulldown(obj, "ENST00000621271", order = 1) head(analyze_subgraph(g))obj <- IsoNetAnalyzeR("example") g <- virtual_pulldown(obj, "ENST00000621271", order = 1) head(analyze_subgraph(g))
Produced by run_component_analysis. Stores Tier-1 structural
and Tier-2 topological summary tables derived from decomposing the merged
cross-gene network of a DifferentialPulldownAnalysis run.
## S4 method for signature 'ComponentAnalysis' show(object)## S4 method for signature 'ComponentAnalysis' show(object)
object |
A ComponentAnalysis object. |
Topology classification (topology_class):
Each component is heuristically classified based on its degree
centralization score:
"hub-spoke"Centralization > 0.6: degree is concentrated in one or a few nodes.
"clique-like"Centralization < 0.2: connectivity is relatively uniformly distributed.
"chain-like"Centralization between 0.2 and 0.6: a intermediate degree concentration.
These thresholds are descriptive heuristics and do not establish a regulator, complex, pathway, or mechanism.
Objects of this class are created by run_component_analysis; read them with get_component_overview and get_component.
show(ComponentAnalysis): Print a concise summary.
labelCharacter scalar. User-supplied label, used as the
component_analysis argument in
get_component_overview(obj, analysis, component_analysis).
parent_labelCharacter scalar. Label of the parent DifferentialPulldownAnalysis run.
component_tableData frame (Tier 1). One row per retained connected
component. Columns:
component_id, n_nodes, n_edges, density,
avg_degree, clustering,
n_seeds, n_neighbours, seed_fraction,
n_seeds_up, n_seeds_down,
n_genes_up, n_genes_down,
mixed (logical), n_shared_nodes, shared_fraction.
node_tableData frame (Tier 1). One row per node across all
retained components. Columns:
node, component_id, source_gene, is_seed,
seed_direction ("up"/"down"/"both"/NA),
degree.
topology_tableData frame (Tier 2). One row per retained component.
Augments component_table with:
component_id, diameter, radius,
degree_centralization,
topology_class ("clique-like", "hub-spoke", or
"chain-like" - see Details).
hub_tableData frame (Tier 2). One row per shared
(source_gene == "multi-gene") node across all retained components,
ranked by betweenness centrality within its component. Columns:
node, component_id, degree,
betweenness (raw), betweenness_norm (normalised to
[0, 1] within each component), betweenness_rank (1 = highest).
directionCharacter scalar: "up", "down", or
"both".
levelCharacter scalar: "isoform" or "gene".
ora_resultsNamed list of ComponentOraResult
objects, keyed by user-supplied label. Populated by
run_component_ora. Empty list by default.
genesCharacter vector. Gene IDs included (length 0 = all).
created_atPOSIXct scalar. Timestamp of the run.
seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) genes <- c("CLTCL1", "WAS", "VAV1", "HLA-DMA", "ICOS", "PRKACB") obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name %in% genes, ], order = 1, confirm = FALSE, verbose = FALSE ) obj <- run_component_analysis(obj, "t2d", label = "comp") get_component_overview(obj, "t2d", "comp")seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) genes <- c("CLTCL1", "WAS", "VAV1", "HLA-DMA", "ICOS", "PRKACB") obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name %in% genes, ], order = 1, confirm = FALSE, verbose = FALSE ) obj <- run_component_analysis(obj, "t2d", label = "comp") get_component_overview(obj, "t2d", "comp")
Produced by run_component_ora. Stores the ORA result table
across all components and all run parameters. Stored inside
ComponentAnalysis@ora_results[[label]].
## S4 method for signature 'ComponentOraResult' show(object)## S4 method for signature 'ComponentOraResult' show(object)
object |
A ComponentOraResult object. |
Objects of this class are created by run_component_ora and returned by get_component_ora_result.
show(ComponentOraResult): Print a concise summary.
labelCharacter scalar. User-supplied label, used as the
ora_label argument in
get_component_ora_result(obj, analysis, component_analysis, ora_label).
parent_labelCharacter scalar. Label of the parent ComponentAnalysis.
grandparent_labelCharacter scalar. Label of the parent DifferentialPulldownAnalysis.
result_tableData frame. One row per (component, pathway)
combination. Columns:
component_id (integer),
pathway (character),
pval (numeric),
padj (numeric; BH-adjusted within each component),
overlap (integer; genes in both the component and the pathway),
pathway_size (integer; pathway size after filtering to universe),
n_genes_tested (integer; number of genes tested for this
component),
overlap_genes (list column of character vectors; the overlapping
gene IDs).
Sorted by component_id then padj ascending.
universeCharacter vector. The background gene set used.
nodes_usedCharacter scalar. "all" or "seeds".
go_categoryCharacter scalar. GO subcollection tested, or
NA when a user-supplied pathway list was used.
paramsNamed list. Run parameters: minSize,
maxSize, n_components_tested,
n_components_skipped (too few genes to test),
universe_size.
created_atPOSIXct scalar. Timestamp of the run.
seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) genes <- c("CLTCL1", "WAS", "VAV1", "HLA-DMA", "ICOS", "PRKACB") obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name %in% genes, ], order = 1, confirm = FALSE, verbose = FALSE ) obj <- run_component_analysis(obj, "t2d", label = "comp") hallmark <- readRDS(system.file("extdata", "msigdb_hallmark_ensembl.rds", package = "IsoNetAnalyzeR")) obj <- run_component_ora(obj, "t2d", "comp", label = "hallmark", pathways = hallmark) get_component_ora_result(obj, "t2d", "comp", "hallmark")seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) genes <- c("CLTCL1", "WAS", "VAV1", "HLA-DMA", "ICOS", "PRKACB") obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name %in% genes, ], order = 1, confirm = FALSE, verbose = FALSE ) obj <- run_component_analysis(obj, "t2d", label = "comp") hallmark <- readRDS(system.file("extdata", "msigdb_hallmark_ensembl.rds", package = "IsoNetAnalyzeR")) obj <- run_component_ora(obj, "t2d", "comp", label = "hallmark", pathways = hallmark) get_component_ora_result(obj, "t2d", "comp", "hallmark")
Top-level container produced by run_differential_pulldown.
Stores one GeneDiffPulldown object per gene, the validated
input table, the run parameters, and cross-gene summary statistics.
## S4 method for signature 'DifferentialPulldownAnalysis' show(object)## S4 method for signature 'DifferentialPulldownAnalysis' show(object)
object |
A DifferentialPulldownAnalysis object. |
Objects of this class are created by run_differential_pulldown and returned by get_analysis.
show(DifferentialPulldownAnalysis): Print a concise run summary.
labelCharacter scalar. A user-supplied label for this
analysis run, used as the label argument in
get_analysis(obj, label).
input_tableData frame. The validated long-format input table with
columns gene_id, isoform_id, direction
("up" / "down"). Protein-identical collisions have been
collapsed to resolved representatives.
gene_resultsNamed list of GeneDiffPulldown objects,
one per gene in input_table. Names are gene IDs.
cross_gene_summaryData frame with one row per gene summarising
up/down subgraph properties side by side. Columns:
gene_id,
n_up_input, n_down_input (cleaned distinct submitted
isoforms),
n_up_resolved, n_down_resolved (resolved protein
representatives analyzed),
n_up_found, n_down_found (input isoforms present in the
network before BFS expansion),
pct_up_found, pct_down_found (percentage of input isoforms
found in the network; NA when n_input == 0),
up_nodes, up_edges, up_density,
up_avg_degree, up_clustering,
up_starness (degree centralization of the up subgraph; 0 = uniform,
1 = perfect hub-and-spoke topology),
up_genes (number of unique genes represented in the up subgraph),
down_nodes, down_edges, down_density,
down_avg_degree, down_clustering,
down_starness (degree centralization of the down subgraph),
down_genes (number of unique genes represented in the down subgraph),
n_shared_nodes (nodes present in both up and down subgraphs),
n_up_unique (nodes exclusive to the up subgraph),
n_down_unique (nodes exclusive to the down subgraph),
jaccard (Jaccard index of node-set overlap between up and down
subgraphs: |up intersect down| / |up union down|; NA when either
subgraph is absent),
n_edges_gained (edges unique to the up-seed neighbourhood),
n_edges_lost (edges unique to the down-seed neighbourhood),
n_edges_shared (edges present in both subgraphs; together with
n_edges_gained and n_edges_lost this partitions the edges
in the two seed-derived neighbourhoods). All three edge columns are
NA when either subgraph is absent,
up_seed_mean_pi (mean of per-seed mean-pi values across all up
seeds; summarises average interaction confidence of the up seed set),
up_seed_pi_entropy (mean of per-seed pi-entropy values across all
up seeds; summarises how evenly interaction confidence is distributed
across partners for the up seed set),
down_seed_mean_pi, down_seed_pi_entropy (analogous metrics
for the down seed set). All four columns are NA when the
corresponding subgraph is absent or carries no pi edge attribute.
gsea_resultsNamed list of FgseaResult objects,
keyed by user-supplied label. Populated by run_fgsea.
Empty list by default.
component_analysesNamed list of ComponentAnalysis
objects, keyed by user-supplied label. Populated by
run_component_analysis. Empty list by default.
orderInteger scalar. Number of BFS hops used.
cutoffNumeric scalar. Internal-edge fraction cutoff used.
created_atPOSIXct scalar. Timestamp of the run.
seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name == "CLTCL1", ], order = 1, confirm = FALSE, verbose = FALSE ) get_analysis(obj, "t2d")seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name == "CLTCL1", ], order = 1, confirm = FALSE, verbose = FALSE ) get_analysis(obj, "t2d")
Produced by run_fgsea. Stores the ranked gene vector, the
fgsea result table, and all run parameters. One FgseaResult
object can be stored per user-supplied label inside a
DifferentialPulldownAnalysis; retrieve with
get_gsea_result(obj, analysis, label).
## S4 method for signature 'FgseaResult' show(object)## S4 method for signature 'FgseaResult' show(object)
object |
A FgseaResult object. |
Objects of this class are created by run_fgsea and returned by get_gsea_result.
show(FgseaResult): Print a concise summary.
labelCharacter scalar. User-supplied label, used as the
gsea_label argument in
get_gsea_result(obj, analysis, gsea_label).
parent_labelCharacter scalar. Label of the parent DifferentialPulldownAnalysis run.
result_tableData frame. Output of fgsea::fgsea() with
standard columns: pathway, pval, padj, ES,
NES, nMoreExtreme, size, leadingEdge.
Sorted by padj ascending. Access via
get_gsea_table(obj, analysis, gsea_label).
ranked_genesNamed numeric vector. The gene-level rank statistic
passed to fgsea, sorted descending. Names are gene IDs matching the
pathway gene sets. Access as a data frame via
get_gsea_stats(obj, analysis, gsea_label).
rank_byCharacter scalar. The preset used (rank_by
argument), or "custom" when the user supplied stats
directly.
go_categoryCharacter scalar. GO subcollection(s) fetched from
msigdbr, or NA when a user-supplied pathway list was used.
paramsNamed list. Run parameters: minSize,
maxSize, nperm, n_genes_ranked,
n_genes_dropped_na.
created_atPOSIXct scalar. Timestamp of the run.
seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) hallmark <- readRDS(system.file("extdata", "msigdb_hallmark_ensembl.rds", package = "IsoNetAnalyzeR")) # For speed, this example analyses only the seed genes found in Hallmark # sets; the vignette ranks all 65 genes. With few ranked genes, minSize # must be small. in_hallmark <- seeds$gene_id %in% unlist(hallmark) obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown(obj, "t2d", seeds[in_hallmark, ], order = 1, confirm = FALSE, verbose = FALSE) set.seed(42) obj <- run_fgsea(obj, "t2d", label = "hallmark_gsea", pathways = hallmark, minSize = 3) get_gsea_result(obj, "t2d", "hallmark_gsea")seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) hallmark <- readRDS(system.file("extdata", "msigdb_hallmark_ensembl.rds", package = "IsoNetAnalyzeR")) # For speed, this example analyses only the seed genes found in Hallmark # sets; the vignette ranks all 65 genes. With few ranked genes, minSize # must be small. in_hallmark <- seeds$gene_id %in% unlist(hallmark) obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown(obj, "t2d", seeds[in_hallmark, ], order = 1, confirm = FALSE, verbose = FALSE) set.seed(42) obj <- run_fgsea(obj, "t2d", label = "hallmark_gsea", pathways = hallmark, minSize = 3) get_gsea_result(obj, "t2d", "hallmark_gsea")
Stores the virtual pulldown subgraphs and statistics for a single gene's up- and down-labelled isoform seeds. One GeneDiffPulldown object is created per gene in a DifferentialPulldownAnalysis run.
## S4 method for signature 'GeneDiffPulldown' show(object)## S4 method for signature 'GeneDiffPulldown' show(object)
object |
A GeneDiffPulldown object. |
Objects of this class are returned by get_gene_result.
show(GeneDiffPulldown): Print a concise per-gene summary.
gene_idCharacter scalar. The gene identifier from the input table.
up_isoformsCharacter vector. Isoform IDs from the input table that were labelled up for this gene.
down_isoformsCharacter vector. Isoform IDs from the input table that were labelled down for this gene.
up_graphAn igraph object. Virtual pulldown subgraph seeded
from up_isoforms, or NULL when no up-labelled isoforms were
present in the network.
down_graphAn igraph object. Virtual pulldown subgraph seeded
from down_isoforms, or NULL when no down-labelled isoforms
were present in the network.
up_statsData frame. Per-node statistics for up_graph
(output of analyze_subgraph), or a zero-row data frame when
up_graph is NULL.
down_statsData frame. Per-node statistics for down_graph,
or a zero-row data frame when down_graph is NULL.
graph_summaryData frame with one row per direction ("up",
"down") summarising network-level properties: nodes, edges,
density, avg_degree, clustering, starness, genes. Rows are NA
when the corresponding graph is absent.
gene_summaryNamed list of gene-level overview scalars:
n_up_input, n_down_input (cleaned distinct submitted
isoforms), n_up_resolved, n_down_resolved (resolved protein
representatives analyzed),
n_up_network, n_down_network (isoforms found in the network),
has_up, has_down (logical flags for subgraph availability).
seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name == "CLTCL1", ], order = 1, confirm = FALSE, verbose = FALSE ) get_gene_result(obj, "t2d", "ENSG00000070371")seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name == "CLTCL1", ], order = 1, confirm = FALSE, verbose = FALSE ) get_gene_result(obj, "t2d", "ENSG00000070371")
Retrieve a stored analysis result
get_analysis(obj, label)get_analysis(obj, label)
obj |
An IsoNetAnalyzeR session object. |
label |
Character scalar. The key under which the analysis was stored. |
A DifferentialPulldownAnalysis object.
seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name == "CLTCL1", ], order = 1, confirm = FALSE, verbose = FALSE ) list_analyses(obj) get_analysis(obj, "t2d")seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name == "CLTCL1", ], order = 1, confirm = FALSE, verbose = FALSE ) list_analyses(obj) get_analysis(obj, "t2d")
Returns a single data frame with one row per node in the requested
component, combining the Tier-1 node membership columns
(@node_table) with the Tier-2 hub betweenness columns
(@hub_table) via a left-join on node and
component_id.
get_component(obj, analysis, component_analysis, component_id)get_component(obj, analysis, component_analysis, component_id)
obj |
An IsoNetAnalyzeR session object. |
analysis |
Character scalar. Label of the parent
DifferentialPulldownAnalysis; use |
component_analysis |
Character scalar. Label of the
ComponentAnalysis; use |
component_id |
Integer scalar. The component to retrieve, as
listed in |
Nodes that are not shared across genes (source_gene != "multi-gene")
receive NA in the hub columns (betweenness,
betweenness_norm, betweenness_rank), as betweenness is only
computed for shared nodes. This makes it easy to filter for hub nodes with
!is.na(betweenness_norm) or to sort all nodes by their hub score.
A data frame with one row per node in the requested component and
the following columns:
node, component_id, source_gene, is_seed,
seed_direction, degree,
betweenness (NA for non-shared nodes),
betweenness_norm (NA for non-shared nodes),
betweenness_rank (NA for non-shared nodes).
Rows are sorted by betweenness_norm descending (hub nodes first),
with NAs at the end.
seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) genes <- c("CLTCL1", "WAS", "VAV1", "HLA-DMA", "ICOS", "PRKACB") obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name %in% genes, ], order = 1, confirm = FALSE, verbose = FALSE ) obj <- run_component_analysis(obj, "t2d", label = "comp") # Nodes of the largest component comp1 <- get_component(obj, "t2d", "comp", component_id = 1) head(comp1) # Seed nodes only comp1[comp1$is_seed, ]seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) genes <- c("CLTCL1", "WAS", "VAV1", "HLA-DMA", "ICOS", "PRKACB") obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name %in% genes, ], order = 1, confirm = FALSE, verbose = FALSE ) obj <- run_component_analysis(obj, "t2d", label = "comp") # Nodes of the largest component comp1 <- get_component(obj, "t2d", "comp", component_id = 1) head(comp1) # Seed nodes only comp1[comp1$is_seed, ]
Retrieve a stored component ORA result
get_component_ora_result(obj, analysis, component_analysis, ora_label) ## S4 method for signature 'IsoNetAnalyzeR' get_component_ora_result(obj, analysis, component_analysis, ora_label)get_component_ora_result(obj, analysis, component_analysis, ora_label) ## S4 method for signature 'IsoNetAnalyzeR' get_component_ora_result(obj, analysis, component_analysis, ora_label)
obj |
An IsoNetAnalyzeR session object. |
analysis |
Character scalar. Label of the parent DifferentialPulldownAnalysis. |
component_analysis |
Character scalar. Label of the ComponentAnalysis. |
ora_label |
Character scalar. Label of the ComponentOraResult. |
A ComponentOraResult object.
get_component_ora_result(IsoNetAnalyzeR): Method for IsoNetAnalyzeR.
seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) genes <- c("CLTCL1", "WAS", "VAV1", "HLA-DMA", "ICOS", "PRKACB") obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name %in% genes, ], order = 1, confirm = FALSE, verbose = FALSE ) obj <- run_component_analysis(obj, "t2d", label = "comp") hallmark <- readRDS(system.file("extdata", "msigdb_hallmark_ensembl.rds", package = "IsoNetAnalyzeR")) obj <- run_component_ora(obj, "t2d", "comp", label = "hallmark", pathways = hallmark) ora <- get_component_ora_result(obj, "t2d", "comp", "hallmark") oraseeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) genes <- c("CLTCL1", "WAS", "VAV1", "HLA-DMA", "ICOS", "PRKACB") obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name %in% genes, ], order = 1, confirm = FALSE, verbose = FALSE ) obj <- run_component_analysis(obj, "t2d", label = "comp") hallmark <- readRDS(system.file("extdata", "msigdb_hallmark_ensembl.rds", package = "IsoNetAnalyzeR")) obj <- run_component_ora(obj, "t2d", "comp", label = "hallmark", pathways = hallmark) ora <- get_component_ora_result(obj, "t2d", "comp", "hallmark") ora
Returns a single wide data frame with one row per retained connected
component, combining all Tier-1 structural columns
(@component_table) and all Tier-2 topological columns
(@topology_table) side by side via a left-join on
component_id.
get_component_overview(obj, analysis, component_analysis)get_component_overview(obj, analysis, component_analysis)
obj |
An IsoNetAnalyzeR session object. |
analysis |
Character scalar. Label of the parent
DifferentialPulldownAnalysis; use |
component_analysis |
Character scalar. Label of the
ComponentAnalysis; use |
This is the recommended starting point for exploring a
ComponentAnalysis result: scan the table for mixed
components (mixed == TRUE), hub-spoke topology
(topology_class == "hub-spoke"), or high shared-node fractions
(shared_fraction), then drill into individual components with
get_component.
A data frame with one row per retained component and the following
columns (Tier-1 first, then Tier-2):
component_id, n_nodes, n_edges, density,
avg_degree, clustering, n_seeds,
n_neighbours, seed_fraction, n_seeds_up,
n_seeds_down, n_genes_up, n_genes_down,
mixed, n_shared_nodes, shared_fraction,
diameter, radius, degree_centralization,
topology_class.
Topology columns are NA for any component absent from
@topology_table (e.g. single-node components where topology
metrics are undefined).
seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) genes <- c("CLTCL1", "WAS", "VAV1", "HLA-DMA", "ICOS", "PRKACB") obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name %in% genes, ], order = 1, confirm = FALSE, verbose = FALSE ) obj <- run_component_analysis(obj, "t2d", label = "comp") overview <- get_component_overview(obj, "t2d", "comp") # Largest components first head(overview[order(-overview$n_nodes), c("component_id", "n_nodes", "n_edges", "topology_class")])seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) genes <- c("CLTCL1", "WAS", "VAV1", "HLA-DMA", "ICOS", "PRKACB") obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name %in% genes, ], order = 1, confirm = FALSE, verbose = FALSE ) obj <- run_component_analysis(obj, "t2d", label = "comp") overview <- get_component_overview(obj, "t2d", "comp") # Largest components first head(overview[order(-overview$n_nodes), c("component_id", "n_nodes", "n_edges", "topology_class")])
Returns the wide-format summary data frame with one row per gene, containing subgraph topology metrics for both the up- and down-labelled conditions side by side.
get_cross_gene_summary(obj, analysis) ## S4 method for signature 'IsoNetAnalyzeR' get_cross_gene_summary(obj, analysis)get_cross_gene_summary(obj, analysis) ## S4 method for signature 'IsoNetAnalyzeR' get_cross_gene_summary(obj, analysis)
obj |
An IsoNetAnalyzeR session object. |
analysis |
Character scalar. Label of the
DifferentialPulldownAnalysis; use |
A data frame with one row per gene. See DifferentialPulldownAnalysis for a full description of columns.
get_cross_gene_summary(IsoNetAnalyzeR): Method for IsoNetAnalyzeR.
seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) genes <- c("CLTCL1", "WAS", "VAV1", "HLA-DMA", "ICOS", "PRKACB") obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name %in% genes, ], order = 1, confirm = FALSE, verbose = FALSE ) cgs <- get_cross_gene_summary(obj, "t2d") cgs[, c("gene_id", "up_nodes", "down_nodes", "up_edges", "down_edges")]seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) genes <- c("CLTCL1", "WAS", "VAV1", "HLA-DMA", "ICOS", "PRKACB") obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name %in% genes, ], order = 1, confirm = FALSE, verbose = FALSE ) cgs <- get_cross_gene_summary(obj, "t2d") cgs[, c("gene_id", "up_nodes", "down_nodes", "up_edges", "down_edges")]
Returns the GeneDiffPulldown object for a single gene, which contains the up and down subgraphs, per-node statistics, and graph-level summaries for that gene.
get_gene_result(obj, analysis, gene_id) ## S4 method for signature 'IsoNetAnalyzeR' get_gene_result(obj, analysis, gene_id)get_gene_result(obj, analysis, gene_id) ## S4 method for signature 'IsoNetAnalyzeR' get_gene_result(obj, analysis, gene_id)
obj |
An IsoNetAnalyzeR session object. |
analysis |
Character scalar. Label of the
DifferentialPulldownAnalysis; use |
gene_id |
Character scalar. Ensembl gene ID (or whichever identifier was used in the input table). |
A GeneDiffPulldown object.
get_gene_result(IsoNetAnalyzeR): Method for IsoNetAnalyzeR.
seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name == "CLTCL1", ], order = 1, confirm = FALSE, verbose = FALSE ) gr <- get_gene_result(obj, "t2d", "ENSG00000070371") grseeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name == "CLTCL1", ], order = 1, confirm = FALSE, verbose = FALSE ) gr <- get_gene_result(obj, "t2d", "ENSG00000070371") gr
Retrieve a stored GSEA result from a differential pulldown analysis
get_gsea_result(obj, analysis, gsea_label) ## S4 method for signature 'IsoNetAnalyzeR' get_gsea_result(obj, analysis, gsea_label)get_gsea_result(obj, analysis, gsea_label) ## S4 method for signature 'IsoNetAnalyzeR' get_gsea_result(obj, analysis, gsea_label)
obj |
An IsoNetAnalyzeR session object. |
analysis |
Character scalar. Label of the DifferentialPulldownAnalysis. |
gsea_label |
Character scalar. Label of the FgseaResult stored inside the analysis. |
A FgseaResult object.
get_gsea_result(IsoNetAnalyzeR): Method for IsoNetAnalyzeR.
seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) hallmark <- readRDS(system.file("extdata", "msigdb_hallmark_ensembl.rds", package = "IsoNetAnalyzeR")) # For speed, this example analyses only the seed genes found in Hallmark # sets; the vignette ranks all 65 genes. With few ranked genes, minSize # must be small. in_hallmark <- seeds$gene_id %in% unlist(hallmark) obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown(obj, "t2d", seeds[in_hallmark, ], order = 1, confirm = FALSE, verbose = FALSE) set.seed(42) obj <- run_fgsea(obj, "t2d", label = "hallmark_gsea", pathways = hallmark, minSize = 3) get_gsea_result(obj, "t2d", "hallmark_gsea")seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) hallmark <- readRDS(system.file("extdata", "msigdb_hallmark_ensembl.rds", package = "IsoNetAnalyzeR")) # For speed, this example analyses only the seed genes found in Hallmark # sets; the vignette ranks all 65 genes. With few ranked genes, minSize # must be small. in_hallmark <- seeds$gene_id %in% unlist(hallmark) obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown(obj, "t2d", seeds[in_hallmark, ], order = 1, confirm = FALSE, verbose = FALSE) set.seed(42) obj <- run_fgsea(obj, "t2d", label = "hallmark_gsea", pathways = hallmark, minSize = 3) get_gsea_result(obj, "t2d", "hallmark_gsea")
Returns the named numeric vector of rank statistics that was passed to
fgsea::fgsea() as a two-column data frame, making it easy to inspect
which genes drove the enrichment, join with other tables, or plot a ranking
barcode.
get_gsea_stats(obj, analysis, gsea_label) ## S4 method for signature 'IsoNetAnalyzeR' get_gsea_stats(obj, analysis, gsea_label)get_gsea_stats(obj, analysis, gsea_label) ## S4 method for signature 'IsoNetAnalyzeR' get_gsea_stats(obj, analysis, gsea_label)
obj |
An IsoNetAnalyzeR session object. |
analysis |
Character scalar. Label of the DifferentialPulldownAnalysis. |
gsea_label |
Character scalar. Label of the FgseaResult. |
A data frame with columns:
gene_idGene identifier (names from the ranked vector).
statRank statistic value (e.g. delta_nodes).
rankInteger rank (1 = highest statistic).
Sorted by stat descending (i.e. rank 1 first).
get_gsea_stats(IsoNetAnalyzeR): Method for IsoNetAnalyzeR.
seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) hallmark <- readRDS(system.file("extdata", "msigdb_hallmark_ensembl.rds", package = "IsoNetAnalyzeR")) # For speed, this example analyses only the seed genes found in Hallmark # sets; the vignette ranks all 65 genes. With few ranked genes, minSize # must be small. in_hallmark <- seeds$gene_id %in% unlist(hallmark) obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown(obj, "t2d", seeds[in_hallmark, ], order = 1, confirm = FALSE, verbose = FALSE) set.seed(42) obj <- run_fgsea(obj, "t2d", label = "hallmark_gsea", pathways = hallmark, minSize = 3) # The ranked statistic used by fgsea, highest first head(get_gsea_stats(obj, "t2d", "hallmark_gsea"))seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) hallmark <- readRDS(system.file("extdata", "msigdb_hallmark_ensembl.rds", package = "IsoNetAnalyzeR")) # For speed, this example analyses only the seed genes found in Hallmark # sets; the vignette ranks all 65 genes. With few ranked genes, minSize # must be small. in_hallmark <- seeds$gene_id %in% unlist(hallmark) obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown(obj, "t2d", seeds[in_hallmark, ], order = 1, confirm = FALSE, verbose = FALSE) set.seed(42) obj <- run_fgsea(obj, "t2d", label = "hallmark_gsea", pathways = hallmark, minSize = 3) # The ranked statistic used by fgsea, highest first head(get_gsea_stats(obj, "t2d", "hallmark_gsea"))
Returns the fgsea::fgsea() result table stored in a
FgseaResult object as a plain data frame, with an optional
significance filter.
get_gsea_table(obj, analysis, gsea_label, padj_cutoff = NULL) ## S4 method for signature 'IsoNetAnalyzeR' get_gsea_table(obj, analysis, gsea_label, padj_cutoff = NULL)get_gsea_table(obj, analysis, gsea_label, padj_cutoff = NULL) ## S4 method for signature 'IsoNetAnalyzeR' get_gsea_table(obj, analysis, gsea_label, padj_cutoff = NULL)
obj |
An IsoNetAnalyzeR session object. |
analysis |
Character scalar. Label of the DifferentialPulldownAnalysis. |
gsea_label |
Character scalar. Label of the FgseaResult stored inside the analysis. |
padj_cutoff |
Numeric scalar or |
A data frame with columns pathway, pval,
padj, ES, NES, nMoreExtreme, size,
leadingEdge, sorted by padj ascending.
get_gsea_table(IsoNetAnalyzeR): Method for IsoNetAnalyzeR.
seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) hallmark <- readRDS(system.file("extdata", "msigdb_hallmark_ensembl.rds", package = "IsoNetAnalyzeR")) # For speed, this example analyses only the seed genes found in Hallmark # sets; the vignette ranks all 65 genes. With few ranked genes, minSize # must be small. in_hallmark <- seeds$gene_id %in% unlist(hallmark) obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown(obj, "t2d", seeds[in_hallmark, ], order = 1, confirm = FALSE, verbose = FALSE) set.seed(42) obj <- run_fgsea(obj, "t2d", label = "hallmark_gsea", pathways = hallmark, minSize = 3) # All tested gene sets, and those passing an adjusted p-value cutoff get_gsea_table(obj, "t2d", "hallmark_gsea") get_gsea_table(obj, "t2d", "hallmark_gsea", padj_cutoff = 0.05)seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) hallmark <- readRDS(system.file("extdata", "msigdb_hallmark_ensembl.rds", package = "IsoNetAnalyzeR")) # For speed, this example analyses only the seed genes found in Hallmark # sets; the vignette ranks all 65 genes. With few ranked genes, minSize # must be small. in_hallmark <- seeds$gene_id %in% unlist(hallmark) obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown(obj, "t2d", seeds[in_hallmark, ], order = 1, confirm = FALSE, verbose = FALSE) set.seed(42) obj <- run_fgsea(obj, "t2d", label = "hallmark_gsea", pathways = hallmark, minSize = 3) # All tested gene sets, and those passing an adjusted p-value cutoff get_gsea_table(obj, "t2d", "hallmark_gsea") get_gsea_table(obj, "t2d", "hallmark_gsea", padj_cutoff = 0.05)
Merges the per-node statistics from the up- and down-labelled subgraphs of
a single gene into one long-format data frame, with a direction
column ("up" / "down") identifying the condition. A
is_seed column flags isoforms that were supplied as seeds, using the
explicit seed annotation stored by analyze_subgraph().
Isoforms that appear in only one condition are
represented in that condition's rows only; no artificial NAs are introduced
for the missing direction.
get_isoform_stats(obj, analysis, gene_id) ## S4 method for signature 'IsoNetAnalyzeR' get_isoform_stats(obj, analysis, gene_id)get_isoform_stats(obj, analysis, gene_id) ## S4 method for signature 'IsoNetAnalyzeR' get_isoform_stats(obj, analysis, gene_id)
obj |
An IsoNetAnalyzeR session object. |
analysis |
Character scalar. Label of the
DifferentialPulldownAnalysis; use |
gene_id |
Character scalar. Ensembl gene ID (or whichever identifier was used in the input table). |
A data frame with one row per isoform per direction and columns:
direction, isoform, is_seed, degree,
clustering, distance_from_seed, mean_pi,
pi_entropy.
get_isoform_stats(IsoNetAnalyzeR): Method for IsoNetAnalyzeR.
seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name == "CLTCL1", ], order = 1, confirm = FALSE, verbose = FALSE ) stats <- get_isoform_stats(obj, "t2d", "ENSG00000070371") head(stats)seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name == "CLTCL1", ], order = 1, confirm = FALSE, verbose = FALSE ) stats <- get_isoform_stats(obj, "t2d", "ENSG00000070371") head(stats)
Retrieve a stored lookup result
get_lookup(obj, label)get_lookup(obj, label)
obj |
An IsoNetAnalyzeR session object. |
label |
Character scalar. The key under which the lookup was stored. |
A VirtualPulldownLookup object.
obj <- IsoNetAnalyzeR("example") obj <- lookup_virtual_pulldown(obj, "cltcl1_up", seed = "ENST00000621271", order = 1) get_lookup(obj, "cltcl1_up")obj <- IsoNetAnalyzeR("example") obj <- lookup_virtual_pulldown(obj, "cltcl1_up", seed = "ENST00000621271", order = 1) get_lookup(obj, "cltcl1_up")
Returns the node_stats data frame stored in a
VirtualPulldownLookup object directly, without having to
unpack the S4 slot manually. The data frame contains one row per node in
the pulldown subgraph and is the output of analyze_subgraph.
get_lookup_stats(obj, label) ## S4 method for signature 'IsoNetAnalyzeR' get_lookup_stats(obj, label)get_lookup_stats(obj, label) ## S4 method for signature 'IsoNetAnalyzeR' get_lookup_stats(obj, label)
obj |
An IsoNetAnalyzeR session object. |
label |
Character scalar. Label of the
VirtualPulldownLookup; use |
A data frame with one row per node in the subgraph and columns
produced by analyze_subgraph: isoform,
is_seed, degree, clustering,
distance_from_seed, mean_pi, pi_entropy.
get_lookup_stats(IsoNetAnalyzeR): Method for IsoNetAnalyzeR.
obj <- IsoNetAnalyzeR("example") obj <- lookup_virtual_pulldown(obj, "cltcl1_up", seed = "ENST00000621271", order = 1) stats <- get_lookup_stats(obj, "cltcl1_up") head(stats)obj <- IsoNetAnalyzeR("example") obj <- lookup_virtual_pulldown(obj, "cltcl1_up", seed = "ENST00000621271", order = 1) stats <- get_lookup_stats(obj, "cltcl1_up") head(stats)
Returns the igraph subgraph stored in a
VirtualPulldownLookup object directly, without having to
unpack the S4 slot manually. The subgraph can be passed directly to
plot_network(), igraph functions, or any other graph-level
utility.
get_lookup_subgraph(obj, label) ## S4 method for signature 'IsoNetAnalyzeR' get_lookup_subgraph(obj, label)get_lookup_subgraph(obj, label) ## S4 method for signature 'IsoNetAnalyzeR' get_lookup_subgraph(obj, label)
obj |
An IsoNetAnalyzeR session object. |
label |
Character scalar. Label of the
VirtualPulldownLookup; use |
An igraph object representing the pulldown subnetwork.
get_lookup_subgraph(IsoNetAnalyzeR): Method for IsoNetAnalyzeR.
obj <- IsoNetAnalyzeR("example") obj <- lookup_virtual_pulldown(obj, "cltcl1_up", seed = "ENST00000621271", order = 1) g <- get_lookup_subgraph(obj, "cltcl1_up") c(nodes = igraph::vcount(g), edges = igraph::ecount(g))obj <- IsoNetAnalyzeR("example") obj <- lookup_virtual_pulldown(obj, "cltcl1_up", seed = "ENST00000621271", order = 1) g <- get_lookup_subgraph(obj, "cltcl1_up") c(nodes = igraph::vcount(g), edges = igraph::ecount(g))
Returns one named entry of the session metadata, or the complete metadata
list. The constructor and the analysis functions record provenance here:
network_source, network_cutoff and
network_biotype_filter (the transcript eligibility audit) are set
when the session is created, and analysis_network_coverage,
analysis_seed_support and analysis_duplicate_resolution are
lists keyed by analysis label.
get_metadata(obj, key = NULL)get_metadata(obj, key = NULL)
obj |
An IsoNetAnalyzeR session object. |
key |
Character scalar naming one metadata entry, or |
The value stored under key, or the named list of all
metadata when key is NULL.
obj <- IsoNetAnalyzeR("example") names(get_metadata(obj)) get_metadata(obj, "network_cutoff") get_metadata(obj, "network_biotype_filter")$excluded_nmdobj <- IsoNetAnalyzeR("example") names(get_metadata(obj)) get_metadata(obj, "network_cutoff") get_metadata(obj, "network_biotype_filter")$excluded_nmd
Returns the isoform interaction network used by the session, after transcript eligibility filtering.
get_network(obj)get_network(obj)
obj |
An IsoNetAnalyzeR session object. |
An undirected igraph object. Vertices are transcripts with
name, gene and transcript_biotype attributes; edges
carry a binary interact attribute and, for the bundled network,
the predicted interaction probability pi.
obj <- IsoNetAnalyzeR("example") net <- get_network(obj) c(vertices = igraph::vcount(net), edges = igraph::ecount(net))obj <- IsoNetAnalyzeR("example") net <- get_network(obj) c(vertices = igraph::vcount(net), edges = igraph::ecount(net))
Returns the NetworkDiagnostics object stored in the session,
or stops with an informative message if run_network_diagnostics
has not been called yet.
get_network_diagnostics(obj) ## S4 method for signature 'IsoNetAnalyzeR' get_network_diagnostics(obj)get_network_diagnostics(obj) ## S4 method for signature 'IsoNetAnalyzeR' get_network_diagnostics(obj)
obj |
An IsoNetAnalyzeR session object. |
A NetworkDiagnostics object.
get_network_diagnostics(IsoNetAnalyzeR): Method for IsoNetAnalyzeR.
# A small deterministic network keeps this example fast; on the bundled # network the diagnostics take about half a minute. g <- igraph::make_graph("Zachary") n <- igraph::vcount(g) igraph::V(g)$name <- paste0("tx", seq_len(n)) igraph::V(g)$gene <- paste0("gene", ceiling(seq_len(n) / 2)) igraph::V(g)$transcript_biotype <- "protein_coding" igraph::E(g)$interact <- 1L toy <- IsoNetAnalyzeR("toy", network = g, metadata = list(network_cutoff = 0.25)) toy <- run_network_diagnostics(toy) get_network_diagnostics(toy)# A small deterministic network keeps this example fast; on the bundled # network the diagnostics take about half a minute. g <- igraph::make_graph("Zachary") n <- igraph::vcount(g) igraph::V(g)$name <- paste0("tx", seq_len(n)) igraph::V(g)$gene <- paste0("gene", ceiling(seq_len(n) / 2)) igraph::V(g)$transcript_biotype <- "protein_coding" igraph::E(g)$interact <- 1L toy <- IsoNetAnalyzeR("toy", network = g, metadata = list(network_cutoff = 0.25)) toy <- run_network_diagnostics(toy) get_network_diagnostics(toy)
Returns the fgsea::fora() result table stored in a
ComponentOraResult object as a plain data frame. Results
can be filtered by component, significance threshold, and/or restricted to
the top N terms per component. All filters compose — they are
applied in the order: component_id → padj_cutoff →
top_n.
get_ora_table( obj, analysis, component_analysis, ora_label, component_id = NULL, padj_cutoff = NULL, top_n = NULL ) ## S4 method for signature 'IsoNetAnalyzeR' get_ora_table( obj, analysis, component_analysis, ora_label, component_id = NULL, padj_cutoff = NULL, top_n = NULL )get_ora_table( obj, analysis, component_analysis, ora_label, component_id = NULL, padj_cutoff = NULL, top_n = NULL ) ## S4 method for signature 'IsoNetAnalyzeR' get_ora_table( obj, analysis, component_analysis, ora_label, component_id = NULL, padj_cutoff = NULL, top_n = NULL )
obj |
An IsoNetAnalyzeR session object. |
analysis |
Character scalar. Label of the parent DifferentialPulldownAnalysis. |
component_analysis |
Character scalar. Label of the ComponentAnalysis. |
ora_label |
Character scalar. Label of the ComponentOraResult. |
component_id |
Integer scalar or |
padj_cutoff |
Numeric scalar or |
top_n |
Integer scalar or |
A data frame with columns component_id, pathway,
pval, padj, overlap, pathway_size,
n_genes_tested, overlap_genes. Sorted by
component_id then padj ascending.
get_ora_table(IsoNetAnalyzeR): Method for IsoNetAnalyzeR.
seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) genes <- c("CLTCL1", "WAS", "VAV1", "HLA-DMA", "ICOS", "PRKACB") obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name %in% genes, ], order = 1, confirm = FALSE, verbose = FALSE ) obj <- run_component_analysis(obj, "t2d", label = "comp") hallmark <- readRDS(system.file("extdata", "msigdb_hallmark_ensembl.rds", package = "IsoNetAnalyzeR")) obj <- run_component_ora(obj, "t2d", "comp", label = "hallmark", pathways = hallmark) # Top two gene sets per component get_ora_table(obj, "t2d", "comp", "hallmark", top_n = 2) # Significant gene sets of component 1 get_ora_table(obj, "t2d", "comp", "hallmark", component_id = 1, padj_cutoff = 0.05)seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) genes <- c("CLTCL1", "WAS", "VAV1", "HLA-DMA", "ICOS", "PRKACB") obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name %in% genes, ], order = 1, confirm = FALSE, verbose = FALSE ) obj <- run_component_analysis(obj, "t2d", label = "comp") hallmark <- readRDS(system.file("extdata", "msigdb_hallmark_ensembl.rds", package = "IsoNetAnalyzeR")) obj <- run_component_ora(obj, "t2d", "comp", label = "hallmark", pathways = hallmark) # Top two gene sets per component get_ora_table(obj, "t2d", "comp", "hallmark", top_n = 2) # Significant gene sets of component 1 get_ora_table(obj, "t2d", "comp", "hallmark", component_id = 1, padj_cutoff = 0.05)
Returns the virtual pulldown subgraph seeded from a gene's up-labelled or down-labelled isoforms.
get_pulldown_graph(x, direction = c("up", "down")) ## S4 method for signature 'GeneDiffPulldown' get_pulldown_graph(x, direction = c("up", "down"))get_pulldown_graph(x, direction = c("up", "down")) ## S4 method for signature 'GeneDiffPulldown' get_pulldown_graph(x, direction = c("up", "down"))
x |
A GeneDiffPulldown object, as returned by
|
direction |
Either |
An igraph object, or NULL when none of the gene's
isoforms in that direction were found in the session network. A seed
that is in the network but has no predicted interaction gives a
one-vertex graph.
get_pulldown_graph(GeneDiffPulldown): Method for GeneDiffPulldown.
seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name == "CLTCL1", ], order = 1, confirm = FALSE, verbose = FALSE ) cltcl1 <- get_gene_result(obj, "t2d", "ENSG00000070371") up <- get_pulldown_graph(cltcl1, "up") c(nodes = igraph::vcount(up), edges = igraph::ecount(up))seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name == "CLTCL1", ], order = 1, confirm = FALSE, verbose = FALSE ) cltcl1 <- get_gene_result(obj, "t2d", "ENSG00000070371") up <- get_pulldown_graph(cltcl1, "up") c(nodes = igraph::vcount(up), edges = igraph::ecount(up))
Returns the transcriptome-wide annotation used by IsoNetAnalyzeR to map redundant Ensembl transcript identifiers to the representative transcript retained for the same protein product. Rows outside the embedded network are retained because they are still needed for upstream count aggregation.
isonet_duplicate_map(refresh = FALSE)isonet_duplicate_map(refresh = FALSE)
refresh |
Logical; reread the packaged CSV instead of using the package-local cache. |
A data frame with kept/redundant ENSG, ENSP, and ENST identifiers
and a network_applicable flag. Build provenance is attached as the
provenance attribute.
map <- isonet_duplicate_map() head(map[, c("kept_ENST", "redundant_ENST", "network_applicable")]) table(map$network_applicable)map <- isonet_duplicate_map() head(map[, c("kept_ENST", "redundant_ENST", "network_applicable")]) table(map$network_applicable)
Returns the GENCODE v41 gene name, usually the HGNC symbol, of every gene in the bundled network. Plots use it to label nodes, and it can annotate any result table keyed by Ensembl gene ID.
isonet_gene_names()isonet_gene_names()
A data frame with gene_id (Ensembl, without version) and
gene_name columns.
gene_names <- isonet_gene_names() gene_names[gene_names$gene_id == "ENSG00000070371", ]gene_names <- isonet_gene_names() gene_names[gene_names$gene_id == "ENSG00000070371", ]
Returns pinned GENCODE v41 transcript annotation. These transcript biotypes are not gene-level coding labels or evidence of stable protein production.
isonet_transcript_biotypes()isonet_transcript_biotypes()
A data frame with isoform_id and transcript_biotype columns.
biotypes <- isonet_transcript_biotypes() head(biotypes) head(sort(table(biotypes$transcript_biotype), decreasing = TRUE))biotypes <- isonet_transcript_biotypes() head(biotypes) head(sort(table(biotypes$transcript_biotype), decreasing = TRUE))
Initialises an IsoNetAnalyzeR object. When no network
is supplied the package's internal isoform interaction network
(.network_data) is loaded automatically, along with the associated
.network_cutoff and .pi_threshold values stored as metadata.
IsoNetAnalyzeR( name = "IsoNetAnalyzeR", network = NULL, metadata = list(), include_nmd = FALSE, include_nsd = FALSE, transcript_biotypes = NULL )IsoNetAnalyzeR( name = "IsoNetAnalyzeR", network = NULL, metadata = list(), include_nmd = FALSE, include_nsd = FALSE, transcript_biotypes = NULL )
name |
Character scalar. A human-readable label for the session
(e.g. |
network |
An |
metadata |
Named list of additional metadata to attach to the session.
This is merged with any automatically populated fields
( |
include_nmd |
Include nonsense-mediated decay transcripts. Default FALSE. |
include_nsd |
Include non-stop decay transcripts. Default FALSE. Exclusions apply to seeds and neighbours. Set both flags TRUE for an unfiltered network. |
transcript_biotypes |
Optional data frame with isoform_id and transcript_biotype columns, overriding vertex annotations and the pinned GENCODE v41 table. Unknown vertex biotypes are an error when either decay exclusion is enabled. Gene-level biotypes are not used. |
An IsoNetAnalyzeR object. The exclusion audit is stored in metadata$network_biotype_filter. Create a new session to change the policy.
# Session on the bundled network (NMD and NSD transcripts excluded) obj <- IsoNetAnalyzeR("example") obj # A user-supplied network needs vertex names, a `gene` vertex attribute, # a binary `interact` edge attribute and known transcript biotypes g <- igraph::graph_from_data_frame( data.frame(from = "tx1", to = "tx2", interact = 1L, pi = 0.9), directed = FALSE, vertices = data.frame(name = c("tx1", "tx2"), gene = c("g1", "g2"), transcript_biotype = "protein_coding") ) IsoNetAnalyzeR("custom", network = g, metadata = list(network_cutoff = 0))# Session on the bundled network (NMD and NSD transcripts excluded) obj <- IsoNetAnalyzeR("example") obj # A user-supplied network needs vertex names, a `gene` vertex attribute, # a binary `interact` edge attribute and known transcript biotypes g <- igraph::graph_from_data_frame( data.frame(from = "tx1", to = "tx2", interact = 1L, pi = 0.9), directed = FALSE, vertices = data.frame(name = c("tx1", "tx2"), gene = c("g1", "g2"), transcript_biotype = "protein_coding") ) IsoNetAnalyzeR("custom", network = g, metadata = list(network_cutoff = 0))
The central object of the IsoNetAnalyzeR package. It holds the isoform interaction network, session metadata, a named list of full analyses (e.g. virtual pulldown runs), and a named list of quick look-ups.
## S4 method for signature 'IsoNetAnalyzeR' show(object) ## S4 method for signature 'IsoNetAnalyzeR' list_analyses(obj) ## S4 method for signature 'IsoNetAnalyzeR' get_analysis(obj, label) ## S4 method for signature 'IsoNetAnalyzeR' list_lookups(obj) ## S4 method for signature 'IsoNetAnalyzeR' get_lookup(obj, label)## S4 method for signature 'IsoNetAnalyzeR' show(object) ## S4 method for signature 'IsoNetAnalyzeR' list_analyses(obj) ## S4 method for signature 'IsoNetAnalyzeR' get_analysis(obj, label) ## S4 method for signature 'IsoNetAnalyzeR' list_lookups(obj) ## S4 method for signature 'IsoNetAnalyzeR' get_lookup(obj, label)
object |
An IsoNetAnalyzeR object. |
obj |
An IsoNetAnalyzeR session object. |
label |
Character scalar. The key under which the lookup was stored. |
Objects of this class are created by IsoNetAnalyzeR.
show(IsoNetAnalyzeR): Print a concise summary of an IsoNetAnalyzeR
session object.
list_analyses(IsoNetAnalyzeR): List labels of stored analyses.
get_analysis(IsoNetAnalyzeR): Retrieve a stored analysis by label.
list_lookups(IsoNetAnalyzeR): List labels of stored lookups.
get_lookup(IsoNetAnalyzeR): Retrieve a stored lookup by label.
nameCharacter scalar. A user-defined label for the session.
networkAn igraph object representing the isoform
interaction network. Populated from the package's internal data by
default; can be replaced with a user-supplied graph in the future.
created_atPOSIXct scalar. Timestamp recorded when the object
was constructed.
metadataNamed list of arbitrary session-level metadata (e.g.
pi_threshold, network_cutoff carried over from internal
data, or user-supplied fields).
analysesNamed list of DifferentialPulldownAnalysis objects (and potentially other analysis classes added in the future).
lookupsNamed list of VirtualPulldownLookup objects (and potentially other look-up classes added in the future).
network_diagnosticsEither NULL (before diagnostics have been
run) or a NetworkDiagnostics object produced by
run_network_diagnostics.
obj <- IsoNetAnalyzeR("example") obj list_analyses(obj)obj <- IsoNetAnalyzeR("example") obj list_analyses(obj)
List stored analysis labels
list_analyses(obj)list_analyses(obj)
obj |
An IsoNetAnalyzeR session object. |
Character vector of analysis labels, or character(0) if none.
seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name == "CLTCL1", ], order = 1, confirm = FALSE, verbose = FALSE ) list_analyses(obj)seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name == "CLTCL1", ], order = 1, confirm = FALSE, verbose = FALSE ) list_analyses(obj)
List stored lookup labels
list_lookups(obj)list_lookups(obj)
obj |
An IsoNetAnalyzeR session object. |
Character vector of lookup labels, or character(0) if none.
obj <- IsoNetAnalyzeR("example") obj <- lookup_virtual_pulldown(obj, "cltcl1_up", seed = "ENST00000621271", order = 1) list_lookups(obj)obj <- IsoNetAnalyzeR("example") obj <- lookup_virtual_pulldown(obj, "cltcl1_up", seed = "ENST00000621271", order = 1) list_lookups(obj)
Runs a virtual pulldown for one or more seed isoforms or genes and adds
the result as a VirtualPulldownLookup object to the
IsoNetAnalyzeR object. All supplied seeds are treated as
order-0 anchors in a single pulldown. The network is taken directly from
obj; the cutoff defaults to the value stored in
obj@metadata[["network_cutoff"]] but can be overridden to explore
alternative thresholds.
lookup_virtual_pulldown( obj, label, seed, order, cutoff = NULL, level = c("isoform", "gene"), resolve_duplicates = TRUE )lookup_virtual_pulldown( obj, label, seed, order, cutoff = NULL, level = c("isoform", "gene"), resolve_duplicates = TRUE )
obj |
An IsoNetAnalyzeR session object. |
label |
Character scalar. Key under which to store the look-up. |
seed |
Character vector. One or more isoform vertex names or gene names. When multiple seeds are given they are all used as order-0 anchors in the same virtual pulldown. |
order |
Integer. Number of interaction hops. |
cutoff |
Numeric in [0, 1]. Internal-edge fraction threshold. Falls
back to |
level |
Character scalar. |
resolve_duplicates |
Logical. For isoform-level lookups, resolve
versioned and protein-identical redundant transcript IDs against the
active network. Default |
An updated IsoNetAnalyzeR object (invisibly);
access the look-up via get_lookup(obj, label).
obj <- IsoNetAnalyzeR("example") # One isoform seed, using the session's stored cutoff obj <- lookup_virtual_pulldown(obj, "cltcl1_up", seed = "ENST00000621271", order = 1) # Several seeds act as joint order-0 anchors; try a stricter cutoff obj <- lookup_virtual_pulldown( obj, "cltcl1_both", seed = c("ENST00000621271", "ENST00000427926"), order = 1, cutoff = 0.4 ) # All network isoforms of a gene as seeds obj <- lookup_virtual_pulldown(obj, "cltcl1_gene", seed = "ENSG00000070371", order = 1, level = "gene") list_lookups(obj) get_lookup(obj, "cltcl1_gene")obj <- IsoNetAnalyzeR("example") # One isoform seed, using the session's stored cutoff obj <- lookup_virtual_pulldown(obj, "cltcl1_up", seed = "ENST00000621271", order = 1) # Several seeds act as joint order-0 anchors; try a stricter cutoff obj <- lookup_virtual_pulldown( obj, "cltcl1_both", seed = c("ENST00000621271", "ENST00000427926"), order = 1, cutoff = 0.4 ) # All network isoforms of a gene as seeds obj <- lookup_virtual_pulldown(obj, "cltcl1_gene", seed = "ENSG00000070371", order = 1, level = "gene") list_lookups(obj) get_lookup(obj, "cltcl1_gene")
Top-level container produced by run_network_diagnostics.
Stores structural and topological summary statistics of the loaded isoform
interaction network. Stored in the @network_diagnostics slot of an
IsoNetAnalyzeR session object; retrieved with
get_network_diagnostics.
## S4 method for signature 'NetworkDiagnostics' show(object)## S4 method for signature 'NetworkDiagnostics' show(object)
object |
A NetworkDiagnostics object. |
Objects of this class are created by run_network_diagnostics and returned by get_network_diagnostics.
show(NetworkDiagnostics): Print a concise diagnostics summary.
network_statsData frame with one row summarising the three network views and global topology metrics. Columns:
Total isoform nodes in the full network.
Unique genes in the full network.
Total edges in the session network. For the bundled network (from 0.99.0) this equals the number of predicted interaction edges.
Edges with interact == 1.
Isoform nodes in the predicted subnetwork.
Unique genes in the predicted subnetwork.
Edges in the predicted subnetwork.
Edge density of the predicted isoform subnetwork.
Mean isoform degree in the predicted subnetwork.
Mean local clustering coefficient.
Number of connected components.
Node count of the largest component.
Percentage of nodes in the largest component.
Diameter of the largest component.
Mean shortest path length in the largest component.
Nodes in the gene-level predicted network.
Edges in the gene-level predicted network.
Isoforms with zero predicted edges.
Percentage of all isoforms that are isolated.
isoform_degree_tableData frame with one row per isoform in the
predicted subnetwork. Columns: isoform_id, gene_id,
degree. Isoforms with zero predicted edges are included with
degree = 0.
gene_degree_tableData frame with one row per gene in the
gene-level predicted network. Columns: gene_id, degree.
component_tableData frame with one row per connected component
in the predicted isoform subnetwork, sorted descending by size. Columns:
component_id, n_nodes, n_edges.
clustering_tableData frame with one row per isoform in the
predicted subnetwork. Columns: isoform_id, gene_id,
degree, clustering_coefficient.
isoform_per_gene_tableData frame with one row per gene present in
the full network. Columns: gene_id, n_isoforms_total
(all isoforms for this gene in the full network),
n_isoforms_connected (isoforms with at least one predicted edge),
n_isoforms_isolated (isoforms with zero predicted edges),
connectivity_status (character: "all_connected",
"partial", or "all_isolated").
sticky_isoform_tableData frame with one row per sticky isoform
(degree above threshold). Columns: isoform_id, gene_id,
degree. Empty data frame if no sticky isoforms found.
sticky_gene_tableData frame with one row per sticky gene.
Columns: gene_id, degree. Empty data frame if none found.
sticky_methodCharacter scalar. Threshold method used:
"quantile" or "sd".
sticky_cutoffNumeric scalar. Cutoff value supplied to the threshold method.
sticky_isoform_thresholdNumeric scalar. The computed degree threshold above which an isoform is classified as sticky.
sticky_gene_thresholdNumeric scalar. The computed degree threshold above which a gene is classified as sticky.
created_atPOSIXct scalar. Timestamp of the run.
# A small deterministic network keeps this example fast; on the bundled # network the diagnostics take about half a minute. g <- igraph::make_graph("Zachary") n <- igraph::vcount(g) igraph::V(g)$name <- paste0("tx", seq_len(n)) igraph::V(g)$gene <- paste0("gene", ceiling(seq_len(n) / 2)) igraph::V(g)$transcript_biotype <- "protein_coding" igraph::E(g)$interact <- 1L toy <- IsoNetAnalyzeR("toy", network = g, metadata = list(network_cutoff = 0.25)) toy <- run_network_diagnostics(toy) get_network_diagnostics(toy)# A small deterministic network keeps this example fast; on the bundled # network the diagnostics take about half a minute. g <- igraph::make_graph("Zachary") n <- igraph::vcount(g) igraph::V(g)$name <- paste0("tx", seq_len(n)) igraph::V(g)$gene <- paste0("gene", ceiling(seq_len(n) / 2)) igraph::V(g)$transcript_biotype <- "protein_coding" igraph::E(g)$interact <- 1L toy <- IsoNetAnalyzeR("toy", network = g, metadata = list(network_cutoff = 0.25)) toy <- run_network_diagnostics(toy) get_network_diagnostics(toy)
Extracts one connected component by its component_id (as assigned in
@component_table) and renders it using the same cross-gene plot
style as plot_network on a
DifferentialPulldownAnalysis object.
plot_component( obj, analysis, component_analysis, component_id, colour_by = c("gene", "hub_degree", "direction"), colour_neighbours = FALSE, layout = "stress", node_size = 3, label_size = 2.5, edge_alpha = 0.4, title = NULL, node_labels = c("symbol", "id", "none"), ... )plot_component( obj, analysis, component_analysis, component_id, colour_by = c("gene", "hub_degree", "direction"), colour_neighbours = FALSE, layout = "stress", node_size = 3, label_size = 2.5, edge_alpha = 0.4, title = NULL, node_labels = c("symbol", "id", "none"), ... )
obj |
An IsoNetAnalyzeR session object. |
analysis |
Character scalar. Label of the parent
DifferentialPulldownAnalysis; use |
component_analysis |
Character scalar. Label of the
ComponentAnalysis; use |
component_id |
Integer scalar. The component to plot, matching
the |
colour_by |
Character scalar: |
colour_neighbours |
Logical. Only used when
|
layout |
ggraph layout string. Default |
node_size |
Numeric. Base node size. Default |
label_size |
Numeric. Label text size. Default |
edge_alpha |
Numeric in [0, 1]. Edge opacity. Default
|
title |
Character scalar or |
node_labels |
Character scalar. |
... |
Additional arguments forwarded to
|
Component IDs are assigned in descending order of node count (edge count as
tiebreaker), so component_id = 1 is always the largest component.
These IDs match the component_id column in all four
ComponentAnalysis tables.
A ggplot object, invisibly.
colour_by)"gene"Each node is coloured by the pulldown gene it belongs to. Shared (multi-gene) nodes are dark grey.
"hub_degree"Shared nodes are coloured by degree on a sequential (Mako) scale; all other nodes are light grey.
"direction"Encodes the regulation direction of each node. Behaviour differs by analysis level — see below.
Seed nodes are coloured by their caller-supplied direction: up (orange),
down (sky blue), or present in both directions (purple).
Neighbour behaviour is controlled by colour_neighbours:
FALSE (default)Neighbours are light grey.
TRUE — territory mapEach neighbour is coloured by the direction of its nearest seed group, computed as unweighted shortest-path distance within the component. Neighbours equidistant from both seed groups are shown in purple (equidistant territory).
At gene level each node represents a collapsed gene rather than a single isoform, so a binary up/down label is not meaningful (most genes contribute both up- and down-labelled isoforms). Instead a continuous dominance score is computed per gene:
where and are the numbers of seed isoforms from
the input table that are up- and down-labelled for that gene. The score is
mapped to a diverging orange–white–sky-blue colour scale:
+1 (pure up) → orange
0 (balanced or neighbour) → white / neutral
-1 (pure down) → sky blue
Neighbour genes (no seed isoforms in this component) receive a score of 0
and appear white/neutral. colour_neighbours is ignored at gene level.
seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) genes <- c("CLTCL1", "WAS", "VAV1", "HLA-DMA", "ICOS", "PRKACB") obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name %in% genes, ], order = 1, confirm = FALSE, verbose = FALSE ) obj <- run_component_analysis(obj, "t2d", label = "comp") # Colour seeds by direction p <- plot_component(obj, "t2d", "comp", component_id = 1, colour_by = "direction") # Territory map: neighbours coloured by the seed directions reaching them p <- plot_component(obj, "t2d", "comp", component_id = 1, colour_by = "direction", colour_neighbours = TRUE) # Without node labels p <- plot_component(obj, "t2d", "comp", component_id = 1, node_labels = "none")seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) genes <- c("CLTCL1", "WAS", "VAV1", "HLA-DMA", "ICOS", "PRKACB") obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name %in% genes, ], order = 1, confirm = FALSE, verbose = FALSE ) obj <- run_component_analysis(obj, "t2d", label = "comp") # Colour seeds by direction p <- plot_component(obj, "t2d", "comp", component_id = 1, colour_by = "direction") # Territory map: neighbours coloured by the seed directions reaching them p <- plot_component(obj, "t2d", "comp", component_id = 1, colour_by = "direction", colour_neighbours = TRUE) # Without node labels p <- plot_component(obj, "t2d", "comp", component_id = 1, node_labels = "none")
For each gene computes a per-gene delta (x_col - y_col, or the
log10 fold-change log10(x_col / y_col) when log_ratio = TRUE)
and displays the distribution as a boxplot with individual gene points
overlaid as a jitter strip. A horizontal reference line at zero marks no
difference between the two columns. Orange points have a positive delta
(x_col > y_col); blue have a negative delta.
plot_cross_gene_boxplot( obj, analysis, x_col, y_col, log_ratio = FALSE, label_n = 10L, label = "delta", title = NULL )plot_cross_gene_boxplot( obj, analysis, x_col, y_col, log_ratio = FALSE, label_n = 10L, label = "delta", title = NULL )
obj |
An IsoNetAnalyzeR session object. |
analysis |
Character scalar. Label of the
DifferentialPulldownAnalysis; use |
x_col |
Character scalar. Column for the minuend / numerator (e.g. the up-seed neighbourhood metric). Must be numeric. |
y_col |
Character scalar. Column for the subtrahend / denominator
(e.g. the down-seed neighbourhood metric). Must be numeric.
Delta = |
log_ratio |
Logical. When |
label_n |
Integer. Maximum total genes to label across all strategies.
Default |
label |
Character vector. One or more of |
title |
Character scalar or |
A ggplot object, invisibly.
When log_ratio = TRUE the plotted value is
log10((x_col + 1) / (y_col + 1)). Adding 1 before dividing means
zero-value genes map to 0 (no change) rather than being dropped, so all
genes are retained. The zero reference line corresponds to a ratio of 1
(no difference).
seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) genes <- c("CLTCL1", "WAS", "VAV1", "HLA-DMA", "ICOS", "PRKACB") obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name %in% genes, ], order = 1, confirm = FALSE, verbose = FALSE ) p <- plot_cross_gene_boxplot(obj, "t2d", "up_nodes", "down_nodes")seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) genes <- c("CLTCL1", "WAS", "VAV1", "HLA-DMA", "ICOS", "PRKACB") obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name %in% genes, ], order = 1, confirm = FALSE, verbose = FALSE ) p <- plot_cross_gene_boxplot(obj, "t2d", "up_nodes", "down_nodes")
Assembles five plot_cross_gene_boxplot panels in one row, each
showing the distribution of per-gene deltas (up - down) for a
standard metric pair:
Nodes
Edges
Density
Average degree
Clustering coefficient
All panels include expand_limits(y = 0) so the zero reference
line is always in frame, making it easy to compare the direction of
shift across metrics. Labels are suppressed by default for a clean
overview; use plot_cross_gene_boxplot to drill into any
panel with labels.
plot_cross_gene_boxplot_overview( obj, analysis, log_ratio = FALSE, label_n = 0L, label = "delta", title = NULL )plot_cross_gene_boxplot_overview( obj, analysis, log_ratio = FALSE, label_n = 0L, label = "delta", title = NULL )
obj |
An IsoNetAnalyzeR session object. |
analysis |
Character scalar. Label of the
DifferentialPulldownAnalysis; use |
log_ratio |
Logical. Use |
label_n |
Integer. Maximum total genes to label per panel. Default |
label |
Character vector. One or more of |
title |
Character scalar or |
When log_ratio = TRUE, the delta is computed as
log10((x+1)/(y+1)) so that zero-value genes map to 0 rather
than being dropped.
Requires the patchwork package.
A patchwork object, invisibly.
seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) genes <- c("CLTCL1", "WAS", "VAV1", "HLA-DMA", "ICOS", "PRKACB") obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name %in% genes, ], order = 1, confirm = FALSE, verbose = FALSE ) p <- plot_cross_gene_boxplot_overview(obj, "t2d")seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) genes <- c("CLTCL1", "WAS", "VAV1", "HLA-DMA", "ICOS", "PRKACB") obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name %in% genes, ], order = 1, confirm = FALSE, verbose = FALSE ) p <- plot_cross_gene_boxplot_overview(obj, "t2d")
A first-look function that assembles six plot_cross_gene_scatter
panels in a 2x3 grid:
Nodes (up vs down)
Edges (up vs down)
Density (up vs down)
Average degree (up vs down)
Clustering coefficient (up vs down)
Edges gained vs edges lost
Count columns (nodes, edges, edges gained/lost) use log10(x + 1)
scaling by default so that zero-interaction genes stay at the origin
rather than being dropped. Labels are suppressed so the overview stays
clean; use plot_cross_gene_scatter directly on any panel
that catches your eye to add labels and explore further.
plot_cross_gene_overview( obj, analysis, log_counts = TRUE, label_n = 0L, label = "delta", title = NULL )plot_cross_gene_overview( obj, analysis, log_counts = TRUE, label_n = 0L, label = "delta", title = NULL )
obj |
An IsoNetAnalyzeR session object. |
analysis |
Character scalar. Label of the
DifferentialPulldownAnalysis; use |
log_counts |
Logical. Apply |
label_n |
Integer. Maximum total genes to label per panel.
Default |
label |
Character vector. Labelling strategy passed to each
panel. One or more of |
title |
Character scalar or |
Requires the patchwork package
(install.packages("patchwork")).
A patchwork object, invisibly. The combined figure is
printed as a side-effect.
seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) genes <- c("CLTCL1", "WAS", "VAV1", "HLA-DMA", "ICOS", "PRKACB") obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name %in% genes, ], order = 1, confirm = FALSE, verbose = FALSE ) p <- plot_cross_gene_overview(obj, "t2d")seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) genes <- c("CLTCL1", "WAS", "VAV1", "HLA-DMA", "ICOS", "PRKACB") obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name %in% genes, ], order = 1, confirm = FALSE, verbose = FALSE ) p <- plot_cross_gene_overview(obj, "t2d")
Plots any two numeric columns from cross_gene_summary as a scatter,
one point per gene. A diagonal identity line makes up/down asymmetry
immediately visible. For a quick five-panel overview across all standard
metrics, see plot_cross_gene_overview.
plot_cross_gene_scatter( obj, analysis, x_col, y_col, x_axis_log = FALSE, y_axis_log = FALSE, x_log_offset = 1, y_log_offset = 1, label_n = 10L, label = "delta", title = NULL )plot_cross_gene_scatter( obj, analysis, x_col, y_col, x_axis_log = FALSE, y_axis_log = FALSE, x_log_offset = 1, y_log_offset = 1, label_n = 10L, label = "delta", title = NULL )
obj |
An IsoNetAnalyzeR session object. |
analysis |
Character scalar. Label of the
DifferentialPulldownAnalysis; use |
x_col |
Character scalar. Column for the X-axis (must be numeric
in |
y_col |
Character scalar. Column for the Y-axis (must be numeric
in |
x_axis_log |
Logical. Apply |
y_axis_log |
Logical. Apply |
x_log_offset |
Numeric scalar. Offset added before |
y_log_offset |
Numeric scalar. Offset added before |
label_n |
Integer. Maximum total genes to label across all strategies.
Default |
label |
Character vector. One or more of |
title |
Character scalar or |
A ggplot object, invisibly.
seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) genes <- c("CLTCL1", "WAS", "VAV1", "HLA-DMA", "ICOS", "PRKACB") obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name %in% genes, ], order = 1, confirm = FALSE, verbose = FALSE ) p <- plot_cross_gene_scatter(obj, "t2d", "up_nodes", "down_nodes")seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) genes <- c("CLTCL1", "WAS", "VAV1", "HLA-DMA", "ICOS", "PRKACB") obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name %in% genes, ], order = 1, confirm = FALSE, verbose = FALSE ) p <- plot_cross_gene_scatter(obj, "t2d", "up_nodes", "down_nodes")
Renders a network using ggraph and ggplot2. Dispatches on IsoNetAnalyzeR (full session network) and VirtualPulldownLookup (single pulldown subgraph).
Dispatches on GeneDiffPulldown. Three display modes are
available via the direction argument:
"up" or "down" - renders a single subgraph,
highlighting the seed isoforms.
"side_by_side" (default) - renders the two subgraphs
side-by-side as a two-panel ggplot2 / patchwork figure.
"overlay" - merges the up- and down-labelled subgraphs
into a single network. Non-seed nodes and edges use green for the
up-seed neighbourhood, orange for the down-seed neighbourhood, and blue
when present in both. Focal seeds use a reddish-purple fill and directional
seed shapes, separating node role from neighbourhood membership.
Down-only edges are dashed and shared edges thicker, and the legend
sits below the plot.
Dispatches on DifferentialPulldownAnalysis. Merges the virtual pulldown subgraphs from multiple genes into a single network to reveal cross-gene clustering and shared interaction partners.
plot_network( object, level = "isoform", all_edges = FALSE, group_by_gene = FALSE, layout = "stress", node_size = 3, label_size = 2.5, edge_alpha = 0.4, title = NULL, node_labels = c("symbol", "id", "none"), ... ) ## S4 method for signature 'IsoNetAnalyzeR' plot_network( object, level = "isoform", all_edges = FALSE, group_by_gene = FALSE, layout = "stress", node_size = 3, label_size = 2.5, edge_alpha = 0.4, title = NULL, node_labels = c("symbol", "id", "none"), force = FALSE, ... ) ## S4 method for signature 'VirtualPulldownLookup' plot_network( object, level = "isoform", all_edges = FALSE, group_by_gene = FALSE, layout = "stress", node_size = 3, label_size = 2.5, edge_alpha = 0.4, title = NULL, node_labels = c("symbol", "id", "none"), ... ) ## S4 method for signature 'GeneDiffPulldown' plot_network( object, level = "isoform", all_edges = FALSE, group_by_gene = FALSE, layout = "stress", node_size = 3, label_size = 2.5, edge_alpha = 0.4, title = NULL, node_labels = c("symbol", "id", "none"), ..., direction = c("side_by_side", "up", "down", "overlay") ) ## S4 method for signature 'DifferentialPulldownAnalysis' plot_network( object, level = "isoform", all_edges = FALSE, group_by_gene = FALSE, layout = "stress", node_size = 3, label_size = 2.5, edge_alpha = 0.4, title = NULL, node_labels = c("symbol", "id", "none"), ..., direction = c("both", "up", "down"), genes = NULL, min_nodes = NULL, min_shared_nodes = NULL, min_component_nodes = NULL, min_edges = NULL, colour_by = c("gene", "hub_degree") )plot_network( object, level = "isoform", all_edges = FALSE, group_by_gene = FALSE, layout = "stress", node_size = 3, label_size = 2.5, edge_alpha = 0.4, title = NULL, node_labels = c("symbol", "id", "none"), ... ) ## S4 method for signature 'IsoNetAnalyzeR' plot_network( object, level = "isoform", all_edges = FALSE, group_by_gene = FALSE, layout = "stress", node_size = 3, label_size = 2.5, edge_alpha = 0.4, title = NULL, node_labels = c("symbol", "id", "none"), force = FALSE, ... ) ## S4 method for signature 'VirtualPulldownLookup' plot_network( object, level = "isoform", all_edges = FALSE, group_by_gene = FALSE, layout = "stress", node_size = 3, label_size = 2.5, edge_alpha = 0.4, title = NULL, node_labels = c("symbol", "id", "none"), ... ) ## S4 method for signature 'GeneDiffPulldown' plot_network( object, level = "isoform", all_edges = FALSE, group_by_gene = FALSE, layout = "stress", node_size = 3, label_size = 2.5, edge_alpha = 0.4, title = NULL, node_labels = c("symbol", "id", "none"), ..., direction = c("side_by_side", "up", "down", "overlay") ) ## S4 method for signature 'DifferentialPulldownAnalysis' plot_network( object, level = "isoform", all_edges = FALSE, group_by_gene = FALSE, layout = "stress", node_size = 3, label_size = 2.5, edge_alpha = 0.4, title = NULL, node_labels = c("symbol", "id", "none"), ..., direction = c("both", "up", "down"), genes = NULL, min_nodes = NULL, min_shared_nodes = NULL, min_component_nodes = NULL, min_edges = NULL, colour_by = c("gene", "hub_degree") )
object |
A DifferentialPulldownAnalysis object. |
level |
|
all_edges |
Logical. |
group_by_gene |
Logical. Only used when |
layout |
ggraph layout string. Default |
node_size |
Numeric. Base node size. Default |
label_size |
Numeric. Label text size. Default |
edge_alpha |
Numeric in [0, 1]. Default |
title |
Character scalar or |
node_labels |
Character scalar. |
... |
Additional arguments forwarded to
|
force |
Logical. If |
direction |
Character scalar: |
genes |
Character vector of gene IDs to include. Defaults to
|
min_nodes |
Integer or |
min_shared_nodes |
Integer or |
min_component_nodes |
Integer or |
min_edges |
Integer or |
colour_by |
Character scalar:
Must be passed as a named argument. |
all_edges: For IsoNetAnalyzeR the stored network
is already filtered at construction time, so all_edges = TRUE only
has an effect when a pi_score edge attribute is still present on the
graph. For VirtualPulldownLookup all_edges = TRUE
re-displays edges whose pi_score falls below @params$cutoff,
which is meaningful for inspecting nodes that were filtered out.
Gene-level plot: Isoforms are contracted by the gene vertex
attribute. Isoforms with a missing gene attribute are grouped as
"NA_gene". Isolated seed nodes are retained and rendered as valid
one-node/zero-edge results; isolated non-seed nodes are omitted.
Node shapes and black outlines provide redundant role encoding alongside colour.
Nodes are coloured by the gene whose pulldown they originated from. Nodes that appear in the subgraphs of more than one gene receive a distinct multi-gene colour (dark grey) so that shared interaction hubs are immediately visible. Seed isoforms are highlighted via shape.
All colour palettes are colour-blind-safe (Okabe-Ito).
A ggplot object, invisibly. Can be further modified with
ggplot2 layers or saved with ggplot2::ggsave().
A ggplot / patchwork object, invisibly.
A ggplot object, invisibly.
plot_network(IsoNetAnalyzeR): Plot the full network of an
IsoNetAnalyzeR session object.
plot_network(VirtualPulldownLookup): Plot the subgraph of a
VirtualPulldownLookup result. The seed node is highlighted
in a contrasting colour.
plot_network(GeneDiffPulldown): Plot a GeneDiffPulldown result.
plot_network(DifferentialPulldownAnalysis): Plot cross-gene network from a
DifferentialPulldownAnalysis result.
When group_by_gene = TRUE and level = "isoform", nodes are
coloured by their parent gene. In "up", "down", and
"side_by_side" modes this replaces the default uniform node colour.
In "overlay" mode, gene identity is mapped to node fill
colour while membership (up-only / shared / down-only) is shown via the
node border (stroke) colour and edge colour, so both dimensions
remain visible simultaneously.
obj <- IsoNetAnalyzeR("example") # Neighbourhood of one isoform obj <- lookup_virtual_pulldown(obj, "cltcl1_up", seed = "ENST00000621271", order = 1) p <- plot_network(get_lookup(obj, "cltcl1_up")) # The same neighbourhood at gene level p <- plot_network(get_lookup(obj, "cltcl1_up"), level = "gene") # Transcript identifiers instead of gene symbols, or no labels p <- plot_network(get_lookup(obj, "cltcl1_up"), node_labels = "id") p <- plot_network(get_lookup(obj, "cltcl1_up"), node_labels = "none") seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name == "CLTCL1", ], order = 1, confirm = FALSE, verbose = FALSE ) gr <- get_gene_result(obj, "t2d", "ENSG00000070371") # Up and down neighbourhoods side by side p <- plot_network(gr) # Both neighbourhoods in one overlay p <- plot_network(gr, direction = "overlay") seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) genes <- c("CLTCL1", "WAS", "VAV1", "HLA-DMA", "ICOS", "PRKACB") obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name %in% genes, ], order = 1, confirm = FALSE, verbose = FALSE ) result <- get_analysis(obj, "t2d") # Cross-gene view of the up-labelled seed neighbourhoods p <- plot_network(result, direction = "up") # Keep components that share at least one node between genes p <- plot_network(result, min_shared_nodes = 1)obj <- IsoNetAnalyzeR("example") # Neighbourhood of one isoform obj <- lookup_virtual_pulldown(obj, "cltcl1_up", seed = "ENST00000621271", order = 1) p <- plot_network(get_lookup(obj, "cltcl1_up")) # The same neighbourhood at gene level p <- plot_network(get_lookup(obj, "cltcl1_up"), level = "gene") # Transcript identifiers instead of gene symbols, or no labels p <- plot_network(get_lookup(obj, "cltcl1_up"), node_labels = "id") p <- plot_network(get_lookup(obj, "cltcl1_up"), node_labels = "none") seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name == "CLTCL1", ], order = 1, confirm = FALSE, verbose = FALSE ) gr <- get_gene_result(obj, "t2d", "ENSG00000070371") # Up and down neighbourhoods side by side p <- plot_network(gr) # Both neighbourhoods in one overlay p <- plot_network(gr, direction = "overlay") seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) genes <- c("CLTCL1", "WAS", "VAV1", "HLA-DMA", "ICOS", "PRKACB") obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name %in% genes, ], order = 1, confirm = FALSE, verbose = FALSE ) result <- get_analysis(obj, "t2d") # Cross-gene view of the up-labelled seed neighbourhoods p <- plot_network(result, direction = "up") # Keep components that share at least one node between genes p <- plot_network(result, min_shared_nodes = 1)
Produces a 2-row x 3-column panel figure summarising the NetworkDiagnostics result stored in an IsoNetAnalyzeR session object. Panels carry no in-plot titles; panel content and the overall figure title are intended to live in the surrounding caption/body text rather than the image itself.
plot_network_diagnostics(obj, title = NULL)plot_network_diagnostics(obj, title = NULL)
obj |
An IsoNetAnalyzeR session object with a
completed network diagnostics run (see |
title |
Character scalar or |
Panel layout (2 rows x 3 columns), grouped by network level:
Row 1 (isoform-level, blue): (A) Isoform degree distribution | (B) Connected component sizes | (C) Clustering coefficient vs degree
Row 2 (gene-level, orange / categorical): (D) Gene degree distribution | (E) Isoforms per gene | (F) Gene connectivity status
Sticky degree thresholds are shown as dashed vertical lines in the two degree distribution panels (A, D). A LOESS smoothing line is overlaid on the clustering coefficient panel (C). Degree-distribution panels (A, D) and the isoforms-per-gene panel (E) use log-scaled counts to make the heavy right tail readable; no power-law shape is implied by this choice.
A patchwork object (invisibly). Print it to display, or
save with ggplot2::ggsave().
# A small deterministic network keeps this example fast; on the bundled # network the diagnostics take about half a minute. g <- igraph::make_graph("Zachary") n <- igraph::vcount(g) igraph::V(g)$name <- paste0("tx", seq_len(n)) igraph::V(g)$gene <- paste0("gene", ceiling(seq_len(n) / 2)) igraph::V(g)$transcript_biotype <- "protein_coding" igraph::E(g)$interact <- 1L toy <- IsoNetAnalyzeR("toy", network = g, metadata = list(network_cutoff = 0.25)) toy <- run_network_diagnostics(toy) p <- plot_network_diagnostics(toy)# A small deterministic network keeps this example fast; on the bundled # network the diagnostics take about half a minute. g <- igraph::make_graph("Zachary") n <- igraph::vcount(g) igraph::V(g)$name <- paste0("tx", seq_len(n)) igraph::V(g)$gene <- paste0("gene", ceiling(seq_len(n) / 2)) igraph::V(g)$transcript_biotype <- "protein_coding" igraph::E(g)$interact <- 1L toy <- IsoNetAnalyzeR("toy", network = g, metadata = list(network_cutoff = 0.25)) toy <- run_network_diagnostics(toy) p <- plot_network_diagnostics(toy)
Displays every key-value pair stored in the @metadata slot in a
readable, aligned format. Values that are themselves lists or vectors are
shown compactly on one line.
print_metadata(object, ...) ## S4 method for signature 'IsoNetAnalyzeR' print_metadata(object, ...)print_metadata(object, ...) ## S4 method for signature 'IsoNetAnalyzeR' print_metadata(object, ...)
object |
An IsoNetAnalyzeR session object. |
... |
Currently unused; reserved for future arguments. |
object, invisibly.
print_metadata(IsoNetAnalyzeR): Print metadata for an IsoNetAnalyzeR
object.
obj <- IsoNetAnalyzeR("example") obj <- set_metadata(obj, "author", "Jane Doe") print_metadata(obj)obj <- IsoNetAnalyzeR("example") obj <- set_metadata(obj, "author", "Jane Doe") print_metadata(obj)
Remaps redundant Ensembl transcript identifiers to their kept protein representative. With a network supplied, a mapping is applied only when it is compatible with that graph. Identifiers absent from the map are retained.
resolve_duplicate_isoforms( x, network = NULL, isoform_col = "isoform_id", gene_col = "gene_id", duplicate_map = NULL )resolve_duplicate_isoforms( x, network = NULL, isoform_col = "isoform_id", gene_col = "gene_id", duplicate_map = NULL )
x |
Character vector or data frame containing transcript identifiers. |
network |
Optional igraph used to validate whether each mapping is applicable. |
isoform_col |
Name of the transcript-ID column when |
gene_col |
Name of the gene-ID column when |
duplicate_map |
Optional map with the schema returned by
|
The same broad type as x, with resolved identifiers and a
dedup_audit attribute.
obj <- IsoNetAnalyzeR("example") map <- isonet_duplicate_map() # A versioned identifier and a redundant protein-identical transcript, # resolved against the session network ids <- c("ENST00000621271.4", map$redundant_ENST[map$network_applicable][1]) resolved <- resolve_duplicate_isoforms(ids, network = get_network(obj)) resolved attr(resolved, "dedup_audit")obj <- IsoNetAnalyzeR("example") map <- isonet_duplicate_map() # A versioned identifier and a redundant protein-identical transcript, # resolved against the session network ids <- c("ENST00000621271.4", map$redundant_ENST[map$network_applicable][1]) resolved <- resolve_duplicate_isoforms(ids, network = get_network(obj)) resolved attr(resolved, "dedup_audit")
Decomposes the merged cross-gene network of an existing
DifferentialPulldownAnalysis run into its connected components
and computes both Tier-1 structural statistics and Tier-2 topological
statistics for each component. The result is stored inside the parent
analysis and can be accessed with
get_component_overview(obj, analysis, label).
run_component_analysis( obj, analysis, label, direction = c("both", "up", "down"), level = c("isoform", "gene"), genes = NULL, min_component_nodes = NULL, min_shared_nodes = NULL, min_edges = NULL )run_component_analysis( obj, analysis, label, direction = c("both", "up", "down"), level = c("isoform", "gene"), genes = NULL, min_component_nodes = NULL, min_shared_nodes = NULL, min_edges = NULL )
obj |
An IsoNetAnalyzeR session object. |
analysis |
Character scalar. Label of an existing
DifferentialPulldownAnalysis; use |
label |
Character scalar. Key under which to store the result. |
direction |
|
level |
|
genes |
Character vector of gene IDs to include, or |
min_component_nodes |
Integer or |
min_shared_nodes |
Integer or |
min_edges |
Integer or |
An updated IsoNetAnalyzeR object (invisibly).
Access results with get_component_overview (combined
Tier-1 and Tier-2 table) and get_component (per-node
table for a single component).
Size: nodes, edges, density, average degree, clustering coefficient.
Seed enrichment: count and fraction of seed vs. neighbour nodes.
Direction mixing: up/down seed counts and contributing
genes; the mixed flag records components containing both labels.
Multi-gene hubs: count and fraction of shared nodes.
Diameter: longest shortest path in the component. Large diameter suggests a signalling cascade rather than a tight complex.
Radius: minimum eccentricity across all nodes.
Degree centralization: how unequally degree is distributed (0 = perfectly uniform, 1 = pure star graph).
Topology class: heuristic classification into
"hub-spoke", "chain-like", or "clique-like" based
on degree centralization (see ComponentAnalysis Details).
Hub betweenness: for every shared (multi-gene) node, betweenness centrality computed within its component, normalised to [0, 1], and ranked. Nodes with high normalised betweenness are structural bridges across the sub-communities pulled in by different genes. Biological relevance requires external evidence.
seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) genes <- c("CLTCL1", "WAS", "VAV1", "HLA-DMA", "ICOS", "PRKACB") obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name %in% genes, ], order = 1, confirm = FALSE, verbose = FALSE ) # Isoform-level components of both seed directions obj <- run_component_analysis(obj, "t2d", label = "comp") overview <- get_component_overview(obj, "t2d", "comp") # Components containing both up and down seed labels overview[overview$mixed, c("component_id", "n_nodes", "n_shared_nodes")] # Gene-level components obj <- run_component_analysis(obj, "t2d", label = "comp_gene", level = "gene")seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) genes <- c("CLTCL1", "WAS", "VAV1", "HLA-DMA", "ICOS", "PRKACB") obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name %in% genes, ], order = 1, confirm = FALSE, verbose = FALSE ) # Isoform-level components of both seed directions obj <- run_component_analysis(obj, "t2d", label = "comp") overview <- get_component_overview(obj, "t2d", "comp") # Components containing both up and down seed labels overview[overview$mixed, c("component_id", "n_nodes", "n_shared_nodes")] # Gene-level components obj <- run_component_analysis(obj, "t2d", label = "comp_gene", level = "gene")
Tests each connected component from a ComponentAnalysis run
against GO gene sets (or a user-supplied pathway list) using
fgsea::fora(). The result annotates each component with the GO
terms most significantly over-represented among its member genes, providing
a biological interpretation of what each protein community is doing.
run_component_ora( obj, analysis, component_analysis, label, pathways = NULL, go_category = c("GO:BP", "GO:MF", "GO:CC", "ALL"), nodes = c("all", "seeds"), universe = NULL, minSize = 10L, maxSize = 500L )run_component_ora( obj, analysis, component_analysis, label, pathways = NULL, go_category = c("GO:BP", "GO:MF", "GO:CC", "ALL"), nodes = c("all", "seeds"), universe = NULL, minSize = 10L, maxSize = 500L )
obj |
An IsoNetAnalyzeR session object. |
analysis |
Character scalar. Label of the parent DifferentialPulldownAnalysis. |
component_analysis |
Character scalar. Label of the ComponentAnalysis to annotate. |
label |
Character scalar. Key under which the result is
stored; retrieve it afterwards with
|
pathways |
Named list of character vectors (Ensembl gene IDs
per pathway), or |
go_category |
Character scalar. GO subcollection to fetch when
|
nodes |
Character scalar. Which nodes to test per
component: |
universe |
Character vector of Ensembl gene IDs to use as
the ORA background, or |
minSize |
Integer. Minimum gene set size after filtering
to the universe. Default |
maxSize |
Integer. Maximum gene set size. Default
|
The IsoNetAnalyzeR session object, invisibly, with
the ComponentOraResult stored under label inside the
component analysis. Access via
get_component_ora_result(obj, analysis, component_analysis, label).
Nodes in the component network are isoform IDs. The reliable gene
vertex attribute on the IsoNetAnalyzeR network object is used to map each
isoform to its Ensembl gene ID. This mapping is applied automatically;
no user input is required.
The default background is all genes represented in the full IsoNetAnalyzeR
network. This is the most principled choice for protein-interaction network
ORA because it restricts the background to proteins that could in principle
have appeared in any component. Using all GO-annotated genes would inflate
apparent enrichment by including thousands of proteins absent from the
network. You can override this with the universe argument.
When pathways = NULL (default), gene sets are fetched from MSigDB
via msigdbr using category "C5" (GO gene sets).
go_category selects the subcollection:
"GO:BP"Biological process - what the proteins do. Most informative for isoform-switch interpretation. Default.
"GO:MF"Molecular function - the biochemical activity. Useful for identifying domain-level functional differences between isoforms.
"GO:CC"Cellular component - subcellular location. Less directly relevant to isoform switching; use as secondary context.
"ALL"All three GO subcollections combined (excludes HPO).
nodes = "all" (default)All nodes in each component are tested. Recommended when components are small (typical for differential pulldown results), as using all nodes maximises the gene set size and statistical power.
nodes = "seeds"Only seed nodes (the experimentally regulated isoforms) are tested. More conservative; useful when components are large and neighbours dominate.
seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) genes <- c("CLTCL1", "WAS", "VAV1", "HLA-DMA", "ICOS", "PRKACB") obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name %in% genes, ], order = 1, confirm = FALSE, verbose = FALSE ) obj <- run_component_analysis(obj, "t2d", label = "comp") hallmark <- readRDS(system.file("extdata", "msigdb_hallmark_ensembl.rds", package = "IsoNetAnalyzeR")) obj <- run_component_ora(obj, "t2d", "comp", label = "hallmark", pathways = hallmark) get_component_ora_result(obj, "t2d", "comp", "hallmark") # Most significant gene set per component get_ora_table(obj, "t2d", "comp", "hallmark", top_n = 1)seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) genes <- c("CLTCL1", "WAS", "VAV1", "HLA-DMA", "ICOS", "PRKACB") obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown( obj, "t2d", seeds[seeds$gene_name %in% genes, ], order = 1, confirm = FALSE, verbose = FALSE ) obj <- run_component_analysis(obj, "t2d", label = "comp") hallmark <- readRDS(system.file("extdata", "msigdb_hallmark_ensembl.rds", package = "IsoNetAnalyzeR")) obj <- run_component_ora(obj, "t2d", "comp", label = "hallmark", pathways = hallmark) get_component_ora_result(obj, "t2d", "comp", "hallmark") # Most significant gene set per component get_ora_table(obj, "t2d", "comp", "hallmark", top_n = 1)
Reads a long-format table of caller-selected isoform seeds (one isoform per row), runs a virtual pulldown for the up- and down-labelled seeds of each gene separately, computes per-direction and per-gene statistics, and adds a DifferentialPulldownAnalysis object to the IsoNetAnalyzeR session object.
run_differential_pulldown( obj, label, input, order, cutoff = NULL, parallel = FALSE, confirm = interactive(), verbose = TRUE, resolve_duplicates = TRUE, seed_padj_col = NULL, seed_fdr = 0.05 )run_differential_pulldown( obj, label, input, order, cutoff = NULL, parallel = FALSE, confirm = interactive(), verbose = TRUE, resolve_duplicates = TRUE, seed_padj_col = NULL, seed_fdr = 0.05 )
obj |
An IsoNetAnalyzeR session object. |
label |
Character scalar. Key under which to store the result;
retrieve it afterwards with |
input |
One of:
|
order |
Integer scalar. Number of BFS hops for the virtual pulldown. |
cutoff |
Numeric scalar in [0, 1]. Internal-edge fraction cutoff.
Defaults to |
parallel |
Logical. When |
confirm |
Logical. When |
verbose |
Logical. Print per-gene progress messages. Default
|
resolve_duplicates |
Logical. Resolve versioned and protein-identical
redundant transcript identifiers before analysis. Same-direction
representative collisions are collapsed and genes with opposite-direction
collisions are excluded. Default |
seed_padj_col |
Optional name of the caller-supplied adjusted p-value column. When non-NULL, enforce significant retained support and both mapped directions after biological eligibility and identifier resolution. |
seed_fdr |
Numeric scalar in (0, 1]. A retained seed is significant when its supplied adjusted p-value is strictly below this threshold. Default 0.05. No additional p-value adjustment is performed. |
An updated IsoNetAnalyzeR object (invisibly); access
the result via get_analysis(obj, label).
A CSV, Excel (.xlsx / .xls), or already-loaded data frame in
long format with exactly the following columns (any order):
Gene identifier (e.g. Ensembl gene ID or gene symbol).
Isoform / transcript identifier matching vertex names in the session network.
Must be exactly "up" or "down" (case
insensitive; trimmed).
Extra columns are retained in @input_table. If seed_padj_col
is supplied, that column is used for retained-seed validation.
With seed_padj_col supplied, decay filtering and identifier resolution
occur first, then unmapped rows are removed. Each retained gene must have
both up and down seeds and at least one retained adjusted p-value below
seed_fdr. Other retained seeds may be non-significant or have missing
adjusted p-values. No maximum seed count is imposed. Supply only transcripts
passing the study's gene and effect-size filters; this function does not
perform RNA testing or choose an effect floor. Audits are stored in
obj@metadata$analysis_seed_support[[label]].
With seed_padj_col = NULL, the generic three-column exploratory
contract is unchanged and does not assert statistical support.
Parallelism is opt-in and requires the future and future.apply
packages (install.packages(c("future", "future.apply"))).
When parallel = TRUE the per-gene pulldowns are dispatched via
future.apply::future_lapply(), which delegates all scheduling to
whatever future plan the user has set before calling this
function.
Typical setup:
library(future) # Recommended: works on all platforms including Windows plan(multisession, workers = 4) # Unix/macOS only: lower overhead via forking plan(multicore, workers = 4) # Back to sequential when done plan(sequential)
If no plan has been set explicitly, future defaults to
sequential, so passing parallel = TRUE without configuring a
plan is safe but will not speed anything up. An informative message is
emitted in that situation.
The network graph embedded in obj is treated as read-only inside
each worker; no mutable state is shared between workers.
A progress bar is always shown during the per-gene loop via progressr. The bar works in both sequential and parallel modes. Users can customise the handler before calling this function, e.g.:
progressr::handlers("cli") # rich bar (default when cli is installed)
progressr::handlers("txtprogressbar") # plain fallback
If progressr::handlers(global = TRUE) has been set in the session,
that handler is used automatically; otherwise with_progress() applies
the default handler locally for this call only.
seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) cltcl1 <- seeds[seeds$gene_name == "CLTCL1", ] obj <- IsoNetAnalyzeR("example") # Exploratory run: gene_id, isoform_id and direction only obj <- run_differential_pulldown(obj, "explore", cltcl1, order = 1, confirm = FALSE, verbose = FALSE) # Require at least one significant retained seed per gene obj <- run_differential_pulldown( obj, "supported", cltcl1, order = 1, confirm = FALSE, verbose = FALSE, seed_padj_col = "within_gene_padj", seed_fdr = 0.05 ) get_metadata(obj, "analysis_seed_support")$supported$gene_audit get_cross_gene_summary(obj, "supported")seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) cltcl1 <- seeds[seeds$gene_name == "CLTCL1", ] obj <- IsoNetAnalyzeR("example") # Exploratory run: gene_id, isoform_id and direction only obj <- run_differential_pulldown(obj, "explore", cltcl1, order = 1, confirm = FALSE, verbose = FALSE) # Require at least one significant retained seed per gene obj <- run_differential_pulldown( obj, "supported", cltcl1, order = 1, confirm = FALSE, verbose = FALSE, seed_padj_col = "within_gene_padj", seed_fdr = 0.05 ) get_metadata(obj, "analysis_seed_support")$supported$gene_audit get_cross_gene_summary(obj, "supported")
Ranks genes by a network-topology delta derived from the
cross_gene_summary table of an existing
DifferentialPulldownAnalysis run, then tests the ranked list
against GO gene sets (or a user-supplied pathway list) using
fgsea::fgsea().
run_fgsea( obj, analysis, label, rank_by = "delta_nodes", stats = NULL, pathways = NULL, go_category = c("GO:BP", "GO:MF", "GO:CC", "ALL"), minSize = 15L, maxSize = 500L, nperm = 1000L, ... )run_fgsea( obj, analysis, label, rank_by = "delta_nodes", stats = NULL, pathways = NULL, go_category = c("GO:BP", "GO:MF", "GO:CC", "ALL"), minSize = 15L, maxSize = 500L, nperm = 1000L, ... )
obj |
An IsoNetAnalyzeR session object. |
analysis |
Character scalar. Label of the
DifferentialPulldownAnalysis; use |
label |
Character scalar. Key under which the result will be
stored; retrieve it afterwards with
|
rank_by |
Character scalar. One of the built-in ranking presets
(see Ranking tiers above). Ignored when |
stats |
Named numeric vector or |
pathways |
Named list of character vectors (gene IDs per pathway),
or |
go_category |
Character scalar. GO subcollection to fetch when
|
minSize |
Integer. Minimum gene set size after filtering to genes
present in the ranked list. Default |
maxSize |
Integer. Maximum gene set size. Default |
nperm |
Integer. Number of permutations for p-value estimation.
Default |
... |
Additional arguments passed to |
The IsoNetAnalyzeR session object, invisibly, with the
FgseaResult stored under label inside the analysis.
Access via get_gsea_result(obj, analysis, label).
rank_by)A named delta computed as the up-seed metric minus the down-seed metric
from cross_gene_summary. Positive values indicate a larger
static predicted neighbourhood metric for the up-labelled seeds;
negative values indicate the opposite.
Available presets:
\itemize{
\item \code{"delta_nodes"} - up_nodes \eqn{-} down_nodes \strong{(default)}
\item \code{"delta_edges"} - up_edges \eqn{-} down_edges
\item \code{"delta_avg_degree"} - up_avg_degree \eqn{-} down_avg_degree
\item \code{"delta_density"} - up_density \eqn{-} down_density
\item \code{"delta_clustering"} - up_clustering \eqn{-} down_clustering
\item \code{"delta_starness"} - up_starness \eqn{-} down_starness
\item \code{"delta_genes"} - up_genes \eqn{-} down_genes
\item \code{"delta_seed_mean_pi"} - up_seed_mean_pi \eqn{-} down_seed_mean_pi
\item \code{"delta_seed_pi_entropy"} - up_seed_pi_entropy \eqn{-} down_seed_pi_entropy
\item \code{"edges_gained_vs_lost"} - n_edges_gained \eqn{-} n_edges_lost
}
stats)Pass a named numeric vector directly (names must be gene IDs matching
the pathway gene sets). This completely bypasses the built-in ranking
logic and rank_by is ignored. Useful for complex custom rankings:
\preformatted{
cgs <- get_cross_gene_summary(obj, "my_run")
my_stats <- setNames(
(cgs$up_nodes - cgs$down_nodes) * 0.7 +
(cgs$up_edges - cgs$down_edges) * 0.3,
cgs$gene_id
)
obj <- run_fgsea(obj, "my_run", label = "weighted", stats = my_stats)
}
When pathways = NULL (default), gene sets are fetched from MSigDB
via msigdbr using category "C5" (GO gene sets). The
go_category argument selects the subcollection(s):
"GO:BP" (biological process), "GO:MF" (molecular function),
"GO:CC" (cellular component), or "ALL" for all three.
Gene sets are keyed by Ensembl gene ID (ensembl_gene).
For reproducible analyses, prefer a saved, versioned pathways list,
set the random seed before this call, and record the list checksum and run
parameters. Live pathway collections can change over time.
seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) hallmark <- readRDS(system.file("extdata", "msigdb_hallmark_ensembl.rds", package = "IsoNetAnalyzeR")) # For speed, this example analyses only the seed genes found in Hallmark # sets; the vignette ranks all 65 genes. With few ranked genes, minSize # must be small. in_hallmark <- seeds$gene_id %in% unlist(hallmark) obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown(obj, "t2d", seeds[in_hallmark, ], order = 1, confirm = FALSE, verbose = FALSE) set.seed(42) obj <- run_fgsea(obj, "t2d", label = "hallmark_gsea", pathways = hallmark, minSize = 3) get_gsea_table(obj, "t2d", "hallmark_gsea") # Custom ranking: a weighted node and edge difference per gene cgs <- get_cross_gene_summary(obj, "t2d") my_stats <- setNames( (cgs$up_nodes - cgs$down_nodes) * 0.7 + (cgs$up_edges - cgs$down_edges) * 0.3, cgs$gene_id ) obj <- run_fgsea(obj, "t2d", label = "weighted", stats = my_stats, pathways = hallmark, minSize = 3)seeds <- read.csv(system.file("extdata", "gse141432_t2d_vs_lean_seeds.csv", package = "IsoNetAnalyzeR")) hallmark <- readRDS(system.file("extdata", "msigdb_hallmark_ensembl.rds", package = "IsoNetAnalyzeR")) # For speed, this example analyses only the seed genes found in Hallmark # sets; the vignette ranks all 65 genes. With few ranked genes, minSize # must be small. in_hallmark <- seeds$gene_id %in% unlist(hallmark) obj <- IsoNetAnalyzeR("example") obj <- run_differential_pulldown(obj, "t2d", seeds[in_hallmark, ], order = 1, confirm = FALSE, verbose = FALSE) set.seed(42) obj <- run_fgsea(obj, "t2d", label = "hallmark_gsea", pathways = hallmark, minSize = 3) get_gsea_table(obj, "t2d", "hallmark_gsea") # Custom ranking: a weighted node and edge difference per gene cgs <- get_cross_gene_summary(obj, "t2d") my_stats <- setNames( (cgs$up_nodes - cgs$down_nodes) * 0.7 + (cgs$up_edges - cgs$down_edges) * 0.3, cgs$gene_id ) obj <- run_fgsea(obj, "t2d", label = "weighted", stats = my_stats, pathways = hallmark, minSize = 3)
Characterises the isoform interaction network loaded in an IsoNetAnalyzeR session object. Computes:
Structural summary statistics across three network views (full, predicted isoform, gene-level predicted).
Global topology metrics: density, average degree, clustering coefficient, connected components, diameter, and average path length of the largest component.
Per-isoform and per-gene degree tables.
Connected component size table.
Clustering coefficient vs degree table.
Per-gene isoform connectivity status
("all_connected", "partial", "all_isolated").
Sticky isoform and gene tables based on a degree threshold.
run_network_diagnostics( obj, sticky_method = c("quantile", "sd"), sticky_cutoff = NULL )run_network_diagnostics( obj, sticky_method = c("quantile", "sd"), sticky_cutoff = NULL )
obj |
An IsoNetAnalyzeR session object. |
sticky_method |
Character scalar. Threshold method for sticky node
detection: |
sticky_cutoff |
Numeric scalar. For |
Results are stored in obj@network_diagnostics as a
NetworkDiagnostics object and can be retrieved with
get_network_diagnostics. Re-running overwrites any previous
result with a warning.
The updated IsoNetAnalyzeR object, invisibly.
Access the result with get_network_diagnostics(obj).
An isoform (or gene) is classified as sticky if its degree in the predicted subnetwork exceeds a threshold derived from the overall degree distribution. Two methods are supported:
"quantile" (default)Threshold is the sticky_cutoff
quantile of the degree distribution. sticky_cutoff = 0.95 means
the top 5% by degree are sticky. Robust to the heavy-tailed
distributions typical of protein interaction networks.
"sd"Threshold is mean + sticky_cutoff * SD.
More sensitive to extreme hubs inflating the mean.
# A small deterministic network keeps this example fast; on the bundled # network the diagnostics take about half a minute. g <- igraph::make_graph("Zachary") n <- igraph::vcount(g) igraph::V(g)$name <- paste0("tx", seq_len(n)) igraph::V(g)$gene <- paste0("gene", ceiling(seq_len(n) / 2)) igraph::V(g)$transcript_biotype <- "protein_coding" igraph::E(g)$interact <- 1L toy <- IsoNetAnalyzeR("toy", network = g, metadata = list(network_cutoff = 0.25)) # Default: sticky nodes are the top 5% by degree toy <- run_network_diagnostics(toy) toy # Standard-deviation rule instead of a quantile toy <- run_network_diagnostics(toy, sticky_method = "sd", sticky_cutoff = 2)# A small deterministic network keeps this example fast; on the bundled # network the diagnostics take about half a minute. g <- igraph::make_graph("Zachary") n <- igraph::vcount(g) igraph::V(g)$name <- paste0("tx", seq_len(n)) igraph::V(g)$gene <- paste0("gene", ceiling(seq_len(n) / 2)) igraph::V(g)$transcript_biotype <- "protein_coding" igraph::E(g)$interact <- 1L toy <- IsoNetAnalyzeR("toy", network = g, metadata = list(network_cutoff = 0.25)) # Default: sticky nodes are the top 5% by degree toy <- run_network_diagnostics(toy) toy # Standard-deviation rule instead of a quantile toy <- run_network_diagnostics(toy, sticky_method = "sd", sticky_cutoff = 2)
Adds or updates a single named entry in the @metadata slot of an
IsoNetAnalyzeR session object. If the key already exists its
value is silently overwritten; if it does not exist it is created.
set_metadata(obj, key, value)set_metadata(obj, key, value)
obj |
An IsoNetAnalyzeR session object. |
key |
Character scalar. The metadata field name. |
value |
Any R object to store under |
The following keys are set automatically by the constructor and should
not normally be overwritten:
network_source, pi_threshold, network_cutoff.
An updated IsoNetAnalyzeR object (invisibly).
obj <- IsoNetAnalyzeR("example") obj <- set_metadata(obj, "author", "Jane Doe") obj <- set_metadata(obj, "notes", "Pilot run") get_metadata(obj, "author")obj <- IsoNetAnalyzeR("example") obj <- set_metadata(obj, "author", "Jane Doe") obj <- set_metadata(obj, "notes", "Pilot run") get_metadata(obj, "author")
Computes a set of network-level statistics for each subgraph in
vp_list, returning one row per subgraph. When a subgraph has
multiple seed vertices, their names are collapsed into a single
comma-separated string.
summarize_subgraphs(vp_list)summarize_subgraphs(vp_list)
vp_list |
A named list of igraph objects, typically the output of
repeated calls to |
A data frame with one row per subgraph and the following columns:
Comma-separated seed isoform name(s).
Total number of vertices.
Total number of edges.
Edge density of the subgraph.
Mean vertex degree.
Average local clustering coefficient.
Degree centralization score (0 = uniform, 1 = perfect star).
Number of unique genes represented.
obj <- IsoNetAnalyzeR("example") neighbourhoods <- list( cltcl1_up = virtual_pulldown(obj, "ENST00000621271", order = 1), cltcl1_down = virtual_pulldown(obj, "ENST00000427926", order = 1) ) summarize_subgraphs(neighbourhoods)obj <- IsoNetAnalyzeR("example") neighbourhoods <- list( cltcl1_up = virtual_pulldown(obj, "ENST00000621271", order = 1), cltcl1_down = virtual_pulldown(obj, "ENST00000427926", order = 1) ) summarize_subgraphs(neighbourhoods)
Performs a virtual pulldown by first restricting the network to predicted
interaction edges (interact == 1), expanding from a set of seed
isoforms up to order hops, then filtering out non-specific nodes
whose edges are predominantly external to the subnetwork.
virtual_pulldown( obj, seed_vertices, order, cutoff = NULL, resolve_duplicates = TRUE )virtual_pulldown( obj, seed_vertices, order, cutoff = NULL, resolve_duplicates = TRUE )
obj |
An IsoNetAnalyzeR session object. |
seed_vertices |
Character vector of seed isoform vertex names. All supplied vertices are treated as order-0 anchors. |
order |
Integer. Number of interaction hops to expand from the seeds. |
cutoff |
Numeric scalar in [0, 1]. Minimum fraction of edges
that must be internal to the subnetwork for a node to be retained. When
|
resolve_duplicates |
Logical. Resolve versioned and protein-identical
redundant transcript IDs against the active network. Default |
The network is taken directly from the IsoNetAnalyzeR session
object. The cutoff defaults to the value stored in
obj@metadata[["network_cutoff"]] but can be overridden to explore
alternative thresholds.
An igraph object representing the filtered virtual pulldown
subnetwork. Vertices carry an order attribute (hop distance from
the nearest seed) and a frac_internal attribute (fraction of
their interaction edges that remain internal to the subnetwork).
Seed vertices with zero interact == 1 edges are retained as
isolated nodes (frac_internal = NA, degree = 0),
representing isoforms present in the pinned network but incident to no
predicted edge in that network.
obj <- IsoNetAnalyzeR("example") g <- virtual_pulldown(obj, "ENST00000621271", order = 1) c(nodes = igraph::vcount(g), edges = igraph::ecount(g))obj <- IsoNetAnalyzeR("example") g <- virtual_pulldown(obj, "ENST00000621271", order = 1) c(nodes = igraph::vcount(g), edges = igraph::ecount(g))
Stores the result of a one-shot virtual pulldown query at either isoform or gene level, without running a full analysis across many seeds. Can optionally be stored inside an IsoNetAnalyzeR session object.
## S4 method for signature 'VirtualPulldownLookup' show(object)## S4 method for signature 'VirtualPulldownLookup' show(object)
object |
An VirtualPulldownLookup session object. |
Objects of this class are created by lookup_virtual_pulldown and returned by get_lookup.
show(VirtualPulldownLookup): Print a concise summary.
seedCharacter vector. The seed isoform(s) or gene(s) queried. Multiple seeds are stored as a vector when all were used as order-0 anchors in a single pulldown.
levelCharacter scalar. Either "isoform" or "gene".
subgraphAn igraph object representing the pulldown subnetwork.
node_statsData frame. Per-node statistics for the subgraph
(output of analyze_subgraph).
cutoffNumeric scalar. The internal-edge fraction cutoff used for this look-up. Stored explicitly so it is always visible on the object independent of the session metadata.
paramsNamed list. Additional parameters used: order,
level.
created_atPOSIXct scalar. Timestamp of the look-up.
obj <- IsoNetAnalyzeR("example") obj <- lookup_virtual_pulldown(obj, "cltcl1_up", seed = "ENST00000621271", order = 1) get_lookup(obj, "cltcl1_up")obj <- IsoNetAnalyzeR("example") obj <- lookup_virtual_pulldown(obj, "cltcl1_up", seed = "ENST00000621271", order = 1) get_lookup(obj, "cltcl1_up")