Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • bfr_bioinformatics/bfr-abc-toolbox
1 result
Show changes
Commits on Source (2)
......@@ -243,7 +243,7 @@ deploy_bfr_abc() {
}
analyse_single_pipeline() {
## [Rationale] analyse_single_pipeline() This is the Rationale for analyse_single_pipeline() which is looped in analyse_bfr_abc()
## [Rationale] analyse_single_pipeline() This is the Rationale for analyse_single_pipeline() which is looped in analyze_bfr_abc()
local pipeline pipeline_dir skip_test_analysis
skip_test_analysis=true
......@@ -259,14 +259,14 @@ pipeline_dir:|$pipeline_dir
" | column -t -s "|" | logpipe
## analyse test data
[[ $(find "$pipeline_dir/test_data" -type f -name "pipeline_status*" | wc -l) -lt 1 ]] && skip_test_analysis=false || logwarn "No test data found"
[[ $skip_test_analysis == false ]] && logexec bash "$pipeline_dir"/"${pipeline_wrapper_sh[$pipeline]}" $args_interactive --norun
[[ $(find "$pipeline_dir/test_data" -type f -name "pipeline_status*" | wc -l) -lt 1 ]] && skip_test_analysis=false || logwarn "pipeline_status file found. Skipping pipeline analysis: $pipeline"
[[ $skip_test_analysis == false ]] && logexec bash "$pipeline_dir"/"${pipeline_wrapper_sh[$pipeline]}" --auto $args_dryrun # --norun
logsuccess "Pipeline $pipeline test data analysed successfully"
}
analyse_bfr_abc() {
## [Rationale] analyse_bfr_abc() This is the Rationale for deploy_bfr_abc() and mode "--analysis"
analyze_bfr_abc() {
## [Rationale] analyze_bfr_abc() This is the Rationale for deploy_bfr_abc() and mode "--analysis"
local pipeline
......@@ -278,7 +278,7 @@ analyse_bfr_abc() {
for pipeline in "${!pipeline_wrapper_sh[@]}"; do
[[ $interactive == true ]] && (
echo
interactive_query "Analyse pipeline ${magenta}$pipeline${normal}?" || continue # TODO: interactive_query exits upon "no"; This only exits the subshell caused by the (..) group.
interactive_query "Analyze data with pipeline ${magenta}$pipeline${normal}?" || continue # TODO: interactive_query exits upon "no"; This only exits the subshell caused by the (..) group.
)
analyse_single_pipeline "$pipeline"
done
......@@ -295,7 +295,7 @@ show_info
## Workflow
[[ $args_deployment == true ]] && deploy_bfr_abc
[[ $args_analysis == true ]] && analyse_bfr_abc
[[ $args_analysis == true ]] && analyze_bfr_abc
logglobal "All steps were logged to: $logfile"
logglobal "[STOP] $script_real"
......
......@@ -2,7 +2,7 @@
## [Goal] Helper Functions for Bash Scripts of https://gitlab.bfr.bund.de/4nsz/scripts.git
## [Author] Holger Brendebach
## [Version] 1.0.16
## [Version] 1.0.17
## Notification Trap --------------------------------------------------
......@@ -13,7 +13,7 @@ error_handler() {
## NOTE: notification hierarchy: .bash-env and crontab define "EMAIL" as NGSadmin@bfr.bund.de, accordingly,
## NOTE: additional recipients of ERROR notifications should be added as an email2 string;
## NOTE: lower-case "email" is used in config files for SUCCESS notifications
[[ ${dryrun:-"false"} == false && -n ${EMAIL:-${email:-}} ]] && cat << MSG | mail -s "[${script_name:-}] Script Error${email_subject_suffix:-}" "${EMAIL:-${email:-NGSadmin@bfr.bund.de}}" "${EMAIL2:-${email2:-}}"
[[ ${dryrun:-"false"} == false && -n ${EMAIL:-${email:-}} && -x "$(command -v "mail")" ]] && cat << MSG | mail -s "[${script_name:-}] Script Error${email_subject_suffix:-}" "${EMAIL:-${email:-NGSadmin@bfr.bund.de}}" "${EMAIL2:-${email2:-}}"
Date: $(date +"%F %T")
Script: ${script_real:-}
Arguments: ${*:-${args:-"No arguments provided"}}
......