ProtProtocols / IsoProt

Protocol of the analysis of iTRAQ/TMT proteomics data including quantification, statistical analysis and maybe clustering
https://protprotocols.github.io
11 stars 4 forks source link

Set correct default experimental design for test case #46

Closed veitveit closed 6 years ago

jgriss commented 6 years ago

@veitveit This is not an easy goal.

The only way to load an experimental design is to put the exp_design.tsv file in the OUT directory. Since we mount the OUT directory from the user's filesystem, we cannot integrate the file into the Docker image.

Alternatively, we could add a custom feature that copies the exp_design.tsv file for the example when the user selectes the "IN" directory. But this will get VERY ugly and will break the concept of having an independent search GUI module.

In short, I think that this is currently not feasible.

veitveit commented 6 years ago

@jgriss

Wouldn't it be easier to just add and if statement that checks whether the mgf-file is the one from the example and iTAQ8 is selected, and then set the last four channels as Treatment?

jgriss commented 6 years ago

@veitveit

The issue with this approach is that it breaks the software design. The GUI script is designed to be independent of our workbook. Therefore, if we / someone creates a new workbook the GUI + search functionality can easily be integrated. If we add notebook specific code to these scripts they will quickly become impossible to maintain since if you change something you have to make sure that all notebook specific functionality is still in place.

Additionally, the class that generates the experimental design is agnostic to the file structure etc.

As you may have seen, the complete code that triggers loading of previous parameters and results is triggered from the Notebook side. So the Python scripts "only" contain functions to load a given parameter file.

So to sum it up, although your idea would work, I believe that in the long run it might cause quite some trouble.

But I'll keep thinking about a different solution...

jgriss commented 6 years ago

@veitveit

I've added a possible solution for this:

  1. search_ui_in defines a callback function in case the input directory changes
  2. The notebook provides such as callback function and checks:
    1. Whether the example MGF file is present
    2. Whether the example exp_design file is present
    3. That no other exp_design file has already been created
  3. If all are true, the example exp_design is loaded

One major disadvantage of this approach is that as soon as the experimental design is loaded, the input directory, labeling techniques etc. cannot be changed unless the experimental design is reset. Due to our design there is no other alternative. We could only change the default values for iTRAQ 8-plex labeling in general to always define the last 4 channels as group 2. But that's not ideal either.

Please test it and tell me how you feel about this option. To disable it, we only have to remove the callback function from the example notebook.

veitveit commented 6 years ago

Thanks, this seems to work. I will add a bit more information above, so the test case is clearer.