genome/breakdancer — pull request #1 by bpow (2012-12-26 16:30:43+00:00)
Title: Correctly handle readgroups with ID of 0

Line 114 of perl/bam2cfg.pl currently reads:

```perl
my $lib=($t->{readgroup})?$RGlib{$t->{readgroup}}:'NA'; #when multiple libraries are in a BAM file
```

If the read group id is 0, the conditional part of the ?: statement evaluates to false, so that readgroup is ignored. It would be better to see if `$t->{readgroup}` is defined:

```perl
my $lib=defined($t->{readgroup})?$RGlib{$t->{readgroup}}:'NA'; #when multiple libraries are in a BAM file
```