Hello all,
I am trying to analyze a plant metabolomics database with PAPi, but haven't been able to get even started as there is a constant error apparently related with the data formatting. All examples from the package work fine, and my own data looks in the same format as the example metabolomics data set. My database contains 20 compounds (rows) and 80 samples (columns), the column names are "Sample1", "Sample2" ... "Sample80"; the second row indicate two conditions, healthy or infected. The first column has the KEGG codes instead of compound names. Below is a portion of my database (first six rows and columns).
> papivoc[1:6, 1:6] Names Sample1 Sample2 Sample3 Sample4 Sample5 1 Replicates healthy healthy healthy healthy healthy 2 C19757 2.1927358 1.6329086 2.4302252 0.5544893 <NA> 3 C00042 <NA> 1.0817259 <NA> <NA> 0.7601545 4 C11391 <NA> 0.9295942 <NA> <NA> <NA> 5 C14272 1.2880552 1.2894686 0.8696715 1.9424637 <NA> 6 C07287 1.4880006 1.4538546 1.2594548 1.2812344 0.2241397
All the columns in the data.frame are formatted as characters
> str(papivoc) 'data.frame': 21 obs. of 81 variables: $ Names : chr "Replicates" "C19757" "C00042" "C11391" ... $ Sample1 : chr "healthy" "2.1927358" NA NA ... $ Sample2 : chr "healthy" "1.6329086" "1.0817259" "0.9295942" ... $ Sample3 : chr "healthy" "2.4302252" NA NA ...
The error message is the following
> papiresults <- papi(papivoc, save = FALSE, offline = FALSE) [1] "Online analysis being performed..." [1] "PAPi in progess..." [1] "Data frame loaded..." |= | 2% Error in names(comp)[1] <- "value" : 'names' attribute [1] must be the same length as the vector [0] In addition: Warning message: In if (getpath != 0) { : the condition has length > 1 and only the first element will be used
Thanks for any help in advance
Hannier Pulido
Graduate student
Department of Biology, Penn State University
Hi Raphael,
Sorry for the delay in my answer.
Yes, I can send along the csv file. I uploaded it to my github account:
https://github.com/hannierpulido/database-for-PAPi.git
Thanks in advance.
Best,
Hannier