Title: | Fast and Robust Deconvolution of Tumor Infiltrating Lymphocyte from Expression Profiles using Least Trimmed Squares |
---|---|
Description: | Using the idea of least trimmed square, it could automatically detects and removes outliers from data before estimating the coefficients. It is a robust machine learning tool which can be applied to gene-expression deconvolution technique. Yuning Hao, Ming Yan, Blake R. Heath, Yu L. Lei and Yuying Xie (2019) <doi:10.1101/358366>. |
Authors: | Yuning Hao [aut], Ming Yan [aut], Blake R. Heath [aut], Yu L. Lei [aut], Yuying Xie [aut, cre] |
Maintainer: | Yuying Xie <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.0.1 |
Built: | 2025-02-15 05:24:41 UTC |
Source: | https://github.com/cran/FARDEEP |
Using the basic idea of least trimmed square to detect and remove outliers before estimating the coefficients. Adaptive least trimmed square.
alts(x, y, alpha1 = 0.1, alpha2 = 1.5, k = 6, nn = TRUE, intercept = TRUE)
alts(x, y, alpha1 = 0.1, alpha2 = 1.5, k = 6, nn = TRUE, intercept = TRUE)
x |
input matrix of predictors with n rows and p columns. |
y |
input vector of dependent variable with length n. |
alpha1 |
parameter used to adjust the upper bound of outliers. Take value from 0 to 1, default 0.1. |
alpha2 |
parameter used to adjust the lower bound of outliers. Take value larger than 1, default 1.5. |
k |
parameter used to determine the boundary of outliers in the following step of algorithm. Take value from 1 to 10, default 6. |
nn |
whether coefficients are non-negative,default TRUE. |
intercept |
whether intercept is included in model, default TRUE. |
beta: estimation of coefficients.
number_outlier: number of outliers.
outlier_detect: index of detected outliers.
X.new: good observed points for independent variables.
Y.new: good observed points for dependent variables.
k: modified k (if the input value is not appropriate).
Yuning Hao, Ming Yan, Blake R. Heath, Yu L. Lei and Yuying Xie
Yuning Hao, Ming Yan, Blake R. Heath, Yu L. Lei and Yuying Xie. Fast and Robust Deconvolution of Tumor Infiltrating Lymphocyte from Expression Profiles using Least Trimmed Squares. <doi:10.1101/358366>
library(FARDEEP) samp = sample.sim(n = 500, p = 20, sig = 1, a1 = 0.1, a2 = 0.2, nn = TRUE, intercept = TRUE) result = alts(samp$x, samp$y, alpha1 = 0.1, alpha2 = 1.5, k = 6, nn = TRUE, intercept = TRUE) coef = result$beta
library(FARDEEP) samp = sample.sim(n = 500, p = 20, sig = 1, a1 = 0.1, a2 = 0.2, nn = TRUE, intercept = TRUE) result = alts(samp$x, samp$y, alpha1 = 0.1, alpha2 = 1.5, k = 6, nn = TRUE, intercept = TRUE) coef = result$beta
Using the idea of least trimmed square to detect and remove outliers before estimating the coefficients. A robust method for gene-expression deconvolution.
fardeep(X, Y, alpha1 = 0.1, alpha2 = 1.5, up = 10, low = 1, nn = TRUE, intercept = TRUE, lognorm = TRUE, permn = 100, QN = FALSE)
fardeep(X, Y, alpha1 = 0.1, alpha2 = 1.5, up = 10, low = 1, nn = TRUE, intercept = TRUE, lognorm = TRUE, permn = 100, QN = FALSE)
X |
input matrix of predictors with n rows and p columns. |
Y |
input vector of dependent variable. |
alpha1 |
parameter used to adjust the upper bound of outliers. Take value from 0 to 1, default 0.1. |
alpha2 |
parameter used to adjust the lower bound of outliers. Take value larger than 1, default 1.5. |
up |
upper bound of parameter k in function alts, default 10. |
low |
lower bound of parameter k in function alts, default 1. |
nn |
whether coefficients are non-negative,default TRUE. |
intercept |
whether intercept is included in model, default TRUE. |
lognorm |
whether noise is log-normal distributed, default TRUE. |
permn |
the number of permutation to get the p-values, default TRUE. |
QN |
whether perform quantile normalization, default TRUE. |
abs.beta: estimation of abosulute abundance of cells (TIL subset scores).
relative.beta: estimation of relative proportions by normalizing abs.beta to 1.
pval: statistical significance for the deconvolution result.
k.value: tuned paprameter by modified BIC.
Yuning Hao, Ming Yan, Blake R. Heath, Yu L. Lei and Yuying Xie
Yuning Hao, Ming Yan, Blake R. Heath, Yu L. Lei and Yuying Xie. Fast and Robust Deconvolution of Tumor Infiltrating Lymphocyte from Expression Profiles using Least Trimmed Squares. <doi:10.1101/358366>
library(FARDEEP) data(LM22) data(mixture) # toy examples result = fardeep(LM22, mixture[, 1:2], permn = 0) result = fardeep(LM22, mixture) coef = result$abs.beta
library(FARDEEP) data(LM22) data(mixture) # toy examples result = fardeep(LM22, mixture[, 1:2], permn = 0) result = fardeep(LM22, mixture) coef = result$abs.beta
A dataset containing 547 genes and 22 TILs.
LM22
LM22
A data frame with 547 rows and 22 variables:
naive B cells
memory B cells
Plasma cells
CD8 T cells
naive CD4 T cells
resting memory CD4 T cells
activated memory CD4 T cells
follicular helper T cells
regulatory T cells
gamma delta T cells
resting natural killer cells
activated natural killer cells
monocytes
M0 macrophages
M1 macrophages
M2 macrophages
resting dendritic cells
activated dendritic cells
resting mast cells
activated mast cells
eosinophils
neutrophils
Aaron M. Newman, Chih Long Liu, Michael R. Green, Andrew J. Gentles, Weiguo Feng, Yue Xu, Chuong D. Hoang, Maximilian Diehn and Ash A. Alizadeh. Robust enumeration of cell subsets from tissue expression profiles.
This gene-expression dataset consists of surgical lymph node biopsies of 14 follicular lymphoma patients with 19416 genes. It is available on Gene Expression Omnibus (GEO) with accession number GSE65135. https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE65135.
mixture
mixture
A data frame with 19416 rows and 14 variables:
FL lymph node biopsy, untreated, 1063
FL lymph node biopsy, untreated, 1080
FL lymph node biopsy, untreated, 575
FL lymph node biopsy, untreated, 581
FL lymph node biopsy, untreated, 598
FL lymph node biopsy, untreated, 639
FL lymph node biopsy, untreated, 664
FL lymph node biopsy, untreated, 666
FL lymph node biopsy, untreated, 695
FL lymph node biopsy, untreated, 706
FL lymph node biopsy, untreated, 726
FL lymph node biopsy, untreated, 731
FL lymph node biopsy, untreated, 944
FL lymph node biopsy, untreated, 959
Aaron M. Newman, Chih Long Liu, Michael R. Green, Andrew J. Gentles, Weiguo Feng, Yue Xu, Chuong D. Hoang, Maximilian Diehn and Ash A. Alizadeh. Robust enumeration of cell subsets from tissue expression profiles.
Generate random sample with different proportion of outliers and leverage points
sample.sim(n, p, sig, a1, a2, nn = TRUE, intercept = FALSE)
sample.sim(n, p, sig, a1, a2, nn = TRUE, intercept = FALSE)
n |
number of observations. |
p |
number of independent variables (predictors). |
sig |
variance of dependent variable. |
a1 |
proportion of outliers. |
a2 |
proportion of leverage points in outliers. |
nn |
whether coefficients are non-negative, default TRUE. |
intercept |
whether intercept is included in model, default TRUE. |
y: vector of dependent variable.
x: matrix of predictors with n rows and p columns.
loc: index of added outliers.
beta: vector of coefficients.
Yuning Hao, Ming Yan, Blake R. Heath, Yu L. Lei and Yuying Xie
Yuning Hao, Ming Yan, Blake R. Heath, Yu L. Lei and Yuying Xie. Fast and Robust Deconvolution of Tumor Infiltrating Lymphocyte from Expression Profiles using Least Trimmed Squares. <doi:10.1101/358366>
library(FARDEEP) samp = sample.sim(n = 500, p = 20, sig = 1, a1 = 0.1, a2 = 0.2, nn = TRUE, intercept = TRUE)
library(FARDEEP) samp = sample.sim(n = 500, p = 20, sig = 1, a1 = 0.1, a2 = 0.2, nn = TRUE, intercept = TRUE)
Tuning parameter k in function alts using Bayesian Information Criterion (BIC) with some adjustment.
tuningBIC(x, y, alpha1 = 0.1, alpha2 = 1.5, up = 10, low = 1, nn = TRUE, intercept = TRUE, lognorm = TRUE)
tuningBIC(x, y, alpha1 = 0.1, alpha2 = 1.5, up = 10, low = 1, nn = TRUE, intercept = TRUE, lognorm = TRUE)
x |
input matrix of predictors with n rows and p columns. |
y |
input vector of dependent variable with length n. |
alpha1 |
parameter used to adjust the upper bound of outliers. Take value from 0 to 1, default 0.1. |
alpha2 |
parameter used to adjust the lower bound of outliers. Take value larger than 1, default 1.5. |
up |
upper bound of parameter k in function alts, default 10. |
low |
lower bound of parameter k in function alts, default 1. |
nn |
whether coefficients are non-negative, default TRUE. |
intercept |
whether intercept is included in model, default TRUE. |
lognorm |
whether noise is log-normal distributed, default TRUE. |
k: tuning result of parameter k for function alts.
Yuning Hao, Ming Yan, Blake R. Heath, Yu L. Lei and Yuying Xie
Yuning Hao, Ming Yan, Blake R. Heath, Yu L. Lei and Yuying Xie. Fast and Robust Deconvolution of Tumor Infiltrating Lymphocyte from Expression Profiles using Least Trimmed Squares. <doi:10.1101/358366>
library(FARDEEP) samp = sample.sim(n = 500, p = 20, sig = 1, a1 = 0.1, a2 = 0.2, nn = TRUE, intercept = TRUE) k = tuningBIC(samp$x, samp$y, lognorm = FALSE)
library(FARDEEP) samp = sample.sim(n = 500, p = 20, sig = 1, a1 = 0.1, a2 = 0.2, nn = TRUE, intercept = TRUE) k = tuningBIC(samp$x, samp$y, lognorm = FALSE)