TCGAbiolinks icon indicating copy to clipboard operation
TCGAbiolinks copied to clipboard

Error in plot.window(...) : need finite 'ylim' values in TCGAbatch_Correction

Open Ci-TJ opened this issue 9 months ago • 0 comments

I often encounter errors when using TCGAbatch_Correction. Could it be caused by issues with the plot parameters? The code is from here.

v.dataFilt<-voom(dataFilt)

#in order to have 2 batches with multiple samples and avoid batches with one sample
#the user need to call first the get_IDs function on the top of this script if this has not been done already
c1<-which(get_IDs(dataPrep)$tss=="A1") #just change "E9" to "A1"
c2<-which(get_IDs(dataPrep)$tss=="E2")

#taking log transformed data for exploration of batch effects

tt <- TCGAbatch_Correction(tabDF = v.dataFilt$E[,c(c1,c2)], batch.factor="TSS", adjustment=NULL)

[1] A1 E2
Levels: A1 E2
Using the 'mean only' version of ComBat
Found2batches
Note: one batch has only one sample, setting mean.only=TRUE
Adjusting for1covariate(s) or covariate level(s)
Standardizing Data across genes
Fitting L/S model and finding priors
Error in plot.window(...) : need finite 'ylim' values


##same 
tt <- TCGAbatch_Correction(tabDF = v.dataFilt$E, batch.factor="TSS", adjustment=NULL)
 [1] A1 A2 A7 A8 AC AN AO AR B6 BH C8 D8 E2 E9 EW GM LL OL S3 GI
Levels: A1 A2 A7 A8 AC AN AO AR B6 BH C8 D8 E2 E9 EW GI GM LL OL S3
Using the 'mean only' version of ComBat
Found20batches
Note: one batch has only one sample, setting mean.only=TRUE
Adjusting for1covariate(s) or covariate level(s)
Standardizing Data across genes
Fitting L/S model and finding priors
Error in plot.window(...) : need finite 'ylim' values

Best, Seager

Ci-TJ avatar Mar 27 '25 12:03 Ci-TJ