Hi, everyone, I had spent days to do trouble-shooting on bam2cfg.pl,
breakdancer-1.1_2011_02_21.zip. I had tried some ways to figure out the problem, but without any success. Owing to only one lib I have, I changed the header code of bam2cfg.pl,
Edited code:
open(BAM,"samtools view -h $fbam |") || die "unable to open $fbam\n";
while(<BAM>){
chomp;
if(/^\@PG/){ #getting RG=>LIB mapping from the bam header
my ($id)="bwa";
my ($lib)="1.2k";
my ($platform)="Illumina";
my ($sample)="88LN";
my ($insertsize)="1200";
#if(defined $insertsize && $insertsize>0){
#$lib=$sample . '_'. $lib;
$libs{$lib}=1;
$RGlib{$id}=$lib;
$RGplatform{$id}=$platform;
#}
}
this is the sorted bam file I have:
@SQ SN:scaffold00001 LN:10500
@SQ SN:scaffold00002 LN:2281
@SQ SN:scaffold00003 LN:27085
@SQ SN:scaffold00004 LN:12161
@SQ SN:scaffold00005 LN:2206
.
.
.
@PG ID:bwa PN:bwa VN:0.5.9-r16
.
.
.
HWI-ST833:6:4:18265:54791#0 145 scaffold00001 207 0 50M scaffold00079 243097 0 TTTACTAAAACCGATTGGNCCCGGACAATATTTCGATGTGGGCCGGCCCT ggggggfggg\[]]][K]B[e`gggggfggWgggggegcggggggggggg XT:A:R NM:i:1 SM:i:0 AM:i:0 X0:i:2 X1:i:2 XM:i:1 XO:i:0 XG:i:0 MD:Z:18T31 XA:Z:scaffold00100,+12080,50M,1;scaffold00042,-1233,50M,2;scaffold00007,-133793,50M,2;
.
.
.
"perl bam2cfg.pl *bam > jun.cfg"
At last: samtaols and perl run successfully, but no output from bam2cfg .
Could anyone help me?
Thanks in advance!
Best
Jun
breakdancer-1.1_2011_02_21.zip. I had tried some ways to figure out the problem, but without any success. Owing to only one lib I have, I changed the header code of bam2cfg.pl,
Edited code:
open(BAM,"samtools view -h $fbam |") || die "unable to open $fbam\n";
while(<BAM>){
chomp;
if(/^\@PG/){ #getting RG=>LIB mapping from the bam header
my ($id)="bwa";
my ($lib)="1.2k";
my ($platform)="Illumina";
my ($sample)="88LN";
my ($insertsize)="1200";
#if(defined $insertsize && $insertsize>0){
#$lib=$sample . '_'. $lib;
$libs{$lib}=1;
$RGlib{$id}=$lib;
$RGplatform{$id}=$platform;
#}
}
this is the sorted bam file I have:
@SQ SN:scaffold00001 LN:10500
@SQ SN:scaffold00002 LN:2281
@SQ SN:scaffold00003 LN:27085
@SQ SN:scaffold00004 LN:12161
@SQ SN:scaffold00005 LN:2206
.
.
.
@PG ID:bwa PN:bwa VN:0.5.9-r16
.
.
.
HWI-ST833:6:4:18265:54791#0 145 scaffold00001 207 0 50M scaffold00079 243097 0 TTTACTAAAACCGATTGGNCCCGGACAATATTTCGATGTGGGCCGGCCCT ggggggfggg\[]]][K]B[e`gggggfggWgggggegcggggggggggg XT:A:R NM:i:1 SM:i:0 AM:i:0 X0:i:2 X1:i:2 XM:i:1 XO:i:0 XG:i:0 MD:Z:18T31 XA:Z:scaffold00100,+12080,50M,1;scaffold00042,-1233,50M,2;scaffold00007,-133793,50M,2;
.
.
.
"perl bam2cfg.pl *bam > jun.cfg"
At last: samtaols and perl run successfully, but no output from bam2cfg .
Could anyone help me?
Thanks in advance!
Best
Jun
Comment