#!/bin/bash set -e set -o pipefail umask 0002 #### SET THE STAGE SCRATCH_DIR=/scratch/Bowtie2_2024-11-01--10-14-56_NA12891_chr10_temp$$ GSTORE_DIR=/srv/GT/analysis/course_sushi/public/gstore/projects INPUT_DATASET=/srv/GT/analysis/course_sushi/public/gstore/projects/p1010/Bowtie2_2024-11-01--10-14-56/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/samtools/1.20 Aligner/Bowtie2/2.5.4 QC/fastp/0.23.4 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']] = '8' param[['ram']] = '30' param[['scratch']] = '200' param[['partition']] = 'course' param[['process_mode']] = 'SAMPLE' param[['samples']] = 'NA12878_chr10,NA12889_chr10,NA12890_chr10,NA12891_chr10,NA12892_chr10' param[['refBuild']] = 'Homo_sapiens/Ensembl/GRCh37.p13/Annotation/Version-2015-03-05' param[['paired']] = 'true' param[['secondRef']] = '' param[['cmdOptions']] = '--no-mixed --no-discordant --very-sensitive -X 1000' param[['trimAdapter']] = 'true' param[['trim_front1']] = '0' param[['trim_tail1']] = '0' param[['cut_front']] = 'true' param[['cut_front_window_size']] = '4' param[['cut_front_mean_quality']] = '20' param[['cut_tail']] = 'true' param[['cut_tail_window_size']] = '4' param[['cut_tail_mean_quality']] = '20' param[['cut_right']] = 'true' param[['cut_right_window_size']] = '4' param[['cut_right_mean_quality']] = '20' param[['average_qual']] = '20' param[['max_len1']] = '0' param[['max_len2']] = '0' param[['poly_x_min_len']] = '10' param[['length_required']] = '18' param[['cmdOptionsFastp']] = '' param[['markDuplicates']] = 'true' param[['generateBigWig']] = 'false' param[['specialOptions']] = '' param[['mail']] = '' param[['sushi_app']] = 'Bowtie2App' param[['dataRoot']] = '/srv/GT/analysis/course_sushi/public/gstore/projects' param[['resultDir']] = 'p1010/Bowtie2_2024-11-01--10-14-56' param[['isLastJob']] = FALSE output = list() output[['Name']] = 'NA12891_chr10' output[['BAM [File]']] = 'p1010/Bowtie2_2024-11-01--10-14-56/NA12891_chr10.bam' output[['BAI [File]']] = 'p1010/Bowtie2_2024-11-01--10-14-56/NA12891_chr10.bam.bai' output[['IGV [Link]']] = 'p1010/Bowtie2_2024-11-01--10-14-56/NA12891_chr10-igv.html' output[['Species']] = 'Homo sapien' output[['refBuild']] = 'Homo_sapiens/Ensembl/GRCh37.p13/Annotation/Version-2015-03-05' output[['paired']] = 'true' output[['Read Count']] = '250000' output[['IGV [File]']] = 'p1010/Bowtie2_2024-11-01--10-14-56/NA12891_chr10-igv.html' output[['PreprocessingLog [File]']] = 'p1010/Bowtie2_2024-11-01--10-14-56/NA12891_chr10_preprocessing.log' output[['Bowtie2Log [File]']] = 'p1010/Bowtie2_2024-11-01--10-14-56/NA12891_chr10_bowtie2.log' input = list() input[['Name']] = 'NA12891_chr10' input[['Read1']] = 'p1000/chr10_WES_reads_subSampled/NA12891_chr10_R1.fastq.gz' input[['Read2']] = 'p1000/chr10_WES_reads_subSampled/NA12891_chr10_R2.fastq.gz' input[['Adapter1']] = 'GATCGGAAGAGCACACGTCTGAACTCCAGTCAC' input[['Adapter2']] = 'AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGT' input[['strandMode']] = 'both' input[['Species']] = 'Homo sapien' input[['Read Count']] = '250000' EzAppBowtie2\$new()\$run(input=input, output=output, param=param) EOT #### JOB IS DONE WE PUT THINGS IN PLACE AND CLEAN AUP rsync -r NA12891_chr10.bam /srv/GT/analysis/course_sushi/public/gstore/projects/p1010/Bowtie2_2024-11-01--10-14-56/ rsync -r NA12891_chr10.bam.bai /srv/GT/analysis/course_sushi/public/gstore/projects/p1010/Bowtie2_2024-11-01--10-14-56/ rsync -r NA12891_chr10-igv.html /srv/GT/analysis/course_sushi/public/gstore/projects/p1010/Bowtie2_2024-11-01--10-14-56/ rsync -r NA12891_chr10_preprocessing.log /srv/GT/analysis/course_sushi/public/gstore/projects/p1010/Bowtie2_2024-11-01--10-14-56/ rsync -r NA12891_chr10_bowtie2.log /srv/GT/analysis/course_sushi/public/gstore/projects/p1010/Bowtie2_2024-11-01--10-14-56/ cd /scratch rm -rf /scratch/Bowtie2_2024-11-01--10-14-56_NA12891_chr10_temp$$ || exit 1 echo __SCRIPT END__