rezakj / iCellR

Single (i) Cell R package (iCellR) is an interactive R package to work with high-throughput single cell sequencing technologies (i.e scRNA-seq, scVDJ-seq, scATAC-seq, CITE-Seq and Spatial Transcriptomics (ST)).
121 stars 19 forks source link

qc.stats() missing value where TRUE/FALSE needed #7

Closed BioLaoXu closed 4 years ago

BioLaoXu commented 4 years ago

Hi ! dear developer,iCellR is a powerful tools,but I got it wrong at the beginning of the test,my code like this :

library(iCellR) datt=as.data.frame(t(read.table("A11_Positive_DataFrame.csv",sep=",",header = T,stringsAsFactors = F,row.names = 1))) dim(datt)

[1] 19148 192

head(datt)[1:2]

AAAGCAATCTGTGCAA-1 AACCGCGCATGCCTAA-1

FO538757.3 0 0

FO538757.2 0 0

AP006222.2 0 0

FAM87B 0 0

LINC00115 0 0

FAM41C 0 0

my.obj <- make.obj(datt)

################################### ,--. ,-----. ,--.,--.,------. --'' .--./ ,---. | || || .--. ' ,--.| | | .-. :| || || '--'.' | |' '--'\ --. | || || | --' -----'----'--'--'`--' '--' ################################### An object of class iCellR version: 1.2.5 Raw/original data dimentions (rows,columns): 19148,192 Data conditions: no conditions/single sample Row names: FO538757.3,FO538757.2,AP006222.2 ... Columns names: AAAGCAATCTGTGCAA-1,AACCGCGCATGCCTAA-1,AACTCCCTCCAAATGC-1 ... ################################### QC stats performed:FALSE, PCA performed:FALSE, CCA performed:FALSE Clustering performed:FALSE, Number of clusters:0 tSNE performed:FALSE, UMAP performed:FALSE, DiffMap performed:FALSE Main data dimentions (rows,columns):0,0 Normalization factors:,... Imputed data dimentions (rows,columns):0,0 ############## scVDJ-Seq ########### VDJ data dimentions (rows,columns):0,0 ############## CITE-Seq ############ ADT raw data dimentions (rows,columns):0,0 ADT main data dimentions (rows,columns):0,0 ADT columns names:... ADT row names:... ########### iCellR object ##########

make iCellR object is no error ,then i make qc for my.obj,like this : my.obj <- qc.stats(my.obj)

Error in if (mito.genes[1] != "default.genes") { : missing value where TRUE/FALSE needed

I want to know if my gene name format is wrong,or i lose some genes?

rezakj commented 4 years ago

All looks good, the only reason my.obj <- qc.stats(my.obj) does not run is that by default it looks for genes starting with "mt." for mito genes but it seems like in your case you might not have them. So the solution is to manually give it your mito gene names like this c("gene1","gene2") or to just skip this QC filtering step like this my.obj@main.data <- my.obj@raw.data. The second solution is of course for when you don't want to filter. If you skip the filtering step you can jump to the normalization and continue from there.

Let us know if this solved it for you :)