Description Usage Arguments Value Examples
Given total and allele-specific read counts along with library size, the two-step inference procedure is implemented to build prediction model. Step 1: estimate variances of total and allele-specific count response respectively along with intercept for total count response Step 2: transform observation according to step 1 and build prediction model using glmnet (Elastic net with alpha = alpha and nfold-fold cross-validation)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
geno1 |
genotype of haplotype 1 (dimension = N x P) |
geno2 |
genotype of haplotype 2 (dimension = N x P) |
y1 |
allele-specific read count for haplotype 1 (dimension = N x 1) |
y2 |
allele-specific read count for haplotype 2 (dimension = N x 1) |
ytotal |
total read count (dimension = N x 1) |
lib_size |
library size (dimension = N x 1) |
cov_offset |
predicted effect of covariates on total read count response term, log(ytotal / lib_size / 2) (dimension = N x 1) |
trc_cutoff |
total read count cutoff to exclude observations with ytotal lower than the cutoff |
asc_cutoff |
allele-specific read count cutoff to exclude observations with y1 or y2 lower than asc_cutoff |
weight_cap |
the maximum weight difference (in fold) is min(weight_cap, floor(sample_size / 10)). The ones exceeding the cutoff is capped. Set to NULL then no weight_cap applied. |
asc_cap |
exclude observations with y1 or y2 higher than asc_cap |
alpha |
alpha parameter in elastic net model of glmnet (lasso: alpha = 1; ridge: alpha = 0). (default = 0.5). |
nfold |
number of fold for cross-validation to pick lambda parameter in glmnet. (default = 5). |
nobs_asc_cutoff |
don't consider ASC if number of observations is smaller than nobs_asc_cutoff |
prediction model
1 2 3 4 5 6 7 8 9 10 11 12 13 | mixpred(
geno1 = matrix(sample(c(0, 0.5, 1), 200, replace = TRUE), ncol = 2),
geno2 = matrix(sample(c(0, 0.5, 1), 200, replace = TRUE), ncol = 2),
y1 = rpois(100, 100),
y2 = rpois(100, 100),
ytotal = rpois(100, 1000),
lib_size = rpois(100, 10000),
cov_offset = runif(100),
trc_cutoff = 100,
asc_cutoff = 50,
weight_cap = 100,
asc_cap = 1000
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.