sunduanchen / Scissor

Scissor package
GNU General Public License v3.0
168 stars 29 forks source link

Error in normalize.quantiles(dataset0) : vector types do not match in copyVector #53

Open jmzvillarreal opened 1 year ago

jmzvillarreal commented 1 year ago

Hi, Thanks for developping this interesting tool. It seems that the error: Error in normalize.quantiles(dataset0) : vector types do not match in copyVector is quite common. I have tried : BiocManager::install("preprocessCore", configure.args="--disable-threading", force = TRUE) But it is not working... Could you please give some help on ow to debug it ? Many thanks. Jaime.

jmzvillarreal commented 1 year ago

I was able to fix the error by doing:

sc_data <- sc_data[["RNA"]]@counts sc_data <- Seurat_preprocessing(sc_data, min.cells= 1, min.features= 500, resolution= 0.2, dims_Neighbors= 1:20, dims_TSNE= 1:20, dims_UMAP= 1:20,verbose=TRUE)

TCGA <- read.table('TCGA_status_ConsensusClass.txt', header = TRUE, sep = '\t',row.names = 1) TCGA <- TCGA[-c(1,2),] TCGA <- TCGA %>% mutate_all(as.numeric) metadata <- read.table('Subtype_info.csv', header = TRUE, sep = ',') all(colnames(TCGA) == metadata$Sample)

TRUE

table(metadata$genotype)

NULL PRESENT

247 156

Execute Scissor to select the informative cells

phenotype <-metadata$genotype tag <- as.list(phenotype) infos <- Scissor(as.matrix(TCGA), sc_data, phenotype,tag=tag, alpha = 0.2, family = "binomial")

but now I am getting the following error:

Error in Scissor(as.matrix(TCGA), sc_data, phenotype, tag = tag, : The length differs between tags and phenotypes. Please check Scissor inputs and selected regression type. In addition: Warning messages: 1: In asMethod(object) : sparse->dense coercion: allocating vector of size 17.8 GiB 2: In asMethod(object) : sparse->dense coercion: allocating vector of size 66.0 GiB 3: In Scissor(as.matrix(TCGA), sc_data, phenotype, tag = tag, : NAs introduced by coercion

Any help would be appreciated !

sunduanchen commented 1 year ago

try tag=c('NULL','PRESENT') ?

On Tue, 30 May 2023 at 18:54, jmzvillarreal @.***> wrote:

I was able to fix the error by doing:

sc_data <- @.*** https://github.com/CountS sc_data <- Seurat_preprocessing(sc_data, min.cells= 1, min.features= 500, resolution= 0.2, dims_Neighbors= 1:20, dims_TSNE= 1:20, dims_UMAP= 1:20,verbose=TRUE)

TCGA <- read.table('TCGA_status_ConsensusClass.txt', header = TRUE, sep = '\t',row.names = 1) TCGA <- TCGA[-c(1,2),] TCGA <- TCGA %>% mutate_all(as.numeric) metadata <- read.table('Subtype_info.csv', header = TRUE, sep = ',') all(colnames(TCGA) == metadata$Sample) TRUE

table(metadata$genotype) NULL PRESENT 247 156 Execute Scissor to select the informative cells

phenotype <-metadata$genotype tag <- as.list(phenotype) infos <- Scissor(as.matrix(TCGA), sc_data, phenotype,tag=tag, alpha = 0.2, family = "binomial")

but now I am getting the following error:

Error in Scissor(as.matrix(TCGA), sc_data, phenotype, tag = tag, : The length differs between tags and phenotypes. Please check Scissor inputs and selected regression type. In addition: Warning messages: 1: In asMethod(object) : sparse->dense coercion: allocating vector of size 17.8 GiB 2: In asMethod(object) : sparse->dense coercion: allocating vector of size 66.0 GiB 3: In Scissor(as.matrix(TCGA), sc_data, phenotype, tag = tag, : NAs introduced by coercion

Any help would be appreciated !

— Reply to this email directly, view it on GitHub https://github.com/sunduanchen/Scissor/issues/53#issuecomment-1568221085, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEYQWDFAVX2LKKZOH7WKPCTXIXGWVANCNFSM6AAAAAAYQG6SO4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

jmzvillarreal commented 1 year ago

Hi again, Thanks for the quick reply ... What you suggest was my first option, since it is how it appears in the tutorial... But the error is exactly the same ...