#BSUB -L /bin/bash # uses the bash login shell for job environment #BSUB -J bwa2delly # job name #BSUB -n 4 # assigns 4 cores for execution #BSUB -R "span[ptile=4]" # assigns 4 cores per node #BSUB -R "rusage[mem=2500]" # reserves 2500MB memory per core #BSUB -M 2500 # sets to 2500MB per process enforceable memory limit. #BSUB -W 24:00 # sets to 24 hour the job's runtime wall-clock limit. #BSUB -o stdout.%J # directs the job's standard output to stdout.jobid #BSUB -e stderr.%J # directs the job's standard error to stderr.jobid module load BWA/0.7.17-intel-2018b module load picard/2.18.27-Java-1.8.0 module load SAMtools/1.9-intel-2018b module load Delly/0.8.1-intel-2018b module load BCFtools/1.9-intel-2018b < $TMPDIR/${sample}_bwa_sampe_out.sam # sort sam picard; validation is because some reads align past the end of the reference chromosome java -Xmx48g -jar $EBROOTPICARD/picard.jar SortSam TMP_DIR=$TMPDIR I=$TMPDIR/${sample}_bwa_sampe_out.sam O=$TMPDIR/${sample}_sorted.bam SO=coordinate VALIDATION_STRINGENCY=LENIENT # mark duplicates with picard java -jar $EBROOTPICARD/picard.jar MarkDuplicates TMP_DIR=$TMPDIR I=$TMPDIR/${sample}_sorted.bam O=${sample}_sorted_dedup.bam METRICS_FILE=${sample}_dup.metrics VALIDATION_STRINGENCY=LENIENT # index bam files samtools index ${sample}_sorted_dedup.bam # call variants with delly delly call --genome $ref_genome --outfile $out_bcf_file ${sample}_sorted_dedup.bam # create a vcf file from the bcf file bcftools view $out_bcf_file > $out_vcf_file <