SAMtools-Teaching: Difference between revisions
(Created page with "Category:TeachingCategory:SoftwareCategory:Bioinformatics === Category === Bioinformatics === Program On === Teaching === Version === 0.1.19 ===...") |
No edit summary |
||
Line 9: | Line 9: | ||
=== Version === | === Version === | ||
1.6 | |||
=== Author / Distributor === | === Author / Distributor === | ||
Line 16: | Line 16: | ||
=== Description === | === Description === | ||
"SAM Tools provide various utilities for manipulating alignments in the SAM format, | "SAM Tools provide various utilities for manipulating alignments in the SAM format, including sorting, merging, indexing and generating alignments in a per-position format." | ||
More details are at [http://www.htslib.org/ SAMtools] | More details are at [http://www.htslib.org/ SAMtools] | ||
=== Running Program === | === Running Program === | ||
The last version of this application is at /usr/local/apps/eb/SAMtools/ | The last version of this application is at /usr/local/apps/eb/SAMtools/1.6-foss-2016b | ||
To use this version, please loads the module with | To use this version, please loads the module with | ||
<pre class="gscript"> | <pre class="gscript"> | ||
ml SAMtools/ | ml SAMtools/1.6-foss-2016b | ||
</pre> | </pre> | ||
Line 44: | Line 42: | ||
cd $SLURM_SUBMIT_DIR<br> | cd $SLURM_SUBMIT_DIR<br> | ||
ml SAMtools/1.6-foss-2016b<br> | |||
ml | samtools <u>[options]</u><br> | ||
</div> | </div> | ||
In the real submission script, at least all the above underlined values need to be reviewed or to be replaced by the proper values | In the real submission script, at least all the above underlined values need to be reviewed or to be replaced by the proper values. | ||
Please refer to [[Running_Jobs_on_the_teaching_cluster]], [[Running_Jobs_on_the_teaching_cluster#Running_an_X-windows_application | Run X window Jobs]] and [[Running_Jobs_on_the_teaching_cluster#How_to_open_an_interactive_session | Run interactive Jobs]] for more details of running jobs at Teaching cluster. | Please refer to [[Running_Jobs_on_the_teaching_cluster]], [[Running_Jobs_on_the_teaching_cluster#Running_an_X-windows_application | Run X window Jobs]] and [[Running_Jobs_on_the_teaching_cluster#How_to_open_an_interactive_session | Run interactive Jobs]] for more details of running jobs at Teaching cluster. | ||
Line 60: | Line 58: | ||
<pre class="gcommand"> | <pre class="gcommand"> | ||
SAMtools/ | ml SAMtools/1.6-foss-2016b | ||
samtools --help | samtools samtools --help | ||
[ | |||
Program: samtools (Tools for alignments in the SAM format) | |||
Version: 1.6 (using htslib 1.6) | |||
Usage: samtools <command> [options] | |||
Commands: | |||
-- Indexing | |||
dict create a sequence dictionary file | |||
faidx index/extract FASTA | |||
index index alignment | |||
-- Editing | |||
calmd recalculate MD/NM tags and '=' bases | |||
fixmate fix mate information | |||
reheader replace BAM header | |||
rmdup remove PCR duplicates | |||
targetcut cut fosmid regions (for fosmid pool only) | |||
addreplacerg adds or replaces RG tags | |||
markdup mark duplicates | |||
-- File operations | |||
collate shuffle and group alignments by name | |||
cat concatenate BAMs | |||
merge merge sorted alignments | |||
mpileup multi-way pileup | |||
sort sort alignment file | |||
split splits a file by read group | |||
quickcheck quickly check if SAM/BAM/CRAM file appears intact | |||
fastq converts a BAM to a FASTQ | |||
fasta converts a BAM to a FASTA | |||
-- Statistics | |||
bedcov read depth per BED region | |||
depth compute the depth | |||
flagstat simple stats | |||
idxstats BAM index stats | |||
phase phase heterozygotes | |||
stats generate stats (former bamcheck) | |||
-- Viewing | |||
flags explain BAM flags | |||
tview text alignment viewer | |||
view SAM<->BAM<->CRAM conversion | |||
depad convert padded BAM to unpadded BAM | |||
</pre> | </pre> |
Revision as of 10:36, 10 August 2018
Category
Bioinformatics
Program On
Teaching
Version
1.6
Author / Distributor
Description
"SAM Tools provide various utilities for manipulating alignments in the SAM format, including sorting, merging, indexing and generating alignments in a per-position format." More details are at SAMtools
Running Program
The last version of this application is at /usr/local/apps/eb/SAMtools/1.6-foss-2016b
To use this version, please loads the module with
ml SAMtools/1.6-foss-2016b
Here is an example of a shell script, sub.sh, to run on at the batch queue:
#!/bin/bash
#SBATCH --job-name=j_SAMtools
#SBATCH --partition=batch
#SBATCH --mail-type=ALL
#SBATCH --mail-user=username@uga.edu
#SBATCH --ntasks=1
#SBATCH --mem=10gb
#SBATCH --time=08:00:00
#SBATCH --output=SAMtools.%j.out
cd $SLURM_SUBMIT_DIR
ml SAMtools/1.6-foss-2016b
samtools [options]
In the real submission script, at least all the above underlined values need to be reviewed or to be replaced by the proper values.
Please refer to Running_Jobs_on_the_teaching_cluster, Run X window Jobs and Run interactive Jobs for more details of running jobs at Teaching cluster.
Here is an example of job submission command:
sbatch ./sub.sh
Documentation
ml SAMtools/1.6-foss-2016b samtools samtools --help Program: samtools (Tools for alignments in the SAM format) Version: 1.6 (using htslib 1.6) Usage: samtools <command> [options] Commands: -- Indexing dict create a sequence dictionary file faidx index/extract FASTA index index alignment -- Editing calmd recalculate MD/NM tags and '=' bases fixmate fix mate information reheader replace BAM header rmdup remove PCR duplicates targetcut cut fosmid regions (for fosmid pool only) addreplacerg adds or replaces RG tags markdup mark duplicates -- File operations collate shuffle and group alignments by name cat concatenate BAMs merge merge sorted alignments mpileup multi-way pileup sort sort alignment file split splits a file by read group quickcheck quickly check if SAM/BAM/CRAM file appears intact fastq converts a BAM to a FASTQ fasta converts a BAM to a FASTA -- Statistics bedcov read depth per BED region depth compute the depth flagstat simple stats idxstats BAM index stats phase phase heterozygotes stats generate stats (former bamcheck) -- Viewing flags explain BAM flags tview text alignment viewer view SAM<->BAM<->CRAM conversion depad convert padded BAM to unpadded BAM
Installation
Source code is obtained from SAMtools
System
64-bit Linux