satijalab / seurat

R toolkit for single cell genomics
http://www.satijalab.org/seurat
Other
2.27k stars 910 forks source link

Merge function not present in Seurat 4.0.4 #5123

Closed wht10 closed 3 years ago

wht10 commented 3 years ago

I believe the merge function may not be present in Seurat version 4.0.4, which I just freshly installed.

library(Seurat)
pbmc_small <- pbmc_small
SeuratData::InstallData("pbmc3k")
data("pbmc3k")
Seurat::merge(pbmc_small,pbmc3k, add.cell.ids = c("small","3K"))
Error: 'merge' is not an exported object from 'namespace:Seurat'

lsf.str("package:Seurat")
AddAzimuthResults : function (object = NULL, filename)  
AddMetaData : function (object, metadata, col.name = NULL)  
AddModuleScore : function (object, features, pool = NULL, nbin = 24, ctrl = 100, k = FALSE, assay = NULL, 
    name = "Cluster", seed = 1, search = FALSE, ...)  
AggregateExpression : function (object, assays = NULL, features = NULL, return.seurat = FALSE, group.by = "ident", 
    add.ident = NULL, slot = "data", verbose = TRUE, ...)  
AnnotateAnchors : function (anchors, vars, slot, ...)  
as.CellDataSet : function (x, ...)  
as.Graph : function (x, ...)  
as.Neighbor : function (x, ...)  
as.Seurat : function (x, ...)  
as.SingleCellExperiment : function (x, ...)  
as.sparse : function (x, ...)  
Assays : function (object, slot = NULL)  
AugmentPlot : function (plot, width = 10, height = 10, dpi = 100)  
AverageExpression : function (object, assays = NULL, features = NULL, return.seurat = FALSE, group.by = "ident", 
    add.ident = NULL, slot = "data", verbose = TRUE, ...)  
BarcodeInflectionsPlot : function (object)  
BGTextColor : function (background, threshold = 186, w3c = FALSE, dark = "black", light = "white")  
BlackAndWhite : function (mid = NULL, k = 50)  
BlueAndRed : function (k = 50)  
BoldTitle : function (...)  
BuildClusterTree : function (object, assay = NULL, features = NULL, dims = NULL, reduction = "pca", graph = NULL, 
    slot = "data", reorder = FALSE, reorder.numeric = FALSE, verbose = TRUE)  
CalcPerturbSig : function (object, assay = NULL, features = NULL, slot = "data", gd.class = "guide_ID", 
    nt.cell.class = "NT", split.by = NULL, num.neighbors = NULL, reduction = "pca", 
    ndims = 15, new.assay.name = "PRTB", verbose = TRUE)  
CalculateBarcodeInflections : function (object, barcode.column = "nCount_RNA", group.column = "orig.ident", threshold.low = NULL, 
    threshold.high = NULL)  
CaseMatch : function (search, match)  
CellCycleScoring : function (object, s.features, g2m.features, ctrl = NULL, set.ident = FALSE, ...)  
Cells : function (x)  
CellsByIdentities : function (object, idents = NULL, cells = NULL, return.null = FALSE)  
CellScatter : function (object, cell1, cell2, features = NULL, highlight = NULL, cols = NULL, pt.size = 1, 
    smooth = FALSE, raster = NULL)  
CellSelector : function (plot, object = NULL, ident = "SelectedCells", ...)  
CenterTitle : function (...)  
CollapseEmbeddingOutliers : function (object, reduction = "umap", dims = 1:2, group.by = "ident", outlier.sd = 2, 
    reduction.key = "UMAP_")  
CollapseSpeciesExpressionMatrix : function (object, prefix = "HUMAN_", controls = "MOUSE_", ncontrols = 100)  
ColorDimSplit : function (object, node, left.color = "red", right.color = "blue", other.color = "grey50", 
    ...)  
CombinePlots : function (plots, ncol = NULL, legend = NULL, ...)  
Command : function (object, ...)  
CreateAssayObject : function (counts, data, min.cells = 0, min.features = 0, ...)  
CreateDimReducObject : function (embeddings = new(Class = "matrix"), loadings = new(Class = "matrix"), projected = new(Class = "matrix"), 
    assay = NULL, stdev = numeric(), key = NULL, global = FALSE, jackstraw = NULL, 
    misc = list())  
CreateSCTAssayObject : function (counts, data, scale.data = NULL, umi.assay = "RNA", min.cells = 0, min.features = 0, 
    SCTModel.list = NULL)  
CreateSeuratObject : function (counts, project = "CreateSeuratObject", assay = "RNA", names.field = 1, names.delim = "_", 
    meta.data = NULL, ...)  
CustomDistance : function (my.mat, my.function, ...)  
CustomPalette : function (low = "white", high = "red", mid = NULL, k = 50)  
DarkTheme : function (...)  
DEenrichRPlot : function (object, ident.1 = NULL, ident.2 = NULL, balanced = TRUE, logfc.threshold = 0.25, 
    assay = NULL, max.genes, test.use = "wilcox", p.val.cutoff = 0.05, cols = NULL, 
    enrich.database = NULL, num.pathway = 10, return.gene.list = FALSE, ...)  
DefaultAssay : function (object, ...)  
DefaultAssay<- : function (object, ..., value)  
DietSeurat : function (object, counts = TRUE, data = TRUE, scale.data = FALSE, features = NULL, 
    assays = NULL, dimreducs = NULL, graphs = NULL)  
DimHeatmap : function (object, dims = 1, nfeatures = 30, cells = NULL, reduction = "pca", disp.min = -2.5, 
    disp.max = NULL, balanced = TRUE, projected = FALSE, ncol = NULL, fast = TRUE, 
    raster = TRUE, slot = "scale.data", assays = NULL, combine = TRUE)  
DimPlot : function (object, dims = c(1, 2), cells = NULL, cols = NULL, pt.size = NULL, reduction = NULL, 
    group.by = NULL, split.by = NULL, shape.by = NULL, order = NULL, shuffle = FALSE, 
    seed = 1, label = FALSE, label.size = 4, label.color = "black", label.box = FALSE, 
    repel = FALSE, cells.highlight = NULL, cols.highlight = "#DE2D26", sizes.highlight = 1, 
    na.value = "grey50", ncol = NULL, combine = TRUE, raster = NULL)  
DiscretePalette : function (n, palette = NULL)  
Distances : function (object, ...)  
DoHeatmap : function (object, features = NULL, cells = NULL, group.by = "ident", group.bar = TRUE, 
    group.colors = NULL, disp.min = -2.5, disp.max = NULL, slot = "scale.data", assay = NULL, 
    label = TRUE, size = 5.5, hjust = 0, angle = 45, raster = TRUE, draw.lines = TRUE, 
    lines.width = NULL, group.bar.height = 0.02, combine = TRUE)  
DotPlot : function (object, assay = NULL, features, cols = c("lightgrey", "blue"), col.min = -2.5, 
    col.max = 2.5, dot.min = 0, dot.scale = 6, idents = NULL, group.by = NULL, split.by = NULL, 
    cluster.idents = FALSE, scale = TRUE, scale.by = "radius", scale.min = NA, scale.max = NA)  
ElbowPlot : function (object, ndims = 20, reduction = "pca")  
Embeddings : function (object, ...)  
ExpMean : function (x, ...)  
ExpSD : function (x)  
ExpVar : function (x)  
FastRowScale : function (mat, center = TRUE, scale = TRUE, scale_max = 10)  
FeatureLocator : function (plot, ...)  
FeaturePlot : function (object, features, dims = c(1, 2), cells = NULL, cols = if (blend) {
    c("lightgrey", "#ff0000", "#00ff00")
} else {
    c("lightgrey", "blue")
}, pt.size = NULL, order = FALSE, min.cutoff = NA, max.cutoff = NA, reduction = NULL, 
    split.by = NULL, keep.scale = "feature", shape.by = NULL, slot = "data", blend = FALSE, 
    blend.threshold = 0.5, label = FALSE, label.size = 4, repel = FALSE, ncol = NULL, 
    coord.fixed = FALSE, by.col = TRUE, sort.cell = NULL, interactive = FALSE, combine = TRUE, 
    raster = NULL)  
FeatureScatter : function (object, feature1, feature2, cells = NULL, shuffle = FALSE, seed = 1, group.by = NULL, 
    cols = NULL, pt.size = 1, shape.by = NULL, span = NULL, smooth = FALSE, combine = TRUE, 
    slot = "data", plot.cor = TRUE, raster = NULL, jitter = TRUE)  
FetchData : function (object, vars, cells = NULL, slot = "data")  
FilterSlideSeq : function (object, image = "image", center = NULL, radius = NULL, do.plot = TRUE)  
FindAllMarkers : function (object, assay = NULL, features = NULL, logfc.threshold = 0.25, test.use = "wilcox", 
    slot = "data", min.pct = 0.1, min.diff.pct = -Inf, node = NULL, verbose = TRUE, 
    only.pos = FALSE, max.cells.per.ident = Inf, random.seed = 1, latent.vars = NULL, 
    min.cells.feature = 3, min.cells.group = 3, pseudocount.use = 1, mean.fxn = NULL, 
    fc.name = NULL, base = 2, return.thresh = 0.01, densify = FALSE, ...)  
FindClusters : function (object, ...)  
FindConservedMarkers : function (object, ident.1, ident.2 = NULL, grouping.var, assay = "RNA", slot = "data", 
    meta.method = metap::minimump, verbose = TRUE, ...)  
FindIntegrationAnchors : function (object.list = NULL, assay = NULL, reference = NULL, anchor.features = 2000, 
    scale = TRUE, normalization.method = c("LogNormalize", "SCT"), sct.clip.range = NULL, 
    reduction = c("cca", "rpca", "rlsi"), l2.norm = TRUE, dims = 1:30, k.anchor = 5, 
    k.filter = 200, k.score = 30, max.features = 200, nn.method = "annoy", n.trees = 50, 
    eps = 0, verbose = TRUE)  
FindMarkers : function (object, ...)  
FindMultiModalNeighbors : function (object, reduction.list, dims.list, k.nn = 20, l2.norm = TRUE, knn.graph.name = "wknn", 
    snn.graph.name = "wsnn", weighted.nn.name = "weighted.nn", modality.weight.name = NULL, 
    knn.range = 200, prune.SNN = 1/15, sd.scale = 1, cross.contant.list = NULL, smooth = FALSE, 
    return.intermediate = FALSE, modality.weight = NULL, verbose = TRUE)  
FindNeighbors : function (object, ...)  
FindSpatiallyVariableFeatures : function (object, ...)  
FindSubCluster : function (object, cluster, graph.name, subcluster.name = "sub.cluster", resolution = 0.5, 
    algorithm = 1)  
FindTransferAnchors : function (reference, query, normalization.method = "LogNormalize", recompute.residuals = TRUE, 
    reference.assay = NULL, reference.neighbors = NULL, query.assay = NULL, reduction = "pcaproject", 
    reference.reduction = NULL, project.query = FALSE, features = NULL, scale = TRUE, 
    npcs = 30, l2.norm = TRUE, dims = 1:30, k.anchor = 5, k.filter = 200, k.score = 30, 
    max.features = 200, nn.method = "annoy", n.trees = 50, eps = 0, approx.pca = TRUE, 
    mapping.score.k = NULL, verbose = TRUE)  
FindVariableFeatures : function (object, ...)  
FoldChange : function (object, ...)  
FontSize : function (x.text = NULL, y.text = NULL, x.title = NULL, y.title = NULL, main = NULL, 
    ...)  
GeneSymbolThesarus : function (symbols, timeout = 10, several.ok = FALSE, search.types = c("alias_symbol", 
    "prev_symbol"), verbose = TRUE, ...)  
GetAssay : function (object, ...)  
GetAssayData : function (object, slot, ...)  
GetImage : function (object, mode = c("grob", "raster", "plotly", "raw"), ...)  
GetIntegrationData : function (object, integration.name, slot)  
GetResidual : function (object, features, assay = NULL, umi.assay = NULL, clip.range = NULL, replace.value = FALSE, 
    na.rm = TRUE, verbose = TRUE)  
GetTissueCoordinates : function (object, ...)  
GetTransferPredictions : function (object, assay = "predictions", slot = "data", score.filter = 0.75)  
GroupCorrelation : function (object, assay = NULL, slot = "scale.data", var = NULL, group.assay = NULL, 
    min.cells = 5, ngroups = 6, do.plot = TRUE)  
GroupCorrelationPlot : function (object, assay = NULL, feature.group = "feature.grp", cor = "nCount_RNA_cor")  
HoverLocator : function (plot, information = NULL, axes = TRUE, dark.theme = FALSE, ...)  
HTODemux : function (object, assay = "HTO", positive.quantile = 0.99, init = NULL, nstarts = 100, 
    kfunc = "clara", nsamples = 100, seed = 42, verbose = TRUE)  
HTOHeatmap : function (object, assay = "HTO", classification = paste0(assay, "_classification"), 
    global.classification = paste0(assay, "_classification.global"), ncells = 5000, 
    singlet.names = NULL, raster = TRUE)  
HVFInfo : function (object, selection.method, status = FALSE, ...)  
Idents : function (object, ...)  
Idents<- : function (object, ..., value)  
IFeaturePlot : function (object, feature, dims = c(1, 2), reduction = NULL, slot = "data")  
Images : function (object, assay = NULL)  
Index : function (object, ...)  
Index<- : function (object, ..., value)  
Indices : function (object, ...)  
IntegrateData : function (anchorset, new.assay.name = "integrated", normalization.method = c("LogNormalize", 
    "SCT"), features = NULL, features.to.integrate = NULL, dims = 1:30, k.weight = 100, 
    weight.reduction = NULL, sd.weight = 1, sample.tree = NULL, preserve.order = FALSE, 
    eps = 0, verbose = TRUE)  
IntegrateEmbeddings : function (anchorset, ...)  
Intensity : function (color)  
IsGlobal : function (object, ...)  
ISpatialDimPlot : function (object, image = NULL, group.by = NULL, alpha = c(0.3, 1))  
ISpatialFeaturePlot : function (object, feature, image = NULL, slot = "data", alpha = c(0.1, 1))  
JackStraw : function (object, reduction = "pca", assay = NULL, dims = 20, num.replicate = 100, 
    prop.freq = 0.01, verbose = TRUE, maxit = 1000)  
JackStrawPlot : function (object, dims = 1:5, cols = NULL, reduction = "pca", xmax = 0.1, ymax = 0.3)  
JS : function (object, ...)  
JS<- : function (object, ..., value)  
Key : function (object, ...)  
Key<- : function (object, ..., value)  
L2CCA : function (object, ...)  
L2Dim : function (object, reduction, new.dr = NULL, new.key = NULL)  
LabelClusters : function (plot, id, clusters = NULL, labels = NULL, split.by = NULL, repel = TRUE, 
    box = FALSE, geom = "GeomPoint", position = "median", ...)  
LabelPoints : function (plot, points, labels = NULL, repel = FALSE, xnudge = 0.3, ynudge = 0.05, 
    ...)  
LinkedDimPlot : function (object, dims = 1:2, reduction = NULL, image = NULL, group.by = NULL, alpha = c(0.1, 
    1), combine = TRUE)  
LinkedFeaturePlot : function (object, feature, dims = 1:2, reduction = NULL, image = NULL, slot = "data", 
    alpha = c(0.1, 1), combine = TRUE)  
Load10X_Spatial : function (data.dir, filename = "filtered_feature_bc_matrix.h5", assay = "Spatial", 
    slice = "slice1", filter.matrix = TRUE, to.upper = FALSE, image = NULL, ...)  
LoadAnnoyIndex : function (object, file)  
Loadings : function (object, ...)  
Loadings<- : function (object, ..., value)  
LoadSTARmap : function (data.dir, counts.file = "cell_barcode_count.csv", gene.file = "genes.csv", 
    qhull.file = "qhulls.tsv", centroid.file = "centroids.tsv", assay = "Spatial", 
    image = "image")  
LocalStruct : function (object, grouping.var, idents = NULL, neighbors = 100, reduction = "pca", 
    reduced.dims = 1:10, orig.dims = 1:10, verbose = TRUE)  
LogNormalize : function (data, scale.factor = 10000, verbose = TRUE)  
LogSeuratCommand : function (object, return.command = FALSE)  
LogVMR : function (x, ...)  
Luminance : function (color)  
MappingScore : function (anchors, ...)  
MapQuery : function (anchorset, query, reference, refdata = NULL, new.reduction.name = NULL, reference.reduction = NULL, 
    reference.dims = NULL, query.dims = NULL, reduction.model = NULL, transferdata.args = list(), 
    integrateembeddings.args = list(), projectumap.args = list(), verbose = TRUE)  
MetaFeature : function (object, features, meta.name = "metafeature", cells = NULL, assay = NULL, 
    slot = "data")  
MinMax : function (data, min, max)  
Misc : function (object, ...)  
Misc<- : function (object, ..., value)  
MixingMetric : function (object, grouping.var, reduction = "pca", dims = 1:2, k = 5, max.k = 300, 
    eps = 0, verbose = TRUE)  
MixscapeHeatmap : function (object, ident.1 = NULL, ident.2 = NULL, balanced = TRUE, logfc.threshold = 0.25, 
    assay = "RNA", max.genes = 100, test.use = "wilcox", max.cells.group = NULL, order.by.prob = TRUE, 
    group.by = NULL, mixscape.class = "mixscape_class", prtb.type = "KO", fc.name = "avg_log2FC", 
    pval.cutoff = 0.05, ...)  
MixscapeLDA : function (object, assay = NULL, ndims.print = 1:5, nfeatures.print = 30, reduction.key = "LDA_", 
    seed = 42, pc.assay = "PRTB", labels = "gene", nt.label = "NT", npcs = 10, verbose = TRUE, 
    logfc.threshold = 0.25)  
MULTIseqDemux : function (object, assay = "HTO", quantile = 0.7, autoThresh = FALSE, maxiter = 5, qrange = seq(from = 0.1, 
    to = 0.9, by = 0.05), verbose = TRUE)  
Neighbors : function (object, slot = NULL)  
NNPlot : function (object, reduction, nn.idx, query.cells, dims = 1:2, label = FALSE, label.size = 4, 
    repel = FALSE, sizes.highlight = 2, pt.size = 1, cols.highlight = c("#377eb8", 
        "#e41a1c"), na.value = "#bdbdbd", order = c("self", "neighbors", "other"), 
    show.all.cells = TRUE, ...)  
NoAxes : function (..., keep.text = FALSE, keep.ticks = FALSE)  
NoGrid : function (...)  
NoLegend : function (...)  
NormalizeData : function (object, ...)  
PCAPlot : function (object, ...)  
PCASigGenes : function (object, pcs.use, pval.cut = 0.1, use.full = FALSE, max.per.pc = NULL)  
PCHeatmap : function (object, ...)  
PercentageFeatureSet : function (object, pattern = NULL, features = NULL, col.name = NULL, assay = NULL)  
PlotClusterTree : function (object, direction = "downwards", ...)  
PlotPerturbScore : function (object, target.gene.class = "gene", target.gene.ident = NULL, mixscape.class = "mixscape_class", 
    col = "orange2", split.by = NULL, before.mixscape = FALSE, prtb.type = "KO")  
PolyDimPlot : function (object, group.by = NULL, cells = NULL, poly.data = "spatial", flip.coords = FALSE)  
PolyFeaturePlot : function (object, features, cells = NULL, poly.data = "spatial", ncol = ceiling(x = length(x = features)/2), 
    min.cutoff = 0, max.cutoff = NA, common.scale = TRUE, flip.coords = FALSE)  
PredictAssay : function (object, nn.idx, assay, reduction = NULL, dims = NULL, return.assay = TRUE, 
    slot = "scale.data", features = NULL, mean.function = rowMeans, seed = 4273, verbose = TRUE)  
PrepLDA : function (object, de.assay = "RNA", pc.assay = "PRTB", labels = "gene", nt.label = "NT", 
    npcs = 10, verbose = TRUE, logfc.threshold = 0.25)  
PrepSCTIntegration : function (object.list, assay = NULL, anchor.features = 2000, sct.clip.range = NULL, 
    verbose = TRUE)  
Project : function (object, ...)  
Project<- : function (object, ..., value)  
ProjectDim : function (object, reduction = "pca", assay = NULL, dims.print = 1:5, nfeatures.print = 20, 
    overwrite = FALSE, do.center = FALSE, verbose = TRUE)  
ProjectUMAP : function (query, ...)  
PurpleAndYellow : function (k = 50)  
Radius : function (object)  
Read10X : function (data.dir, gene.column = 2, cell.column = 1, unique.features = TRUE, strip.suffix = FALSE)  
Read10X_h5 : function (filename, use.names = TRUE, unique.features = TRUE)  
Read10X_Image : function (image.dir, image.name = "tissue_lowres_image.png", filter.matrix = TRUE, 
    ...)  
ReadMtx : function (mtx, cells, features, cell.column = 1, feature.column = 2, cell.sep = "\t", 
    feature.sep = "\t", skip.cell = 0, skip.feature = 0, mtx.transpose = FALSE, unique.features = TRUE, 
    strip.suffix = FALSE)  
ReadParseBio : function (data.dir, ...)  
ReadSlideSeq : function (coord.file, assay = "Spatial")  
ReadSTARsolo : function (data.dir, ...)  
Reductions : function (object, slot = NULL)  
RegroupIdents : function (object, metadata)  
RelativeCounts : function (data, scale.factor = 1, verbose = TRUE)  
RenameCells : function (object, ...)  
RenameIdents : function (object, ...)  
ReorderIdent : function (object, var, ...)  
RestoreLegend : function (..., position = "right")  
RidgePlot : function (object, features, cols = NULL, idents = NULL, sort = FALSE, assay = NULL, 
    group.by = NULL, y.max = NULL, same.y.lims = FALSE, log = FALSE, ncol = NULL, slot = "data", 
    stack = FALSE, combine = TRUE, fill.by = "feature")  
RotatedAxis : function (...)  
RowMergeSparseMatrices : function (mat1, mat2)  
RunCCA : function (object1, object2, ...)  
RunICA : function (object, ...)  
RunLDA : function (object, ...)  
RunMarkVario : function (spatial.location, data, ...)  
RunMixscape : function (object, assay = "PRTB", slot = "scale.data", labels = "gene", nt.class.name = "NT", 
    new.class.name = "mixscape_class", min.de.genes = 5, min.cells = 5, de.assay = "RNA", 
    logfc.threshold = 0.25, iter.num = 10, verbose = FALSE, split.by = NULL, fine.mode = FALSE, 
    fine.mode.labels = "guide_ID", prtb.type = "KO")  
RunMoransI : function (data, pos, verbose = TRUE)  
RunPCA : function (object, ...)  
RunSPCA : function (object, ...)  
RunTSNE : function (object, ...)  
RunUMAP : function (object, ...)  
SampleUMI : function (data, max.umi = 1000, upsample = FALSE, verbose = FALSE)  
SaveAnnoyIndex : function (object, file)  
ScaleData : function (object, ...)  
scalefactors : function (spot, fiducial, hires, lowres)  
ScaleFactors : function (object, ...)  
ScoreJackStraw : function (object, ...)  
SCTransform : function (object, assay = "RNA", new.assay.name = "SCT", reference.SCT.model = NULL, 
    do.correct.umi = TRUE, ncells = 5000, residual.features = NULL, variable.features.n = 3000, 
    variable.features.rv.th = 1.3, vars.to.regress = NULL, do.scale = FALSE, do.center = TRUE, 
    clip.range = c(-sqrt(x = ncol(x = object[[assay]])/30), sqrt(x = ncol(x = object[[assay]])/30)), 
    conserve.memory = FALSE, return.only.var.genes = TRUE, seed.use = 1448145, verbose = TRUE, 
    ...)  
SCTResults : function (object, ...)  
SCTResults<- : function (object, ..., value)  
SelectIntegrationFeatures : function (object.list, nfeatures = 2000, assay = NULL, verbose = TRUE, fvf.nfeatures = 2000, 
    ...)  
SetAssayData : function (object, slot, new.data, ...)  
SetIdent : function (object, ...)  
SetIntegrationData : function (object, integration.name, slot, new.data)  
SeuratAxes : function (...)  
SeuratTheme : function ()  
SpatialDimPlot : function (object, group.by = NULL, images = NULL, cols = NULL, crop = TRUE, cells.highlight = NULL, 
    cols.highlight = c("#DE2D26", "grey50"), facet.highlight = FALSE, label = FALSE, 
    label.size = 7, label.color = "white", repel = FALSE, ncol = NULL, combine = TRUE, 
    pt.size.factor = 1.6, alpha = c(1, 1), image.alpha = 1, stroke = 0.25, label.box = TRUE, 
    interactive = FALSE, information = NULL)  
SpatialFeaturePlot : function (object, features, images = NULL, crop = TRUE, slot = "data", min.cutoff = NA, 
    max.cutoff = NA, ncol = NULL, combine = TRUE, pt.size.factor = 1.6, alpha = c(1, 
        1), image.alpha = 1, stroke = 0.25, interactive = FALSE, information = NULL)  
SpatiallyVariableFeatures : function (object, selection.method, ...)  
SpatialPlot : function (object, group.by = NULL, features = NULL, images = NULL, cols = NULL, image.alpha = 1, 
    crop = TRUE, slot = "data", min.cutoff = NA, max.cutoff = NA, cells.highlight = NULL, 
    cols.highlight = c("#DE2D26", "grey50"), facet.highlight = FALSE, label = FALSE, 
    label.size = 5, label.color = "white", label.box = TRUE, repel = FALSE, ncol = NULL, 
    combine = TRUE, pt.size.factor = 1.6, alpha = c(1, 1), stroke = 0.25, interactive = FALSE, 
    do.identify = FALSE, identify.ident = NULL, do.hover = FALSE, information = NULL)  
SpatialTheme : function (...)  
SplitObject : function (object, split.by = "ident")  
StashIdent : function (object, save.name, ...)  
Stdev : function (object, ...)  
SubsetByBarcodeInflections : function (object)  
SVFInfo : function (object, selection.method, status, ...)  
Tool : function (object, ...)  
Tool<- : function (object, ..., value)  
TopCells : function (object, dim = 1, ncells = 20, balanced = FALSE, ...)  
TopFeatures : function (object, dim = 1, nfeatures = 20, projected = FALSE, balanced = FALSE, ...)  
TopNeighbors : function (object, cell, n = 5)  
TransferData : function (anchorset, refdata, reference = NULL, query = NULL, weight.reduction = "pcaproject", 
    l2.norm = FALSE, dims = NULL, k.weight = 50, sd.weight = 1, eps = 0, n.trees = 50, 
    verbose = TRUE, slot = "data", prediction.assay = FALSE, store.weights = TRUE)  
TSNEPlot : function (object, ...)  
UMAPPlot : function (object, ...)  
UpdateSCTAssays : function (object)  
UpdateSeuratObject : function (object)  
UpdateSymbolList : function (symbols, timeout = 10, several.ok = FALSE, verbose = TRUE, ...)  
VariableFeaturePlot : function (object, cols = c("black", "red"), pt.size = 1, log = NULL, selection.method = NULL, 
    assay = NULL, raster = NULL)  
VariableFeatures : function (object, selection.method = NULL, ...)  
VariableFeatures<- : function (object, ..., value)  
VizDimLoadings : function (object, dims = 1:5, nfeatures = 30, col = "blue", reduction = "pca", projected = FALSE, 
    balanced = FALSE, ncol = NULL, combine = TRUE)  
VlnPlot : function (object, features, cols = NULL, pt.size = NULL, idents = NULL, sort = FALSE, 
    assay = NULL, group.by = NULL, split.by = NULL, adjust = 1, y.max = NULL, same.y.lims = FALSE, 
    log = FALSE, ncol = NULL, slot = "data", split.plot = FALSE, stack = FALSE, combine = TRUE, 
    fill.by = "feature", flip = FALSE)  
WhichCells : function (object, ...)  
WhiteBackground : function (...)  

sessionInfo()
R version 4.0.4 (2021-02-15)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19043)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] parallel  stats4    stats     graphics  grDevices utils     datasets  methods  
[9] base     

other attached packages:
[1] pbmc3k.SeuratData_3.1.4 Seurat_4.0.4            SeuratObject_4.0.2     
[4] GenomicRanges_1.42.0    GenomeInfoDb_1.26.7     IRanges_2.24.1         
[7] S4Vectors_0.28.1        BiocGenerics_0.36.1    

loaded via a namespace (and not attached):
  [1] Rtsne_0.15               colorspace_2.0-0         deldir_0.2-10           
  [4] ellipsis_0.3.2           ggridges_0.5.3           XVector_0.30.0          
  [7] spatstat.data_2.1-0      leiden_0.3.9             listenv_0.8.0           
 [10] ggrepel_0.9.1            SeuratData_0.2.1         fansi_0.5.0             
 [13] codetools_0.2-18         splines_4.0.4            polyclip_1.10-0         
 [16] jsonlite_1.7.2           pbmcsca.SeuratData_3.0.0 ica_1.0-2               
 [19] cluster_2.1.2            png_0.1-7                uwot_0.1.10             
 [22] shiny_1.7.0              sctransform_0.3.2        spatstat.sparse_2.0-0   
 [25] compiler_4.0.4           httr_1.4.2               assertthat_0.2.1        
 [28] Matrix_1.3-4             fastmap_1.1.0            lazyeval_0.2.2          
 [31] cli_3.0.1                later_1.3.0              htmltools_0.5.2         
 [34] tools_4.0.4              igraph_1.2.6             gtable_0.3.0            
 [37] glue_1.4.2               GenomeInfoDbData_1.2.4   RANN_2.6.1              
 [40] reshape2_1.4.4           dplyr_1.0.7              rappdirs_0.3.3          
 [43] Rcpp_1.0.7               scattermore_0.7          vctrs_0.3.8             
 [46] nlme_3.1-152             lmtest_0.9-38            stringr_1.4.0           
 [49] globals_0.14.0           mime_0.11                miniUI_0.1.1.1          
 [52] lifecycle_1.0.0          irlba_2.3.3              goftest_1.2-2           
 [55] future_1.22.1            zlibbioc_1.36.0          MASS_7.3-53.1           
 [58] zoo_1.8-9                scales_1.1.1             spatstat.core_2.3-0     
 [61] promises_1.2.0.1         spatstat.utils_2.2-0     RColorBrewer_1.1-2      
 [64] reticulate_1.21          pbapply_1.5-0            gridExtra_2.3           
 [67] ggplot2_3.3.5            rpart_4.1-15             stringi_1.7.4           
 [70] panc8.SeuratData_3.0.2   rlang_0.4.10             pkgconfig_2.0.3         
 [73] matrixStats_0.60.1       bitops_1.0-7             lattice_0.20-41         
 [76] ROCR_1.0-11              purrr_0.3.4              tensor_1.5              
 [79] patchwork_1.1.1          htmlwidgets_1.5.4        cowplot_1.1.1           
 [82] tidyselect_1.1.1         parallelly_1.28.1        RcppAnnoy_0.0.19        
 [85] plyr_1.8.6               magrittr_2.0.1           R6_2.5.1                
 [88] generics_0.1.0           DBI_1.1.1                pillar_1.6.2            
 [91] mgcv_1.8-33              fitdistrplus_1.1-5       survival_3.2-13         
 [94] abind_1.4-5              RCurl_1.98-1.5           tibble_3.1.2            
 [97] future.apply_1.8.1       crayon_1.4.1             KernSmooth_2.23-20      
[100] utf8_1.2.1               spatstat.geom_2.2-2      plotly_4.9.4.1          
[103] grid_4.0.4               data.table_1.14.0        digest_0.6.27           
[106] xtable_1.8-4             tidyr_1.1.3              httpuv_1.6.3            
[109] munsell_0.5.0            viridisLite_0.4.0   
samuel-marsh commented 3 years ago

Hi,

Not member of dev team but hopefully can be helpful. merge is in SeuratObject package so need to call that in code instead of Seurat SeuratObject::merge

Also unless you have another package with merge function that is masking SeuratObject no need for :: at all as SeuratObject is attached by default when loading Seurat.

Best, Sam

wht10 commented 3 years ago

Hey Sam,

Thanks for pointing that out, but it still returns the same error. I am explicitly defining the package because I wanted to show it wasn't a package overlap issue.

`` library(Seurat) pbmc_small <- pbmc_small SeuratData::InstallData("pbmc3k") data("pbmc3k") SeuratObject::merge(pbmc_small,pbmc3k, add.cell.ids = c("small","3K"))

wht10 commented 3 years ago

Hey Sam,

Thanks for pointing that out. I still get the same error when I specify the SeuratObject package. I am explicitly using the SeuratObject package to show it isn't a package overlap issue.

library(Seurat)
pbmc_small <- pbmc_small
SeuratData::InstallData("pbmc3k")
data("pbmc3k")
SeuratObject::merge(pbmc_small,pbmc3k, add.cell.ids = c("small","3K"))
Error: 'merge' is not an exported object from 'namespace:SeuratObject'

lsf.str("package:SeuratObject")
%||% : function (x, y)  
%iff% : function (x, y)  
AddMetaData : function (object, metadata, col.name = NULL)  
as.Graph : function (x, ...)  
as.Neighbor : function (x, ...)  
as.Seurat : function (x, ...)  
as.sparse : function (x, ...)  
Assays : function (object, slot = NULL)  
AttachDeps : function (deps)  
Cells : function (x)  
CellsByIdentities : function (object, idents = NULL, cells = NULL, return.null = FALSE)  
CheckGC : function (option = "SeuratObject.memsafe")  
colMeans : Formal class 'standardGeneric' [package "methods"] with 8 slots
colSums : Formal class 'standardGeneric' [package "methods"] with 8 slots
Command : function (object, ...)  
CreateAssayObject : function (counts, data, min.cells = 0, min.features = 0, ...)  
CreateDimReducObject : function (embeddings = new(Class = "matrix"), loadings = new(Class = "matrix"), projected = new(Class = "matrix"), 
    assay = NULL, stdev = numeric(), key = NULL, global = FALSE, jackstraw = NULL, 
    misc = list())  
CreateSeuratObject : function (counts, project = "CreateSeuratObject", assay = "RNA", names.field = 1, names.delim = "_", 
    meta.data = NULL, ...)  
DefaultAssay : function (object, ...)  
DefaultAssay<- : function (object, ..., value)  
Distances : function (object, ...)  
Embeddings : function (object, ...)  
FetchData : function (object, vars, cells = NULL, slot = "data")  
GetAssayData : function (object, slot, ...)  
GetImage : function (object, mode = c("grob", "raster", "plotly", "raw"), ...)  
GetTissueCoordinates : function (object, ...)  
Graphs : function (object, slot = NULL)  
HVFInfo : function (object, selection.method, status = FALSE, ...)  
Idents : function (object, ...)  
Idents<- : function (object, ..., value)  
Images : function (object, assay = NULL)  
Index : function (object, ...)  
Index<- : function (object, ..., value)  
Indices : function (object, ...)  
IsGlobal : function (object, ...)  
IsMatrixEmpty : function (x)  
IsS4List : function (x)  
JS : function (object, ...)  
JS<- : function (object, ..., value)  
Key : function (object, ...)  
Key<- : function (object, ..., value)  
ListToS4 : function (x)  
Loadings : function (object, ...)  
Loadings<- : function (object, ..., value)  
LogSeuratCommand : function (object, return.command = FALSE)  
Misc : function (object, ...)  
Misc<- : function (object, ..., value)  
Neighbors : function (object, slot = NULL)  
Project : function (object, ...)  
Project<- : function (object, ..., value)  
Radius : function (object)  
Reductions : function (object, slot = NULL)  
RenameAssays : function (object, ...)  
RenameCells : function (object, ...)  
RenameIdents : function (object, ...)  
ReorderIdent : function (object, var, ...)  
rowMeans : Formal class 'standardGeneric' [package "methods"] with 8 slots
RowMergeSparseMatrices : function (mat1, mat2)  
rowSums : Formal class 'standardGeneric' [package "methods"] with 8 slots
S4ToList : function (object)  
SetAssayData : function (object, slot, new.data, ...)  
SetIdent : function (object, ...)  
show : Formal class 'standardGeneric' [package "methods"] with 8 slots
SpatiallyVariableFeatures : function (object, selection.method, ...)  
StashIdent : function (object, save.name, ...)  
Stdev : function (object, ...)  
SVFInfo : function (object, selection.method, status, ...)  
Tool : function (object, ...)  
Tool<- : function (object, ..., value)  
UpdateSeuratObject : function (object)  
VariableFeatures : function (object, selection.method = NULL, ...)  
VariableFeatures<- : function (object, ..., value)  
Version : function (object, ...)  
WhichCells : function (object, ...)  
samuel-marsh commented 3 years ago

Hi,

I would first try restarting R and loading Seurat again.

then I would replace this in code as I also just realized the merge you have there isn’t saving back to environment.

merged_obj <- merge(pbmc_small,pbmc3k, add.cell.ids = c("small","3K"))

let me know if that works.

best, Sam

wht10 commented 3 years ago

Hey Sam,

It still returns the same error.

library(Seurat)
pbmc_small <- pbmc_small
SeuratData::InstallData("pbmc3k")
data("pbmc3k")
pbmc3k <- pbmc3k.SeuratData::pbmc3k
merged_obj <- SeuratObject::merge(pbmc_small,pbmc3k, add.cell.ids = c("small","3K"))

Error: 'merge' is not an exported object from 'namespace:SeuratObject'
samuel-marsh commented 3 years ago

Try without the :: call.

samuel-marsh commented 3 years ago

Due to the way in which merge function in SeuratObject functions

timoast commented 3 years ago

merge is a function in base R, not Seurat. We define a custom merge method for the Seurat object class, but the function that's being called first is the function from base R not Seurat. Removing the :: will solve this issue.

samuel-marsh commented 3 years ago

Yes what @timoast said. Brain broke when I said to use SeuratObject:: at first.