federicomarini / ideal

Interactive Differential Expression AnaLysis - DE made accessible and reproducible
https://federicomarini.github.io/ideal/
Other
29 stars 7 forks source link

Can't remove outliers from the optionnal step box #3

Closed clbenoit closed 5 years ago

clbenoit commented 5 years ago

Hi everyone,

When trying to remove outliers from the "Optionnal step box". I get the following error :

Warning: Error in .validate_names: assay colnames() must be NULL or identical to colData rownames()

However everything works fine when constructing the dds object if i do not remove any sample...

Here is the code activated when clicking on the boxe's button :

observeEvent(input$button_outliersout, {
            withProgress({
                allsamples <- colnames(values$dds_obj)
                outliersamples <- input$selectoutliers
                keptsamples <- setdiff(allsamples, outliersamples)
                dds <- DESeqDataSetFromMatrix(countData = values$countmatrix[, 
                  keptsamples], colData = values$expdesign[keptsamples, 
                  ], design = design(values$dds_obj))
                dds <- estimateSizeFactors(dds)
                values$removedsamples <- input$selectoutliers
                curr_species <- input$speciesSelect
                values$dds_obj <- dds
                updateSelectInput(session, inputId = "speciesSelect", 
                  selected = curr_species)
                values$res_obj <- NULL
            }, message = "Removing selected samples from the current dataset")
        }) 

I do not understand why it's not working, colnames seem to be updated before the new DESeqDataSetFromMatrix function calling. Do you have any idea ?

Thanks you !

Elendill

federicomarini commented 5 years ago

Hi Elendill, I'll have a look into it!

federicomarini commented 5 years ago

While using the airway demo dataset I am not able to trigger this behaviour and reproduce it - the sample removal works as expected with no errors.

What are you using as input, can you provide me with some more detail?

Federico

clbenoit commented 5 years ago

Hi Frederico,

I am using the files that you can find attached as input. Then selecting the "group" variable for the design before to construct the dds object.

I am using the server version edition of the app. Thanks you in advance for your advice !

Clément

SAMPLE_PLAN_2.txt tablecounts_raw_ideal.txt

clbenoit commented 5 years ago

Ok removing the "run_id" entry in my SAMPLE_PLAN.txt header fixed the issue. I am sorry to ask you for a not so complicated problem. Hope it will further help users !

Clément

federicomarini commented 5 years ago

Hi Clément,

the most important part is that the issue is now resolved :)

I'm closing this then, and hope that any other user will be able to find this as a helping record.

Federico