Skip to content

Commit

Permalink
Bugfix100/vcf minimal rejoin (#802)
Browse files Browse the repository at this point in the history
* increment subversion

* add rejoin_variants_in_InputBuffer

* add testes for rejoin on minimal
  • Loading branch information
at7 committed Jul 14, 2020
1 parent b69359f commit 4be118e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion modules/Bio/EnsEMBL/VEP/Constants.pm
Expand Up @@ -53,7 +53,7 @@ use warnings;
use base qw(Exporter);

our $VEP_VERSION = 100;
our $VEP_SUB_VERSION = 2;
our $VEP_SUB_VERSION = 3;

our @EXPORT_OK = qw(
@FLAG_FIELDS
Expand Down
2 changes: 2 additions & 0 deletions modules/Bio/EnsEMBL/VEP/OutputFactory/VCF.pm
Expand Up @@ -274,6 +274,8 @@ sub get_all_lines_by_InputBuffer {
map {@{$self->reset_shifted_positions($_)}}
@{$buffer->buffer};

$self->rejoin_variants_in_InputBuffer($buffer) if $buffer->rejoin_required;

foreach my $vf(@{$buffer->buffer}) {

my $line;
Expand Down
14 changes: 14 additions & 0 deletions t/OutputFactory_VCF.t
Expand Up @@ -576,7 +576,21 @@ ok(
"SV overlap percent and length available"
);

## rejoin on minimal

$ib = get_runner({
input_file => $test_cfg->create_input_file([qw(21 25741665 . CAGAAGAAAG TAGAAGAAAG,C . . .)]),
minimal => 1,
})->get_InputBuffer;
$of = Bio::EnsEMBL::VEP::OutputFactory::VCF->new({config => $ib->config});

is(scalar @{$ib->buffer}, 2, 'minimal - expanded count');
is($ib->buffer->[0]->allele_string, 'C/T', 'minimal - expanded first allele string');

$of->rejoin_variants_in_InputBuffer($ib);

is(scalar @{$ib->buffer}, 1, 'minimal - rejoined count');
is($ib->buffer->[0]->allele_string, 'CAGAAGAAAG/TAGAAGAAAG/C', 'minimal - rejoined allele string');


## test getting stuff from input
Expand Down

0 comments on commit 4be118e

Please sign in to comment.