Skip to contents

All functions

actionability_doc_note()
Get documentation string for AMP/ASCO/CAP clinical actionability tiers
af_distribution()
Function that plots a histogram of the the variant allelic support (tumor)
append_alteration_name()
Function that appends informative alteration names to sample variants based on gene symbol, consequence and HGVS annotations
append_annotation_links()
Function that appends multiple HTML annotation links to variant identifiers e.g. COSMIC, CLINVAR, REFSEQ etc
append_cancer_association_ranks()
Function that appends cancer gene evidence links
append_cancer_gene_evidence()
Function that appends cancer gene evidence links
append_dbmts_var_link()
Function that adds miRNA target annotations (dbMTS) to genetic variant identifiers
append_dbnsfp_var_link()
Function that assigns HTML links to dbNSFP prediction entries
append_drug_var_link()
Function that adds link to targeted drugs (on and off-label) for a list of variants and associated targeted
append_gwas_citation_phenotype()
Function that adds GWAS citation/phenotype to GWAS hit found through PCGR annotation
append_oncogenicity_docs()
Function that adds oncogenicity documentation from codes
append_protein_domains()
Function that adds protein domain annotations (PFAM) for a list of variants and associated targeted
append_styled_cna_vclass()
Function that styles CNA variant classes (amplification, gain, hetdel, homdel/hemdel) with more informative names for display in PCGR reports and other outputs
append_targeted_drug_annotations()
Function that adds link to targeted drugs (on and off-label) for a list of variants and associated targeted
append_tcga_var_link()
Function that adds TCGA annotations (cohort, frequency etc.) to variant identifiers
append_tfbs_annotation()
Function that adds TFBS annotations (dbMTS) to genetic variant identifiers
assign_amp_asco_cap_tiers()
AMP/ASCO/CAP tier classification for somatic variants in cancer
assign_bm_tier_support_ttagnostic()
For all biomarker evidence items with specified confidence level, assign whether these are tier-defining or providing additional support - tumor-type agnostic query
assign_bm_tier_support_ttspecific()
For all biomarker evidence items with specified confidence level, assign whether these are tier-defining or providing additional support - tumor-type specific query
assign_germline_popfreq_status()
Function that sets gnomAD_AF_ABOVE_TOLERATED to TRUE for variants if any gnomAD population frequency exceeds max_tolerated_af
assign_germline_popfreq_status_old()
Function that sets STATUS_POPFREQ_1KG_ABOVE_TOLERATED/ STATUS_POPFREQ_GNOMAD_ABOVE_TOLERATED to TRUE for variants if any population frequency exceeds max_tolerated_af
assign_mutation_type()
Function that assigns one of six mutation types to a list of mutations
assign_somatic_classification()
Function that assigns a SOMATIC_CLASSIFICATION to variants based on evidence found in variant set, potentially limited by user-defined options
assign_somatic_germline_evidence()
Function that appends several tags denoting evidence for somatic/germline status of variants
assign_variant_tiers_cna()
Assign tiers of clinical significance (AMP/ASCO/CAP framework) to somatic CNAs
assign_variant_tiers_fusion()
Assign tiers of clinical significance (AMP/ASCO/CAP framework) to RNA fusions
assign_variant_tiers_snv_indel()
Assign tiers of clinical significance (AMP/ASCO/CAP framework) to somatic SNVs/InDels
assign_variant_top_tiers_ttagnostic()
Assign top tiers of clinical significance (AMP/ASCO/CAP framework) to variants based on data from biomarker evidence items (tumor-type agnostic query)
assign_variant_top_tiers_ttspecific()
Assign top tiers of clinical significance (AMP/ASCO/CAP framework) to variants based on data from biomarker evidence items (tumor type-specific query)
biomarker_evidence
Fixed data types and levels for biomarker evidence items
bm_categories
Named list of biomarker categories used for variant classification
bm_evidence
Fixed data types/categories used for biomarker evidence, e.g. 'types','levels' etc.
bp_junction_transcript_overlap()
Find transcripts covering given splice junction breakpoints
build_oncogenicity_col_defs()
Build column definitions for oncogenicity table with category-aware styling
build_rt_row_details()
JS function for reactable row details with exclusions and card styling (Generated by Claude Opus 4.6 with some manual tweaks)
build_twohit_display_data()
Build display data for potential two-hit events (nested reactable)
callout_biomarker_scope()
Emit the shared "biomarker types and report scope" callout note
cancer_phenotypes_regex
Regular expression of terms indicative of cancer-related phenotypes and syndromes
check_common_colnames()
Function that checks whether a set of column names are present in two different data frames
check_file_exists()
Function that checks the existence of a file
clean_gnomad_annotations()
Clean gnomAD VCF annotations
clean_oncokb_evidence()
Clean extracted evidence data from OncoKB
clinvar_germline_status()
Function that assigns a logical to STATUS_CLINVAR_GERMLINE based on whether a ClinVar entry of germline origin is found for a given variant (for entries in a data frame)
color_palette
Color encodings for report elements of PCGR/CPSR
cosmic_sbs_signatures
List of COSMIC reference mutational signatures (SBS, v3.4)
cosmic_somatic_status()
Function that assigns a logical (STATUS_COSMIC) reflecting whether a variant co-incides with an entry in COSMIC (germline)
data_coltype_defs
List of coltype definitions for input files to pcgrr (e.g. VCF-converted TSV, CNA TVS etc.)
dbsnp_germline_status()
Function that assigns a logical (STATUS_DBSNP) reflecting whether a variant co-incides with an entry in dbSNP (germline)
detect_vcf_sample_name()
A function that detects whether the sample name in variant data frame is unique (as present in column name VCF_SAMPLE_ID), throws an error if multiple sample names are present for the CPSR workflow
df_string_replace()
Function that performs stringr::str_replace on strings of multiple string columns of a dataframe
effect_prediction_algos
List of URLs for a range of variant effect prediction algorithms
exclude_non_chrom_variants()
Function that excludes genomic aberrations from non-nuclear chromosomes
exonic_filter_levels
Exonic filter levels
export_quarto_evars()
Export Quarto Environment Variables
expression_doc_note()
Get documentation string for RNA expression analysis (outlier, similarity)
extract_complete_annotation()
Extract mutation effect information
extract_diagnostic_evidence()
Extract diagnostic implications from OncoKB annotation
extract_prognostic_evidence()
Extract prognostic implications from OncoKB annotation
extract_therapeutic_evidence()
Extract therapeutic evidence items from OncoKB annotation
fetch_oncokb_cna_annotation()
Fetch OncoKB annotation for copy number alteration
fetch_oncokb_fusion_annotation()
Fetch OncoKB annotation for gene fusion
fetch_oncokb_genomic_annotation()
Fetch OncoKB annotation for SNV/InDel via genomic change
fetch_oncokb_hgvsp_annotation()
Fetch OncoKB annotation for SNV/InDel via protein change
filter_maf_file()
Function that takes a MAF file generated with vcf2maf and filters out variants that are presumably germline (tumor-only run)
filter_read_support()
Function that filters variant set on depth and allelic fraction according to settings provided by user (tumor and control)
fusion_doc_note()
Get documentation string for RNA fusion analysis
generate_annotation_link()
A function that generates a HTML link for selected identifiers (DBSNP, COSMIC, CLINVAR, ENTREZ)
generate_report()
Function that generates all contents of the cancer genome report (PCGR)
generate_report_data_expression()
Function that generates expression data for PCGR report
generate_report_data_fusion()
Function that generates fusion data for PCGR report
generate_report_data_kataegis()
Function that generates data frame with potential kataegis events
generate_report_data_msi()
Function that generates MSI prediction data for PCGR report
generate_report_data_rainfall()
Function that generates data for rainfall plot (mutation density along genome, considering SNVs only)
generate_report_data_signatures()
Function that generates mutational signatures data for PCGR report
generate_report_data_tmb()
Function that reads TSV file with TMB estimates from sample
generate_tier_tsv()
Function that generates dense and tiered annotated variant datasets
germline_filter_levels
Data frame with germline filtering criteria
get_data_versions_sheet()
Build the DATA_VERSIONS sheet for the Excel workbook
get_druggable_fusion_partner()
Identify druggable fusion partners
get_excel_sheets()
Function that produces the contents of sheets for an Excel report of PCGR output
get_genome_obj()
Get BSgenome Object
get_oncogenic_cna_events()
Get oncogenic copy number events
get_prevalent_site_signatures()
Function that retrieves prevalent signatures for a given tumor type/primary site Data is collected from COSMIC v3.4.
get_settings_sheet()
Build the SETTINGS sheet for the Excel workbook
get_tumor_only_filtering_criteria()
Function that generates a string with filtering criteria for callsets coming from tumor-only sequencing
get_valid_chromosomes()
Checks for valid chromosome names in data frame of variants
grpmax_faf_nc_gnomad()
Function that assigns a maximum value to a variable (gnomAD_NC_FAF_GRPMAX) reflecting the filter allele frequency (GrpMAX) for a given variant in the non-cancer gnomAD subset (v3.1)
het_af_germline_status()
Function that assigns a logical (STATUS_LIKELY_GERMLINE_HETEROZYGOUS) reflecting whether a variant is likely heterozygous (germline) - based on allelic fraction (VAF_TUMOR), presence in gnomAD and dbSNP, and no presence in TCGA and COSMIC
hex_to_rgba()
Convert Hex Color to RGBA
hom_af_status()
Function that assigns a logical (STATUS_LIKELY_GERMLINE_HOMOZYGOUS) reflecting whether a variant is likely homozygous (germline) - based on allelic fraction (VAF_TUMOR)
immune_celltypes
Data frame with immune cell types
init_biomarker_content()
Function that initiates report element with biomarker evidence information
init_expression_content()
Function that initiates report element with expression information
init_fusion_content()
Function that initiates report element with fusion information
init_germline_content()
Function that initiates report element with germline variant information (CPSR)
init_kataegis_content()
Function that initiates report element with kataegis information
init_msi_content()
Function that initiates report element with MSI classification
init_mutsignature_content()
Function that initiates report element with mutational signatures information
init_rainfall_content()
Function that initiates report element with rainfall information
init_report()
Function that initiates PCGR/CPSR report object
init_tmb_content()
Function that initiates report element with TMB information
init_tumor_only_content()
Function that initiates report element with tumor-only information
init_var_content()
Function that initiates report element with variant data
init_vstats_actionable()
Function that initiates report element with actionable variant statistics information
init_vstats_cna()
Function that initiates CNA statistics
init_vstats_fusion()
Function that initiates RNA fusion statistics
init_vstats_snv_indel()
Function that initiates report element with SNV/InDel statistics information
kataegis_detect()
Function that detects kataegis events from a data frame with genomic cooordinates of mutations
kataegis_input()
Function that detects kataegis events from a data frame with genomic cooordinates of mutations
list_of_list_to_df()
Helper function to convert list of lists to data.frame
load_cpsr_classified_variants()
Function that reads CPSR-classified variants from a TSV file
load_dna_variants()
Function that reads and validates CNA or SNV/InDel TSV files file from PCGR/CPSR pre-report (Python) pipeline
load_expression_csq()
Load expression consequence settings
load_expression_outliers()
Load expression outlier results
load_expression_similarity()
Load expression similarity results
load_reference_data()
Function that parses and loads reference data from files in the assembly-specific PCGR bundle directory
load_rna_fusions()
Load RNA fusion results
load_somatic_cna()
Function that reads and validates fully annotated CNA data (segments and genes) from PCGR pre-reporting pipeline
load_somatic_snv_indel()
Function that reads and validates an annotated somatic SNV/InDel file from PCGR pre-reporting pipeline
load_yaml()
Function that loads YAML data with settings and file paths to annotated molecular profiles
lof_doc_note()
Get documentation string for loss-of-function annotation
log4r_debug()
Write messages to logs at a given priority level
log4r_fatal()
Write messages to logs at a given priority level
log4r_info()
Write messages to logs at a given priority level
log4r_warn()
Write messages to logs at a given priority level
map_biomarker_data()
Function that maps biomarker identifiers from VCF variant annotation to full biomarker data tables for display in report
max_af_gnomad()
Function that assigns a maximum value to a variable (MAX_AF_GNOMAD) reflecting the maximum allele frequency for a given variant across gnomAD populations
mkdir()
Create directory
msi_doc_note()
Get documentation string for MSI status prediction
msi_indel_fraction_plot()
Function that plots the indel fraction for a given sample and contrasts this with the distribution for MSI-H/MSS samples from TCGA
msi_indel_load_plot()
Function that plots the indel load for a given sample and contrasts this with the distribution for MSI-H/MSS samples from TCGA
mutational_signatures_doc_note()
Get documentation string for mutational signatures analysis
oncogenicity_criteria
Oncogenicity criteria (ClinGen/CGC/VICC)
oncogenicity_doc_note()
Get documentation string for oncogenicity annotation
oncokb_annotations
Character vector with OncoKB annotations coming from the MafAnnotator / FusionAnnotator / CnaAnnnotator tools in the PCGR Python workflow. These annotations are used for variant classification and reporting in PCGR.
oncokb_base_api_url
OncoKB base API URL
order_variants()
Function that orders genomic aberrations according to order of chromosomes and chromosomal position
pkg_exists()
Does R Package Exist
plot_cna_segments_absolute()
Plot allele-specific copy number segments (absolute copies)
plot_cna_segments_relative()
Plot copy number segments (relative log2 fold change)
plot_filtering_stats_exonic()
Function that generates a pie chart for exonic/non-exonic variant statistics (for callsets coming from tumor-only sequencing)
plot_filtering_stats_germline()
Function that generates a pie chart for germline filtering statistics for callsets coming from tumor-only sequencing
plot_signature_contributions()
Function that makes plots of mutational signature contributions in a given sample (both ggplot and plotly)
plot_tmb_primary_site_tcga()
Function that makes a plot with TMB boxplots for reference cohorts, highlighting the TMB estimate for a given sample and the cohort/primary site of interest
plot_value_boxes()
Function that plots four value boxes with the most important findings in the cancer genome
plotly_pie_chart()
Plotly Pie Chart - variant statistics
pon_status()
Function that assigns a logical (STATUS_PON) reflecting whether a variant is co-inciding with a variant present in a panel-of-normals database (PANEL_OF_NORMALS column is TRUE)
popmax_af_gnomad()
Function that assigns a maximum value to a variable (gnomAD_AF_POPMAX) reflecting the maximum allele frequency for a given variant across gnomAD populations
predict_msi_status()
Function that predicts MSI status based on fraction of indels among calls
prep_actble_display_tbl()
Function that gathers data tables on actionable variants for display in report (tier 1 + tier 2)
prep_diagn_display_tbl()
Function that gathers data tables on diagnostic variants
prep_progn_display_tbl()
Function that gathers data tables on prognostic variants for display in report
process_oncokb_cna()
Process OncoKB CNA output file and fetch complete annotations
process_oncokb_fusion()
Process OncoKB fusion output file and fetch complete annotations
process_oncokb_maf()
Process OncoKB MAF output files (both HGVSp and HGVSg) and fetch complete annotations
remove_cols_from_df()
Function that removes column(s) from data frame
render_actble_bm_table()
Build biomarker reactable with category-aware styling Combines tier 1 and tier 2 records in one table. Header uses tier 1 color; THERAPY_MATCH cell background reflects the row's tier (1 or 2).
render_alteration_cell()
Render sample alteration with confidence icon Uses filled circle + bold for high confidence, hollow circle + muted for medium confidence
render_alteration_clinvar_style()
Style alteration cell background based on ClinVar classification (Generated by Claude Opus 4.6 with some manual tweaks)
render_bar_cell()
Render a value between 0 and 1 as a horizontal bar (Generated by Claude Opus 4.6 with some manual tweaks)
render_diagn_bm_table()
Build biomarker reactable with category-aware styling Combines tier 1 and tier 2 records in one table. Header uses tier 1 color; THERAPY_MATCH cell background reflects the row's tier (1 or 2).
render_diagnosis()
Render diagnosis cell with background color based on actionability tier (Generated by Claude Opus 4.6 with some manual tweaks)
render_evidence_desc_cell()
Render evidence description with truncation and tooltip (Generated by Claude Opus 4.6 with some manual tweaks)
render_evidence_level_cell()
Render evidence level badge (Generated by Claude Opus 4.6 with some manual tweaks)
render_oncogenicity_cell()
Style oncogenicity cell background based on value (Generated by Claude Opus 4.6 with some manual tweaks)
render_progn_bm_table()
Build biomarker reactable with category-aware styling Combines tier 1 and tier 2 records in one table. Header uses tier 1 color; THERAPY_MATCH cell background reflects the row's tier (1 or 2).
render_prognostic_outcome()
Render prognostic outcome cell with background color based on actionability tier (Generated by Claude Opus 4.6 with some manual tweaks)
render_source_logos()
Render one or more source logos from a pipe-separated string (Generated by Claude Opus 4.6 with some manual tweaks)
render_symbol_assoc_style()
Style alteration cell background based on cancer association rank (Generated by Claude Opus 4.6 with some manual tweaks)
render_therapy_style()
Render therapy match cell with background color based on actionability tier (Generated by Claude Opus 4.6 with some manual tweaks)
render_tier_cell()
Render actionability tier as a styled badge with tier-specific colors
rna_fusion_recurrence_mitdb()
Function that checks for recurrence of RNA fusions in Mitelman database and annotates with clinical and cytogenetic features
rt_theme()
Predefined reactable theme for PCGR/CPSR tables (Generated by Claude Opus 4.6 with some manual tweaks)
sort_chromosomal_segments()
Function that sorts chromosomal segments according to chromosome and chromosomal start/end position
stats_report_cna()
Function that computes various variant statistics for CNAs from a callset object
stats_report_fusion()
Function that computes various variant statistics for fusions from a callset object
stats_report_germline()
Function that generate stats for a germline variant callset, including number of variants and number of variants with evidence items for each BM evidence type
stats_report_snv_indel()
Function that computes various variant statistics for SNVs/InDels from a callset object
stats_type_snv_indel()
Function that computes various variant statistics from a data frame with variant records
strip_html()
Strip HTML tags
sync_biomarker_evidence()
Re-synchronize biomarker evidence items/classifications with a (possibly further-filtered) variant set
table_display_cols
HTML Table display columns
tcga_cohorts
Data frame with all TCGA cohorts
tcga_somatic_status()
Function that assigns a logical (STATUS_TCGA_SOMATIC) reflecting whether a variant co-incides with an entry in TCGA (somatic)
tier_af_distribution()
Function that plots a histogram of the the variant allelic support (tumor) - grouped by tiers
tmb_doc_note()
Get documentation string for tumor mutational burden (TMB) annotation
tsv_cols
TSV columns
tumor_sites
Character vector of tumor site names used in PCGR/CPSR reports
twohit_doc_note()
Get documentation string for two-hit detection & VAF consistency assessment
update_report()
Function that updates a PCGR/CPSR report object structure
vaf_plot()
Function that generates a VAF distribution plot for a given PCGR report object
variant_db_url
List of URLS and variant identifiers for variant/gene/protein domain databases
write_processed_vcf()
Function that writes a VCF intended for mutational signature analysis
write_report_excel()
Function that writes key datasets of PCGR object to an Excel workbook
write_report_html()
Function that writes contents of PCGR object to an HTML report (quarto-based)
write_report_tsv()
Function that writes contents of PCGR object to various output formats (Rmarkdown/flexdashboard HTML reports, JSON, tab-separated etc)