view build-and-run-job-scripts.sh @ 10:1b637e0a30b6 draft

planemo upload commit 61448862dc9016969191967aeefb7f7acce1e1f9-dirty
author mingchen0919
date Tue, 01 May 2018 00:24:08 -0400
parents
children 1a7af4f6b101
line wrap: on
line source

# run job scripts within the tool outputs directory
cd ${REPORT_FILES_PATH}

#========== build and run job 1 script ============
cat >job-1-script.sh <<EOF
skewer \\
	${X_A} \\
	${X_B} \\
	-x ${X_x} \\
	-y ${X_y} \\
	-m ${X_m} \\
	-r ${X_r} \\
	-d ${X_D} \\
	-q ${X_q} \\
	-Q ${X_Q} \\
	-l ${X_l} \\
	-j ${X_j} \\
	-M ${X_M} \\
	-b ${X_b} \\
	-c ${X_b} \\
	-n ${X_n} \\
	-u ${X_u} \\
	-f ${X_f} \\
	-z ${X_z} \\
	-qiime ${X_E} \\
	-quiet ${X_F} \\
	-i ${X_i} \\
	-o trim > /dev/null 2>&1
EOF

# remove empty input lines
grep -v '\-M  \\' temp.sh |\
  grep -v 'None' |\
  grep -v 'NO_ARGUMENT_NO' |\
  sed 's/NO_ARGUMENT_YES//g' > job-1-script.sh

rm temp.sh

# run job 1 script
sh job-1-script.sh

# rename log file
if [ -e trim-trimmed.log ]; then
  cp trim-trimmed.log trim-trimmed.txt
fi