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