Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail when RG==0 #80

Closed
ym3 opened this issue Feb 23, 2019 · 1 comment
Closed

Fail when RG==0 #80

ym3 opened this issue Feb 23, 2019 · 1 comment

Comments

@ym3
Copy link

ym3 commented Feb 23, 2019

The code in its current form fails whenever readgroup is set to 0 by design:
@RG ID=0
Read groups from Illumina/Isaac pipeline are typically numbered 0, 1, 2, ...

unless ($bas_ob->get($rg_id, 'readgroup')) { die "Readgroup $rg_id in bam file but not in bas file $!"; }

If you want to use unless, you need to make an exception for RG==0, e.g.

my $bas_ob_rg=$bas_ob->get($rg_id, 'readgroup'); 
unless($bas_ob_rg==0 || $bas_ob_rg) { die "Readgroup $rg_id in bam file but not in bas file $!"; }

Traceback from inside dockstore-cgpwgs-2.0.1.simg
Readgroup 0 in bam file but not in bas file at /opt/wtsi-cgp/bin/brassI_prep_bam.pl line 146. Command exited with non-zero status 255

@keiranmraine
Copy link
Contributor

Hm, yes this needs to be fixed should be:

unless (defined $bas_ob->get($rg_id, 'readgroup')) { die "Readgroup $rg_id in bam file but not in bas file $!"; }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants