Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing value? #9

Open
yingzhang121 opened this issue Jan 26, 2018 · 2 comments
Open

missing value? #9

yingzhang121 opened this issue Jan 26, 2018 · 2 comments

Comments

@yingzhang121
Copy link

Hi,

Is there an option in determineDropoutCandidates to handle missing value?

I made a reduced UMI count matrix for my single-cell RNA-Seq data. Then I had the "missing value" issue:

x=read.csv("filtered_reduced_matrix.csv", header=T, row.names=1, skipNul=T)
scPan <- scDataConstructor(as.matrix(x))
scPan <- determineDropoutCandidates(scPan)
Error in density.default(object@nData[, topLibraries[i]], kernel = "epanechnikov", :
'x' contains missing values

Best,
Ying

@hojwk
Copy link
Contributor

hojwk commented Jan 31, 2018

Hi Ying,

Sorry it has taken some time to get back to you.

At the moment, detemineDropoutCandidates does not allow for missing values (e.g., NA). The call to the function "density" from the R "stats" package, implicitly has the parameter "na.rm" set to FALSE - which will produce an error when encountering any missing values. If we explicitly set na.rm to TRUE in our CIDR code, this would "remove any missing values from the data", which we do not think is desirable. If a missing value indicates a possible dropout, we recommend replacing all occurrence of NA to zero. I hope this is helpful.

Regards,
Joshua

@yingzhang121
Copy link
Author

Thank you for your comments.

I managed to run CIDR on my reduced matrix by running the following command before the scPan commands:

x<-na.omit(x)

Do you see any caveat in it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants