bcbio / bcbio-nextgen

Validated, scalable, community developed variant calling, RNA-seq and small RNA analysis
https://bcbio-nextgen.readthedocs.io
MIT License
992 stars 354 forks source link

Minor bug fix for simple_sv_annotation.py #1434

Closed schelhorn closed 8 years ago

schelhorn commented 8 years ago

AZ kindly contributed the simple_sv_annotation script, which is hosted by bioconda and used in bcbio. I have a minor bugfix for this module; however, it seems to be vanished from the AZ github repository at the moment. The bug fix is very simple; in line 218 of that file, it says:

        exons.append(int(ann_a[8].split('/')[0]))

Sometimes, the extracted values can be '' (an empty string), in which case the cast to integer fails. The fix is to catch the error and pass on it:

        try:
            exons.append(int(ann_a[8].split('/')[0]))
        except ValueError:
            pass

@miika, perhaps you could comment on the script being lost from your repo, and could fix the bug in the bioconda version? Thanks a bunch.

mjafin commented 8 years ago

[joke] Now that we got you hooked, we pulled it and will be monetising on it! [/joke] More seriously, let me see what's happened.

On a positive note, SnpEff 4.3 will finally support properly annotating gene fusions resulting from inv/dup/del so most of the hackery we have in place will be redundant soon I hope. Just helping Pablo Cingolani with the remaining issues.

mjafin commented 8 years ago

It's back now at https://github.com/AstraZeneca-NGS/simple_sv_annotation, can you check? Happy to accept pull requests.

schelhorn commented 8 years ago

It's back, thanks. Could you just add the proposed fix directly, though? It's such a small change after all :) Thanks!

mjafin commented 8 years ago

All done now

chapmanb commented 8 years ago

Sven-Eric and Miika -- thanks much for this. I'll update the conda package with the new version.

schelhorn commented 8 years ago

Hello @chapmanb, is it possible that the conda package you updated did not include the bug fix? The AZ repository does contain the fix, but I was just looking at the source of 2016.06.15, and the problematic method find_deleted_exons() seems to be unchanged there.

chapmanb commented 8 years ago

Sven-Eric -- apologies, that's my mistake. I messed up building the previous package and just rebuilt it so if you update you should get the latest which will include your fix. Sorry about the mistake.

schelhorn commented 8 years ago

Great, thanks for the update.