#!/bin/bash set -e set -o pipefail umask 0002 #### SET THE STAGE SCRATCH_DIR=/scratch/Kraken_2024-12-13--09-46-12_sample1_temp$$ GSTORE_DIR=/srv/GT/analysis/course_sushi/public/gstore/projects INPUT_DATASET=/srv/GT/analysis/course_sushi/public/gstore/projects/p8004/Kraken_2024-12-13--09-46-12/input_dataset.tsv LAST_JOB=FALSE echo "Job runs on `hostname`" echo "at $SCRATCH_DIR" mkdir $SCRATCH_DIR || exit 1 cd $SCRATCH_DIR || exit 1 source /usr/local/ngseq/etc/lmod_profile module add QC/fastp/0.23.4 Dev/R/4.4.0 Tools/kraken/2.1.3 Tools/Krona/2.8.1 #### NOW THE ACTUAL JOBS STARTS R --vanilla --slave<< EOT EZ_GLOBAL_VARIABLES <<- '/usr/local/ngseq/opt/EZ_GLOBAL_VARIABLES.txt' if (!library(ezRun, logical.return = TRUE)){ message('retry loading ezRun') Sys.sleep(120) library(ezRun) } param = list() param[['cores']] = '4' param[['ram']] = '15' param[['scratch']] = '30' param[['partition']] = 'course' param[['process_mode']] = 'SAMPLE' param[['samples']] = 'sample1,sample2' param[['paired']] = 'false' param[['krakenDBOpt']] = 'bacteria' param[['krakenConfidenceOpt']] = '0.0' param[['krakenPhredOpt']] = '0' param[['cmdOptions']] = '' param[['trimAdapter']] = 'true' param[['trim_front1']] = '0' param[['trim_tail1']] = '0' param[['cut_front']] = 'false' param[['cut_front_window_size']] = '4' param[['cut_front_mean_quality']] = '20' param[['cut_tail']] = 'false' param[['cut_tail_window_size']] = '4' param[['cut_tail_mean_quality']] = '20' param[['cut_right']] = 'false' param[['cut_right_window_size']] = '4' param[['cut_right_mean_quality']] = '20' param[['average_qual']] = '0' param[['max_len1']] = '0' param[['max_len2']] = '0' param[['poly_x_min_len']] = '10' param[['length_required']] = '18' param[['cmdOptionsFastp']] = '' param[['markDuplicates']] = 'true' param[['mail']] = '' param[['sushi_app']] = 'KrakenApp' param[['dataRoot']] = '/srv/GT/analysis/course_sushi/public/gstore/projects' param[['resultDir']] = 'p8004/Kraken_2024-12-13--09-46-12' param[['isLastJob']] = FALSE output = list() output[['Name']] = 'sample1' output[['KronaReport [Link]']] = 'p8004/Kraken_2024-12-13--09-46-12/sample1.html' output[['KrakenOut [File]']] = 'p8004/Kraken_2024-12-13--09-46-12/sample1.txt' output[['KrakenReport [File]']] = 'p8004/Kraken_2024-12-13--09-46-12/sample1.report.txt' output[['KronaOutDir [File]']] = 'p8004/Kraken_2024-12-13--09-46-12/sample1.html.files' output[['KronaOut [File]']] = 'p8004/Kraken_2024-12-13--09-46-12/sample1.html' input = list() input[['Name']] = 'sample1' input[['Read1']] = 'p6000/MetaAtlas_data/sample1_R1.fastq.gz' input[['Read2']] = 'p6000/MetaAtlas_data/sample1_R2.fastq.gz' EzAppKraken\$new()\$run(input=input, output=output, param=param) EOT #### JOB IS DONE WE PUT THINGS IN PLACE AND CLEAN AUP rsync -r sample1.txt /srv/GT/analysis/course_sushi/public/gstore/projects/p8004/Kraken_2024-12-13--09-46-12/ rsync -r sample1.report.txt /srv/GT/analysis/course_sushi/public/gstore/projects/p8004/Kraken_2024-12-13--09-46-12/ rsync -r sample1.html.files /srv/GT/analysis/course_sushi/public/gstore/projects/p8004/Kraken_2024-12-13--09-46-12/ rsync -r sample1.html /srv/GT/analysis/course_sushi/public/gstore/projects/p8004/Kraken_2024-12-13--09-46-12/ cd /scratch rm -rf /scratch/Kraken_2024-12-13--09-46-12_sample1_temp$$ || exit 1 echo __SCRIPT END__