#!/bin/bash set -e set -o pipefail umask 0002 #### SET THE STAGE SCRATCH_DIR=/scratch/Flash_2024-11-06--17-08-01_NA12878_chr10_temp$$ GSTORE_DIR=/srv/GT/analysis/course_sushi/public/gstore/projects INPUT_DATASET=/srv/GT/analysis/course_sushi/public/gstore/projects/p1001/Flash_2024-11-06--17-08-01/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 Tools/FLASH/1.2.11 QC/fastp/0.23.4 Dev/R/4.4.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']] = '8' param[['ram']] = '30' param[['scratch']] = '100' param[['partition']] = 'user' param[['process_mode']] = 'SAMPLE' param[['samples']] = 'NA12878_chr10,NA12889_chr10,NA12890_chr10,NA12891_chr10,NA12892_chr10' 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']] = 'FlashApp' param[['paired']] = 'true' param[['dataRoot']] = '/srv/GT/analysis/course_sushi/public/gstore/projects' param[['resultDir']] = 'p1001/Flash_2024-11-06--17-08-01' param[['isLastJob']] = FALSE output = list() output[['Name']] = 'NA12878_chr10' output[['Read1 [File]']] = 'p1001/Flash_2024-11-06--17-08-01/NA12878_chr10.extendedFrags.fastq.gz' output[['FlashLog [File]']] = 'p1001/Flash_2024-11-06--17-08-01/NA12878_chr10_flash.log' output[['TrimmomaticLog [File]']] = 'p1001/Flash_2024-11-06--17-08-01/NA12878_chr10_preprocessing.log' output[['Species']] = 'Homo sapien' output[['Read Count']] = '250000' input = list() input[['Name']] = 'NA12878_chr10' input[['Read1']] = 'p1000/chr10_WES_reads_subSampled/NA12878_chr10_R1.fastq.gz' input[['Read2']] = 'p1000/chr10_WES_reads_subSampled/NA12878_chr10_R2.fastq.gz' input[['Adapter1']] = 'GATCGGAAGAGCACACGTCTGAACTCCAGTCAC' input[['Adapter2']] = 'AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGT' input[['strandMode']] = 'both' input[['Species']] = 'Homo sapien' input[['Read Count']] = '250000' EzAppFlash\$new()\$run(input=input, output=output, param=param) EOT #### JOB IS DONE WE PUT THINGS IN PLACE AND CLEAN AUP rsync -r NA12878_chr10.extendedFrags.fastq.gz /srv/GT/analysis/course_sushi/public/gstore/projects/p1001/Flash_2024-11-06--17-08-01/ rsync -r NA12878_chr10_flash.log /srv/GT/analysis/course_sushi/public/gstore/projects/p1001/Flash_2024-11-06--17-08-01/ rsync -r NA12878_chr10_preprocessing.log /srv/GT/analysis/course_sushi/public/gstore/projects/p1001/Flash_2024-11-06--17-08-01/ cd /scratch rm -rf /scratch/Flash_2024-11-06--17-08-01_NA12878_chr10_temp$$ || exit 1 echo __SCRIPT END__