arnesmits / DEP

DEP package
27 stars 13 forks source link

Error on make_se #31

Closed RTCarmo closed 2 years ago

RTCarmo commented 2 years ago

Hello there,

First of all, thanks for the amazing tool!

I'm trying to load some LFQ data into DEP following the instructions in the vignette. All going ok until I try to make the summarized experiment when I get the following error:

 Error: specified 'columns' should be numeric
 Run make_se_parse() with the appropriate columns as argument

I checked the class of each parameter needed for make_se, and they are in the correct classes!

Here is the proteinGroup file and the ExperimentalDesign files.

This is my code:

library("DEP")
library("dplyr")

wd <- "/home/rtorreglosa/Documents/LFQ_analysis/"
setwd(wd)

data_c <- read.table(file = "LFQ_DEP_analysis_adjusted.txt", header=T, sep="\t", stringsAsFactors = FALSE)

data_c_filt <- filter(data_c, Potential.contaminant != "+")

data_c_filt$Gene.names %>% duplicated() %>% any()

data_c %>% group_by(Gene.names) %>% summarize(frequency = n()) %>% 
arrange(desc(frequency)) %>% filter(frequency > 1)

data_c_unique <- make_unique(data_c_filt, "Gene.names", "Protein.IDs", delim = ";")

data_c_filt$name %>% duplicated() %>% any()

data_c_filt$Razor...unique.peptides

LFQ_columns_c <- grep("LFQ.", colnames(data_c_unique))

experimental_design_c <- read.table(file = "LFQ_Exp_Design.txt", header=T, sep="\t", stringsAsFactors = FALSE)

data_c_se <- make_se(data_c_unique, LFQ_columns_c, experimental_design_c)

Any ideas on how to solve this issue are welcome!

Thanks!

Ramon

RTCarmo commented 2 years ago

After some debugging, I discovered the problem was in my input: My decimal separator was a comma! Changing this automatically made the function work!