# Yet Another Package for Signature Analysis

## Documentation for package ‘YAPSA’ version 1.36.0

- DESCRIPTION file.
- User guides, package vignettes and other documentation.
- Package NEWS.

## Help Pages

A B C D E F G H L M N P R S T V Y

## -- A --

add_annotation | Add information to an annotation data structure
add_as_fist_to_list | Add an element as first entry to a list
aggregate_exposures_by_category | Aggregate exposures by category
AlexCosmicArtif_sigInd_df | Data for mutational signatures
AlexCosmicArtif_sig_df | Data for mutational signatures
AlexCosmicValid_sigInd_df | Data for mutational signatures
AlexCosmicValid_sig_df | Data for mutational signatures
AlexInitialArtif_sigInd_df | Data for mutational signatures
AlexInitialArtif_sig_df | Data for mutational signatures
AlexInitialValid_sigInd_df | Data for mutational signatures
AlexInitialValid_sig_df | Data for mutational signatures
annotate_intermut_dist_cohort | Annotate the intermutation distance of variants cohort-wide
annotate_intermut_dist_PID | Annotate the intermutation distance of variants per PID
annotation_exposures_barplot | Plot the exposures of a cohort with different layers of annotation
annotation_exposures_list_barplot | Plot the exposures of a cohort with different layers of annotation for SNV and INDEL signatures
annotation_heatmap_exposures | Heatmap to cluster the PIDs on their signature exposures (ComplexHeatmap)
attribute_nucleotide_exchanges | Attribute the nucleotide exchange for an SNV
attribute_sequence_contex_indel | Attribution of sequence context and size for an INDEL
attribution_of_indels | Attribution of variant into one onf the 83 INDEL categories
average_over_present | Useful functions on data frames

## -- B --

build_gene_list_for_pathway | Build a gene list for a given pathway name

## -- C --

chosen_AlexInitialArtif_sigInd_df | Test and example data
chosen_signatures_indices_df | Test and example data
classify_indels | INDEL function V1 - not compartible with AlexandrovSignatures
compare_exposures | Compares alternative exposures
compare_expousre_sets | Compare two sets of exposures by cosine distance
compare_sets | Compare two sets of signatures by cosine distance
compare_SMCs | Compare all strata from different stratifications
compare_to_catalogues | Compare one mutational catalogue to reference mutational catalogues
complex_heatmap_exposures | Heatmap to cluster the PIDs on their signature exposures (ComplexHeatmap)
computeLogLik | Compute the loglikelihood
compute_comparison_stat_df | Extract statistical measures for entity comparison
confidence_indel_calulation | Wrapper to compute confidence intervals for SNV and INDEL signatures of a cohort or single-sample
confidence_indel_only_calulation | Wrapper to compute confidence intervals for only INDEL signatures.
confIntExp | Compute confidence intervals
correct_rounded | Readjust the vector to it's original norm after rounding
cosineDist | Compute the cosine distance of two vectors
cosineMatchDist | Compute an altered cosine distance of two vectors
COSMIC_subgroups_df | Test and example data
create_indel_mutation_catalogue_from_df | Wrapper to create an INDEL mutational catalog from a vlf-like data frame
create_indel_mut_cat_from_df | Create a Mutational catalog from a data frame
create_mutation_catalogue_from_df | Create a Mutational Catalogue from a data frame
create_mutation_catalogue_from_VR | Create a Mutational Catalogue from a VRanges Object
cutoffCosmicArtif_abs_df | Cutoffs for a supervised analysis of mutational signatures.
cutoffCosmicArtif_rel_df | Cutoffs for a supervised analysis of mutational signatures.
cutoffCosmicValid_abs_df | Cutoffs for a supervised analysis of mutational signatures.
cutoffCosmicValid_rel_df | Cutoffs for a supervised analysis of mutational signatures.
cutoffInitialArtif_abs_df | Cutoffs for a supervised analysis of mutational signatures.
cutoffInitialArtif_rel_df | Cutoffs for a supervised analysis of mutational signatures.
cutoffInitialValid_abs_df | Cutoffs for a supervised analysis of mutational signatures.
cutoffInitialValid_rel_df | Cutoffs for a supervised analysis of mutational signatures.
cutoffPCAWG_ID_WGS_Pid_df | Opt. cutoffs, PCAWG SNV signatures, including artifacts
cutoffPCAWG_SBS_WGSWES_artifPid_df | Opt. cutoffs, PCAWG SNV signatures, including artifacts
cutoffPCAWG_SBS_WGSWES_realPid_df | Opt. cutoffs, PCAWG SNV signatures, including artifacts
cutoffs | Cutoffs for a supervised analysis of mutational signatures.
cutoffs_pcawg | Opt. cutoffs, PCAWG SNV signatures, including artifacts
cut_breaks_as_intervals | Wrapper for cut

## -- D --

deriveSigInd_df | Derive a signature_indices_df object
disambiguateVector | Disambiguate a vector

## -- E --

enrichSigs | Compare to background distribution
exampleINDEL_YAPSA | Data structures used in examples, Indel tests and the Indel signature vignette of the YAPSA package.
exampleYAPSA | Test and example data
exchange_colour_vector | Colours codes for displaying SNVs
exome_mutCatRaw_df | Example mutational catalog for the exome vignette
exposures_barplot | Wrapper for enhanced_barplot
extract_names_from_gene_list | Return gene names from gene lists

## -- F --

find_affected_PIDs | Find samples affected

## -- G --

GenomeOfNl_raw | Example data for the Indel vignette
getSequenceContext | Extracts the sequence context up and downstream of a nucleotide position
get_extreme_PIDs | Return those PIDs which have an extreme pattern for signature exposure

## -- H --

hclust_exposures | Cluster the PIDs according to their signature exposures

## -- L --

LCD | Linear Combination Decomposition
LCD_complex_cutoff | LCD with a signature-specific cutoff on exposures
LCD_complex_cutoff_combined | LCD with a signature-specific cutoff on exposures
LCD_complex_cutoff_consensus | LCD with a signature-specific cutoff on exposures
LCD_complex_cutoff_perPID | LCD with a signature-specific cutoff on exposures
LCD_extractCohort_callPerPID | LCD with a signature-specific cutoff on exposures
LCD_SMC | CD stratification analysis
logLikelihood | Compute a loglikelihood ratio test
lymphomaNature2013_mutCat_df | Example mutational catalog for the SNV vignette
lymphoma_Nature2013_COSMIC_cutoff_exposures_df | Test and example data
lymphoma_Nature2013_raw_df | Test and example data
lymphoma_PID_df | Test and example data
lymphoma_test_df | Test and example data

## -- M --

makeVRangesFromDataFrame | Construct a VRanges Object from a data frame
make_catalogue_strata_df | Group strata from different stratification axes
make_comparison_matrix | Compute a similarity matrix for different strata
make_strata_df | Group strata from different stratification axes
make_subgroups_df | Make a custom data structure for subgroups
melt_exposures | Generically melts exposure data frames
merge_exposures | Merge exposure data frames
MutCat_indel_df | Example mutational catalog for the Indel vignette

## -- N --

normalizeMotifs_otherRownames | Normalize Somatic Motifs with different rownames
normalize_df_per_dim | Useful functions on data frames

## -- P --

PCAWG_SP_ID_sigInd_df | Data for PCAWG SNV signatures (COSMIC v3), including artifacts 'PCAWG_SP_SBS_sigs_Artif_df': Data frame of the signatures published by Alexandrov et al. (Biorxiv 2013) which were decomposed with the method SigProfiler. SNV signatures are labeled with SBS, single base signature. There are 67 signatures which constitute the columns, 47 of which were validated by a bayesian NFM mehtod, SignatureAnayzer. Validated signatures are SBS1-SBS26,SBS28-SBS42 and SBS44. SBS7 is split up into 7 a/b/c and d. SBS10 ans SBS17 are both split up into a and b. Resulting in a 47 validated sigantures. Please note, unlike the paper by Alexandrov et al. (Biorxiv 2018) the data sets do not contain a SBS84 and SBS85 as not all were availiablt to perfom supervised signature analysis. In total there are 96 different features and therefore 96 rows when dealing with a trinucleotide context.
PCAWG_SP_ID_sigs_df | Data for PCAWG SNV signatures (COSMIC v3), including artifacts 'PCAWG_SP_SBS_sigs_Artif_df': Data frame of the signatures published by Alexandrov et al. (Biorxiv 2013) which were decomposed with the method SigProfiler. SNV signatures are labeled with SBS, single base signature. There are 67 signatures which constitute the columns, 47 of which were validated by a bayesian NFM mehtod, SignatureAnayzer. Validated signatures are SBS1-SBS26,SBS28-SBS42 and SBS44. SBS7 is split up into 7 a/b/c and d. SBS10 ans SBS17 are both split up into a and b. Resulting in a 47 validated sigantures. Please note, unlike the paper by Alexandrov et al. (Biorxiv 2018) the data sets do not contain a SBS84 and SBS85 as not all were availiablt to perfom supervised signature analysis. In total there are 96 different features and therefore 96 rows when dealing with a trinucleotide context.
PCAWG_SP_SBS_sigInd_Artif_df | Data for PCAWG SNV signatures (COSMIC v3), including artifacts 'PCAWG_SP_SBS_sigs_Artif_df': Data frame of the signatures published by Alexandrov et al. (Biorxiv 2013) which were decomposed with the method SigProfiler. SNV signatures are labeled with SBS, single base signature. There are 67 signatures which constitute the columns, 47 of which were validated by a bayesian NFM mehtod, SignatureAnayzer. Validated signatures are SBS1-SBS26,SBS28-SBS42 and SBS44. SBS7 is split up into 7 a/b/c and d. SBS10 ans SBS17 are both split up into a and b. Resulting in a 47 validated sigantures. Please note, unlike the paper by Alexandrov et al. (Biorxiv 2018) the data sets do not contain a SBS84 and SBS85 as not all were availiablt to perfom supervised signature analysis. In total there are 96 different features and therefore 96 rows when dealing with a trinucleotide context.
PCAWG_SP_SBS_sigInd_Real_df | Data for PCAWG SNV signatures (COSMIC v3), including artifacts 'PCAWG_SP_SBS_sigs_Artif_df': Data frame of the signatures published by Alexandrov et al. (Biorxiv 2013) which were decomposed with the method SigProfiler. SNV signatures are labeled with SBS, single base signature. There are 67 signatures which constitute the columns, 47 of which were validated by a bayesian NFM mehtod, SignatureAnayzer. Validated signatures are SBS1-SBS26,SBS28-SBS42 and SBS44. SBS7 is split up into 7 a/b/c and d. SBS10 ans SBS17 are both split up into a and b. Resulting in a 47 validated sigantures. Please note, unlike the paper by Alexandrov et al. (Biorxiv 2018) the data sets do not contain a SBS84 and SBS85 as not all were availiablt to perfom supervised signature analysis. In total there are 96 different features and therefore 96 rows when dealing with a trinucleotide context.
PCAWG_SP_SBS_sigs_Artif_df | Data for PCAWG SNV signatures (COSMIC v3), including artifacts 'PCAWG_SP_SBS_sigs_Artif_df': Data frame of the signatures published by Alexandrov et al. (Biorxiv 2013) which were decomposed with the method SigProfiler. SNV signatures are labeled with SBS, single base signature. There are 67 signatures which constitute the columns, 47 of which were validated by a bayesian NFM mehtod, SignatureAnayzer. Validated signatures are SBS1-SBS26,SBS28-SBS42 and SBS44. SBS7 is split up into 7 a/b/c and d. SBS10 ans SBS17 are both split up into a and b. Resulting in a 47 validated sigantures. Please note, unlike the paper by Alexandrov et al. (Biorxiv 2018) the data sets do not contain a SBS84 and SBS85 as not all were availiablt to perfom supervised signature analysis. In total there are 96 different features and therefore 96 rows when dealing with a trinucleotide context.
PCAWG_SP_SBS_sigs_Real_df | Data for PCAWG SNV signatures (COSMIC v3), including artifacts 'PCAWG_SP_SBS_sigs_Artif_df': Data frame of the signatures published by Alexandrov et al. (Biorxiv 2013) which were decomposed with the method SigProfiler. SNV signatures are labeled with SBS, single base signature. There are 67 signatures which constitute the columns, 47 of which were validated by a bayesian NFM mehtod, SignatureAnayzer. Validated signatures are SBS1-SBS26,SBS28-SBS42 and SBS44. SBS7 is split up into 7 a/b/c and d. SBS10 ans SBS17 are both split up into a and b. Resulting in a 47 validated sigantures. Please note, unlike the paper by Alexandrov et al. (Biorxiv 2018) the data sets do not contain a SBS84 and SBS85 as not all were availiablt to perfom supervised signature analysis. In total there are 96 different features and therefore 96 rows when dealing with a trinucleotide context.
plotExchangeSpectra | Plot the spectra of nucleotide exchanges
plotExchangeSpectra_indel | Plot the spectra of nucleotide exchanges of INDELs
plotExposuresConfidence | Plot exposures including confidence intervals
plotExposuresConfidence_indel | Plot exposures including confidence intervals for exposures of SNVs and INDELs
plot_exposures | Plot the exposures of a cohort
plot_relative_exposures | Plot the exposures of a cohort
plot_SMC | Plot results of the Stratification of a Mutational Catalogue
plot_strata | Plot all strata from different stratification axes together

## -- R --

read_entry | Read a single vcf-like file into a single data frame
read_list | Read a single vcf-like file into a single data frame
relateSigs | Make unique assignments between sets of signatures
rel_lymphoma_Nature2013_COSMIC_cutoff_exposures_df | Test and example data
repeat_df | Create a data frame with default values
round_precision | Round to a defined precision
run_annotate_vcf_pl | Wrapper function to annotate addition information
run_comparison_catalogues | Compare all strata from different stratifications
run_comparison_general | Compare all strata from different stratifications
run_kmer_frequency_correction | Provide comprehensive correction factors for kmer content
run_kmer_frequency_normalization | Provide normalized correction factors for kmer content
run_plot_strata_general | Wrapper function for 'plot_strata'
run_SMC | Wrapper function for the Stratification of a Mutational Catalogue

## -- S --

sd_over_present | Useful functions on data frames
shapiro_if_possible | Wrapper for Shapiro test but allow for all identical values
sigs | Data for mutational signatures
sigs_pcawg | Data for PCAWG SNV signatures (COSMIC v3), including artifacts 'PCAWG_SP_SBS_sigs_Artif_df': Data frame of the signatures published by Alexandrov et al. (Biorxiv 2013) which were decomposed with the method SigProfiler. SNV signatures are labeled with SBS, single base signature. There are 67 signatures which constitute the columns, 47 of which were validated by a bayesian NFM mehtod, SignatureAnayzer. Validated signatures are SBS1-SBS26,SBS28-SBS42 and SBS44. SBS7 is split up into 7 a/b/c and d. SBS10 ans SBS17 are both split up into a and b. Resulting in a 47 validated sigantures. Please note, unlike the paper by Alexandrov et al. (Biorxiv 2018) the data sets do not contain a SBS84 and SBS85 as not all were availiablt to perfom supervised signature analysis. In total there are 96 different features and therefore 96 rows when dealing with a trinucleotide context.
SMC | Stratification of a Mutational Catalogue
SMC_perPID | Run SMC at a per sample level
split_exposures_by_subgroups | Split an exposures data frame by subgroups
stat_plot_subgroups | Plot averaged signature exposures per subgroup
stat_test_SMC | Apply statistical tests to a stratification (SMC)
stat_test_subgroups | Test for differences in average signature exposures between subgroups
stderrmean | Compute the standard error of the mean
stderrmean_over_present | Useful functions on data frames
sum_over_list_of_df | Elementwise sum over a list of (numerical) data frames

## -- T --

targetCapture_cor_factors | Correction factors for different target capture kits
testSigs | Test for significance of alternative models cohort wide
test_exposureAffected | Test significance of association
test_gene_list_in_exposures | Test if mutated PIDs are enriched in signatures
transform_rownames_deconstructSigs_to_YAPSA | Change rownames from one naming convention to another
transform_rownames_MATLAB_to_R | Change rownames from one naming convention to another
transform_rownames_nature_to_R | Change rownames from one naming convention to another
transform_rownames_R_to_MATLAB | Change rownames from one naming convention to another
transform_rownames_YAPSA_to_deconstructSigs | Change rownames from one naming convention to another
translate_to_1kG | Translate chromosome names to the hg19 naming convention
translate_to_hg19 | Translate chromosome names to the hg19 naming convention
trellis_rainfall_plot | Create a rainfall plot in a trellis structure

## -- V --

variateExp | Wrapper to compute confidence intervals for a cohort
variateExpSingle | Wrapper for the likelihood ratio test

## -- Y --

YAPSA | Generate R documentation from inline comments.