#!/bin/bash #SBATCH --dependency=afterany:3723:3724:3725:3726:3727 set -e set -o pipefail umask 0002 #### SET THE STAGE SCRATCH_DIR=/scratch/samtoolsmpileup_single_HB_2024-11-01--13-16-26_temp$$ GSTORE_DIR=/srv/GT/analysis/course_sushi/public/gstore/projects INPUT_DATASET=/srv/GT/analysis/course_sushi/public/gstore/projects/p1000/samtoolsmpileup_single_HB_2024-11-01--13-16-26/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 Tools/bcftools/1.20 Dev/jdk/21 Tools/Picard/3.2.0 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']] = 'course' param[['process_mode']] = 'DATASET' param[['samples']] = 'NA12878_chr10' param[['paired']] = 'true' param[['name']] = 'Mpileup_Variants' param[['refBuild']] = 'Homo_sapiens/Ensembl/GRCh37.p13/Annotation/Version-2015-03-05' param[['region']] = '' param[['mpileupOptions']] = '--skip-indels --annotate AD,INFO/AD,ADF,ADR,SP' param[['callOptions']] = '--multiallelic-caller --keep-alts --variants-only' param[['filterOptions']] = '--include "MIN(DP)>5"' param[['specialOptions']] = '' param[['mail']] = '' param[['sushi_app']] = 'MpileupApp' param[['dataRoot']] = '/srv/GT/analysis/course_sushi/public/gstore/projects' param[['resultDir']] = 'p1000/samtoolsmpileup_single_HB_2024-11-01--13-16-26' param[['isLastJob']] = TRUE output = list() output[['Name']] = 'Mpileup_Variants' output[['VCF [File]']] = 'p1000/samtoolsmpileup_single_HB_2024-11-01--13-16-26/Mpileup_Variants.vcf.gz' output[['TBI [File]']] = 'p1000/samtoolsmpileup_single_HB_2024-11-01--13-16-26/Mpileup_Variants.vcf.gz.tbi' output[['Report [File]']] = 'p1000/samtoolsmpileup_single_HB_2024-11-01--13-16-26/Mpileup_Variants' output[['Html [Link]']] = 'p1000/samtoolsmpileup_single_HB_2024-11-01--13-16-26/Mpileup_Variants/00index.html' output[['Species']] = 'Homo sapien' output[['refBuild']] = 'Homo_sapiens/Ensembl/GRCh37.p13/Annotation/Version-2015-03-05' input = '/srv/GT/analysis/course_sushi/public/gstore/projects/p1000/samtoolsmpileup_single_HB_2024-11-01--13-16-26/input_dataset.tsv' EzAppMpileup\$new()\$run(input=input, output=output, param=param) EOT #### JOB IS DONE WE PUT THINGS IN PLACE AND CLEAN AUP rsync -r Mpileup_Variants.vcf.gz /srv/GT/analysis/course_sushi/public/gstore/projects/p1000/samtoolsmpileup_single_HB_2024-11-01--13-16-26/ rsync -r Mpileup_Variants.vcf.gz.tbi /srv/GT/analysis/course_sushi/public/gstore/projects/p1000/samtoolsmpileup_single_HB_2024-11-01--13-16-26/ rsync -r Mpileup_Variants /srv/GT/analysis/course_sushi/public/gstore/projects/p1000/samtoolsmpileup_single_HB_2024-11-01--13-16-26/ cd /scratch rm -rf /scratch/samtoolsmpileup_single_HB_2024-11-01--13-16-26_temp$$ || exit 1 echo __SCRIPT END__