Maximizing IT Efficiency with Software Asset Management (SAM) Tools
seen from China
seen from Argentina
seen from China
seen from China
seen from United States
seen from Sri Lanka
seen from United States

seen from India
seen from Kenya

seen from United States

seen from Sri Lanka
seen from Germany
seen from United States
seen from United Arab Emirates

seen from United States

seen from Netherlands
seen from United States

seen from Brazil

seen from United States
seen from Sri Lanka
Maximizing IT Efficiency with Software Asset Management (SAM) Tools
Market Forecast: Software Asset Management (SAM) tools, 2024-2028, Worldwide
quick SAM to BAM conversion
A postdoc in my lab today was asking me how to compress SAM files back to BAM files. This was apparently nonintuitive to him so I decided to write a quick post on minor details regarding this type of conversion with samtools, a great set of utilities for handling high throughput sequence alignment files:
Before you perform the actual conversion, you’ll want to first check if your SAM file contains a header:
head yourFile.sam
If a header exists, you should see lines beginning with “@”. If this is the case, you’ll want to use the -b flag to signify the output should be BAM and the -S flag to signify the input is in SAM format. Because the header is present you don’t need to include a reference fasta file for samtools to index through–meaning you can proceed as follows:
SAM –> BAM if header is present
samtools view -bS yourFile.sam > youFile.bam
If “@” is missing from the head you did above, you’ll want use the -bT flags.
SAM –> BAM if header is missing
samtools view -bT reference.fa yourFile.sam > yourFile.bam
You’ll probably want to sort your BAM file, considering sorted BAMs are often the useful files for myriad programs.
samtools sort yourFile.bam yourFile_sorted
And lastly, you’ll want to index your BAM file as this is also useful for further analyses on your alignments
samtools index yourFile_sorted.bam yourFile_sorted.bai
…now to get back to studying for my qual #distractionsOver #BerekeleyMCBwhyYouDoThis
pipe bowtie samtools
bowtie reference -SC -q .fastq | samtools view -Shu - | samtools sort - name.sorted.prefix samtools index name.sorted.prefix.bam samtools idxstats name.sorted.prefix.bam > stats.txt