Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

samtools convert sam to bam

# Basic syntax:
samtools view -S -b sam_file.sam > bam_file.bam
# Where:
#	-S specifies that the input is a sam file
#	-b specified that the output should be written in bam format

# To convert a bam file to a sam file, use:
samtools view -h -o sam_file.sam bam_file.bam
Source by quinlanlab.org #
 
PREVIOUS NEXT
Tagged: #samtools #convert #sam #bam
ADD COMMENT
Topic
Name
1+5 =