SAMtools-Teaching: Difference between revisions

From Research Computing Center Wiki
Jump to navigation Jump to search
(Created page with "Category:TeachingCategory:SoftwareCategory:Bioinformatics === Category === Bioinformatics === Program On === Teaching === Version === 0.1.19 ===...")
 
 
(15 intermediate revisions by 2 users not shown)
Line 9: Line 9:


=== Version ===
=== Version ===
0.1.19
0.1.20, 1.6, 1.14, 1.16.1, 1.17
   
   
=== Author / Distributor ===
=== Author / Distributor ===
Line 21: Line 21:
=== Running Program ===
=== Running Program ===


The last version of this application is at /usr/local/apps/eb/SAMtools/0.1.19-foss-2016b
'''Version 0.1.20'''


To use this version, please loads the module with
Installed in /apps/eb/SAMtools/0.1.20-GCC-11.2.0
 
To use this version, please load the module with
<pre class="gscript">
<pre class="gscript">
ml SAMtools/0.1.19-foss-2016b
ml SAMtools/0.1.20-GCC-11.2.0
</pre>
 
'''Version 1.6'''


samtools
Installed in /apps/eb/SAMtools/1.6-GCC-11.2.0
 
To use this version, please load the module with
<pre class="gscript">
ml SAMtools/1.6-GCC-11.2.0
</pre>  
</pre>  


Here is an example of a shell script, sub.sh, to run on at the batch queue:  
'''Version 1.14'''
 
Installed in /apps/eb/SAMtools/1.14-GCC-11.2.0
 
To use this version, please load the module with
<pre class="gscript">
ml SAMtools/1.14-GCC-11.2.0
</pre>
 
'''Version 1.16.1'''
 
Installed in /apps/eb/SAMtools/1.16.1-GCC-11.3.0
 
To use this version, please load the module with
<pre class="gscript">
ml SAMtools/1.16.1-GCC-11.3.0
</pre>
 
Here is an example of a shell script, sub.sh, to run on the batch queue:  


<div class="gscript2">
<div class="gscript2">
Line 42: Line 69:
<nowiki>#</nowiki>SBATCH --time=<u>08:00:00</u><br>   
<nowiki>#</nowiki>SBATCH --time=<u>08:00:00</u><br>   
<nowiki>#</nowiki>SBATCH --output=SAMtools.%j.out<br>
<nowiki>#</nowiki>SBATCH --output=SAMtools.%j.out<br>
<nowiki>#</nowiki>SBATCH --error=SAMtools.%j.err<br>
   
   
cd $SLURM_SUBMIT_DIR<br>
cd $SLURM_SUBMIT_DIR<br>
 
ml SAMtools/1.16.1-GCC-11.3.0<br>  
ml <!-- TEST_COMMAND BEGIN --><!-- TEST_COMMAND END --> <u>[options]</u><br>   
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 or be reviewed .   
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 88:
   
   
<pre  class="gcommand">
<pre  class="gcommand">
SAMtools/0.1.19-foss-2016b
ml SAMtools/1.16.1-GCC-1.3.0
 
samtools --help
samtools --help
[main] unrecognized command '--help'
 
Program: samtools (Tools for alignments in the SAM format)
Version: 1.16.1 (using htslib 1.16)
 
Usage:  samtools <command> [options]
 
Commands:
  -- Indexing
    dict          create a sequence dictionary file
    faidx          index/extract FASTA
    fqidx          index/extract FASTQ
    index          index alignment
 
  -- Editing
    calmd          recalculate MD/NM tags and '=' bases
    fixmate        fix mate information
    reheader      replace BAM header
    targetcut      cut fosmid regions (for fosmid pool only)
    addreplacerg  adds or replaces RG tags
    markdup        mark duplicates
    ampliconclip  clip oligos from the end of reads
 
  -- File operations
    collate        shuffle and group alignments by name
    cat            concatenate BAMs
    consensus      produce a consensus Pileup/FASTA/FASTQ
    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
    import        Converts FASTA or FASTQ files to SAM/BAM/CRAM
    reference      Generates a reference from aligned data
 
  -- Statistics
    bedcov        read depth per BED region
    coverage      alignment depth and percent coverage
    depth          compute the depth
    flagstat      simple stats
    idxstats      BAM index stats
    phase          phase heterozygotes
    stats          generate stats (former bamcheck)
    ampliconstats  generate amplicon specific stats
 
  -- Viewing
    flags          explain BAM flags
    head          header viewer
    tview          text alignment viewer
    view          SAM<->BAM<->CRAM conversion
    depad          convert padded BAM to unpadded BAM
    samples        list the samples in a set of SAM/BAM/CRAM files
 
  -- Misc
    help [cmd]    display this help message or help for [cmd]
    version        detailed version information


</pre>
</pre>

Latest revision as of 09:33, 14 May 2024

Category

Bioinformatics

Program On

Teaching

Version

0.1.20, 1.6, 1.14, 1.16.1, 1.17

Author / Distributor

SAMtools

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

Version 0.1.20

Installed in /apps/eb/SAMtools/0.1.20-GCC-11.2.0

To use this version, please load the module with

ml SAMtools/0.1.20-GCC-11.2.0

Version 1.6

Installed in /apps/eb/SAMtools/1.6-GCC-11.2.0

To use this version, please load the module with

ml SAMtools/1.6-GCC-11.2.0

Version 1.14

Installed in /apps/eb/SAMtools/1.14-GCC-11.2.0

To use this version, please load the module with

ml SAMtools/1.14-GCC-11.2.0

Version 1.16.1

Installed in /apps/eb/SAMtools/1.16.1-GCC-11.3.0

To use this version, please load the module with

ml SAMtools/1.16.1-GCC-11.3.0

Here is an example of a shell script, sub.sh, to run on 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
#SBATCH --error=SAMtools.%j.err

cd $SLURM_SUBMIT_DIR
ml SAMtools/1.16.1-GCC-11.3.0
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.16.1-GCC-1.3.0

samtools --help

Program: samtools (Tools for alignments in the SAM format)
Version: 1.16.1 (using htslib 1.16)

Usage:   samtools <command> [options]

Commands:
  -- Indexing
     dict           create a sequence dictionary file
     faidx          index/extract FASTA
     fqidx          index/extract FASTQ
     index          index alignment

  -- Editing
     calmd          recalculate MD/NM tags and '=' bases
     fixmate        fix mate information
     reheader       replace BAM header
     targetcut      cut fosmid regions (for fosmid pool only)
     addreplacerg   adds or replaces RG tags
     markdup        mark duplicates
     ampliconclip   clip oligos from the end of reads

  -- File operations
     collate        shuffle and group alignments by name
     cat            concatenate BAMs
     consensus      produce a consensus Pileup/FASTA/FASTQ
     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
     import         Converts FASTA or FASTQ files to SAM/BAM/CRAM
     reference      Generates a reference from aligned data

  -- Statistics
     bedcov         read depth per BED region
     coverage       alignment depth and percent coverage
     depth          compute the depth
     flagstat       simple stats
     idxstats       BAM index stats
     phase          phase heterozygotes
     stats          generate stats (former bamcheck)
     ampliconstats  generate amplicon specific stats

  -- Viewing
     flags          explain BAM flags
     head           header viewer
     tview          text alignment viewer
     view           SAM<->BAM<->CRAM conversion
     depad          convert padded BAM to unpadded BAM
     samples        list the samples in a set of SAM/BAM/CRAM files

  -- Misc
     help [cmd]     display this help message or help for [cmd]
     version        detailed version information

Back to Top

Installation

Source code is obtained from SAMtools

System

64-bit Linux