cogaps_result.rds is an example of a latent feature space data structure 
with 24228 features and 4898 samples. The result contains both the 
featureLoadings, a matrix of genes/features by (5) latent patterns and the
sampleFactors, a matrix of barcodes/samples by (5) latent patterns. 

An example of how this cogaps object can be generated is as follows. The exact
parameters will depend on the specs of your machine. 


library(SpaceMarkers)
library(CoGAPS)
main_10xlink <- "https://cf.10xgenomics.com/samples/spatial-exp/1.3.0"
counts_folder <- "Visium_Human_Breast_Cancer"
counts_file <- "Visium_Human_Breast_Cancer_filtered_feature_bc_matrix.h5"
counts_url<-paste(c(main_10xlink,counts_folder,counts_file), collapse = "/")
mtx <- load10XExpr(visiumDir = ".", h5filename = counts_file)
genes <- rownames(mtx)
#Run CoGAPS
params = CogapsParams(nPatterns=5, nIterations=50000, seed=123,
                      sparseOptimization=TRUE, distributed="single-cell",
                      geneNames=genes)
params = setDistributedParams(params, nSets=4)
cgResult = CoGAPS(as.data.frame(mtx), params, nThreads = 4)
saveRDS(cgResult, "CoGAPS_resullt.rds")

More details about cogaps can be found on bioconductor:
https://www.bioconductor.org/packages/release/bioc/html/CoGAPS.html
