getting error when transfer labels for my scRNAseq data using FindTransferAnchors
1
0
Entering edit mode
7 months ago
Sara ▴ 260

I am trying to use FindTransferAnchorsfor label transfer. I normalized my scRNAseq data using LogNormalizeand got the reference for cell labelingfrom Azimuth. I used the following codes in R to transfer labels:

alldata <- readRDS("clustered_data.rds")
sample1<- alldata[, alldata$orig.ident == "sample1"]

reference <- readRDS('labelling_reference_azimuth/ref.Rds')
sample1 <- SetIdent(sample1, value = "CCA.0.5")

sample1 <- sample1 %>%
    NormalizeData() %>%
    FindVariableFeatures() %>%
    ScaleData() %>%
    RunPCA(verbose = F) %>%
    RunUMAP(dims = 1:30)

transfer.anchors <- FindTransferAnchors(reference = reference, query = sample1, dims = 1:30)

when I run the last command I will get this error:

Error: An SCT assay (refAssay) was provided for reference.assay but normalization.method was set as LogNormalize.

do you know how I can solve the problem?

scRNAseq • 618 views
ADD COMMENT
1
Entering edit mode
7 months ago
fracarb8 ★ 1.7k

The message is self explanatory: The reference and the query have been normalised differently. One with SCT and the other with LogNormalise.

Either use SCT when processing sample1 or set DefaultAssay of the reference to RNA.

For the second option to work, you might need to run FindVariableMarkers and LogNormalise on the reference first.

ADD COMMENT

Login before adding your answer.

Traffic: 813 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6