-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix DataToolParameters accepting input with arbitrary datatype in tests #12073
base: dev
Are you sure you want to change the base?
Fix DataToolParameters accepting input with arbitrary datatype in tests #12073
Conversation
sam should accept bam, and we already have tests for that in sam_to_unsorted_bam.xml. The UI should be accepting bam, can you let me know how to reproduce that ? |
I tried with planemo serve.
But then a converter should run, or? You can see in this test that no converter runs. |
I don't see how https://github.com/galaxyproject/galaxy/blob/dev/test/functional/tools/sam_to_unsorted_bam.xml covers this. All tests upload sam. |
You're right, we only have tests in the other direction and we don't have a bam to sam converter, oddly enough ... not sure how that is possible |
Seems to me that there are two things to do:
I could need a hint for the first point. Converter seems easy. |
Maybe try targeting a running instance with the test ... if that fails maybe we're setting up some weird development variables in the testing framework ? |
I started a Galaxy instance with Has exactly the same result:
Any suggestion where to look, e.g. where the check for the input data types happens? |
Tried to find out where the input datatype is checked .. without success. I also tried to set a nonsense |
8ee0728
to
7629054
Compare
7629054
to
4f1e376
Compare
Nearly there (hopefully): only 1 selenium and 1 api test failing. I also ran this on the IUC repo: galaxyproject/tools-iuc#4015 (comment): 291 failures + 3 errors. Uff. I checked a few of them .. seems that they are caused by tests that miss the The planemo html output seems quite useless in these cases (no output at all) and one needs to check the console output which contains something like this
Would be helpful to have this in the html output. |
we might also use the opportunity and try to improve the sniffers. |
test data is sniffed as gff (because it really is gff2) and therefore can not be used as input which needs to be gff2 forcing gff3 by setting ftype since the aegan website insists that gff3 is used (so allowing gff seems not an option) xref galaxyproject/galaxy#12073
dbkey needs to be set since the dynamic options filter otherwise removes the dataset here https://github.com/galaxyproject/galaxy/blob/5ea4d7e647d09dde957e824a083b1bd6acaa6f17/lib/galaxy/tools/parameters/basic.py#L1961 https://github.com/galaxyproject/galaxy/blob/5ea4d7e647d09dde957e824a083b1bd6acaa6f17/lib/galaxy/tools/parameters/dataset_matcher.py#L156 Currently this only leads to not considering the dataset for implicit conversion. With galaxyproject/galaxy#12073 this makes the tool fail.
otherwise if a tool is mapped over a collection where the included datasets are hidden does not work. I guess also implicit conversion did not work so far for this case. Not sure about possible side effects. I tested manually that the tool form does not include hidden datasets
and potentially one selenium test
seems to fix api/selenium problems
output does not matter anyway because of expect_failure
Co-authored-by: Marius van den Beek <[email protected]>
by using content instead of value
as suggested here galaxyproject#12073 (comment) and distinguish HDCA and DCE
This reverts commit a1625e2.
Summary of the discussion at the latest Backend WG meeting: it was agreed that
I hope I've not forgot/misunderstood important details from the meeting, feel free to correct! |
Like in the filter for selects with dynamic options. Note actually in the select case we check if the referred dataset has the dbkey set while we do this here for the dataset itself. I guess this could be changed but I could not find a good way to do this. Discovered while fixing galaxyproject/tools-iuc#4023 for galaxyproject#12073 where this leads to a bug because filtered datasets are not matching: https://github.com/galaxyproject/galaxy/blob/5ea4d7e647d09dde957e824a083b1bd6acaa6f17/lib/galaxy/tools/parameters/dataset_matcher.py#L132
there is no scool datatype in Galaxy. scool is currently sniffed as h5 which leads to an error with galaxyproject/galaxy#12073 possible solutions: - replace scool by h5 and lower the profile - add scool dataype to Galaxy and set the profile to the Galaxy version where it was added
* schicexplorer: missing scool datatype there is no scool datatype in Galaxy. scool is currently sniffed as h5 which leads to an error with galaxyproject/galaxy#12073 possible solutions: - replace scool by h5 and lower the profile - add scool dataype to Galaxy and set the profile to the Galaxy version where it was added * rename version token * schicexplorer: bump profile scool datattype became available in 22.05 galaxyproject/galaxy#14480 * schicexplorer fixes: scHicQualityControl: cp input file scHicAdjustMatrix: fix test * remove unused parameter
Like in the filter for selects with dynamic options. Note actually in the select case we check if the referred dataset has the dbkey set while we do this here for the dataset itself. I guess this could be changed but I could not find a good way to do this. Discovered while fixing galaxyproject/tools-iuc#4023 for galaxyproject#12073 where this leads to a bug because filtered datasets are not matching: https://github.com/galaxyproject/galaxy/blob/5ea4d7e647d09dde957e824a083b1bd6acaa6f17/lib/galaxy/tools/parameters/dataset_matcher.py#L132
In the first place this PR added a test case (
test/functional/tools/bam_input_for_sam.xml
) showing that in tests (e.g. withplanemo test
) data parameters of tools accept input of arbitrary datatypes. The test shows this for asam
input which getsbam
andbed
in the two tests (thebam
case might be interpreted as a case of a missing converter as @mvdbeek pointed out below).Note that in the UI this works as expected, i.e. only sam is accepted.
The main fix is in lines:
galaxy/lib/galaxy/tools/parameters/basic.py
Lines 1961 to 1966 in 570686e
Previously the loop containing this code checked only if an implicit conversion is possible/necessary for one/more inputs. Now an exception is raised if the datasets do not match the datatype required by the parameter.
An additional necessary change is that
dataset_matcher.hda_match
now usesensure_visible=False
. The consequence is that also hidden datasets are considered. This was necessary since otherwise collection input does not get a match if the contained data sets are hidden (makes me wonder if implicit conversion ever worked for this case .. edit: seems so, but I don't understand why). Not sure about other possible side effects.This required a quite few changes to tests where datatypes of inputs were not specified or the wrong datatype was shown. While fixing I realized that at different places
ext
,extension
, andfile_type
are used .. would be nice if this would become consistent...TODO
DataCollectionToolParameter
, somewhere heregalaxy/lib/galaxy/tools/parameters/basic.py
Line 2168 in 433874d
How to test the changes?
(Select all options that apply)
License