saezlab/progeny

input data problem

Tommaso12 opened this issue · 3 comments

Hi, I have a DEGs table (by DESeq2) and I am trying to fit it in progeny. The class of my table is:

> class(degs)
[1] "spec_tbl_df" "tbl_df"      "tbl"         "data.frame" 

I think the class is not correct cause I get back this error:

Error in progeny.default(degs, scale = FALSE, organism = "Mouse") : 
  Do not know how to access the data matrix from class data.frame

I would need help to understand which is the correct object format for progeny. Thank you a lot for helping!

Hi Tommas,

You simply need to convert your tibble into a matrix. You can do that with as.matrix().

Cheers,

Aurelien

Thank you Aurelien!

Hi, I have then another problem after I converted my degs in matrix that I don't really understand.

pathways = progeny(degs, 
                   scale=FALSE,
                   organism = "Mouse")

Error in t(expr[common_genes, , drop = FALSE]) %*% as.matrix(model[common_genes,  : 
  requires numeric/complex matrix/vector arguments

Just a head of my data that could be useful to understand why:

GeneSymbol R01             R02             R03             R04             R05            
[1,] "Xkr4"     " 0.000000e+00" " 0.000000e+00" " 0.0000000000" " 0.0000000000" " 0.0000000000"
[2,] "Rp1"      " 0.000000e+00" " 0.000000e+00" " 0.0000000000" " 0.0000000000" " 0.0000000000"
[3,] "Sox17"    " 0.000000e+00" " 0.000000e+00" " 0.0000000000" " 0.0000000000" " 0.0000000000"
[4,] "Mrpl15"   " 8.635869e+00" " 8.717134e+00" " 8.6441937015" " 8.6880506289" " 8.7298009862"
[5,] "Lypla1"   " 9.244627e+00" " 9.269090e+00" " 9.3573436952" " 9.1489109170" " 9.2977853091"
[6,] "Gm37988"  " 0.000000e+00" " 0.000000e+00" " 0.0000000000" " 0.0000000000" " 0.0000000000"
    R06             R07             R08             R09             R10           
[1,] " 0.0000000000" " 0.0000000000" " 0.0000000000" " 0.0000000000" " 0.000000000"
[2,] " 0.0000000000" " 0.0000000000" " 0.0000000000" " 0.0000000000" " 0.000000000"
[3,] " 0.0000000000" " 0.0000000000" " 0.0000000000" " 0.0000000000" " 0.000000000"
[4,] " 8.7198392285" " 8.5227529800" " 8.4514251862" " 8.5884296137" " 8.932819727"
[5,] " 9.3521550280" " 9.2652168715" " 9.0991266007" " 9.2557273533" " 9.285419734"
[6,] " 0.0000000000" " 0.0000000000" " 0.0000000000" " 0.0000000000" " 0.000000000"
    R11             R12             R13            R14             R15            
[1,] " 0.0000000000" " 0.0000000000" " 0.000000000" " 0.0000000000" " 0.0000000000"
[2,] " 0.0000000000" " 0.0000000000" " 0.000000000" " 0.0000000000" " 0.0000000000"
[3,] " 0.0000000000" " 0.0000000000" " 0.000000000" " 0.0000000000" " 0.0000000000"
[4,] " 8.8387759393" " 8.8430391746" " 8.541431168" " 8.5654369269" " 8.5346340248"
[5,] " 9.3923623216" " 9.2178056210" " 9.207042929" " 9.3779540525" " 9.2662165917"
[6,] " 0.0000000000" " 0.0000000000" " 0.000000000" " 0.0000000000" " 0.0000000000"
    R16             R17             R18           
[1,] " 0.0000000000" " 0.0000000000" " 0.000000000"
[2,] " 0.0000000000" " 0.0000000000" " 0.000000000"
[3,] " 0.0000000000" " 0.0000000000" " 0.000000000"
[4,] " 9.1144122987" " 9.1222161332" " 9.117485472"
[5,] " 9.2214984738" " 9.2386265282" " 9.220453356"
[6,] " 0.0000000000" " 0.0000000000" " 0.000000000"

So, I have here the genes with the log2 trasnformed counts per samples(R1 to R12). These are samples of untreated (R1 to R9 and R13 to R15) and treated cells (R10 to R12 and R16 to R18) at different time points. Should I maybe split the samples in different matrixes according to untr and treat and time points. Having a look to the vignettes I thought so but not sure this makes sense...

Thank you a lot!