rsecFluidigm {clusterExperiment} | R Documentation

## RSEC run for vignette

### Description

RSEC run for vignette

### Format

ClusterExperiment object, the result of running `RSEC` on fluidigm data described in vignette and available in the `scRNAseq` package.

### Author(s)

Elizabeth Purdom epurdom@stat.berkeley.edu

### See Also

`fluidigm`

### Examples

    #code used to create rsecFluidigm:
    ## Not run:
    library(scRNAseq)
    data("fluidigm")
    se <- fluidigm[,colData(fluidigm)[,"Coverage_Type"]=="High"]
    wh_zero <- which(rowSums(assay(se))==0)
    pass_filter <- apply(assay(se), 1, function(x) length(x[x >= 10]) >= 10)
    se <- se[pass_filter,]
    fq <- round(limma::normalizeQuantiles(assay(se)))
    assays(se) <- list(normalized_counts=fq)
    wh<-which(colnames(colData(se)) %in% c("Cluster1","Cluster2"))
    colnames(colData(se))[wh]<-c("Published1","Published2")
    library(clusterExperiment)
    ncores<-1
    system.time(
      rsecFluidigm<-RSEC(se,
                         isCount = TRUE,
                         k0s = 4:15,
                         alphas=c(0.1, 0.2, 0.3),
                         betas = 0.9,
                         reduceMethod="PCA",
                         nReducedDims=10,
                         minSizes=1,
                         clusterFunction="hierarchical01",
                         consensusMinSize=3,
                         consensusProportion=0.7,
                         dendroReduce= "mad",
                         dendroNDims=1000,
                         mergeMethod="adjP",
    	                    mergeDEMethod="limma",
                         mergeCutoff=0.01,
                         ncores=ncores,
                         random.seed=176201)
    )
    metadata(rsecFluidigm)$packageVersion<-packageVersion("clusterExperiment")
    ## Tests that haven't changed the clustering results.
    x<-unique(clusterMatrix(rsecFluidigm)[,"makeConsensus"])
    y<-unique(clusterMatrix(rsecFluidigm)[,"mergeClusters"])
    if(length(x[x>0]) != 8)
      stop("rsecFluidigm object has changed -- makeConsensus")
    if(length(y[y>0]) != 6)
      stop("rsecFluidigm object has changed -- different # of mergeClusters")
    adjPValues<-c(0.049794879, 0.007356062, 0.008204838,
      0.013156033, 0.009336540, 0.007497524, 0.033526666)
    if(nrow(rsecFluidigm@merge_nodeProp)!=length(adjPValues))
      stop("rsecFluidigm object has changed -- makeDendrogram")
    if(!all.equal(adjPValues,rsecFluidigm@merge_nodeProp[,"adjP"]))
      stop("rsecFluidigm object has changed -- different percentages")
    devtools::use_data(rsecFluidigm,overwrite=FALSE)

    ## End(Not run)

[Package clusterExperiment version 2.7.2 Index]