Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

NEW VERSION: Commands to use samtools with a bam file, input.bam,

1. samtools mpileup -uf reference.fna aln1.bam aln2.bam | bcftools view -bvcg - > var.raw.bcf

where reference.fna : reference, in fasta format

aln1.bam, aln2.bam : BAM files containing alignment results. You can use 1 or more alignment flies at a time.

2. bcftools view var.raw.bcf | vcfutils.pl varFilter -D10 > var.filtered.vcf

BCFtools does the actual calling of SNPS and the SNP information is stored in var.filtered.vcf. -D option is used to filter by depth of coverage at the SNP location.

Information about VCF file and other filter options at : http://samtools.sourceforge.net/mpileup.shtml

OLD VERSION: Commands to use samtools with a bam file, input.bam,

1. Use samtools pileup to call SNPs

samtools pileup -vcf reference.fna input.bam > out.pileup 2>out.log &

where reference.fna  : reference file, in fasta format

          input.bam  : BAM file containing alignment results

2. Filter the results further by snp quality:

samtools.pl out.pileup||awk '$6>=20' > out.final.pileup

  • No labels