SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
BWA sam and Samtools sam->bam conversion problem maasha Bioinformatics 6 06-05-2013 07:39 AM
.SAM to .BAM with SAM file header @PG emilyjia2000 Bioinformatics 13 06-14-2011 12:21 PM
NEw to Chip-seq and have .bam/.sam/.bam.bai files... then what? NGS newbie Bioinformatics 11 05-25-2011 07:48 AM
Sam to Bam using Picard - help! Kath Bioinformatics 6 02-12-2011 09:36 PM
SAM/BAM to ELAND Wonko Bioinformatics 1 02-07-2011 10:56 AM

Reply
 
Thread Tools
Old 07-20-2010, 09:31 AM   #1
kwtennis311
Junior Member
 
Location: Earth

Join Date: Jun 2010
Posts: 7
Question sam to bam

I was sure this had been asked earlier, but could not find. Does anyone have a script to convert files from sam to bam format?

Thanks
kwtennis311 is offline   Reply With Quote
Old 07-20-2010, 09:40 AM   #2
quinlana
Senior Member
 
Location: Charlottesville

Join Date: Sep 2008
Posts: 119
Default

Use samtools view. The -S indicates the input is in SAM format and the "b" indicates that you'd like BAM output.

Code:
samtools view -Sb  <SAMFILE>  >  <BAMFILE>
quinlana is offline   Reply With Quote
Old 07-20-2010, 12:19 PM   #3
Lee Sam
Member
 
Location: Ann Arbor, MI

Join Date: Oct 2008
Posts: 57
Default

You can also use samtools import command (this is what I am using), which does this exact thing.
Lee Sam is offline   Reply With Quote
Reply

Tags
sam bam

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 05:01 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO