Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Expand
Commands for doing this if you've been following the tutorials...
Commands for doing this if you've been following the tutorials...
Code Block
mkdir samtools_bowtie
cp bowtie/SRR030257.sam samtools_bowtie
cp bowtie/NC_012967.1.fasta samtools_bowtie

...

  • What new files were created by these commands?
    Expand
    Check that
    Check that
    Code Block
    titleList the contents of the output directory
    ls samtools_bowtie
    
    Code Block
    titleExpected output
    NC_012967.1.fasta      SRR030257.bcf         SRR030257.sorted.bam.bai
    NC_012967.1.fasta.fai  SRR030257.sam
    SRR030257.bam          SRR030257.sorted.bam
    
  • Why didn't we name the output SRR030257.sorted.bam in the samtools sort command?
    Expand
    Answer...
    Answer...

    Samtools appends an extra .bam to whatever we put here, so it would have created SRR030257.sorted.bam.bam, and we would have had to make a joke about the Flintstones.

  • Can you guess what a *.bai file is?
    Expand
    Answer...
    Answer...

    Sure enough, it's the index file for the BAM file.

...

Output BCF file. This is a binary form of the text Variant Call Format (VCF).

Code Block
titleThis is *one* command. Put it all on one line.
samtools mpileup -u -f samtools_bowtie/NC_012967.1.fasta samtools_bowtie/SRR030257.sorted.bam > samtools_bowtie/SRR030257.bcf

...

Convert BCF to human-readable VCF:

Code Block
titleThis is *one* command. Put it all on one line.
bcftools view -v -c -g samtools_bowtie/SRR030257.bcf > samtools_bowtie/SRR030257.vcf

...