Skip to content

Tutorial R code broken #12

Description

@ndaniel

The following R code from the SPATA2 tutorial -- Copy Number Variations (CNV) https://themilolab.github.io/SPATA2/articles/cnv.html

# load required packages
library(SPATA2)
library(SPATAData)
library(tidyverse)

# load SPATA2 object
object_t269 <- downloadSpataObject(sample_name = "UKF269T")

# alternatively, use diet version (results might differ slightly)
object_t269 <- loadExampleObject(sample_name = "UKF269T")

# only histology
plotSurface(object, = object_t269, pt_alpha = 0)

# histological grouping
plotSurface(object = object_t269, color_by = "histology")

shows this error

Error in `dplyr::select()`:
ℹ In argument: `dplyr::all_of(vars)`.
Caused by error in `dplyr::all_of()`:
! Can't subset elements that don't exist.
✖ Element `histology` doesn't exist.

due to missing the histology annotation.
Also there is a typo object, = object_t269 should be object = object_t269.

Running this:

library(SPATA2)
library(tidyverse)

obj <- loadExampleObject("UKF269T", process = TRUE, meta = TRUE)
getSpatAnnIds(obj)

shows this

character(0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions