Find DE genes from comparing one clust vs remaining

find_markers(
  expression_matrix = NULL,
  cluster = NULL,
  selected_cluster = NULL,
  fitType = "local",
  dispersion_method = "per-condition",
  sharing_Mode = "maximum"
)

Arguments

expression_matrix

is a normalised expression matrix.

cluster

corresponding cluster information in the expression_matrix by running CORE clustering or using other methods.

selected_cluster

a vector of unique cluster ids to calculate

fitType

string specifying 'local' or 'parametric' for DEseq dispersion estimation

dispersion_method

one of the options c( 'pooled', 'pooled-CR', per-condition', 'blind' )

sharing_Mode

one of the options c("maximum", "fit-only", "gene-est-only")

Value

a list containing sorted DESeq analysis results

Author

Quan Nguyen, 2017-11-25

Examples

day2 <- day_2_cardio_cell_sample mixedpop1 <-new_scGPS_object(ExpressionMatrix = day2$dat2_counts, GeneMetadata = day2$dat2geneInfo, CellMetadata = day2$dat2_clusters) # depending on the data, the DESeq::estimateDispersions function requires # suitable fitType # and dispersion_method options DEgenes <- find_markers(expression_matrix=assay(mixedpop1), cluster = colData(mixedpop1)[,1], selected_cluster=c(1), #can also run for more #than one clusters, e.g.selected_cluster = c(1,2) fitType = "parametric", dispersion_method = "blind", sharing_Mode="fit-only" )
#> converting counts to integer mode
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> -- note: fitType='parametric', but the dispersion trend was not well captured by the #> function: y = a/x + b, and a local regression fit was automatically substituted. #> specify fitType='local' or 'mean' to avoid this message next time.
#> final dispersion estimates
names(DEgenes)
#> [1] "baseMean" "log2FoldChange" "lfcSE" "stat" #> [5] "pvalue" "padj" "id"