SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert merged BAM back to per lane BAM or FASTQ file danielsbrewer Bioinformatics 6 10-03-2013 07:29 AM
Are there any good ways to use SAMtools java API to convert .bam file into .txt file? alextree Bioinformatics 8 01-24-2012 09:20 AM
what is the file size for a 30X human genome sequencing file, raw and BAM? RNA-seq Illumina/Solexa 2 04-15-2011 11:27 AM
cuffcompare can not handle mouse gtf file from ensembl liuxq Bioinformatics 1 09-05-2010 11:54 PM

Reply
 
Thread Tools
Old 10-19-2011, 03:10 PM   #1
lewewoo
Member
 
Location: Moon

Join Date: Apr 2011
Posts: 60
Default Help: how to handle .bam file

to do some analysis of reads, I have first converted .bam to .sam then write a perl script; however, I would like to directly operate .bam because of its smaller size. Anybody have experiences on writing codes to handle .bam? Would it be possible to share the experience? Thanks!
lewewoo is offline   Reply With Quote
Old 10-19-2011, 11:59 PM   #2
Bukowski
Senior Member
 
Location: Aberdeen, Scotland

Join Date: Jan 2010
Posts: 388
Default

Quote:
Originally Posted by lewewoo View Post
to do some analysis of reads, I have first converted .bam to .sam then write a perl script; however, I would like to directly operate .bam because of its smaller size. Anybody have experiences on writing codes to handle .bam? Would it be possible to share the experience? Thanks!
http://search.cpan.org/~lds/Bio-SamTools/
Bukowski is offline   Reply With Quote
Old 10-20-2011, 11:13 PM   #3
simonandrews
Simon Andrews
 
Location: Babraham Inst, Cambridge, UK

Join Date: May 2009
Posts: 871
Default

..or simply replace:

open (IN,'myfile.sam')...

with:

open (IN,'samtools view myfile.bam |')...

..and keep using the script you already have.
simonandrews is offline   Reply With Quote
Old 11-07-2011, 04:14 PM   #4
lewewoo
Member
 
Location: Moon

Join Date: Apr 2011
Posts: 60
Default

Thanks a lot!
lewewoo is offline   Reply With Quote
Reply

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 07:57 PM.


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