proteinevolution / Toolkit

The MPI Bioinformatics Toolkit
https://toolkit.tuebingen.mpg.de
Apache License 2.0
63 stars 14 forks source link

Vue: Implement correct validation parameters for tools #910

Closed sesati closed 5 years ago

sesati commented 5 years ago

Currently the validation parameters defined in the new frontend are not being passed correctly by the backend (see ToolConfig.scala, a stub is inserted here at the moment). There needs to be a way of configuring the correct sequence formats/sequence types for every tool, so that the correct values can be passed upon calling the UI routes.

sesati commented 5 years ago

As an example, MODELLER only accepts PIR alignments, so this should be specified accordingly.

felixgabler commented 5 years ago

@vikramalva the configuration is optional. If sequence_restrictions.formats is not specified, it will automatically use Seq("FASTA", "CLUSTAL") per default. The default type is "PROTEIN". Is this ok? Eventually, you would have to go over the tools and correct it for each tool.

sesati commented 5 years ago

While we are at it: We have to do the same for the input type ("sequence", "regex", "pdb" or "accessionID"). Currently "sequence" is passed statically for every tool. As an example, PatternSearch needs "regex".

vikramalva commented 5 years ago

@sesati @felixgabler I looked through input validation presently and found a few issues that need to be addressed:

sesati commented 5 years ago

As for feature 1 and 3: These are actually already implemented in the new frontend (see util/validation.ts and SequenceValidationParams). We just need to pass the correct parameters from the backend and configure them in tools.conf. We can also set default values for any of these parameters if appropriate.

If only a single sequence is accepted, one can set maxNumSeq to 1 for this tool.

The auto-conversion to FASTA should be working now.

sesati commented 5 years ago

I added the possibility to configure the additional parameters in tools.conf. @vikramalva Should we set the parameters according to the current validation code or do you want to go over the tools.conf yourself?

vikramalva commented 5 years ago

Thanks @sesati. I am going to go through the tools and set the correct parameters.