When script is checking condition to make the MDS plot, it is checking about the number of sample.
# Make MDS plot (only perform with 3 or more samples)
if (length(filelist[[1]]) > 2){
pdf(paste(header,"_edgeR_MDS_plot.pdf",sep=""))
MDSdata <- plotMDS(dataNorm)
dev.off()
This works in many cases but I have a situation where the length is 3 but when dataNorm is set
# TMM
dataNorm <- calcNormFactors(dataDGE)
I get that there are only 2 columns.
I need to figure out what is wrong with the sample, but however checking should be done on the numbers of columns on dataNorm and not by the filelist
Command used and terminal output
Output error
Error in plotMDS.default(y, top = top, labels = labels, pch = pch, cex = cex, :
Only 2 columns of data: need at least 3
Calls: plotMDS -> plotMDS.DGEList -> plotMDS -> plotMDS.default
Execution halted
### Relevant files
_No response_
### System information
_No response_
Description of the bug
When script is checking condition to make the MDS plot, it is checking about the number of sample.
This works in many cases but I have a situation where the length is 3 but when dataNorm is set
I get that there are only 2 columns. I need to figure out what is wrong with the sample, but however checking should be done on the numbers of columns on dataNorm and not by the filelist
Command used and terminal output