#!/bin/bash set -e set -o pipefail umask 0002 #### SET THE STAGE SCRATCH_DIR=/scratch/o31309_FastqScreen_2024-12-11--13-16-09_temp$$ GSTORE_DIR=/srv/GT/analysis/course_sushi/public/gstore/projects INPUT_DATASET=/srv/GT/analysis/course_sushi/public/gstore/projects/p8001/o31309_FastqScreen_2024-12-11--13-16-09/input_dataset.tsv LAST_JOB=TRUE 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 Tools/samtools/1.20 Aligner/Bowtie2/2.5.4 QC/fastp/0.23.4 Tools/kraken/2.1.3 QC/FastQScreen/0.14.1 Dev/R/4.4.0 Tools/Picard/3.2.0 #### 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']] = 'DATASET' param[['samples']] = '313091_1-,313092_1-,313093_1-,313094_1-,313095_1-,313096_1-,313097_1-,313098_1-' param[['paired']] = 'false' param[['name']] = 'FastqScreen_Result' param[['nReads']] = '100000' param[['nTopSpecies']] = '5' param[['minAlignmentScore']] = '-20' param[['cmdOptions']] = '-k 10 --trim5 4 --trim3 4 --very-sensitive' 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[['mail']] = '' param[['sushi_app']] = 'FastqScreenApp' param[['dataRoot']] = '/srv/GT/analysis/course_sushi/public/gstore/projects' param[['resultDir']] = 'p8001/o31309_FastqScreen_2024-12-11--13-16-09' param[['isLastJob']] = TRUE output = list() output[['Name']] = 'FastqScreen_Result' output[['Report [File]']] = 'p8001/o31309_FastqScreen_2024-12-11--13-16-09/FastqScreen_Result' output[['Html [Link]']] = 'p8001/o31309_FastqScreen_2024-12-11--13-16-09/FastqScreen_Result/00index.html' output[['Order Id [B-Fabric]']] = '31309' input = '/srv/GT/analysis/course_sushi/public/gstore/projects/p8001/o31309_FastqScreen_2024-12-11--13-16-09/input_dataset.tsv' EzAppFastqScreen\$new()\$run(input=input, output=output, param=param) EOT #### JOB IS DONE WE PUT THINGS IN PLACE AND CLEAN AUP rsync -r FastqScreen_Result /srv/GT/analysis/course_sushi/public/gstore/projects/p8001/o31309_FastqScreen_2024-12-11--13-16-09/ cd /scratch rm -rf /scratch/o31309_FastqScreen_2024-12-11--13-16-09_temp$$ || exit 1 echo __SCRIPT END__