## Generate some random data
Data <- matrix(abs(rnorm(3000, sd=2)),ncol=10,nrow=50)
rownames(Data)<-character(dim(Data)[1])
## Generate gene names from index
for (i in 1:dim(Data)[1]){rownames(Data)[i]<-as.character(i)}
## Generate a hypothetical gene list from the first 10 gene names
myGeneSet<-rownames(Data)[1:10]
## Initializing SincellObject named list
mySincellObject <- sc_InitializingSincellObject(Data)
## Assessmet of cell-to-cell distance matrix after dimensionality reduction with
## Principal Component Analysis (PCA)
mySincellObject <- sc_DimensionalityReductionObj(mySincellObject, method="PCA",dim=2)
## Cluster
mySincellObject <- sc_clusterObj (mySincellObject, clust.method="max.distance",
max.distance=0.5)
## Assessment of cell-state hierarchy
mySincellObject<- sc_GraphBuilderObj(mySincellObject, graph.algorithm="SST",
graph.using.cells.clustering=TRUE)
## Assessment of association of the hierarchy with a gene set
mySincellObject<-sc_AssociationOfCellsHierarchyWithAGeneSet(mySincellObject,
myGeneSet, minimum.geneset.size=9,p.value.assessment=TRUE,
spearman.rank.threshold=0.5,num_it=1000)
## To access the similarity between the reference hierarchy and the hierarchy obtained
## from the gene set
myAssociationOfCellsHierarchyWithGeneSet<-
mySincellObject[["AssociationOfCellsHierarchyWithAGeneSet"]]
myAssociationOfCellsHierarchyWithGeneSet.pvalue<-
mySincellObject[["AssociationOfCellsHierarchyWithAGeneSet.pvalue"]]Run the code above in your browser using DataLab