Skip to content

Commit

Permalink
Fixed the calculation of missed inventories.
Browse files Browse the repository at this point in the history
  • Loading branch information
cybersiddhu committed Jun 6, 2016
1 parent 551ff09 commit 3f8ef4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Modware/Import/Stock/PlasmidImporter.pm
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ sub import_inventory {
or $self->logger->logcroak("Cannot open file: $input");
my $count = 0;
while ( my $line = $io->getline() ) {
$count++;
chomp $line;
my @fields = split "\t", $line;
if ( $fields[0] !~ m/^DBP[0-9]{7}/ ) {
Expand All @@ -204,6 +203,7 @@ sub import_inventory {
= $transform->convert_row_to_plasmid_inventory_hash(@fields);
foreach my $key ( keys %$inventory ) {
my $data;
$count++;
$data->{stock_id} = $self->find_stock( $fields[0] );
if ( !$data->{stock_id} ) {
$self->logger->debug(
Expand All @@ -230,7 +230,7 @@ sub import_inventory {
$rank = $rank + 1;
}
$io->close();
my $missed = $count - scalar @stock_data;
my $missed = ( $count - scalar @stock_data ) / 6;
if ($self->schema->resultset('Stock::Stockprop')->populate( \@stock_data )
)
{
Expand Down

0 comments on commit 3f8ef4c

Please sign in to comment.