6 AddAnalysisAndMixedModelCvterms
10 mx-run AddAnalysisAndMixedModelCvterms [options] -H hostname -D dbname -u username [-F]
12 this is a subclass of L<CXGN::Metadata::Dbpatch>
13 see the perldoc of parent class for more details.
17 This dbpatch adds cvterms required for mixed models and analysis features.
21 Lukas Mueller <lam87@cornell.edu>
23 =head1 COPYRIGHT & LICENSE
25 Copyright 2019 Boyce Thompson Institute for Plant Research
27 This program is free software; you can redistribute it and/or modify
28 it under the same terms as Perl itself.
33 package AddAnalysisAndMixedModelCvterms
;
36 use Bio
::Chado
::Schema
;
37 extends
'CXGN::Metadata::Dbpatch';
40 has
'+description' => ( default => <<'' );
41 Adds cvterms required
for mixed models
and analysis features
52 print STDERR
"Executing the patch:\n " . $self->name . ".\n\nDescription:\n ". $self->description . ".\n\nExecuted by:\n " . $self->username . " .";
54 print STDERR
"\nChecking if this db_patch was executed before or if previous db_patches have been executed.\n";
56 print STDERR
"\nExecuting the SQL commands.\n";
58 my $schema = Bio
::Chado
::Schema
->connect( sub { $self->dbh->clone } );
62 print STDERR
"INSERTING CV TERMS...\n";
64 $self->dbh->do("INSERT INTO nd_geolocation (description) values ('[Computation]')");
70 "project_sp_person_id",
71 "analysis_metadata_json",
80 "analysis_experiment",
90 foreach my $t (sort keys %$terms){
91 foreach (@
{$terms->{$t}}){
92 $schema->resultset("Cv::Cvterm")->create_with(
99 print STDERR
"Patch complete\n";