| Miscellaneous |
| Version lineage of this tool (guids ordered most recent to oldest) |
| toolshed.g2.bx.psu.edu/repos/iuc/fastk_logex/fastk_logex/1.1.0+galaxy5 (this tool) |
| toolshed.g2.bx.psu.edu/repos/iuc/fastk_logex/fastk_logex/1.1.0+galaxy4 |
| toolshed.g2.bx.psu.edu/repos/iuc/fastk_logex/fastk_logex/1.1.0+galaxy3 |
| toolshed.g2.bx.psu.edu/repos/iuc/fastk_logex/fastk_logex/1.1.0+galaxy2 |
| toolshed.g2.bx.psu.edu/repos/iuc/fastk_logex/fastk_logex/1.1.0+galaxy1 |
| fastk_logex |
| Requirements (dependencies defined in the <requirements> tag set) |
| name | version | type |
| fastk | 1.1.0 | package |
| Additional information about this tool |
mkdir -p logex_ktabs &&
mkdir -p input_files &&
#if $input_type.input_type_selector != 'collection'
cp '$input_ktab1' input_files/input1.ktab &&
ln -s '$input_ktab1_tar' input1.tar &&
tar -xf input1.tar &&
mv ktabfiles ktabfiles_in1 &&
mv "\$(find ktabfiles_in1 -type f -name '*.ktab.1')" "ktabfiles_in1/.input1.ktab.1" &&
cp '$input_ktab2' input_files/input2.ktab &&
ln -s '$input_ktab2_tar' input2.tar &&
tar -xf input2.tar &&
mv ktabfiles ktabfiles_in2 &&
mv "\$(find ktabfiles_in2 -type f -name '*.ktab.1')" "ktabfiles_in2/.input2.ktab.1" &&
mv ktabfiles_in1/.input1.ktab.1 input_files/ &&
mv ktabfiles_in2/.input2.ktab.1 input_files/ &&
#if $input_type.operation_selector == 'and'
Logex -T\${GALAXY_SLOTS:-8} -h 'out = A&.B' input_files/input1.ktab input_files/input2.ktab &&
#elif $input_type.operation_selector == 'or'
Logex -T\${GALAXY_SLOTS:-8} -h 'out = A|.B' input_files/input1.ktab input_files/input2.ktab &&
#elif $input_type.operation_selector == 'minus'
Logex -T\${GALAXY_SLOTS:-8} -h 'out = A-B' input_files/input1.ktab input_files/input2.ktab &&
#elif $input_type.operation_selector == 'xor'
Logex -T\${GALAXY_SLOTS:-8} -h 'out = A^B' input_files/input1.ktab input_files/input2.ktab &&
#elif $input_type.operation_selector == 'unionsum'
Logex -T\${GALAXY_SLOTS:-8} -h 'out = A&+B' input_files/input1.ktab input_files/input2.ktab &&
#end if
#else
#for $i, $j in enumerate($input_type.input_ktab_collection):
cp "$j" input_files/${i+1}.ktab &&
#end for
#for $p, $q in enumerate($input_type.input_ktab_collection_tar):
ln -s "$q" input_files/input_ktab_${p+1}.tar &&
tar -tf input_files/input_ktab_${p+1}.tar | grep '/\.[^/]*$' | tar --strip-components=1 -xf input_files/input_ktab_${p+1}.tar -C input_files/ -T - &&
for file_name in input_files/.output.ktab.*; do
if [ -f "\$file_name" ]; then
new_name=\$(echo "\$file_name" | sed "s/\.output\.ktab\./\.$((p+1))\.ktab\./");
mv "\$file_name" "\$new_name";
fi
done &&
rm input_files/input_ktab_${p+1}.tar &&
#end for
COUNT=\$(ls -1 input_files/*.ktab 2>/dev/null | wc -l) &&
if [ "\$COUNT" -ge 2 ]; then
#if $input_type.operation_sel.operation_selector_collection == 'unionsum':
EXPRESSION="out=\$(seq -s '&+' 0 \$((COUNT-1)) | tr '0-9' 'A-Z')" &&
#elif $input_type.operation_sel.operation_selector_collection == 'and':
EXPRESSION="out=\$(seq -s '&.' 0 \$((COUNT-1)) | tr '0-9' 'A-Z')" &&
#elif $input_type.operation_sel.operation_selector_collection == 'minus':
EXPRESSION="out=\$(seq -s '-' 0 \$((COUNT-1)) | tr '0-9' 'A-Z')" &&
#elif $input_type.operation_sel.operation_selector_collection == 'or':
EXPRESSION="out=\$(seq -s '|.' 0 \$((COUNT-1)) | tr '0-9' 'A-Z')" &&
#elif $input_type.operation_sel.operation_selector_collection == 'xor':
EXPRESSION="out=\$(seq -s '^' 0 \$((COUNT-1)) | tr '0-9' 'A-Z')" &&
#elif $input_type.operation_sel.operation_selector_collection == 'custom':
EXPRESSION="out=$input_type.operation_sel.custom_expression" &&
#end if
Logex -T\${GALAXY_SLOTS:-8} -h "\$EXPRESSION" input_files/*.ktab;
else
echo "ERROR: Logex needs atleast 2 Ktab files" >&2 && exit 1;
fi &&
#end if
cp *.ktab logex_ktabs/ &&
cp .*.ktab* logex_ktabs/ &&
tar -cf logex_ktab.tar input_files/ logex_ktabs/
| Functional tests |
| name | inputs | outputs | required files |
| Test-1 |
input_type|input_ktab1: fastq1.ktab input_type|input_ktab1_tar: fastk_in1.tar input_type|input_ktab2: fastq2.ktab input_type|input_ktab2_tar: fastk_in2.tar input_type|operation_selector: and input_type|input_type_selector: single |
name: value name: value name: value |
fastq1.ktab fastk_in1.tar fastq2.ktab fastk_in2.tar value |
| Test-2 |
input_type|input_ktab_collection: list collection input_type|input_ktab_collection_tar: list collection input_type|operation_sel|operation_selector_collection: and input_type|input_type_selector: collection |
name: value name: value name: value |
fastq1.ktab fastq2.ktab fastk_in1.tar fastk_in2.tar value |
| Test-3 |
input_type|input_ktab_collection: list collection input_type|input_ktab_collection_tar: list collection input_type|operation_sel|operation_selector_collection: unionsum input_type|input_type_selector: collection |
name: value name: value name: value |
fastq1.ktab fastq2.ktab fastk_in1.tar fastk_in2.tar value |
| Test-4 |
input_type|input_ktab_collection: list collection input_type|input_ktab_collection_tar: list collection input_type|operation_sel|custom_expression: A&.B input_type|operation_sel|operation_selector_collection: custom input_type|input_type_selector: collection |
name: value name: value name: value |
fastq1.ktab fastq2.ktab fastk_in1.tar fastk_in2.tar value |