samtools
Verified for current stable LTS
Samtools Command: Convert Sam To Bam
Use for convert sam to bam with Samtools. Exact CLI syntax to convert sam to bam using Samtools.
When to use this: Use for convert sam to bam with Samtools.
Command Syntax
samtools view -S -b <input.sam> > <output.bam> samtools view -S -b <input.sam> > <output.bam> Live Command Builder
Final Command
samtools view -S -b <input.sam> > <output.bam> Command Breakdown
-S- Command Option
- Tool-specific option used by this command invocation.
-b- Command Option
- Tool-specific option used by this command invocation.
FAQ
Purpose: Exact syntax to convert sam to bam using Samtools.
Test path: Replace placeholders and run destructive commands in a disposable workspace first.
Flag behavior: Tool version, platform, and shell can change behavior.
Improve This Command
Suggest a correction, safer default, or version-specific note for this entry.
Related Operations
Samtools Command: Count Alignments Per Chromosome
samtools idxstats <sorted_indexed_input> Samtools Command: Index Sorted Bam samtools index <sorted_input.bam> Samtools Command: Merge Multiple Files samtools merge <output> <input1 input2 ...> Samtools Command: Print Alignment Statistics samtools flagstat <sorted_input> Samtools Command: Print Sam Header And Reads <other_command> | samtools view -h - chromosome:start-end