Difference between revisions of "Samtools"
(3 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
''From the {{PAGENAME}} Home Page:'' Tools (written in C using htslib) for manipulating next-generation sequencing data | ''From the {{PAGENAME}} Home Page:'' Tools (written in C using htslib) for manipulating next-generation sequencing data | ||
{{AppStandardHeader|1. | {{AppStandardHeader|1.3.1|samtools}} | ||
{{AppRunningOnAll}} | {{AppRunningOnAll}} | ||
Line 11: | Line 11: | ||
Next, use the following commands to open an [[SLURM Interactive|SRUN Interactive Session]], load the module for {{PAGENAME}}, and execute the {{PAGENAME}} binary: | Next, use the following commands to open an [[SLURM Interactive|SRUN Interactive Session]], load the module for {{PAGENAME}}, and execute the {{PAGENAME}} binary: | ||
<pre style="white-space:pre-wrap; width:68%; border:1px solid lightgrey; background:#000000; color:white;">[user@login0 ~]$ srun --time=48:00:00 --nodes=1 -- | <pre style="white-space:pre-wrap; width:68%; border:1px solid lightgrey; background:#000000; color:white;">[user@login0 ~]$ srun --time=48:00:00 --nodes=1 --cpus-per-task=1 --pty /bin/bash | ||
[user@wh-520-4-1 ~]$ module load apps/samtools/1. | [user@wh-520-4-1 ~]$ module load apps/samtools/1.3.1 | ||
[user@wh-520-4-1 ~]$ samtools view -C -T ref.fa aln.bam > aln.cram | [user@wh-520-4-1 ~]$ samtools view -C -T ref.fa aln.bam > aln.cram | ||
</pre> | </pre> | ||
Line 18: | Line 18: | ||
=== Batch Job submission === | === Batch Job submission === | ||
To run batch jobs on the CIRCE/SC cluster, users will need to submit their jobs to the scheduling environment if their jobs take more than | To run batch jobs on the CIRCE/SC cluster, users will need to submit their jobs to the scheduling environment if their jobs take more than 30 minutes to run on a standard PC. | ||
If, for example, you have wish to convert a BAM file to a CRAM file using a local reference sequence, you would set up a submit script to use samtools like this | If, for example, you have wish to convert a BAM file to a CRAM file using a local reference sequence, you would set up a submit script to use samtools like this | ||
Line 34: | Line 34: | ||
# Load the bamtools module: | # Load the bamtools module: | ||
module load apps/samtools/1. | module load apps/samtools/1.3.1 | ||
# Start samtools | # Start samtools |
Latest revision as of 15:31, 13 March 2023
Description
From the Samtools Home Page: Tools (written in C using htslib) for manipulating next-generation sequencing data
Version
- 1.3.1
Authorized Users
CIRCE
account holdersRRA
account holdersSC
account holders
Platforms
CIRCE
clusterRRA
clusterSC
cluster
Modules
Samtools requires the following module file to run:
apps/samtools/1.3.1
- See Modules for more information.
Running Samtools on CIRCE/SC
The Samtools user guide is essential to understanding the application and making the most of it. The guide and this page should help you to get started with your simulations. Please refer to the Documentation section for a link to the guide.
- Note on CIRCE: Make sure to run your jobs from your $WORK directory!
- Note: Scripts are provided as examples only. Your SLURM executables, tools, and options may vary from the example below. For help on submitting jobs to the queue, see our SLURM User’s Guide.
Interactive Mode
Next, use the following commands to open an SRUN Interactive Session, load the module for Samtools, and execute the Samtools binary:
[user@login0 ~]$ srun --time=48:00:00 --nodes=1 --cpus-per-task=1 --pty /bin/bash [user@wh-520-4-1 ~]$ module load apps/samtools/1.3.1 [user@wh-520-4-1 ~]$ samtools view -C -T ref.fa aln.bam > aln.cram
Batch Job submission
To run batch jobs on the CIRCE/SC cluster, users will need to submit their jobs to the scheduling environment if their jobs take more than 30 minutes to run on a standard PC.
If, for example, you have wish to convert a BAM file to a CRAM file using a local reference sequence, you would set up a submit script to use samtools like this
#!/bin/bash # #SBATCH --job-name=samtools-test #SBATCH --time=01:00:00 #SBATCH --nodes=1 #SBATCH --ntasks-per-node=1 #SBATCH --output=output.%j.samtools-test #### SLURM 1 processor bamtools test to run for 1 hours. # Load the bamtools module: module load apps/samtools/1.3.1 # Start samtools samtools view -C -T ref.fa aln.bam > aln.cram
Next, you can change to your job’s directory, and run the sbatch command to submit the job:
[user@login0 ~]$ cd my/jobdir [user@login0 jobdir]$ sbatch ./samtools-test.sh
- You can view the status of your job with the “squeue -u <username>” command
Documentation
Home Page, User Guides, and Manuals
- Samtools Home Page:
- Samtools Documentation
More Job Information
See the following for more detailed job submission information:
Reporting Bugs
Report bugs with Samtools to the IT Help Desk: rc-help@usf.edu