Error in `rownames<-`(`*tmp*`, value = list(genes
1
0
Entering edit mode
mictadlo ▴ 10
@mictadlo-10885
Last seen 4.2 years ago

Hi, I folled this instructions but I got the bellow error:

> logCPM <- cpm(y, prior.count=2, log=TRUE)
> head(y$genes)
       genes
3  sp0025247
4  sp0025250
5  sp0025268
6  sp0025270
8  sp0025282
12 sp0056834
> y$samples$group
 [1] Root_tip.1.5 Root_tip.1.5 Root_tip.1.5 Root_tip.1.5 Leaves.1.5   Leaves.1.5  
 [7] Leaves.1.5   Leaves.1.5   Root_tip.2   Root_tip.2   Root_tip.2   Root_tip.2  
[13] Leaves.2     Leaves.2     Leaves.2     Leaves.2     Root_tip.3   Root_tip.3  
[19] Root_tip.3   Root_tip.3   Leaves.3     Leaves.3     Leaves.3     Leaves.3    
Levels: Leaves.1.5 Leaves.2 Leaves.3 Root_tip.1.5 Root_tip.2 Root_tip.3
> rownames(logCPM) <- y$genes
Error in `rownames<-`(`*tmp*`, value = list(genes = c("sp0025247", "sp0025250",  : 
  length of 'dimnames' [1] not equal to array extent
> dim(y$genes)
[1] 58971     1
> dim(rownames(logCPM))
NULL
> dim(logCPM)
[1] 58971    24
>

What did I miss?

Thank you in advance

edger • 663 views
ADD COMMENT
2
Entering edit mode
Aaron Lun ★ 28k
@alun
Last seen 13 hours ago
The city by the bay

As y$genes is a data.frame, you obviously can't use it as the row names. You need the character vector of gene names instead, i.e., y$genes$genes.

ADD COMMENT

Login before adding your answer.

Traffic: 722 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6