Search
Question: Error in `rownames<-`(`*tmp*`, value = list(genes
0
gravatar for mictadlo
14 months ago by
mictadlo0
mictadlo0 wrote:

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

ADD COMMENTlink modified 14 months ago by Aaron Lun21k • written 14 months ago by mictadlo0
2
gravatar for Aaron Lun
14 months ago by
Aaron Lun21k
Cambridge, United Kingdom
Aaron Lun21k wrote:

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 COMMENTlink written 14 months ago by Aaron Lun21k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 190 users visited in the last hour