lm_count_mat | R Documentation |
Calculated associtation gene counts matrix with the pehonotype where each of gene counts on aexposure
lm_count_mat(
count_matrix,
pheno,
trait,
covariates_string,
gene_IDs = NULL,
log_transform = "log_replace_half_min"
)
count_matrix |
A matrix of gene counts (possibly transformed). rows are genes, columns are individuals |
pheno |
A data frame of phenotype, includes the trait and covariates. |
trait |
A character, the name of the exposure variable. The trait should be a column in pheno. |
covariates_string |
Characters string with specifying the covariats, include "as.factor" statements. example: covariate_string = "age,as.factor(sex)" |
gene_IDs |
Vector of selection of geneID, NULL if all genes are tested |
log_transform |
One of the transformations log_replace_half_min, log_add_min, log_add_0.5, or NULL (default) |
Linear regression results as a data frame with columns geneID, adjLogFC,se,t_stat (t-statistic),t_stat_df(degree of freedom),p_value,fdr_bh
library(dplyr)
data(rnaseq_count_matrix)
rnaseq_count_matrix<- rnaseq_count_matrix[rowSums(rnaseq_count_matrix)>0,]
data(phenotype)
trait<-"Trait.1"
covars<-"Age+Sex"
log_transform<-"log_replace_half_min"
lm_count_mat(count_matrix=rnaseq_count_matrix,pheno=phenotype,trait=trait,
covariates_string=covars, log_transform=log_transform)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.