Title: | Calculate and Explore Property Indices of Neopeptides |
---|---|
Description: | Includes functions to calculate and explore several property indices for neopeptides, which are abnormal peptides generated from genome. |
Authors: | Shixiang Wang [aut, cre] |
Maintainer: | Shixiang Wang <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.0 |
Built: | 2024-08-20 02:45:23 UTC |
Source: | https://github.com/ShixiangWang/neopeptides |
Calculate Dissimilarity Value to Reference Proteome for Peptides
calc_dissimilarity( pep, db = "human", k_val = 4.86936, a_val = 32, fill = NA_real_, use_blastp_short = TRUE, threads = parallel::detectCores(), tmp_dir = file.path(tempdir(), "neopeptides"), clean_tmp = TRUE )
calc_dissimilarity( pep, db = "human", k_val = 4.86936, a_val = 32, fill = NA_real_, use_blastp_short = TRUE, threads = parallel::detectCores(), tmp_dir = file.path(tempdir(), "neopeptides"), clean_tmp = TRUE )
pep |
a vector of peptides. |
db |
an available database, can be one of "human" and "mouse". Or you can set this to specify the (fasta) database file to be searched instead of using standard database. A blast database will be created if it does not exist. |
k_val |
numeric. Steepness of sigmoidal curve at k. Default 4.86936, the value used in the analysis of Van Allen, Snyder, Rizvi, Riaz, and Hellmann datasets. See reference. |
a_val |
numeric. Optionally can be "mean" to use mean alignment for nmers passed. Horizontal displacement of partition function. Default is 32, based on max_SW of 75 million 8-15mers from the five clinical datasets against human, if using max_SW, use 52. This value may not be meaningful for murine alignment so use with care. See reference. |
fill |
a numeric value for filling default NA value when no blast result. |
use_blastp_short |
default is |
threads |
number of threads to run. |
tmp_dir |
path for storing temp files. |
clean_tmp |
if |
Data table of dissimilarity values (to the non-mutated proteome).
peptide - input peptide
dissimilarity - dissimilarity value
Richman LP, Vonderheide RH, and Rech AJ. "Neoantigen dissimilarity to the self-proteome predicts immunogenicity and response to immune checkpoint blockade." Cell Systems 9, 375-382.E4, (2019).
set_blast_path for setting blast path, install_database for installing database.
## Not run: calc_dissimilarity("AAAAAAAAA") calc_dissimilarity("MRLVDRRWA") calc_dissimilarity("VRLVDRRWA") calc_dissimilarity("MTEYKLVVVGAGDVGKSALTI") calc_dissimilarity("MTEYKLVVVGAGDVGKSALTI", db = "mouse") calc_dissimilarity(c("MTEYKLVVVGAGDVGKSALTIQLIQNHFVDEYDP", "MTEYKLVVVG")) ## End(Not run)
## Not run: calc_dissimilarity("AAAAAAAAA") calc_dissimilarity("MRLVDRRWA") calc_dissimilarity("VRLVDRRWA") calc_dissimilarity("MTEYKLVVVGAGDVGKSALTI") calc_dissimilarity("MTEYKLVVVGAGDVGKSALTI", db = "mouse") calc_dissimilarity(c("MTEYKLVVVGAGDVGKSALTIQLIQNHFVDEYDP", "MTEYKLVVVG")) ## End(Not run)
Calculate the Geometric Mean
calc_geometric_mean(x, na.rm = TRUE)
calc_geometric_mean(x, na.rm = TRUE)
x |
a vector or data.frame |
na.rm |
remove NA values before processing |
The geometric mean(s)
x <- 1:5 calc_geometric_mean(x)
x <- 1:5 calc_geometric_mean(x)
Calculate the Harmonic Mean
calc_harmonic_mean(x, na.rm = TRUE, zero = TRUE)
calc_harmonic_mean(x, na.rm = TRUE, zero = TRUE)
x |
a vector, matrix, or data.frame |
na.rm |
na.rm=TRUE remove NA values before processing |
zero |
If TRUE, then if there are any zeros, return 0, else, return the harmonic mean of the non-zero elements |
The harmonic mean(s)
x <- 1:5 calc_harmonic_mean(x)
x <- 1:5 calc_harmonic_mean(x)
Calculate IEDB Score for Peptides
calc_iedb_score( pep, db = "human", fill = NA_real_, use_blastp_short = TRUE, threads = parallel::detectCores(), tmp_dir = file.path(tempdir(), "neopeptides"), clean_tmp = TRUE )
calc_iedb_score( pep, db = "human", fill = NA_real_, use_blastp_short = TRUE, threads = parallel::detectCores(), tmp_dir = file.path(tempdir(), "neopeptides"), clean_tmp = TRUE )
pep |
a vector of peptides. |
db |
an available database, can be one of "human" and "mouse". Or you can set this to specify the (fasta) database file to be searched instead of using standard database. A blast database will be created if it does not exist. |
fill |
a numeric value for filling default NA value when no blast result. |
use_blastp_short |
default is |
threads |
number of threads to run. |
tmp_dir |
path for storing temp files. |
clean_tmp |
if |
Data table of IEDB scores.
peptide - input peptide
iedb_score - IEDB score
annotation - IEDB annotation info
set_blast_path for setting blast path, install_database for installing database.
## Not run: calc_iedb_score("AAAAAAAAA") calc_iedb_score("MTEYKLVVVGAGDVGKSALTIQLIQNHFVDEYDP") calc_iedb_score("MTEYKLVVVGAGDVGKSALTIQLIQNHFVDEYDP", db = "mouse") calc_iedb_score(c("MTEYKLVVVGAGDVGKSALTIQLIQNHFVDEYDP", "MTEYKLVVVG")) ## End(Not run)
## Not run: calc_iedb_score("AAAAAAAAA") calc_iedb_score("MTEYKLVVVGAGDVGKSALTIQLIQNHFVDEYDP") calc_iedb_score("MTEYKLVVVGAGDVGKSALTIQLIQNHFVDEYDP", db = "mouse") calc_iedb_score(c("MTEYKLVVVGAGDVGKSALTIQLIQNHFVDEYDP", "MTEYKLVVVG")) ## End(Not run)
Firstly environment variable PATH will be searched, if not found, configure file then will be used to search the entry.
find_path(entry)
find_path(entry)
entry |
a program or blast database. |
a path.
set_blast_path for setting blast path, install_database for installing database.
At default, configure file is '~/.neopeptide/config.yml', you
can set by options(neopeptides.config="new_path.yml")
.
Please remember, if you change the configure file, you have
to set it per R session.
install_database( db_path = normalizePath("~/.neopeptide/db", mustWork = FALSE), force = FALSE, species = c("human", "mouse"), data_type = c("IEDB", "Proteome") )
install_database( db_path = normalizePath("~/.neopeptide/db", mustWork = FALSE), force = FALSE, species = c("human", "mouse"), data_type = c("IEDB", "Proteome") )
db_path |
a path to store the databases. |
force |
if |
species |
can be 'human' and 'mouse'. Default select them all. |
data_type |
can be 'IEDB' and 'Proteome'. Default select them all. |
Nothing.
set_blast_path, calc_iedb_score, calc_dissimilarity
## Not run: # Default all databases will be downloaded and installed. install_database() ## End(Not run)
## Not run: # Default all databases will be downloaded and installed. install_database() ## End(Not run)
At default, configure file is '~/.neopeptide/config.yml', you
can set by options(neopeptides.config="new_path.yml")
.
Please remember, if you change the configure file, you have
to set it per R session.
set_blast_path(path)
set_blast_path(path)
path |
a directory containing executable Blast program. Installing it by conda is recommended. |
Nothing
## Not run: set_blast_path("/Users/wsx/anaconda3/bin/") ## End(Not run)
## Not run: set_blast_path("/Users/wsx/anaconda3/bin/") ## End(Not run)