Skip to content
This repository has been archived by the owner on Feb 28, 2025. It is now read-only.

Commit

Permalink
Create bqsr_recal_nonhuman.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
georgiesamaha authored Dec 13, 2021
1 parent 614ea18 commit 6777ec8
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions bqsr_recal_nonhuman.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/bin/bash

##########################################################################
#
# Platform: NCI Gadi HPC
# Usage: this script is run by bqsr_recal_run_parallel.pbs
# Version: 2.0
#
# For more details see: https://github.com/Sydney-Informatics-Hub/Fastq-to-BAM
#
# If you use this script towards a publication, please acknowledge the
# Sydney Informatics Hub (or co-authorship, where appropriate).
#
# Suggested acknowledgement:
# The authors acknowledge the support provided by the Sydney Informatics Hub,
# a Core Research Facility of the University of Sydney. This research/project
# was undertaken with the assistance of resources and services from the National
# Computational Infrastructure (NCI), which is supported by the Australian
# Government, and the Australian BioCommons which is enabled by NCRIS via
# Bioplatforms Australia funding.
#
##########################################################################


labSampleID=`echo $1 | cut -d ',' -f 1`
intNum=`echo $1 | cut -d ',' -f 2`
interval=`echo $1 | cut -d ',' -f 3`

echo $labSampleID $intNum $interval

bam=../Dedup_sort/${labSampleID}.coordSorted.dedup.bam
log=./Logs/BQSR_recal/${labSampleID}.${intNum}.log
err=./Logs/BQSR_recal_error_capture/${labSampleID}.${intNum}.err
out=../BQSR_tables/${labSampleID}.${intNum}.recal_data.table

ref=
dbsnp= # edit this depending on your reference

gatk BaseRecalibrator \
--java-options "-Xmx20g -DGATK_STACKTRACE_ON_USER_EXCEPTION=true" \
-R $ref \
-L $interval \
-I $bam \
--known-sites $dbsnp \
-O $out >> $log 2>&1


if grep -q -i error $log
then
printf "Error in GATK log ${log}\n" >> $err
fi

if grep -q Exception $log
then
printf "Exception in GATK log ${log}\n" >> $err
fi

0 comments on commit 6777ec8

Please sign in to comment.