mani2012 / BatchQC

Provides Quality Control of sequencing samples by deducing if there is batch effect and adjusts for it.
34 stars 23 forks source link

Error in if (var(data.matrix[i, cond2[[j]]]) == 0) { : missing value where TRUE/FALSE needed #16

Closed achaiboonchoe closed 4 years ago

achaiboonchoe commented 4 years ago

I have this error while running

batchQC(data, batch=batch, condition=condition, view_report=FALSE, interactive=FALSE) Error in if (var(data.matrix[i, cond2[[j]]]) == 0) { : missing value where TRUE/FALSE needed

my data don't have NA

sum(is.na(data)) [1] 0

Any suggestions?

mani2012 commented 4 years ago

What did you use for condition variable? You may want to check if it is a categorical variable. If it is a continuous variable, you may be able to put in to categories through appropriate quartiles.

Best, Mani

From: achaiboonchoe notifications@github.com Sent: Wednesday, June 24, 2020 5:31 AM To: mani2012/BatchQC BatchQC@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [mani2012/BatchQC] Error in if (var(data.matrix[i, cond2[[j]]]) == 0) { : missing value where TRUE/FALSE needed (#16)

I have this error while running

batchQC(data, batch=batch, condition=condition, view_report=FALSE, interactive=FALSE) Error in if (var(data.matrix[i, cond2[[j]]]) == 0) { : missing value where TRUE/FALSE needed

my data don't have NA

sum(is.na(data)) [1] 0

Any suggestions?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/mani2012/BatchQC/issues/16, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACMB4PAOUVN5LMUUIEB7N63RYHBW3ANCNFSM4OGPKCEQ.

achaiboonchoe commented 4 years ago

My condition is character [1:64]

condition [1] "HER2enriched" "Basal-like" "HER2enriched" "LumB" "HER2enriched" "Basal-like" "HER2enriched" "LumB" "LumA"
[10] "HER2enriched" "LumA" "Basal-like" "HER2enriched" "Basal-like" "Normal-like" "LumB" "LumB" "LumB"
[19] "LumB" "LumA" "HER2enriched" "LumA" "LumA" "Basal-like" "LumB" "Normal-like" "LumA"
[28] "Normal-like" "LumA" "LumA" "Unknown" "TNBC" "TNBC" "TNBC" "TNBC" "TNBC"
[37] "TNBC" "Unknown" "Unknown" "Unknown" "Unknown" "Unknown" "TNBC" "TNBC" "TNBC"
[46] "TNBC" "TNBC" "TNBC" "TNBC" "TNBC" "TNBC" "TNBC" "HER2pos" "HER2pos"
[55] "HER2pos" "ERPRpos" "HER2pos" "ERPRpos" "ERPRpos" "Unknown" "Unknown" "Unknown" "Unknown"
[64] "ERPRHER2pos"

mani2012 commented 4 years ago

It looks like you seem to have just one sample for the condition “ERPRHER2pos”. You cannot do batch or differential expression analysis with just one sample in a condition.

Best, Mani

From: achaiboonchoe notifications@github.com Sent: Monday, June 29, 2020 6:09 AM To: mani2012/BatchQC BatchQC@noreply.github.com Cc: Solaiappan Manimaran manimaran_1975@hotmail.com; Comment comment@noreply.github.com Subject: Re: [mani2012/BatchQC] Error in if (var(data.matrix[i, cond2[[j]]]) == 0) { : missing value where TRUE/FALSE needed (#16)

My condition is character [1:64]

condition [1] "HER2enriched" "Basal-like" "HER2enriched" "LumB" "HER2enriched" "Basal-like" "HER2enriched" "LumB" "LumA" [10] "HER2enriched" "LumA" "Basal-like" "HER2enriched" "Basal-like" "Normal-like" "LumB" "LumB" "LumB" [19] "LumB" "LumA" "HER2enriched" "LumA" "LumA" "Basal-like" "LumB" "Normal-like" "LumA" [28] "Normal-like" "LumA" "LumA" "Unknown" "TNBC" "TNBC" "TNBC" "TNBC" "TNBC" [37] "TNBC" "Unknown" "Unknown" "Unknown" "Unknown" "Unknown" "TNBC" "TNBC" "TNBC" [46] "TNBC" "TNBC" "TNBC" "TNBC" "TNBC" "TNBC" "TNBC" "HER2pos" "HER2pos" [55] "HER2pos" "ERPRpos" "HER2pos" "ERPRpos" "ERPRpos" "Unknown" "Unknown" "Unknown" "Unknown" [64] "ERPRHER2pos"

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/mani2012/BatchQC/issues/16#issuecomment-651036937, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACMB4PH3OBC6JK3JGDH4HA3RZBR25ANCNFSM4OGPKCEQ.