nf-core / smrnaseq

A small-RNA sequencing analysis pipeline
https://nf-co.re/smrnaseq
MIT License
74 stars 125 forks source link

Error in plotMDS (edgeR_miRBase.r) #187

Closed luissian closed 2 months ago

luissian commented 2 years ago

Description of the bug

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_
apeltzer commented 1 year ago

Good spot, will make a PR for a fix for this very soon!

atrigila commented 2 months ago

Closed via #380