This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Getting MDSplot from Cufflinks data [cummeRbund]

Hello Biostars,

I am doing MDSplot like this :

library(cummeRbund)
cuff<-readCufflinks(gtfFile="merged.gtf",genome="grch38")
cuff
CuffSet instance with:
     2 samples
     56875 genes
     282953 isoforms
     131485 TSS
     81720 CDS
     56875 promoters
     131485 splicing
     18767 relCDS

try(genes.MDS<-MDSplot(genes(cuff)))

But it's throwing this error :

Error in cmdscale(d, eig = TRUE, k = 2) : 'k' must be in {1, 2, .. n - 1} Error in try(genes.MDS) : object 'genes.MDS' not found

How can I fix this error? Please help.. Thanks in advance :)

rna-seq r next-gen

I am not a huge expert on cummeRbund, but it looks like you first extract the genes from cuff object, then you use them to create MDS-plot. Usually, the input for MDS (or PCA) is some rectangular data, e.g. genes in rows, samples in columns. For me it looks like you are using just "genes". Am I right?

1 answer

Running MDS on just 2 samples will not tell you much. In any case, you have to specify the dimensions that you want to plot:

MDSplot(genes(cuff), "PC1", "PC2")

Log in to answer this question.