Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1) Make a shell script to merge all libraries run on multiple lanes (e.g. merge.sh)
- ~/bin/gatk-4.0.8.1/gatk MergeSamFiles --INPUT ~/markdup.bam --INPUT ~/markdup.bam --OUTPUT ~/1935_merged_markdup.bam
- ~/bin/gatk-4.0.8.1/gatk MergeSamFiles --INPUT ~/markdup.bam --INPUT ~/markdup.bam --OUTPUT ~/1936_merged_markdup.bam
- ...
- 2) Update readgroup info so the merged files are treated as one (or add it to the previous script)
- java -jar /data/lib/java/picard.jar AddOrReplaceReadGroups I=1935_merged_markdup.bam O=1935_merged_markdup_RG.bam RGID=4 RGLB=lib12 RGPL=illumina RGPU=unit1 RGSM=1935_m
- java -jar /data/lib/java/picard.jar AddOrReplaceReadGroups I=1936_merged_markdup.bam O=1936_merged_markdup_RG.bam RGID=5 RGLB=lib12 RGPL=illumina RGPU=unit1 RGSM=1936_m
- ...
- 3) Write a shell script to index these new bam files (or add it to the previous script)
- samtools index 1935_merged_markdup_RG.bam
- samtools index 1936_merged_markdup_RG.bam
- ...
- 4) Call SNPs
- ~/bin/gatk-4.0.8.1/gatk HaplotypeCaller -R ~/aws_pseudohap_uniq_apr_kraken2_hardmask_allrepeatmasker.fa -I ~/1935_merged_markdup_RG.bam -I ~/1935_merged_markdup_RG.bam -O HapCaller_RGupdate.vcf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement