Skip to content

Instantly share code, notes, and snippets.

@Psy-Fer
Created May 24, 2021 00:43
Show Gist options
  • Save Psy-Fer/92cbc3ecdef1f506e5490fdc15bf78d8 to your computer and use it in GitHub Desktop.
Save Psy-Fer/92cbc3ecdef1f506e5490fdc15bf78d8 to your computer and use it in GitHub Desktop.
# where $1 is the sample name. eg sample-0112, for naming scheme sample-0112_merged.bam, etc.
samtools mpileup \
-f nCoV-2019.reference.fasta \
--max-depth 1000 \
--positions nCoV-2019.reportable_region.bed \
${1}_merged.bam -o ${1}_merged.mpileup
java -jar VarScan.v2.4.3.jar mpileup2snp \
${1}_merged.mpileup \
--min-coverage 50 \
--min-reads2 5 \
--min-var-freq 0.05 \
--p-value 0.99 \
--variants \
--output-vcf \
--strand-filter 0 \
> ${1}.raw_varscan_snvs.vcf
java -jar VarScan.v2.4.3.jar mpileup2indel \
${1}_merged.mpileup \
--min-coverage 50 \
--min-reads2 5 \
--min-var-freq 0.05 \
--p-value 0.99 \
--variants \
--output-vcf \
--strand-filter 0 \
> ${1}.raw_varscan_indel.vcf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment