SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Newbie bwa question (HiSeq data)Hi, Sorry for the newbie question! I am trying to c bsmith030465 Bioinformatics 6 02-26-2015 09:08 AM
First Question njt638 General 1 08-24-2011 11:56 AM
Question cjose Illumina/Solexa 4 08-11-2011 05:31 AM
question? semna Bioinformatics 7 12-20-2010 04:30 AM
question? semna Bioinformatics 1 12-17-2010 01:54 AM

Reply
 
Thread Tools
Old 12-22-2016, 12:44 PM   #1
LacquerHead
Member
 
Location: New York

Join Date: Nov 2015
Posts: 31
Default BEDTOOLS bedtobam question

Hi all,

Quick question, did some shifting of a BAM file by first converting it into BED with bamtobed and shifting with an awk script, however when I converted it back to bam after the file size reduced by 1/3 from 750mb to 250mb. Although when I run samtools flagstat on both before and after it shows me 22 million reads in both the 750mb and 250mb files. Any ideas?
LacquerHead is offline   Reply With Quote
Old 12-22-2016, 03:42 PM   #2
Brian Bushnell
Super Moderator
 
Location: Walnut Creek, CA

Join Date: Jan 2014
Posts: 2,707
Default

I don't personally use the bed format, but the specification does not provide any fields for quality scores or bases. It's just for positions. So, even if it's possible to convert a bed file to a bam file, it will not be the original bam file, since bam -> bed is a lossy conversion. I'm not sure what will be in your bam file, but I don't expect it to contain bases, quality scores, cigar strings, or optional fields.
Brian Bushnell is offline   Reply With Quote
Old 12-22-2016, 11:30 PM   #3
WhatsOEver
Senior Member
 
Location: Germany

Join Date: Apr 2012
Posts: 215
Default

I'm even surprised that flagstat works on such a bam as you actually loose any information on flags (paired, orientation, alternative alignments, ...). And I also don't understand why you'd like to do something like bam->bed->bam?
WhatsOEver 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 05:47 PM.


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