...
Each step above can be done with commands below
Code Block |
---|
module load samtools samtools view -bS <samfile> > <bamfile>
samtools sort <bamfile> <prefix of sorted bamfile>
samtools index <sorted bamfile>
|
Code Block |
---|
title | Copy a an exercise SAM file to your SCRATCH directory |
---|
|
cds
mkdir samtools_exercise
cd samtools_exercise
cp /corral-repl/utexas/BioITeam/core_ngs_tools/yeast_stuff/yeast_chip.sam .
|
...
Expand |
---|
|
Code Block |
---|
module load samtools
samtools view -bS yeast_chip.sam > yeast_chip.bam
samtools sort yeast_chip.bam yeast_chip_sort
samtools index yeast_chip_sort.bam
|
Sorting takes quite big memory and long time. In order to save time, copy the results. Code Block |
---|
| cp /corral-repl/utexas/BioITeam/core_ngs_tools/yeast_stuff/yeast_chip_sort.bam .
cp /corral-repl/utexas/BioITeam/core_ngs_tools/yeast_stuff/yeast_chip_sort.bam.bai . |
|
Basic mapping stats
Code Block |
---|
samtools flagstat <bamfile>
|
...
Expand |
---|
|
Code Block |
---|
samtools flagstat yeast_chip_sort.bam
|
|
Code Block |
---|
samtools idxstats <indexed bam file>
|
...
Expand |
---|
|
Code Block |
---|
samtools view yeast_chip_sort.bam chrIII:123456-124456 | wc -l
|
|
...