Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
RoanKanninga committed Mar 3, 2023
1 parent 144e3ef commit 61a85a7
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 12 deletions.
4 changes: 2 additions & 2 deletions check/indentationcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Use either WORKSPACE location for Jenkins or
# resolve path to scripts we need to check
# when executed manualy outside Jenkins.
# when executed manually outside Jenkins.
#
if [[ -z "${WORKSPACE:-}" ]]; then
MYDIR="$(cd -P "$(dirname "${0}")" && pwd)"
Expand All @@ -13,7 +13,7 @@ fi
echo '#####################################################################################'
echo ' Bash code must be indented with TABs. Checking for lines indented with spaces ... '
echo '#####################################################################################'
grep -n '^[[:space:]]* [[:space:]]*' "${WORKSPACE:-../}/protocols/"*.*sh
grep -n '^[[:space:]]* [[:space:]]*' "${WORKSPACE:-../}"/{protocols,scripts}/*.*sh
grep_exit_status="${?}"
if [[ "${grep_exit_status}" -eq 0 ]]; then
echo '#####################################################################################'
Expand Down
10 changes: 7 additions & 3 deletions check/shellcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@
# * SC2015: Note that A && B || C is not if-then-else. C may run when A is true.
# We know and use this construct regularly to create "transactions"
# where C is only executed when both A and B have succeeded.
# * SC2154: Due to Molgenis Compute string initialization the warning is not valid
#
export SHELLCHECK_OPTS="-e SC2004 -e SC2015"
# * SC2148: the shebang is declared in the header.ftl not in the protocols
#

export SHELLCHECK_OPTS="-e SC2004 -e SC2015 -e SC2154 -e SC2148"

function showHelp() {
#
Expand Down Expand Up @@ -85,7 +89,7 @@ then
#
# Reformat the generated report to add hyperlinks to the ShellCheck issues on the wiki:
# https://github.com/koalaman/shellcheck/wiki/SC${ISSUENUMBER}
# explaining whatis wrong with the code / style and how to improve it.
# explaining what is wrong with the code / style and how to improve it.
#
perl -pi -e "s|message='([^']+)'\s+source='ShellCheck.(SC[0-9]+)'|message='<a href="https://github.com/koalaman/shellcheck/wiki/\$2">\$2: \$1</a>' source='ShellCheck.\$2'|" checkstyle-result.xml
else
Expand All @@ -96,7 +100,7 @@ else
if [[ "${verbose:-0}" -eq 1 ]]
then
cd "${MYDIR}/.."
shellcheck -a -x -o all -f tty bin/*.sh # cannot use the printf construct used below for non-vebose output as it destroys the terminal colors.
shellcheck -a -x -o all -f tty protocols/*.sh # cannot use the printf construct used below for non-vebose output as it destroys the terminal colors.
cd '-' # Goes back to previous directory before we changed to ${MYDIR}.
else
printf '%s\n' "$(cd "${MYDIR}/.." && shellcheck -a -x -o all -f gcc protocols/*.sh)"
Expand Down
6 changes: 3 additions & 3 deletions generate_template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ if [[ -n "${_sampleSheetColumnOffsets["barcode"]+isset}" ]]; then
fi

## Will return or nothing or in case there is a dualbarcode it will create a file
perl "${EBROOTNGS_DEMULTIPLEXING}/convertParametersGitToMolgenis.pl" "${EBROOTNGS_DEMULTIPLEXING}/parameters.csv" > \
perl "${EBROOTNGS_DEMULTIPLEXING}/scripts/convertParametersGitToMolgenis.pl" "${EBROOTNGS_DEMULTIPLEXING}/parameters.csv" > \
"${WORKDIR}/generatedscripts/NGS_Demultiplexing/${RAWDATANAME}/out.csv"

perl "${EBROOTNGS_DEMULTIPLEXING}/convertParametersGitToMolgenis.pl" "${EBROOTNGS_DEMULTIPLEXING}/${ENVIRONMENT_PARAMETERS}" > \
perl "${EBROOTNGS_DEMULTIPLEXING}/scripts/convertParametersGitToMolgenis.pl" "${EBROOTNGS_DEMULTIPLEXING}/${ENVIRONMENT_PARAMETERS}" > \
"${WORKDIR}/generatedscripts/NGS_Demultiplexing/${RAWDATANAME}/environment_parameters.csv"

perl "${EBROOTNGS_DEMULTIPLEXING}/convertParametersGitToMolgenis.pl" "${EBROOTNGS_DEMULTIPLEXING}/parameters_${GROUP}.csv" > \
perl "${EBROOTNGS_DEMULTIPLEXING}/scripts/convertParametersGitToMolgenis.pl" "${EBROOTNGS_DEMULTIPLEXING}/parameters_${GROUP}.csv" > \
"${WORKDIR}/generatedscripts/NGS_Demultiplexing/${RAWDATANAME}/parameters_group.csv"

bash "${EBROOTMOLGENISMINCOMPUTE}/molgenis_compute.sh" \
Expand Down
2 changes: 1 addition & 1 deletion parameters.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ stage,module load
checkStage,module list

### Tool versions ####
bcl2fastqVersion,bcl2fastq2/2.20.0-foss-2022a
bcl2fastqVersion,bcl2fastq2/2.20.0-GCC-11.3.0
perlPlusVersion,PerlPlus/5.34.1-GCCcore-11.3.0-v22.11.1
interopVersion,interop/1.2.0-foss-2022a

Expand Down
6 changes: 3 additions & 3 deletions protocols/Bcl2FastQ.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#MOLGENIS walltime=12:00:00 nodes=1 ppn=6 mem=12gb
#MOLGENIS walltime=12:00:00 nodes=1 ppn=6 mem=20gb
#string bcl2fastqVersion
#string nextSeqRunDataDir
#string stage
Expand Down Expand Up @@ -46,15 +46,15 @@ module load "${demultiplexingversion}"
if [[ "${dualBarcode}" == 'TRUE' ]]
then
echo 'dualBarcode modus on'
perl "${EBROOTNGS_DEMULTIPLEXING}/CreateIlluminaSampleSheet_V3.pl" \
perl "${EBROOTNGS_DEMULTIPLEXING}/scripts/CreateIlluminaSampleSheet_V3.pl" \
-i "${sampleSheet}" \
-o "${tmpIntermediateDir}/Illumina_R${run}.csv" \
-r "${run}" \
-d TRUE \
-s "${prepKitsDir}"
else
echo 'only one barcode detected'
perl "${EBROOTNGS_DEMULTIPLEXING}/CreateIlluminaSampleSheet_V2.pl" \
perl "${EBROOTNGS_DEMULTIPLEXING}/scripts/CreateIlluminaSampleSheet_V2.pl" \
-i "${sampleSheet}" \
-o "${tmpIntermediateDir}/Illumina_R${run}.csv" \
-r "${run}" \
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 61a85a7

Please sign in to comment.