### Load crossdome and example data Source: https://github.com/antuneslab/crossdome/blob/main/vignettes/Example_02.Rmd Loads the crossdome, patchwork, and dplyr packages and the mage_off_targets example dataset, then prints it. ```r library(crossdome) library(patchwork) library(dplyr) data('mage_off_targets') mage_off_targets ``` -------------------------------- ### Install Crossdome from GitHub with devtools Source: https://github.com/antuneslab/crossdome/blob/main/README.md Installs the Crossdome package directly from the antuneslab/crossdome GitHub repository, including vignettes. Requires the devtools package to be available in the R session. ```R devtools::install_github("antuneslab/crossdome", build_vignettes = TRUE) ``` -------------------------------- ### Run cross_compose screening with example query and background Source: https://github.com/antuneslab/crossdome/blob/main/man/cross_compose.Rd Example usage of cross_compose. Sets a query peptide, loads the mage_off_targets dataset, extracts the peptide_sequence column, creates a background with cross_background for allele HLA-A*01:01, and runs cross_compose. Wrapped in dontrun so it is not executed during package checks. ```r query <- 'EVDPIGHLY' data('mage_off_targets') mage_off_targets <- mage_off_targets$peptide_sequence background <- cross_background(off_targets = mage_off_targets, allele = "HLA-A*01:01") result <- cross_compose(query = query, background = background) ``` -------------------------------- ### Run cross_substitution_plot on xrResult object Source: https://github.com/antuneslab/crossdome/blob/main/man/cross_substitution_plot.Rd Example usage of cross_substitution_plot. The object argument must be an xrResult object created by cross_compose. This example is wrapped in \dontrun and will not be executed. ```R cross_substitution_plot(object = result) ``` -------------------------------- ### Launch Crossdome web application with cross_browser() Source: https://github.com/antuneslab/crossdome/blob/main/man/cross_browser.Rd Opens the interactive Shiny application. The example is wrapped in \dontrun{} because it launches an interactive session and is not intended for automated execution. ```r \dontrun{ # Opening the shiny application cross_browser() } ``` -------------------------------- ### Run cross_substitution_matrix on xrResult object Source: https://github.com/antuneslab/crossdome/blob/main/man/cross_substitution_matrix.Rd Example usage of cross_substitution_matrix with an xrResult object. The call is wrapped in \dontrun, so it is not executed. It requires a result from cross_compose and returns a substitution probability matrix. ```r result <- cross_substitution_matrix(object = result) ``` -------------------------------- ### Listing MHC class I alleles and creating background with cross_background Source: https://github.com/antuneslab/crossdome/blob/main/man/cross_background.Rd Shows how to list available MHC class I alleles from the hla_database dataset and create a background using the default immunopeptidomics or custom MAGE3A off-targets. The example is wrapped in \dontrun{} and includes loading the mage_off_targets dataset and extracting the peptide_sequence column before calling cross_background. ```R data('hla_database') View(hla_database) # Using default immunopeptidomics background <- cross_background(allele = 'HLA-A*01:01') # Using MAGE3A off-targets data('mage_off_targets') mage_off_targets <- mage_off_targets$peptide_sequence background <- cross_background(off_targets = mage_off_targets, allele = "HLA-A*01:01") ``` -------------------------------- ### R Markdown chunk options setup Source: https://github.com/antuneslab/crossdome/blob/main/README.Rmd Configures knitr chunk options for the README, setting collapse, comment, figure path, and output width, plus tibble print limits. Used at the top of the R Markdown file to control document rendering. ```r knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/", out.width = "100%" ) options(tibble.print_min = 5, tibble.print_max = 5) ``` -------------------------------- ### cross_pair_summary example Source: https://github.com/antuneslab/crossdome/blob/main/man/cross_pair_summary.Rd Computes the Crossdome relatedness score for two example 9-mer peptides. The query and subject are passed as named arguments, and the function returns a list of Crossdome metrics. ```r query <- 'EVDPIGHLY' subject <- 'ESDPIVAQY' cross_pair_summary(query = query, subject = subject) ``` -------------------------------- ### Run cross_prediction_plot on xrResult object Source: https://github.com/antuneslab/crossdome/blob/main/man/cross_prediction_plot.Rd Example usage of cross_prediction_plot with an xrResult object. The object should be created by running cross_compose. The example is wrapped in dontrun to prevent execution during package checks. ```r cross_prediction_plot(object = result) ``` -------------------------------- ### cross_expression_matrix example Source: https://github.com/antuneslab/crossdome/blob/main/man/cross_expression_matrix.Rd Run cross_expression_matrix on a result object from cross_compose. The example uses the built-in mage_result dataset and applies the default pvalue_threshold of 0.01. The code is wrapped in \dontrun{} so it is not executed during automatic checks. ```r \dontrun{ result <- crossdome::mage_result cross_expression_matrix(object = result) } ``` -------------------------------- ### Convert a peptide to biochemical profile with cross_peptide_properties Source: https://github.com/antuneslab/crossdome/blob/main/man/cross_peptide_properties.Rd Example usage of cross_peptide_properties with a 9-mer peptide 'EVDPIGHLY'. The function returns a matrix of biochemical properties. ```r cross_peptide_properties('EVDPIGHLY') ``` -------------------------------- ### Generate expression heatmap with cross_expression_plot Source: https://github.com/antuneslab/crossdome/blob/main/man/cross_expression_plot.Rd Run cross_expression_matrix on the xrResult object, then pass the result to cross_expression_plot to generate the expression heatmap. The example is wrapped in \dontrun{} and requires a prior cross_compose call. ```r result <- cross_expression_matrix(object = result) cross_expression_plot(object = result) ``` -------------------------------- ### cross_browser Source: https://github.com/antuneslab/crossdome/blob/main/README.Rmd Opens an interactive shiny application. ```APIDOC ## cross_browser ### Description Opens an interactive shiny application. ### Usage `cross_browser()` ### Details This function is part of the Prediction category. For usage examples, see the package documentation with `?cross_browser`. ``` -------------------------------- ### Basic crossdome usage: cross_background and cross_compose Source: https://github.com/antuneslab/crossdome/blob/main/README.Rmd Loads the crossdome library, creates a background database from an off-target peptide and allele, then composes a query against that background. ```r library(crossdome) database <- cross_background(off_targets = 'ESDPIVAQY', allele = "HLA-A*01:01") result <- cross_compose(query = 'EVDPIGHLY', background = database) ``` -------------------------------- ### Load dataset with data() Source: https://github.com/antuneslab/crossdome/blob/main/README.Rmd Use data(DATA_NAME) to load any of the included datasets, such as hla_database, hpa_database, peptide_annotation, or mage_off_targets. ```r data(DATA_NAME) ``` -------------------------------- ### cross_background Source: https://github.com/antuneslab/crossdome/blob/main/README.Rmd Creates a peptide database spanning eluted candidates (experimentally validated) and custom (user-defined) peptides. ```APIDOC ## cross_background ### Description Creates a peptide database spanning eluted candidates (experimentally validated) and custom (user-defined) peptides. ### Usage `cross_background()` ### Details This function is part of the Prediction category. For usage examples, see the package documentation with `?cross_background`. ``` -------------------------------- ### Inspect result structure with str() Source: https://github.com/antuneslab/crossdome/blob/main/README.Rmd Shows the structure of the result object. ```r str(result) ``` -------------------------------- ### cross_browser() Source: https://github.com/antuneslab/crossdome/blob/main/man/cross_browser.Rd Opens an interactive Shiny application for Crossdome. This function is called without arguments to launch the web interface. ```APIDOC ## cross_browser() ### Description Opens an interactive Shiny application for Crossdome. ### Usage ```r cross_browser() ``` ### Parameters None. ### Example ```r \dontrun{ # Opening the shiny application cross_browser() } ``` ``` -------------------------------- ### View result with View() Source: https://github.com/antuneslab/crossdome/blob/main/README.Rmd Displays the result object in the RStudio viewer. ```r View(result@result) ``` -------------------------------- ### Format and display result table with kable Source: https://github.com/antuneslab/crossdome/blob/main/README.Rmd Selects and rounds columns from the result, then renders a table with kable. Requires knitr, kableExtra, and dplyr. ```r library(knitr) library(kableExtra) library(dplyr) to_display_columns <- c('rank', 'query', 'subject', 'n_positive', 'n_mismatch', 'relatedness_score', 'pvalue', 'hla_allele') to_display_data <- result@result[1:30, to_display_columns] %>% mutate( relatedness_score = round(relatedness_score, 2), hla_allele = sub('\\*', '', hla_allele) ) kable( to_display_data, row.names = FALSE ) ``` -------------------------------- ### cross_background(off_targets = NULL, allele) Source: https://github.com/antuneslab/crossdome/blob/main/man/cross_background.Rd Creates an immunopeptidomics database by combining default eluted peptides with optional user-defined off-targets for a specified MHC Class I allele. ```APIDOC ## cross_background(off_targets = NULL, allele) ### Description Peptide database spanning eluted candidates (experimentally validated) and custom (user-defined). ### Usage ```r cross_background(off_targets = NULL, allele) ``` ### Arguments - **off_targets** (list) - Optional - A list of off-target candidates. Only 9-mers are supported. - **allele** (character) - Required - Input an MHC Class I allele. Check `hla_database` for available alleles. ### Value Returns a `xrBackground` object. ### Examples ```r \dontrun{ # Listing MHC class I alleles data('hla_database') View(hla_database) # Using default immunopeptidomics background <- cross_background(allele = 'HLA-A*01:01') # Using MAGE3A off-targets data('mage_off_targets') mage_off_targets <- mage_off_targets$peptide_sequence background <- cross_background(off_targets = mage_off_targets, allele = "HLA-A*01:01") } ``` ``` -------------------------------- ### cross_write(xrResult) Source: https://github.com/antuneslab/crossdome/blob/main/man/cross_write.Rd Writes an xrResult object to a tab-separated file. This method is called after running cross_compose and allows full control over file writing options. ```APIDOC ## cross_write(xrResult) ### Description Exports a Crossdome xrResult object to a tab-separated value (TSV) file. ### Usage ```r cross_write(object, ...) \S4method{cross_write}{xrResult}( object, file = "", append = FALSE, quote = FALSE, sep = "\\t", eol = "\\n", na = "NA", dec = ".", row.names = FALSE, col.names = TRUE, qmethod = c("escape", "double"), fileEncoding = "" ) ``` ### Arguments - **object** (xrResult) - Required - An xrResult object, typically produced by `cross_compose()`. - **file** (character) - Optional - File or connection to write to. Default is `""` (standard output). - **append** (logical) - Optional - If `TRUE`, append to the file instead of overwriting. Default is `FALSE`. - **quote** (logical) - Optional - If `TRUE`, quote fields. Default is `FALSE`. - **sep** (character) - Optional - Field separator. Default is `"\t"` (tab). - **eol** (character) - Optional - End-of-line string. Default is `"\n"`. - **na** (character) - Optional - String for missing values. Default is `"NA"`. - **dec** (character) - Optional - Decimal separator. Default is `"."`. - **row.names** (logical) - Optional - If `TRUE`, write row names. Default is `FALSE`. - **col.names** (logical) - Optional - If `TRUE`, write column names. Default is `TRUE`. - **qmethod** (character) - Optional - Quoting method: `"escape"` or `"double"`. Default is `c("escape", "double")`. - **fileEncoding** (character) - Optional - File encoding. Default is `""`. ### Details This method writes the data contained in an `xrResult` object to a file using the specified parameters. It is typically used after running `cross_compose()` to save the results for further analysis or sharing. ### Value No return value; used for its side effect of writing to a file or connection. ### Examples ```r # Assuming 'result' is an xrResult object from cross_compose() cross_write(result, file = "output.tsv") ``` ``` -------------------------------- ### Set knitr chunk options (collapse and comment) Source: https://github.com/antuneslab/crossdome/blob/main/vignettes/Example_01.Rmd Configures knitr chunk defaults for the vignette: collapse output and use '#>' as the comment prefix. Applies to all chunks in the document. ```r knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) ``` -------------------------------- ### cross_substitution_plot(object) Source: https://github.com/antuneslab/crossdome/blob/main/man/cross_substitution_plot.Rd Creates a heatmap-like figure showing substitution rates for an xrResult object. ```APIDOC ## cross_substitution_plot(object) ### Description A heatmap combined with seqlogo displaying amino acid substitutions. ### Usage cross_substitution_plot(object) ### Arguments - **object** (xrResult) - Required - An xrResult object. Run `cross_compose` function to obtain it. ### Value Returns a heatmap-like figure showing substitution rate. ### Examples ```r \dontrun{ cross_substitution_plot(object = result) } ``` ``` -------------------------------- ### cross_compose(query, background, position_weight = rep(1, 9)) Source: https://github.com/antuneslab/crossdome/blob/main/man/cross_compose.Rd Predicts relatedness among peptides in a given database. Low values are associated with cross-reactive candidates. Returns an xrResult object containing relatedness ranking. ```APIDOC ## cross_compose(query, background, position_weight = rep(1, 9)) ### Description Predicts relatedness among peptides in a given database. Low values are associated with cross-reactive candidates. ### Usage cross_compose(query, background, position_weight = rep(1, 9)) ### Arguments - **query** (character) - Required - A peptide target. Only 9-mers are supported. - **background** (xrBackground) - Required - Background object created with `cross_background`. - **position_weight** (numeric vector) - Optional - A numeric vector derived from TCR hotspots. Default is `rep(1, 9)`. ### Value Returns an `xrResult` object containing relatedness ranking. ### Example ```r query <- 'EVDPIGHLY' data('mage_off_targets') mage_off_targets <- mage_off_targets$peptide_sequence background <- cross_background(off_targets = mage_off_targets, allele = "HLA-A*01:01") result <- cross_compose(query = query, background = background) ``` ``` -------------------------------- ### cross_substitution_matrix Source: https://github.com/antuneslab/crossdome/blob/main/README.Rmd Calculates position-specific substitution across cross-reactive candidates. ```APIDOC ## cross_substitution_matrix ### Description Calculates position-specific substitution across cross-reactive candidates. ### Usage `cross_substitution_matrix()` ### Details This function is part of the Analysis category. For usage examples, see the package documentation with `?cross_substitution_matrix`. ``` -------------------------------- ### cross_write Source: https://github.com/antuneslab/crossdome/blob/main/README.Rmd Exports Crossdome result slot for a tsv file. ```APIDOC ## cross_write ### Description Exports Crossdome result slot for a tsv file. ### Usage `cross_write()` ### Details This function is part of the Analysis category. For usage examples, see the package documentation with `?cross_write`. ``` -------------------------------- ### Generate mRNA expression heatmap with cross_expression_plot Source: https://github.com/antuneslab/crossdome/blob/main/vignettes/Example_01.Rmd Builds the expression matrix with cross_expression_matrix() using a p-value threshold of 0.005, then plots the heatmap with cross_expression_plot(). The heatmaps show peptide-donor expression across healthy tissues from Human Protein Atlas. ```r result <- cross_expression_matrix(result, pvalue_threshold = 0.005) cross_expression_plot(object = result) ``` -------------------------------- ### Create tissue-specificity barplot with cross_tissues_plot Source: https://github.com/antuneslab/crossdome/blob/main/man/cross_tissues_plot.Rd Generates a tissue-specificity barplot from an xrResult object. The object must be created by running the cross_compose function first. The plot is returned as a ggplot object. ```R cross_tissues_plot(object = result) ``` -------------------------------- ### cross_substitution_plot Source: https://github.com/antuneslab/crossdome/blob/main/README.Rmd A heatmap combined with seqlogo displaying amino acid substitutions. ```APIDOC ## cross_substitution_plot ### Description A heatmap combined with seqlogo displaying amino acid substitutions. ### Usage `cross_substitution_plot()` ### Details This function is part of the Visualization category. For usage examples, see the package documentation with `?cross_substitution_plot`. ``` -------------------------------- ### cross_pair_summary(query, subject, position_weight = rep(1, 9)) Source: https://github.com/antuneslab/crossdome/blob/main/man/cross_pair_summary.Rd Calculates the Crossdome relatedness score between a query peptide and a subject peptide. Both peptides must be 9-mers. The position_weight parameter allows weighting positions based on TCR hotspots. ```APIDOC ## cross_pair_summary(query, subject, position_weight = rep(1, 9)) ### Description Calculates the Crossdome relatedness score between a query peptide and a subject peptide. ### Usage cross_pair_summary(query, subject, position_weight = rep(1, 9)) ### Parameters - **query** (character) - Required - A peptide target. Only 9-mers are supported. - **subject** (character) - Required - Putative off-target candidate. Only 9-mers are supported. - **position_weight** (numeric vector) - Optional - A numeric vector derived from TCR hotspots. Default is rep(1, 9). ### Return Value Returns a list holding Crossdome metrics. ### Example ```r query <- 'EVDPIGHLY' subject <- 'ESDPIVAQY' cross_pair_summary(query = query, subject = subject) ``` ``` -------------------------------- ### cross_peptide_properties Source: https://github.com/antuneslab/crossdome/blob/main/README.Rmd Converts a peptide to biochemical profile. ```APIDOC ## cross_peptide_properties ### Description Converts a peptide to biochemical profile. ### Usage `cross_peptide_properties()` ### Details This function is part of the Analysis category. For usage examples, see the package documentation with `?cross_peptide_properties`. ``` -------------------------------- ### Crossdome + A3A-derived contacts screening Source: https://github.com/antuneslab/crossdome/blob/main/vignettes/Example_02.Rmd Defines position weights for MAGE-A3 TCR-peptide contacts, builds a background database with cross_background() using the mage_off_targets peptide sequences and the HLA-A*01:01 allele, then runs cross_compose() on query 'EVDPIGHLY' with those weights. ```r magea_a3a <- c(3.0, 0.5, 0.5, 4.0, 2.0, 0.5, 1.0, 1.0, 0.5) database <- cross_background(off_targets = mage_off_targets$peptide_sequence, allele = "HLA-A*01:01") result_cm_a3a <- cross_compose(query = 'EVDPIGHLY', background = database, position_weight = magea_a3a) ``` -------------------------------- ### cross_expression_matrix(xrResult) Source: https://github.com/antuneslab/crossdome/blob/main/man/cross_expression_matrix.Rd Extracts gene donor mRNA expression based on CR candidates from an xrResult object. Returns a matrix containing mRNA expression across healthy tissues. ```APIDOC ## cross_expression_matrix(xrResult) ### Description Extracts gene donor mRNA expression based on CR candidates from an xrResult object. ### Usage \S4method{cross_expression_matrix}{xrResult}(object, rank = NULL, pvalue_threshold = 0.01) ### Arguments - **object** (xrResult) - Required - Depends on xrResult object. Run `cross_compose` function. - **rank** (numeric) - Optional - A numeric value to filter number of candidates. - **pvalue_threshold** (numeric) - Optional - P-value threshold. Default is 0.01. ### Value Return a matrix containing mRNA expression across healthy tissues. ### Example ```r result <- crossdome::mage_result cross_expression_matrix(object = result) ``` ``` -------------------------------- ### cross_tissues_plot(object) Source: https://github.com/antuneslab/crossdome/blob/main/man/cross_tissues_plot.Rd Generates a bar plot summarizing tissue-specificity groups from an xrResult object. The function takes an xrResult object and returns a ggplot object. ```APIDOC ## cross_tissues_plot(object) ### Description Generates a bar plot summarizing tissue-specificity groups from an xrResult object. ### Usage cross_tissues_plot(object) ### Arguments - **object** (xrResult) - Required - An xrResult object, typically obtained from the `cross_compose` function. ### Value Returns a ggplot object. ### Examples r \dontrun{ cross_tissues_plot(object = result) } ``` -------------------------------- ### Set knitr chunk options for vignette Source: https://github.com/antuneslab/crossdome/blob/main/vignettes/Example_02.Rmd Configures knitr chunk options for the vignette and disables the HTML vignette title check. Used at the top of the document to control output behavior. ```r knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) options(rmarkdown.html_vignette.check_title = FALSE) ``` -------------------------------- ### cross_pair_summary Source: https://github.com/antuneslab/crossdome/blob/main/README.Rmd Calculates relatedness score between peptides. ```APIDOC ## cross_pair_summary ### Description Calculates relatedness score between peptides. ### Usage `cross_pair_summary()` ### Details This function is part of the Prediction category. For usage examples, see the package documentation with `?cross_pair_summary`. ``` -------------------------------- ### Basic usage of cross_pairwise_plot Source: https://github.com/antuneslab/crossdome/blob/main/man/cross_pairwise_plot.Rd Creates a correlation plot for a query and subject peptide pair. Both inputs must be 9-mers. The function returns a corrplot object. ```R query <- 'EVDPIGHLY' subject <- 'ESDPIVAQY' cross_pairwise_plot(query = query, subject = subject) ``` -------------------------------- ### cross_prediction_plot(object) Source: https://github.com/antuneslab/crossdome/blob/main/man/cross_prediction_plot.Rd Generates a dot plot showing immunogenic predictions from an xrResult object. ```APIDOC ## cross_prediction_plot(object) ### Description A dot plot showing the immunogenic predictions ### Usage cross_prediction_plot(object) ### Arguments - **object** (xrResult) - Required - An xrResult object. Run `cross_compose` function. ### Value Returns a ggplot object ### Examples ```r \dontrun{ cross_prediction_plot(object = result) } ``` ``` -------------------------------- ### cross_pairwise_plot Source: https://github.com/antuneslab/crossdome/blob/main/README.Rmd Correlation plot based on two peptide / biochemical profiles. This function is under construction. ```APIDOC ## cross_pairwise_plot ### Description Correlation plot based on two peptide / biochemical profiles. This function is under construction. ### Usage `cross_pairwise_plot()` ### Details This function is part of the Visualization category. For usage examples, see the package documentation with `?cross_pairwise_plot`. ``` -------------------------------- ### cross_expression_plot Source: https://github.com/antuneslab/crossdome/blob/main/README.Rmd A heatmap presenting the gene donor expression profile. ```APIDOC ## cross_expression_plot ### Description A heatmap presenting the gene donor expression profile. ### Usage `cross_expression_plot()` ### Details This function is part of the Visualization category. For usage examples, see the package documentation with `?cross_expression_plot`. ``` -------------------------------- ### cross_tissues_plot Source: https://github.com/antuneslab/crossdome/blob/main/README.Rmd A bar plot summarizing the tissue-specificy groups. ```APIDOC ## cross_tissues_plot ### Description A bar plot summarizing the tissue-specificy groups. ### Usage `cross_tissues_plot()` ### Details This function is part of the Visualization category. For usage examples, see the package documentation with `?cross_tissues_plot`. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.