SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
BreakDancer empty cfg (no output from bam2cfg) zhongj Bioinformatics 13 10-18-2017 10:12 AM
breakdancer bam2cfg error mei404 Bioinformatics 3 02-08-2017 02:36 AM
BreakDancer output question cwhelan Bioinformatics 5 11-09-2012 11:58 AM
Cufflinks, BAM header problem solved... for the moment rossh Bioinformatics 9 05-06-2012 11:33 PM
how to make BreakDancer's bam2cfg.pl work? cliff Bioinformatics 5 09-07-2010 09:15 AM

Reply
 
Thread Tools
Old 09-13-2011, 07:07 PM   #1
jtjli
Member
 
Location: australia

Join Date: Nov 2008
Posts: 21
Cool breakdancer empty cfg (no output from bam2cfg) - Problem Solved

I spent hours figuring out why bam2cfg does not work for my bam. Here's what I found. It may not apply to your case depending on what your bam file is like.

My bam file failed bam2cfg because the @RG header does not have the LB tag.

Solution 1: change the header line:

this won't work
@RG ID:s_1 PL:Illumina SM:88LN
this will work
@RG ID:s_1 PL:Illumina SM:88LN LB:LB_88LN

Solution 2: However, I did not want to change my bam file, so I modified bam2cfg.pl as follows (commenting out the first and add the second):
#if(/^\@RG/){ #getting RG=>LIB mapping from the bam header
if (0) {

AND use the -f flag
bam2cfg -g -h -f rg.txt ......

in rg.txt:
s_1 LB_88LN

OR, if you like:
s_1\tLB_88LN(EOF)

NOTE: s_1 is your ReadGroup. In the sam file, each read comes with an RG tag (among the last columns). If you don't have RG tags on reads, then probably you wouldn't have an error from bam2cfg in the first place.


THE BUG: -f flag does not work when you have the @RG header line. The header overrides your -f file. That's why i had to modify bam2cfg.pl.
jtjli 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 04:43 AM.


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