Skip to contents

Download Matrix from GEO and Load to Seurat.

Usage

ParseGEO(
  acce,
  platform = NULL,
  down.supp = FALSE,
  supp.idx = 1,
  timeout = 3600,
  data.type = c("sc", "bulk"),
  supp.type = c("count", "10x"),
  out.folder = NULL,
  gene2feature = TRUE,
  merge = TRUE,
  ...
)

Arguments

acce

GEO accession number.

platform

Platform information/field. Disable when down.supp is TRUE. Default: NULL (disable).

down.supp

Logical value, whether to download supplementary files to create count matrix. If TRUE, always download supplementary files. If FALSE, use ExpressionSet (If contains non-integer or emoty, download supplementary files automatically). Default: FALSE.

supp.idx

The index of supplementary files to download. This should be consistent with platform. Default: 1.

timeout

Timeout for download.file. Default: 3600.

data.type

The data type of the dataset, choose from "sc" (single-cell) and "bulk" (bulk). Default: "sc".

supp.type

The type of downloaded supplementary files, choose from count (count matrix file or single count matrix file) and 10x (cellranger output files, contains barcodes, genes/features and matrix). Default: count.

out.folder

Output folder to save 10x files. Default: NULL (current working directory).

gene2feature

Logical value, whether to rename genes.tsv.gz to features.tsv.gz. Default: TRUE.

merge

Logical value, whether to merge Seurat list when there are multiple 10x files (supp.type is 10x). Default: FALSE.

...

Parameters for getGEO.

Value

If data.type is "sc", return Seurat object (if merge is TRUE) or Seurat object list (if merge is FALSE). If data.type is "bulk", return count matrix.

Examples

# # the supp files are count matrix
# GSE94820.seu = ParseGEO(acce = "GSE94820", down.supp = TRUE, supp.idx = 1, supp.type = "count")
# # the supp files are cellranger output files: barcodes, genes/features and matrix
# GSE200257.seu = ParseGEO(acce = "GSE200257", down.supp = TRUE, supp.idx = 1, supp.type = "10x",
#                          out.folder = "/path/to/output/folder")