Skip to content

Instantly share code, notes, and snippets.

@geniusphil
Last active September 6, 2020 11:08
Show Gist options
  • Save geniusphil/75dca4b6c9395e9fb4e63fd78f27f468 to your computer and use it in GitHub Desktop.
Save geniusphil/75dca4b6c9395e9fb4e63fd78f27f468 to your computer and use it in GitHub Desktop.
digi_plus_talent_note

Analysis flow

  1. bwa mem alignment
  2. samtools convert sam to bam
  3. sambamba sort
  4. sambamba mark duplication (markdup)
  5. GATK Haplotype Caller
  6. GATK GVCFs -> final vcf file
  7. Annovar -- vcf to annovar input
  8. Annovar -- table_annovar

bam/sam flags resource

http://broadinstitute.github.io/picard/explain-flags.html https://www.samformat.info/sam-format-flag https://www.samformat.info/sam-format-flag-single https://ppotato.wordpress.com/2010/08/25/samtool-bitwise-flag-paired-reads/ https://biobeat.wordpress.com/2013/04/29/directional-rna-seq-part-1-extract-strand-information-from-sam-file/ https://ppotato.files.wordpress.com/2010/08/slide1.png

Create bam index

After sortd
/pkg/biology/SAMtools/SAMtools_v1.9/bin/samtools index NA12878_MOD_sorted.bam

Flagstat

/pkg/biology/SAMtools/SAMtools_v1.9/bin/samtools flagstat NA12878_MOD_sorted.bam >  NA12878_MOD_sorted.bam.flagstat
or 
/pkg/biology/SAMtools/SAMtools_v1.9/bin/samtools stats NA12878_MOD_sorted.bam > NA12878_MOD_sorted.bam.stats
@geniusphil
Copy link
Author

Count fastq reads

echo $(zcat NA12878MOD_1.fastq.gz | wc -l)/4 | bc

@geniusphil
Copy link
Author

@geniusphil
Copy link
Author

/pkg/biology/ANNOVAR/ANNOVAR_20200608/table_annovar.pl chr20.gatk.avinput /work1/ACD109058/humandb/ -buildver hg38 -out chr20.gatk -remove -protocol refGene,ensGene,cytoBand,genomicSuperDups,gwasCatalog,avsnp150,esp6500siv2_all,1000g2015aug_all,1000g2015aug_afr,1000g2015aug_amr,1000g2015aug_eur,1000g2015aug_eas,1000g2015aug_sas,nci60,clinvar_20190305,gnomad211_genome,exac03,intervar_20180118,dbnsfp31a_interpro -operation g,g,r,r,r,f,f,f,f,f,f,f,f,f,f,f,f,f,f -otherinfo -nastring NA

@geniusphil
Copy link
Author

  1. bwa mem alignment
  2. samtools convert sam to bam
  3. sambamba sort
  4. sambamba mark duplication (markdup)
  5. GATK Haplotype Caller
  6. GATK GVCFs -> final vcf file
  7. Annovar -- vcf to annovar input
  8. Annovar -- table_annovar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment