annotate generate.sh @ 13:b57f420a47b9 draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 55a2aeba8bfd8a6910630721de9857dcdfe05d3c"
author galaxyp
date Tue, 13 Oct 2020 20:03:17 +0000
parents b5ede3ff996c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
1 #!/usr/bin/env bash
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
2
13
b57f420a47b9 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 55a2aeba8bfd8a6910630721de9857dcdfe05d3c"
galaxyp
parents: 12
diff changeset
3 VERSION=2.6
11
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
4 FILETYPES="filetypes.txt"
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
5 PROFILE="20.05"
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
6 ## FILETYPES_RE=$(grep -v "^#" $FILETYPES | grep -v "^$" | cut -f 1 -d" " | tr '\n' '|' | sed 's/|$//'| sed 's/|/\\|/g')
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
7
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
8 export tmp=$(mktemp -d)
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
9 export CTDCONVERTER="$tmp/CTDConverter"
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
10
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
11 ###############################################################################
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
12 ## reset old data
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
13 ###############################################################################
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
14 # rm $(ls *xml |grep -v macros)
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
15 # rm -rf ctd
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
16 # mkdir -p ctd
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
17 # echo "" > prepare_test_data.sh
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
18
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
19 ###############################################################################
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
20 ## generate tests
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
21 ## also creates
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
22 ## - conda environment (for executing the binaries) and
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
23 ## - the git clone of OpenMS (for generating the tests)
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
24 ## - ctd files
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
25 ###############################################################################
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
26 bash ./test-data.sh ./macros_autotest.xml
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
27
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
28 ###############################################################################
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
29 ## get the
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
30 ## - conda package (for easy access and listing of the OpenMS binaries),
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
31 ###############################################################################
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
32 # if [ ! -d $OPENMSPKG ]; then
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
33 # mkdir $OPENMSPKG/
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
34 # wget -P $OPENMSPKG/ "$CONDAPKG"
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
35 # tar -xf $OPENMSPKG/"$(basename $CONDAPKG)" -C OpenMS$VERSION-pkg/
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
36 # rm $OPENMSPKG/"$(basename $CONDAPKG)"
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
37 # fi
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
38
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
39 ###############################################################################
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
40 ## Get python libaries for CTD -> Galaxy conversion
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
41 ## TODO fix to main repo OR conda packkage if PRs are merged
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
42 ###############################################################################
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
43 # if [ ! -d CTDopts ]; then
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
44 # # git clone https://github.com/genericworkflownodes/CTDopts CTDopts
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
45 # git clone -b topic/no-1-2x https://github.com/bernt-matthias/CTDopts CTDopts
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
46 # fi
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
47 if [ ! -d $CTDCONVERTER ]; then
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
48 #git clone https://github.com/WorkflowConversion/CTDConverter.git CTDConverter
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
49 git clone -b topic/cdata https://github.com/bernt-matthias/CTDConverter.git $CTDCONVERTER
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
50 fi
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
51 # export PYTHONPATH=$(pwd)/CTDopts
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
52 ###############################################################################
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
53 ## conversion ctd->xml
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
54 ###############################################################################
13
b57f420a47b9 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 55a2aeba8bfd8a6910630721de9857dcdfe05d3c"
galaxyp
parents: 12
diff changeset
55
b57f420a47b9 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 55a2aeba8bfd8a6910630721de9857dcdfe05d3c"
galaxyp
parents: 12
diff changeset
56 find . -maxdepth 0 -name "[A-Z]*xml" -delete
11
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
57 source $(dirname $(which conda))/../etc/profile.d/conda.sh
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
58 conda activate $tmp/OpenMS$VERSION-env
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
59 python $CTDCONVERTER/convert.py galaxy -i ctd/*ctd -o ./ -s tools_blacklist.txt -f "$FILETYPES" -m macros.xml -t tool.conf -p hardcoded_params.json --test-macros macros_autotest.xml --test-macros-prefix autotest_ --test-macros macros_test.xml --test-macros-prefix manutest_ --tool-version $VERSION --tool-profile $PROFILE > convert.out 2> convert.err
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
60 if [[ "$?" -ne "0" ]]; then >&2 echo 'CTD -> XML conversion failed'; >&2 echo -e "stderr:\n$(cat convert.err)"; fi
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
61 conda deactivate
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
62
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
63 patch PepNovoAdapter.xml < PepNovoAdapter.patch
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
64 patch OMSSAAdapter.xml < OMSSAAdapter.patch
13
b57f420a47b9 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 55a2aeba8bfd8a6910630721de9857dcdfe05d3c"
galaxyp
parents: 12
diff changeset
65
b57f420a47b9 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 55a2aeba8bfd8a6910630721de9857dcdfe05d3c"
galaxyp
parents: 12
diff changeset
66 # https://github.com/OpenMS/OpenMS/pull/4984
b57f420a47b9 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 55a2aeba8bfd8a6910630721de9857dcdfe05d3c"
galaxyp
parents: 12
diff changeset
67 sed -i -e 's@http://www.openms.de/documentation/@http://www.openms.de/doxygen/release/2.6.0/html/@' ./*xml
b57f420a47b9 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 55a2aeba8bfd8a6910630721de9857dcdfe05d3c"
galaxyp
parents: 12
diff changeset
68 # https://github.com/OpenMS/OpenMS/pull/4984#issuecomment-702641976
12
b5ede3ff996c "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 6e9568c650259d95b230d1a243e90f73a19564c2"
galaxyp
parents: 11
diff changeset
69 patch -p0 <404-urls.patch
11
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
70
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
71 # #-b version log debug test in_type executable pepnovo_executable param_model_directory rt_concat_trafo_out param_id_pool
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
72
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
73 # for i in A-E F-H I-L M-N O-P Q-Z
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
74 # do
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
75 # planemo t [$i]*xml --galaxy_branch release_20.05 --galaxy_python_version 3.7 --test_output $i.html --test_output_json $i.json &
6eda2adf7613 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
galaxyp
parents:
diff changeset
76 # done