planemo icon indicating copy to clipboard operation
planemo copied to clipboard

planemo test incorrectly passes dataset information instead of text (to text param) when filename matches configured Text value

Open blankenberg opened this issue 3 years ago • 0 comments

Issue found by @nvk747

This issue popped up when testing several tools at a time -- when the tests were run individually on the tools, they passed. I did not check to see if the issue can be replicated on a single tool (although it seems likely).

Tools being tested are from here: https://github.com/nvk747/papaa in galaxy directory

One tool test uploads files named 'GBM' and uses them. The next tool has a text parameter, with text set to 'GBM':

grep '<param' *|grep GBM
compare_within_models.xml:            <param name="pancan_within_classifier_summary" value="classifier_summary/GBM" > <!--
compare_within_models.xml:            <param name="pancan_within_classifier_coefficients" value="classifier_coefficients/GBM"> <!--
pancancer_classifier.xml:            <param name="diseases" value="GBM"/>
pancancer_classifier.xml:            <param name="alt_diseases" value="GBM"/>
within_disease_analysis.xml:              <param name="diseases" value="GBM"/>

Order of test running matters (pancancer_classifier.xml passes because it runs before compare_within_models.xml, but within_disease_analysis.xml fails because it runs last).

You can see that planemo is setting text parameter 'diseases' to the dict value of an HDA (not literal 'GBM'), that is being sanitized for the commandline:

--diseases '__oc____sq__src__sq__: __sq__hda__sq__, __sq__id__sq__: __sq__8155e4b4bf1581ff__sq____cc__' 

full command:

papaa_within_disease_analysis.py  --alphas '0.1,0.13,0.15,0.18,0.2,0.3,0.4,0.6,0.7'    --l1_ratios '0.1,0.125,0.15,0.2,0.25,0.3,0.35'   --remove_hyper  --x_matrix '/tmp/tmpsuyzalo7/files/4/8/f/dataset_48f87414-7dbc-4198-97aa-96bfd4892e2b.dat' --filename_mut '/tmp/tmpsuyzalo7/files/b/b/a/dataset_bbaf527a-e523-4884-9756-355b230fb122.dat' --filename_mut_burden '/tmp/tmpsuyzalo7/files/e/f/d/dataset_efdd2224-217b-4cd6-b76c-c47702ec4f52.dat' --filename_sample '/tmp/tmpsuyzalo7/files/3/0/6/dataset_306bca42-4b8c-44e9-9ebe-f10f84f4ebf7.dat'    --genes 'ERBB2,PIK3CA,KRAS,AKT1' --diseases '__oc____sq__src__sq__: __sq__hda__sq__, __sq__id__sq__: __sq__8155e4b4bf1581ff__sq____cc__'       --filename_copy_loss '/tmp/tmpsuyzalo7/files/8/2/0/dataset_8206b731-51ee-4cc3-9c4a-4c092d587783.dat' --filename_copy_gain '/tmp/tmpsuyzalo7/files/5/0/1/dataset_50158944-83fa-450c-9cfa-16fe954349c7.dat' --filename_cancer_gene_classification '/tmp/tmpsuyzalo7/files/9/0/5/dataset_905d026f-c848-4c35-8b12-9dc7fb68289a.dat'   --classifier_results 'classifier' --seed '1234' --num_features '8000' > '/tmp/tmpsuyzalo7/files/1/0/1/dataset_101cdf32-117a-4af8-87bb-aa387f4e54e3.dat' && papaa_flatten_classifier_directory.py -i 'classifier/within_disease' -o 'classifier_within'

blankenberg avatar Dec 04 '20 15:12 blankenberg