Mercurial > repos > ximgchess > chap_test_20230411
changeset 61:a560d5143348 draft
planemo upload for repository https://github.com/CHESSComputing/ChessAnalysisPipeline commit e280dd942513f966a9a61a3af68ee7972fb8992f-dirty
author | kls286 |
---|---|
date | Thu, 13 Apr 2023 12:18:11 +0000 |
parents | 3a9135044f14 |
children | 2679014bb6eb |
files | pip_install.sh saxswaxs/ignoreshed.yml saxswaxs/klspipeline.yaml saxswaxs/pipeline.yaml saxswaxs/reduce.xml tomo/.tmp.tmp.swp tomo/tmp.tmp tomo/tomo_macros.xml tomo/tomo_reduce.xml |
diffstat | 9 files changed, 63 insertions(+), 116 deletions(-) [+] |
line wrap: on
line diff
--- a/pip_install.sh Wed Apr 12 19:04:05 2023 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ -#!/bin/bash - -VERSION=`python --version | awk '{split($2,a,"."); printf "%s.%s", a[1], a[2]}'` -PIPLOC=`which python | sed 's/bin\/python//g'` -PIPLOC=$PIPLOC/lib/python$VERSION/site-packages -echo $PIPLOC - -echo 'Try installing $1 to $PIPLOC' -#pip --exists-action i install --target $PIPLOC $1 -pip install --target $PIPLOC $1
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/saxswaxs/ignoreshed.yml Thu Apr 13 12:18:11 2023 +0000 @@ -0,0 +1,7 @@ +name: chap_test_20230328 +owner: kls286 +description: A generic test pipeline for CHAP +remote_repository_url: https://github.com/CHESSComputing/ChessAnalysisPipeline +type: unrestricted +categories: +- Structural Materials Analysis
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/saxswaxs/klspipeline.yaml Thu Apr 13 12:18:11 2023 +0000 @@ -0,0 +1,33 @@ +pipeline: + + # Download example data + - common.URLReader: + url: https://gitlab01.classe.cornell.edu/api/v4/projects/308/repository/files/saxswaxs%2frawdata_test_1d.tar/raw?ref=main + headers: + PRIVATE-TOKEN: glpat-sH-sniHbynCxUDJBpv5V # your token here + - common.URLResponseProcessor + - common.ExtractArchiveWriter: + filename: . + + # Collect map data + - common.YAMLReader: + filename: map.yaml + schema: MapConfig + - common.MapProcessor + - common.NexusWriter: + filename: map_specdata.nxs + force_overwrite: true + + # Integrate map detetcor data + - common.MultipleReader: + readers: + - YAMLReader: + filename: map.yaml + schema: MapConfig + - YAMLReader: + filename: integration.yaml + schema: IntegrationConfig + - common.IntegrateMapProcessor + - common.NexusWriter: + filename: map_reduceddata.nxs + force_overwrite: true
--- a/saxswaxs/pipeline.yaml Wed Apr 12 19:04:05 2023 +0000 +++ b/saxswaxs/pipeline.yaml Thu Apr 13 12:18:11 2023 +0000 @@ -4,7 +4,7 @@ - common.URLReader: url: https://gitlab01.classe.cornell.edu/api/v4/projects/308/repository/files/saxswaxs%2frawdata_test_1d.tar/raw?ref=main headers: - PRIVATE-TOKEN: # your token here + PRIVATE-TOKEN: GITLABTOKEN - common.URLResponseProcessor - common.ExtractArchiveWriter: filename: .
--- a/saxswaxs/reduce.xml Wed Apr 12 19:04:05 2023 +0000 +++ b/saxswaxs/reduce.xml Thu Apr 13 12:18:11 2023 +0000 @@ -1,6 +1,6 @@ <tool id="CHAP_saxswaxs_reduce" name="SAXSWAXS Reduce Map" version="0.1.0+galaxy0" python_template_version="3.5" profile="21.05"> <requirements> - <requirement type="package" version="0.0.3">chessanalysispipeline</requirement> + <requirement type="package" version="0.0.5">chessanalysispipeline</requirement> <requirement type="package" version="2.28.1">requests</requirement> <requirement type="package" version="2023.3.0">pyfai</requirement> <requirement type="package" version="1.10.7">pydantic</requirement> @@ -9,9 +9,11 @@ pip --exists-action i install certif-pyspec==1.5.3 && cp '$mapconfig' map.yaml && cp '$integrationconfig' integration.yaml && - CHAP --config '$__tool_directory__/pipeline.yaml' + sed 's/GITLABTOKEN/$token/' '$__tool_directory__/pipeline.yaml' > pipeline.yaml + CHAP --config pipeline.yaml ]]></command> <inputs> + <param type="text" name="token" /> <param type="data" name="mapconfig" format="yaml" /> <param type="data" name="integrationconfig" format="yaml" /> </inputs>
--- a/tomo/tmp.tmp Wed Apr 12 19:04:05 2023 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,84 +0,0 @@ -<tool id="CHAP_tomo_reduce" name="Tomo Reduce" version="@TOOL_VERSION@+galaxy0" profile="@PROFILE@" python_template_version="@PYTHON_TEMPLATE_VERSION@"> - <description>Reduce tomography images</description> - <macros> - <import>tomo_macros.xml</import> - </macros> - <expand macro="requirements"/> - <command detect_errors="exit_code"> - <![CDATA[ - $__tool_directory__/../pip_install.sh 'certif-pyspec==1.5.3' && - ls -alh $__tool_directory__/.. && - cp $tool_config reduce.yaml - ]]> - </command> - <configfiles> - <configfile name="tool_config"> - <![CDATA[#slurp -#* -#if str($map.type_selector) == "yaml" -#echo 'detector:' # -#echo ' file: ' + str($__tool_directory__) + '/andor2.yaml' # -#end if -*# -#echo 'img_x_bounds:' # -#if str($img_x_bounds.type_selector) == "full_range" -#echo '- -1' # -#echo '- -1' # -#else -#echo '- ' + str($img_x_bounds.low) # -#echo '- ' + str($img_x_bounds.upp) # -#end if - ]]> - </configfile> - </configfiles> - <inputs> - <conditional name="map"> - <param name="type_selector" type="select" display="radio" label="Choose map file type"> - <option value="yaml">YAML</option> - <option value="nexus">NeXus</option> - </param> - <when value="yaml"> - <param name="input_file" type="data" format="yaml" optional="false" label="Map config file"/> - <conditional name="detector"> - <param name="type_selector" type="select" display="radio" label="Choose detector prefix"> - <option value="andor2">andor2</option> - <option value="manta">manta</option> - <option value="retiga">retiga</option> - </param> - <when value="andor2"/> - <when value="manta"/> - <when value="retiga"/> - </conditional> - </when> - <when value="nexus"> - <param name="input_file" type="data" format="nex" optional="false" label="Tomography setup file"/> - </when> - </conditional> - <conditional name="img_x_bounds"> - <param name="type_selector" type="select" label="Choose vertical detector image bounds"> - <option value="full_range" selected="true">Use the full image range</option> - <option value="enter_range">Manually enter the image range</option> - </param> - <when value="full_range"/> - <when value="enter_range"> - <param name="low" type="integer" value="-1" optional="false" label="Lower image range index"/> - <param name="upp" type="integer" value="-1" optional="false" label="Upper image range index"/> - </when> - </conditional> - </inputs> - <outputs> - <data name="tool_config" format="yaml" label="Tool config" from_work_dir="reduce.yaml" hidden="false"/> - </outputs> - <help> - <![CDATA[ - usage: PROG [-h] [--config CONFIG] [--verbose] - -options: - -h, --help show this help message and exit - --config CONFIG Input configuration file - --verbose verbose output - - ]]> - </help> - <expand macro="citations"/> -</tool>
--- a/tomo/tomo_macros.xml Wed Apr 12 19:04:05 2023 +0000 +++ b/tomo/tomo_macros.xml Thu Apr 13 12:18:11 2023 +0000 @@ -1,10 +1,10 @@ <macros> <token name="@TOOL_VERSION@">0.1.0</token> <token name="@PROFILE@">21.09</token> - <token name="@PYTHON_TEMPLATE_VERSION@">3.9</token> + <token name="@PYTHON_TEMPLATE_VERSION@">3.9.13</token> <xml name="requirements"> <requirements> - <requirement type="package" version="0.0.4">chessanalysispipeline</requirement> + <requirement type="package" version="0.0.3">chessanalysispipeline</requirement> <requirement type="package" version="1.1.0">lmfit</requirement> <requirement type="package" version="3.7.1">matplotlib</requirement> <requirement type="package" version="1.0.1">nexusformat</requirement>
--- a/tomo/tomo_reduce.xml Wed Apr 12 19:04:05 2023 +0000 +++ b/tomo/tomo_reduce.xml Thu Apr 13 12:18:11 2023 +0000 @@ -7,33 +7,32 @@ <command detect_errors="exit_code"> <![CDATA[ mkdir tomo_reduce_plots; - $__tool_directory__/../pip_install.sh 'certif-pyspec==1.5.3' && - #if str($map.type_selector) == "yaml" - cp $input_file map.yaml && - cat $__tool_directory__/andor2.yaml $tool_config > reduce.yaml && + pip --exists-action i install certif-pyspec==1.5.3 && + #if str($map.type_selector) == "YAML" + cp '$input_file' map.yaml && #else - cp $input_file setup.nex && - cp $tool_config reduce.yaml && + cp '$input_file' setup.nex && #end if + cp '$tool_config' reduce.yaml && CHAP --config - #if str($map.type_selector) == "yaml" - $__tool_directory__/pipeline_reduce_yaml.yaml + #if str($map.type_selector) == "YAML" + '$__tool_directory__/pipeline_reduce_yaml.yaml' #else - $__tool_directory__/pipeline_reduce_nexus.yaml + '$__tool_directory__/pipeline_reduce_nexus.yaml' #end if ]]> </command> <configfiles> <configfile name="tool_config"> <![CDATA[#slurp -#echo 'img_x_bounds:' # -#if str($img_x_bounds.type_selector) == "full_range" -#echo '- -1' # -#echo '- -1' # -#else -#echo '- ' + str($img_x_bounds.low) # -#echo '- ' + str($img_x_bounds.upp) # -#end if + #echo 'img_x_bounds:' # + #if str($img_x_bounds.type_selector) == "full_range" + #echo '- -1' + #echo '- -1' + #else + #echo '- ' + str($img_x_bounds.low) + #echo '- ' + str($img_x_bounds.upp) + #end if ]]> </configfile> </configfiles>