-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5230 from solgenomics/topic/open_pollinated
Add additional member types for population, improve open pollinated cross type, generic cross upload
- Loading branch information
Showing
33 changed files
with
980 additions
and
540 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
#!/usr/bin/env perl | ||
|
||
=head1 NAME | ||
AddMemberTypeCvterm | ||
=head1 SYNOPSIS | ||
mx-run AddMemberTypeCvterm [options] -H hostname -D dbname -u username [-F] | ||
this is a subclass of L<CXGN::Metadata::Dbpatch> | ||
see the perldoc of parent class for more details. | ||
=head1 DESCRIPTION | ||
This patch adds member_type stock_property cvterm | ||
This subclass uses L<Moose>. The parent class uses L<MooseX::Runnable> | ||
=head1 AUTHOR | ||
Titima Tantikanjana <tt15@cornell.edu> | ||
=head1 COPYRIGHT & LICENSE | ||
Copyright 2010 Boyce Thompson Institute for Plant Research | ||
This program is free software; you can redistribute it and/or modify | ||
it under the same terms as Perl itself. | ||
=cut | ||
|
||
|
||
package AddMemberTypeCvterm; | ||
|
||
use Moose; | ||
use Bio::Chado::Schema; | ||
use Try::Tiny; | ||
extends 'CXGN::Metadata::Dbpatch'; | ||
|
||
|
||
has '+description' => ( default => <<'' ); | ||
This patch adds the 'member_type' stock_property cvterm | ||
has '+prereq' => ( | ||
default => sub { | ||
[], | ||
}, | ||
|
||
); | ||
|
||
sub patch { | ||
my $self=shift; | ||
|
||
print STDOUT "Executing the patch:\n " . $self->name . ".\n\nDescription:\n ". $self->description . ".\n\nExecuted by:\n " . $self->username . " ."; | ||
|
||
print STDOUT "\nChecking if this db_patch was executed before or if previous db_patches have been executed.\n"; | ||
|
||
print STDOUT "\nExecuting the SQL commands.\n"; | ||
my $schema = Bio::Chado::Schema->connect( sub { $self->dbh->clone } ); | ||
|
||
print STDERR "INSERTING CV TERMS...\n"; | ||
|
||
$schema->resultset("Cv::Cvterm")->create_with({ | ||
name => 'member_type', | ||
cv => 'stock_property' | ||
}); | ||
|
||
print "You're done!\n"; | ||
} | ||
|
||
|
||
#### | ||
1; # | ||
#### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.