Skip to content

Commit

Permalink
Added DesignVectors report
Browse files Browse the repository at this point in the history
  • Loading branch information
af11-sanger committed Feb 28, 2013
2 parents 3854348 + 2d8df83 commit 430b758
Show file tree
Hide file tree
Showing 197 changed files with 914 additions and 269 deletions.
9 changes: 9 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
0.054 2013-02-28 10:45:42 Europe/London

Added DesignVectors report

0.053 2013-02-26 16:13:34 Europe/London

Copy Plate backend added
Final Pick process and plate type added

0.052 2013-02-21 09:52:15 Europe/London

GenesToElectroporate report now generated from summaries table
Expand Down
9 changes: 8 additions & 1 deletion MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,11 @@ lib/LIMS2/Model/Util/WellName.pm
lib/LIMS2/Report.pm
lib/LIMS2/Report/DNAPlate.pm
lib/LIMS2/Report/DesignPlate.pm
lib/LIMS2/Report/DesignVectors.pm
lib/LIMS2/Report/EPPlate.pm
lib/LIMS2/Report/ElectroporationProductionSummary.pm
lib/LIMS2/Report/FPPlate.pm
lib/LIMS2/Report/FinalPickVectorPlate.pm
lib/LIMS2/Report/FinalVectorPlate.pm
lib/LIMS2/Report/FirstElectroporationProductionDetail.pm
lib/LIMS2/Report/GenesToElectroporate.pm
Expand Down Expand Up @@ -173,6 +175,7 @@ lib/LIMS2/WebApp/Controller/User/BrowseDesigns.pm
lib/LIMS2/WebApp/Controller/User/BrowsePlates.pm
lib/LIMS2/WebApp/Controller/User/BrowseTemplates.pm
lib/LIMS2/WebApp/Controller/User/Graph.pm
lib/LIMS2/WebApp/Controller/User/PlateCopy.pm
lib/LIMS2/WebApp/Controller/User/PlateEdit.pm
lib/LIMS2/WebApp/Controller/User/PlateUpload.pm
lib/LIMS2/WebApp/Controller/User/QC.pm
Expand All @@ -190,6 +193,7 @@ root/favicon.ico
root/lib/colony_count_upload_help.tt
root/lib/navigation.tt
root/lib/pagination.tt
root/lib/plate_copy_help.tt
root/lib/plate_upload_help.tt
root/lib/process_specific_fields.tt
root/lib/recombinase_upload_help.tt
Expand All @@ -211,6 +215,8 @@ root/site/user/browsetemplates/view.tt
root/site/user/error.tt
root/site/user/graph/index.tt
root/site/user/index.tt
root/site/user/platecopy/plate_copy_wait.tt
root/site/user/platecopy/plate_from_copy.tt
root/site/user/plateupload/plate_upload_step1.tt
root/site/user/plateupload/plate_upload_step2.tt
root/site/user/qc/create_plates.tt
Expand All @@ -226,6 +232,7 @@ root/site/user/recombinaseupload/recombinase_upload.tt
root/site/user/report/await_report.tt
root/site/user/report/gene_report.tt
root/site/user/report/select_sponsor.tt
root/site/user/report/select_vector_params.tt
root/site/user/report/simple_table.tt
root/site/user/userpreferences/change_password.tt
root/site/user/welldata/dna_status_update.tt
Expand Down Expand Up @@ -1721,6 +1728,7 @@ t/data/csv_upload_linux.csv
t/data/csv_upload_mac.csv
t/data/csv_upload_win.csv
t/data/dna_prep_process.yaml
t/data/final_pick_process.yaml
t/data/first_electroporation.yaml
t/data/freeze_process.yaml
t/data/int_recom_process.yaml
Expand All @@ -1739,4 +1747,3 @@ t/data/well_850_user_params.yaml
t/fixtures/00-clean-db.sql
t/fixtures/10-load-fixture-data.sql
t/release-no-smart-comments.t
test.pl~
2 changes: 1 addition & 1 deletion META.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,4 @@ requires:
strict: 0
utf8: 0
warnings: 0
version: 0.052
version: 0.054
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@


This archive contains the distribution LIMS2-WebApp,
version 0.052:
version 0.054:

Catalyst based application

Expand Down
2 changes: 1 addition & 1 deletion lib/LIMS2/AlleleRequest.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package LIMS2::AlleleRequest;
## no critic(RequireUseStrict,RequireUseWarnings)
{
$LIMS2::AlleleRequest::VERSION = '0.052';
$LIMS2::AlleleRequest::VERSION = '0.054';
}
## use critic

Expand Down
2 changes: 1 addition & 1 deletion lib/LIMS2/AlleleRequest/DoubleTargeted.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package LIMS2::AlleleRequest::DoubleTargeted;
## no critic(RequireUseStrict,RequireUseWarnings)
{
$LIMS2::AlleleRequest::DoubleTargeted::VERSION = '0.052';
$LIMS2::AlleleRequest::DoubleTargeted::VERSION = '0.054';
}
## use critic

Expand Down
2 changes: 1 addition & 1 deletion lib/LIMS2/AlleleRequest/SingleTargeted.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package LIMS2::AlleleRequest::SingleTargeted;
## no critic(RequireUseStrict,RequireUseWarnings)
{
$LIMS2::AlleleRequest::SingleTargeted::VERSION = '0.052';
$LIMS2::AlleleRequest::SingleTargeted::VERSION = '0.054';
}
## use critic

Expand Down
2 changes: 1 addition & 1 deletion lib/LIMS2/AlleleRequestFactory.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package LIMS2::AlleleRequestFactory;
## no critic(RequireUseStrict,RequireUseWarnings)
{
$LIMS2::AlleleRequestFactory::VERSION = '0.052';
$LIMS2::AlleleRequestFactory::VERSION = '0.054';
}
## use critic

Expand Down
2 changes: 1 addition & 1 deletion lib/LIMS2/CassetteFunction.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package LIMS2::CassetteFunction;
## no critic(RequireUseStrict,RequireUseWarnings)
{
$LIMS2::CassetteFunction::VERSION = '0.052';
$LIMS2::CassetteFunction::VERSION = '0.054';
}
## use critic

Expand Down
2 changes: 1 addition & 1 deletion lib/LIMS2/Catalyst/Controller/REST.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package LIMS2::Catalyst::Controller::REST;
## no critic(RequireUseStrict,RequireUseWarnings)
{
$LIMS2::Catalyst::Controller::REST::VERSION = '0.052';
$LIMS2::Catalyst::Controller::REST::VERSION = '0.054';
}
## use critic

Expand Down
2 changes: 1 addition & 1 deletion lib/LIMS2/Model.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package LIMS2::Model;
## no critic(RequireUseStrict,RequireUseWarnings)
{
$LIMS2::Model::VERSION = '0.052';
$LIMS2::Model::VERSION = '0.054';
}
## use critic

Expand Down
2 changes: 1 addition & 1 deletion lib/LIMS2/Model/AuthDB.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use utf8;
package LIMS2::Model::AuthDB;
## no critic(RequireUseStrict,RequireUseWarnings)
{
$LIMS2::Model::AuthDB::VERSION = '0.052';
$LIMS2::Model::AuthDB::VERSION = '0.054';
}
## use critic

Expand Down
12 changes: 10 additions & 2 deletions lib/LIMS2/Model/Constants.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package LIMS2::Model::Constants;
## no critic(RequireUseStrict,RequireUseWarnings)
{
$LIMS2::Model::Constants::VERSION = '0.052';
$LIMS2::Model::Constants::VERSION = '0.054';
}
## use critic

Expand Down Expand Up @@ -32,6 +32,7 @@ const our %PROCESS_PLATE_TYPES => (
cre_bac_recom => [qw( INT )],
'2w_gateway' => [qw( POSTINT FINAL )],
'3w_gateway' => [qw( POSTINT FINAL )],
final_pick => [qw( FINAL_PICK )],
dna_prep => [qw( DNA )],
recombinase => [qw( FINAL XEP POSTINT )],
first_electroporation => [qw( EP )],
Expand All @@ -55,6 +56,7 @@ const our %PROCESS_TEMPLATE => (
cre_bac_recom => 'recombineering_template.csv',
'2w_gateway' => 'gateway_template.csv',
'3w_gateway' => 'gateway_template.csv',
final_pick => 'standard_template.csv',
dna_prep => 'standard_template.csv',
recombinase => 'recombinase_template.csv',
first_electroporation => 'first_electroporation_template.csv',
Expand All @@ -64,6 +66,8 @@ const our %PROCESS_TEMPLATE => (
freeze => 'standard_template.csv',
);

# number relates to number of input wells (e.g. an SEP has two inputs)
# and type to their plate type(s). N.B. if you don't specify a type then any is fine
const our %PROCESS_INPUT_WELL_CHECK => (
create_di => { number => 0 },
int_recom => {
Expand All @@ -78,14 +82,18 @@ const our %PROCESS_INPUT_WELL_CHECK => (
type => [qw( INT )],
number => 1,
},
final_pick => {
type => [qw( FINAL FINAL_PICK )],
number => 1,
},
recombinase => { number => 1 },
cre_bac_recom => {
type => [qw( DESIGN )],
number => 1,
},
rearray => { number => 1 },
dna_prep => {
type => [qw( FINAL )],
type => [qw( FINAL FINAL_PICK )],
number => 1,
},
clone_pick => {
Expand Down
2 changes: 1 addition & 1 deletion lib/LIMS2/Model/DBConnect.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package LIMS2::Model::DBConnect;
## no critic(RequireUseStrict,RequireUseWarnings)
{
$LIMS2::Model::DBConnect::VERSION = '0.052';
$LIMS2::Model::DBConnect::VERSION = '0.054';
}
## use critic

Expand Down
2 changes: 1 addition & 1 deletion lib/LIMS2/Model/FormValidator.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package LIMS2::Model::FormValidator;
## no critic(RequireUseStrict,RequireUseWarnings)
{
$LIMS2::Model::FormValidator::VERSION = '0.052';
$LIMS2::Model::FormValidator::VERSION = '0.054';
}
## use critic

Expand Down
2 changes: 1 addition & 1 deletion lib/LIMS2/Model/FormValidator/Constraint.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package LIMS2::Model::FormValidator::Constraint;
## no critic(RequireUseStrict,RequireUseWarnings)
{
$LIMS2::Model::FormValidator::Constraint::VERSION = '0.052';
$LIMS2::Model::FormValidator::Constraint::VERSION = '0.054';
}
## use critic

Expand Down
2 changes: 1 addition & 1 deletion lib/LIMS2/Model/Plugin/BAC.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package LIMS2::Model::Plugin::BAC;
## no critic(RequireUseStrict,RequireUseWarnings)
{
$LIMS2::Model::Plugin::BAC::VERSION = '0.052';
$LIMS2::Model::Plugin::BAC::VERSION = '0.054';
}
## use critic

Expand Down
2 changes: 1 addition & 1 deletion lib/LIMS2/Model/Plugin/Design.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package LIMS2::Model::Plugin::Design;
## no critic(RequireUseStrict,RequireUseWarnings)
{
$LIMS2::Model::Plugin::Design::VERSION = '0.052';
$LIMS2::Model::Plugin::Design::VERSION = '0.054';
}
## use critic

Expand Down
2 changes: 1 addition & 1 deletion lib/LIMS2/Model/Plugin/Gene.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package LIMS2::Model::Plugin::Gene;
## no critic(RequireUseStrict,RequireUseWarnings)
{
$LIMS2::Model::Plugin::Gene::VERSION = '0.052';
$LIMS2::Model::Plugin::Gene::VERSION = '0.054';
}
## use critic

Expand Down
2 changes: 1 addition & 1 deletion lib/LIMS2/Model/Plugin/GenotypingQC.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package LIMS2::Model::Plugin::GenotypingQC;
## no critic(RequireUseStrict,RequireUseWarnings)
{
$LIMS2::Model::Plugin::GenotypingQC::VERSION = '0.052';
$LIMS2::Model::Plugin::GenotypingQC::VERSION = '0.054';
}
## use critic

Expand Down
81 changes: 80 additions & 1 deletion lib/LIMS2/Model/Plugin/Plate.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package LIMS2::Model::Plugin::Plate;
## no critic(RequireUseStrict,RequireUseWarnings)
{
$LIMS2::Model::Plugin::Plate::VERSION = '0.052';
$LIMS2::Model::Plugin::Plate::VERSION = '0.054';
}
## use critic

Expand Down Expand Up @@ -200,6 +200,7 @@ sub set_plate_assay_complete {
my $validated_params = $self->check_params( $params, $self->pspec_set_plate_assay_complete,
ignore_unknown => 1 );


my $plate = $self->retrieve_plate($params);

for my $well ( $plate->wells ) {
Expand All @@ -213,6 +214,84 @@ sub set_plate_assay_complete {
return $plate;
}

=head
Method: create_plate_by_copy
Takes an input plate (that must exist), and creates a copy of the plate ready for well
data to be imported by csv upload.
=cut


sub pspec_create_plate_by_copy {
return {
from_plate_name => { validate => 'plate_name' },
to_plate_name => { validate => 'plate_name' },
created_by => { validate => 'existing_user' },
created_at => { validate => 'date_time', optional => 1, post_filter => 'parse_date_time' },

};
}

sub create_plate_by_copy {
my ( $self, $params ) = @_;
my $validated_params = $self->check_params( $params, $self->pspec_create_plate_by_copy );
my $from_plate_name = $validated_params->{'from_plate_name'};
my $to_plate_name = $validated_params->{'to_plate_name'};
my $this_user = $validated_params->{'created_by'};

my $from_plate
= $self->schema->resultset('Plate')->find( { name => $from_plate_name } );
if (! $from_plate) {
$self->throw( Validation => 'Plate ' . $from_plate_name . ' does not exist' );
}

my $to_plate
= $self->schema->resultset('Plate')->find( { name => $to_plate_name } );
if ( $to_plate ) {
$self->throw( Validation => 'Plate ' . $to_plate_name . ' already exists' );
}
#
# Get the wells from the plate we need to copy
#
#
my $well_rs = $self->schema->resultset( 'Well' );

my @wells_on_plate = $well_rs->search( { 'plate.name' => $from_plate_name },
{
join => [ 'plate' ],
}
);

# process the well data into @well_data
my $process_type = 'dna_prep';
my @well_data = ();

foreach my $well ( @wells_on_plate ) {
my %well_hash;
$well_hash{'well_name'} = $well->name;
$well_hash{'parent_plate'} = $from_plate->name;
$well_hash{'parent_well'} = $well->name;
$well_hash{'process_type'} = $process_type;
push @well_data, \%well_hash;
}


my $plate = $self->create_plate(
{
name => $to_plate_name ,
description => $from_plate->description,
type => 'DNA',
created_by => $this_user,
species => $from_plate->species->id,
wells => \@well_data,
}
);
$plate->discard_changes;

return $plate;
}


sub create_plate_csv_upload {
my ( $self, $params, $well_data_fh ) = @_;

Expand Down
2 changes: 1 addition & 1 deletion lib/LIMS2/Model/Plugin/Process.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package LIMS2::Model::Plugin::Process;
## no critic(RequireUseStrict,RequireUseWarnings)
{
$LIMS2::Model::Plugin::Process::VERSION = '0.052';
$LIMS2::Model::Plugin::Process::VERSION = '0.054';
}
## use critic

Expand Down
2 changes: 1 addition & 1 deletion lib/LIMS2/Model/Plugin/ProcessTree.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package LIMS2::Model::Plugin::ProcessTree;
## no critic(RequireUseStrict,RequireUseWarnings)
{
$LIMS2::Model::Plugin::ProcessTree::VERSION = '0.052';
$LIMS2::Model::Plugin::ProcessTree::VERSION = '0.054';
}
## use critic

Expand Down
Loading

0 comments on commit 430b758

Please sign in to comment.