From fe3004005f986eff052a79bb78ac3c81552f92d5 Mon Sep 17 00:00:00 2001 From: MatthewThe Date: Fri, 3 Jul 2020 16:43:11 +0200 Subject: [PATCH] Updated quandenser injections --- Quandenser_pipeline.sh | 15 +- build_image.sh | 1 + .../nextflow_alignment_tree_test/run.sh | 0 dependencies/ui/config/run_quandenser.nf | 146 +++++++++--------- 4 files changed, 85 insertions(+), 77 deletions(-) mode change 100644 => 100755 dependencies/ui/config/nextflow_alignment_tree_test/run.sh diff --git a/Quandenser_pipeline.sh b/Quandenser_pipeline.sh index 03e4c27..e014f5b 100755 --- a/Quandenser_pipeline.sh +++ b/Quandenser_pipeline.sh @@ -50,7 +50,7 @@ do # Check if user wants to install local scripts read_config_location="true" elif [ "$read_config_location" = "true" ]; then - read_config_location="false" + read_config_location="changed" if [[ -d $var ]]; then # If it is an existing path, set it config_location=$(realpath "$var") else @@ -231,23 +231,30 @@ fi if [ "$gui_free_installation" == "true" ]; then # Check if user wants to install local scripts and exit mkdir -p ./out - #base_url="$SCRIPTDIR/dependencies/ui/config/" + + #base_url="/home/matthewt/storage/quandenser-pipeline/dependencies/ui/config/" #cp $base_url/run_quandenser.sh ./ #cp $base_url/run_quandenser.nf ./ #cp $base_url/nextflow ./ #cp $base_url/nf.config ./out/ + base_url="https://raw.githubusercontent.com/statisticalbiotechnology/quandenser-pipeline/master/dependencies/ui/config/" wget -q $base_url/run_quandenser.sh wget -q $base_url/run_quandenser.nf wget -q $base_url/nextflow wget -qO ./out/nf.config $base_url/nf.config + chmod a+x run_quandenser.sh chmod a+x nextflow if [ ! -f file_list.txt ]; then echo -e "file1.mzML\tcase\nfile2.mzML\tcase\nfile3.mzML\tcontrol\nfile4.mzML\tcontrol" > file_list.txt fi - sed -i 's|CONFIG_LOCATION="/home/$USER/.quandenser_pipeline"|CONFIG_LOCATION=`pwd`|g' run_quandenser.sh + if [ "$read_config_location" == "changed" ]; then + sed -i "s|CONFIG_LOCATION=\"\"|CONFIG_LOCATION=\"${config_location}\"|g" run_quandenser.sh + else + sed -i 's|CONFIG_LOCATION=""|CONFIG_LOCATION=`pwd`|g' run_quandenser.sh + fi sed -i 's|OUTPUT_PATH=""|export OUTPUT_PATH=`pwd`/out|g' run_quandenser.sh if [ "$use_docker" == "true" ]; then sed -i 's|USE_DOCKER="false"|USE_DOCKER="true"|g' run_quandenser.sh @@ -260,7 +267,7 @@ if [ "$gui_free_installation" == "true" ]; then # Check if user wants to install printf "${YELLOW}Installed scripts in current working directory.${RESET}" printf "${YELLOW}Please configure scripts by editing out/nf.config and run_quandenser.sh.${RESET}" - printf "${YELLOW}You will also need to edit the tab-delimited file, file_list.txt, specifying" + printf "${YELLOW}You will also need to edit the tab-delimited file, file_list.txt, specifying " printf "the files you want to process and their sample group.${RESET}" printf "${YELLOW}You will then be able to run the pipleline with run_quandenser.sh${RESET}" exit 0 diff --git a/build_image.sh b/build_image.sh index 38612be..eb3cf65 100755 --- a/build_image.sh +++ b/build_image.sh @@ -2,4 +2,5 @@ # Note, You can change the tmpdir to another location #sudo SINGULARITY_TMPDIR=/tmp singularity build SingulQuand.SIF Singularity +rsync -azP /home/matthewt/quandenser/ quandenser docker build -t matthewthe/quandenser-pipeline-i-agree-to-the-vendor-licenses:latest . diff --git a/dependencies/ui/config/nextflow_alignment_tree_test/run.sh b/dependencies/ui/config/nextflow_alignment_tree_test/run.sh old mode 100644 new mode 100755 diff --git a/dependencies/ui/config/run_quandenser.nf b/dependencies/ui/config/run_quandenser.nf index 2d666f4..ffdcee1 100644 --- a/dependencies/ui/config/run_quandenser.nf +++ b/dependencies/ui/config/run_quandenser.nf @@ -14,43 +14,6 @@ if (params.resume_directory != "") { file_def = file(params.batch_file) // batch_file -// change the path to where the database is and the batch file is if you are only doing msconvert -if( params.workflow == "MSconvert" || params.workflow == "Quandenser" ) { - db_file = params.batch_file // Will not be used, so junk name -} else { - db_file = params.db -} -db = file(db_file) // Sets "db" as the file defined above -seq_index_name = "${db.getName()}.index" // appends "index" to the db filename - -if (params.workflow == "MSconvert") { - spectra_in = Channel.from(1) // This prevents name collision crash - - Channel // non-mzML files with proper labeling which will be converted - .from(file_def.readLines()) - .map { it -> it.tokenize('\t') } - .filter { it.size() > 1 } // filters any input that is not - .map { it -> file(it[0]) } - .into { spectra_convert } -} else { - // Preprocessing file_list - Channel // mzML files with proper labeling - .from(file_def.readLines()) - .map { it -> it.tokenize('\t') } - .filter { it.size() > 1 } // filters any input that is not