From Genome Analysis Wiki
Jump to navigationJump to search
13 bytes removed
, 10:12, 10 February 2012
Line 119: |
Line 119: |
| The first thing we'll do is use samtools to generate an initial list of variant sites, using the <code>mpileup</code> command. This command looks at the bases aligned to each location and flags locations that are likely to vary. By default, the results are stored in BCF file, which can be converted into the more widely used VCF format using bcftools (a companion set of tools distributed with samtools). | | The first thing we'll do is use samtools to generate an initial list of variant sites, using the <code>mpileup</code> command. This command looks at the bases aligned to each location and flags locations that are likely to vary. By default, the results are stored in BCF file, which can be converted into the more widely used VCF format using bcftools (a companion set of tools distributed with samtools). |
| | | |
− | mkdir result | + | |
− | samtools mpileup -Iuf ref/human_g1k_v37_chr20.fa bams/SAMPLE*bam | bcftools view -bvcg - > result/chr20.mpileup.bcf
| + | samtools mpileup -Iuf ref/human_g1k_v37_chr20.fa bams/SAMPLE*bam | bcftools view -bvcg - > result/chr20.mpileup.bcf |
| | | |
| bcftools view result/chr20.bcf | sed s/AF1/AF/g | grep -v AF=1 > result/chr20.mpileup.vcf | | bcftools view result/chr20.bcf | sed s/AF1/AF/g | grep -v AF=1 > result/chr20.mpileup.vcf |