View Single Post
Old 07-10-2015, 04:56 AM   #1
vilperte
Junior Member
 
Location: Brazil

Join Date: Aug 2014
Posts: 5
Default PCA plot in cummeRbund with subset genes

Hello all,

I'm trying to create a PCA plot with my data. I managed to create it with all my genes using the standard script:

genes.PCA<-PCAplot(genes(cuff), "PC1","PC2")


However, I would like to create the plot with a subset of those gene, e.g. the differentially expressed (DE) genes. I've created a subset for the DE genes as followed:

gene_diff_data<-diffData(genes(cuff))
sig_gene_data<-subset(gene_diff_data, (significant=='yes'))
sig_genes<-getGenes(cuff, sig_gene_data$gene_id)


When I try to create the PCA with the new subset, it does not work.

genes.PCA<-PCAplot(genes(sig_genes), "PC1","PC2")
Error in PCAplot(genes(sig_genes), "PC1", "PC2") :
error in evaluating the argument 'object' in selecting a method for function 'PCAplot': Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘genes’ for signature ‘"CuffGeneSet"’


Since my skills are very basic in R, could anyone tell me what I am doing wrong?

Thanks!

Best,

Vini
vilperte is offline   Reply With Quote