Skip to contents

All functions

af_distribution()
Function that plots a histogram of the the variant allelic support (tumor)
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_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_tiers()
Function that assigns tier classifications to somatic CNA segments and SNVs/InDels, based on the presence of biomarker evidence found in the variant set
assign_germline_popfreq_status()
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
biomarker_evidence
Fixed data types/categories used for biomarker evidence, e.g. 'types','levels' etc.
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
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)
deduplicate_eitems()
Function that removes redundancy in variant evidence items (i.e. if a variant is assicated with evidence at the codon level, evidence at the exon/gene level is ignored)
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
dt_display
DT Display
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
expand_biomarker_items()
Function that expands biomarker evidence items with variant annotations
export_quarto_evars()
Export Quarto Environment Variables
filter_eitems_by_site()
Function that filters clinical evidence items by tumor type/primary site
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, allelic fraction) for tumor and normal and filters according to settings
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_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_report_data_trials()
Function that retrieves relevant (interventional based on molecular target) clinical trials for a given tumor type
generate_tier_tsv()
Function that generates dense and tiered annotated variant datasets
germline_filter_levels
Data frame with germline filtering criteria
get_clin_assocs_cna()
Function that retrieves clinical evidence items (CIVIC, CBMDB) for CNA aberrations
get_dt_tables()
Function that gathers data tables on actionable variants for display in report (tier 1 + tier 2)
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_valid_chromosomes()
Checks for valid chromosome names in data frame of variants
get_variant_statistics()
Function that computes various variant statistics from a data frame with variant records
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
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_cna_vstats()
Function that initiates report element with CNA information
init_expression_content()
Function that initiates report element with expression 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_m_signature_content()
Function that initiates report element with mutational signatures information
init_msi_content()
Function that initiates report element with MSI classification
init_rainfall_content()
Function that initiates report element with rainfall information
init_report()
Function that initiates PCGR/CPSR report object
init_snv_indel_vstats()
Function that initiates report element with SNV/InDel statistics information
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
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
load_all_eitems()
Function that loads all evidence items from CIViC and CGI, and combines them in a unified 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_eitems()
Function that loads specific set of clinical variant evidence items (CIViC + CGI) based on given parameters (mutation type, variant origin, tumor type etc)
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_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
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
log_var_eitem_stats()
Function that logs the number of evidence items found, for different levels of resolution
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_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
oncogenicity_criteria
Oncogenicity criteria (ClinGen/CGC/VICC)
order_variants()
Function that orders genomic aberrations according to order of chromosomes and chromosomal position
pkg_exists()
Does R Package Exist
plot_cna_segments()
Plot allele-specific copy number segments
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
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)
predict_msi_status()
Function that predicts MSI status based on fraction of indels among calls
qc_var_eitems()
Function that matches variants to evidence items
remove_cols_from_df()
Function that removes column(s) from data frame
sort_chromosomal_segments()
Function that sorts chromosomal segments according to chromosome and chromosomal start/end position
strip_html()
Strip HTML tags
structure_var_eitems()
Function that structures variant evidence items according to strength of evidence
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
tsv_cols
TSV columns
update_report()
Function that updates a PCGR/CPSR report object structure
variant_db_url
List of URLS and variant identifiers for variant/gene/protein domain databases
variant_stats_report()
Function that generate stats for a given variant set, considering number of variants/genes affected across tiers, types of variants ()
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_quarto_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)