-
Notifications
You must be signed in to change notification settings - Fork 0
Bugfixes3 #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
… R and system commands
…processes as single user
…gs when part of the path does not exist, which makes error messages useless
…where the directory is created or else singularity chokes
vinjana
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What a big PR. Looks like a lot of work. Thanks for that!
- I guess the XMLs are just copies of the old ones (old PBS cluster!) from our department, right?
- Better reconsider your (non)use of quoting and of braces in variables in Bash.
Note that we use these plugin versions (SNVCallingWorkflow_1.2.166-1, ACEseqWorkflow_1.2.10) with much newer versions of Roddy that are better in many respects (bugfixes, better diagnostic output, better parameter checks and diagnostics, etc.). Did you consider updating? Did you have a look at the versions used in OTP? This would also make some hacks with Toollib and BE versions unnecessary. Also the hack with the DefaultPlugin version may get unnecessary. This is just a suggestion.
| cd $RODDY_BASE_PLUGINS && \ | ||
| ls -l && \ | ||
| (cd DefaultPlugin && git checkout 1.2.0) && \ | ||
| (cd DefaultPlugin && git checkout 951fc80) && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this necessary? The commit is pretty old -- actually pre-Roddy 3!
| cd ACEseqWorkflow_1.2.10 && \ | ||
| git checkout 1.2.10 | ||
| git checkout 1.2.10 && \ | ||
| sed -i -e 's/[ \t]\${EMAIL}[ \t]/ "${EMAIL}" /g' $ACESEQ_FOLDER/resources/analysisTools/copyNumberEstimationWorkflow/correct_gc_bias*.sh # wrap variable in quotes, or else e-mail is sent, even when $EMAIL is empty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typical -- though interesting that this now produces problems. Actually, all variables should (almost) always get quoted in Bash (there are few exceptions). I will also change this code in the ACEseq head with reference to your PR.
| sed -i -e 's/[ \t]\${EMAIL}[ \t]/ "${EMAIL}" /g' $ACESEQ_FOLDER/resources/analysisTools/copyNumberEstimationWorkflow/correct_gc_bias*.sh # wrap variable in quotes, or else e-mail is sent, even when $EMAIL is empty | ||
|
|
||
| RUN conda env create -n ACEseqWorkflow -f $ACESEQ_FOLDER/resources/analysisTools/copyNumberEstimationWorkflow/environments/conda.yml; | ||
| RUN sed -i -e 's/.*gsl.*//' $ACESEQ_FOLDER/resources/analysisTools/copyNumberEstimationWorkflow/environments/conda.yml && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW: Also in the Docker script all variables should be quoted, unless there is a good reason not to do so (e.g. if R_COMMAND should be allowed to refer to a multi-component command, such as /path/to/R --vanilla).
For instance here, if $ACESEQ_FOLDER contains whitespace your code will fail. You may argue that the variable should not contain whitespace, nobody knows how users are going to use this code.
| COPY config /home/roddy/config | ||
|
|
||
| # create an empty DELLY SV file, for when the workflow is called without SVs | ||
| RUN echo -e 'chrom1\tstart1\tend1\tchrom2\tstart2\tend2\tid\tpairs\tstrand1\tstrand2\tsvtype\tsize\torient\tmapq\tsplit_reads\tsplit_mapq\tsplit_consensus\tpid\taf\tgenotypes\trd_ratio\ttumor_count\tgerm_count\tBf\tdepth.ratio\tCNt\tA\tB\tCN_supp' > /home/roddy/empty_sv.tsv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What a hack. I understand and agree, but anyway, what a hack.
| # 12: Optional: The SV file | ||
|
|
||
| if [[ $# -lt 11 ]]; then | ||
| echo "Wrong number of arguments" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Msg. could be improved:
`echo "Wrong number of arguments: Expected 11 but got $#"
| qconf -am roddy | ||
| qconf -au roddy users | ||
| qconf -as $HOST | ||
| # define roddy as the user to run SGE (required by Singularity) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation
| qconf -aq main.q | ||
| qconf -mq main.q | ||
| function setupGridEngine() { | ||
| changeGridEngineConfig hostname "$hostName" -ae |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation
| # this function creates a temporary non-interactive script that mimicks an interactive editor | ||
| # Usage: changeGridEngineConfig PARAMETER_TO_CHANGE NEW_VALUE QCONF_ARGUMENTS | ||
| function changeGridEngineConfig() { | ||
| PARAMETER="$1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: You can avoid creating global variables using local
local PARAMETER="$1"Also consider checking correct function usage
local PARAMETER="${1:?PARAMETER no defined}"Both will improve you code stability for this function that you use multiple times.
| cd COWorkflowsBasePlugin_1.0.2 && git checkout 1.0.2 | ||
|
|
||
| # Update BatchEuphoria to a version compatible with SGE | ||
| RUN wget -qO - https://github.com/TheRoddyWMS/BatchEuphoria/releases/download/0.0.3/BatchEuphoria-0.0.3.jar > $RODDY_LIBS/BatchEuphoria-0.0.2.jar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you consider instead modifying the build.gradle?
compile 'com.github.theroddywms:BatchEuphoria:0.0.2'
--> compile 'com.github.theroddywms:BatchEuphoria:0.0.3
compile "com.github.theroddywms:RoddyToolLib:0.0.3"
--> compile "com.github.theroddywms:RoddyToolLib:0.0.4"
and then do the build afterwards? This would have the advantage that in every call log (with bash -x roddy.sh the correct version would be reported.
| pluginDirectories=/home/roddy/binaries/Roddy/plugins_R2.4 | ||
|
|
||
| [COMMANDS] | ||
| commandLogTruncate=80 # Truncate logged commands to this length. If <= 0, then no truncation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider setting this to zero, such that the diagnostic messages don't get truncated.
prevent ACEseq from stalling and Mpileup from running into the walltime