Skip to contents

Main interface

End-to-end analysis: run the full SelectSim pipeline in one call.

selectX()
SelectX main function from SelectSim to create alteration object with background model

Core workflow

Step-by-step building blocks called internally by selectX. Expose these directly for custom pipelines or debugging.

new.AL.general()
Create an Alteration Landscape (AL) object
get.blocks()
Get sample/alteration blocks
template.obj.gen()
Generate the template matrix
generateS()
Generate S matrix
generateW_block()
Generate block-aware sample weight matrix
generateW_mean_tmb()
Generate sample weight matrix from TMB values
null_model_parallel()
Generating the null_simulation matrix
retrieveOutliers()
Identify outlier null-model matrices

Statistics

Overlap computation, effect sizes, FDR estimation, and results table.

new.ALS()
Initialize an Alteration Landscape Stats (ALS) container
new.AMS()
Initialize an Alteration Matrix Stats (AMS) container
al.stats()
Compute alteration landscape statistics
am.stats()
Compute summary statistics for a binary alteration matrix
al.pairwise.alteration.stats()
Compute pairwise alteration statistics for an alteration landscape
am.pairwise.alteration.overlap()
Compute pairwise alteration co-occurrence counts
am.pairwise.alteration.coverage()
Compute pairwise alteration coverage statistics
am.weight.pairwise.alteration.overlap()
Compute TMB-weighted pairwise alteration overlap
r.am.pairwise.alteration.overlap()
Compute null overlap matrix
w.r.am.pairwise.alteration.overlap()
Compute null weighted overlap matrix
binary.yule()
Compute Yule Q coefficient for all gene pairs
effectSize()
Compute effect size between observed and expected overlap
r.effectSize()
Compute effect sizes for null model permutations
add()
Sum a list of matrices element-wise
estimateFDR2()
Estimate FDR by scanning observed vs null effect sizes
estimate_p_val()
Compute empirical two-sided p-value for a gene pair
estimate_pairwise_p()
Compute p-values for all gene pairs in a results table
interaction.table()
Build the full interaction results table from selectX outputs

Data processing

MAF file filtering utilities and gene alteration matrix (GAM) construction.

maf2gam()
Generate gam from the maf file
filter_maf_column()
Filter maf function
filter_maf_complex()
Filter a MAF dataframe by a combination of column values
filter_maf_gene.name()
Filter a MAF dataframe by gene name
filter_maf_ignore()
This function filters a MAF dataframe by retaining (or discarding) ignore mutations
filter_maf_missense()
This function filters a MAF dataframe by retaining (or discarding) missense mutations
filter_maf_mutation.type()
Filter a MAF dataframe by mutation type
filter_maf_mutations()
Filter a MAF dataframe by specific gene-mutation combinations
filter_maf_sample()
Filter a MAF dataframe by sample ID
filter_maf_schema()
This function filters a MAF dataframe by sample id
filter_maf_truncating()
This function filters a MAF dataframe by retaining (or discarding) truncating mutations
stat_maf_column()
Summary functions for MAF file
stat_maf_gene()
Count mutations per gene in a MAF file
stat_maf_sample()
Count mutations per sample in a MAF file
mutation_type
Mutation list object
TCGA_maf_schema
TCGA_maf_schema: schema for TCGA maf file to process the mutations
GENIE_maf_schema
GENIE_maf_schema: schema for GENIE maf file to process the mutations

Visualization

Plot helpers for inspecting results and null model distributions.

obs_exp_scatter()
Scatter plot of observed vs expected weighted co-mutation
ridge_plot_ed()
Ridge plot of null-model background distribution for significant gene pairs
ridge_plot_ed_compare()
Ridge plot comparing null-model distributions for two datasets
overlap_pair_extract()
Extract null-model weighted overlap distribution for a gene pair
theme_Publication()
A clean ggplot2 theme for publication-quality plots

Datasets

Example datasets bundled with the package.

luad_run_data
Lung adenocarcinoma from TCGA cohort as SelectSim run object
luad_result
Lung adenocarcinoma from TCGA cohort as SelectSim run results
luad_maf
Lung adenocarcinoma MAF from TCGA cohort
oncokb_genes
OncoKB v3.9 cancer genes
oncokb_truncating_genes
OncoKB v3.9 cancer genes consider for truncating mutations
variant_catalogue
OncoKB v3.9 cancer genes