Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/CXGN/Trial/TrialLayoutDownload/PlantLayout.pm
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ sub retrieve {
my @output;
my $trial_stock_type = $self->trial_stock_type();

my @possible_cols = ('plant_name','plant_id','subplot_name','subplot_id','plot_name','plot_id','accession_name','accession_id','plot_number','block_number','is_a_control','range_number','rep_number','row_number','col_number','seedlot_name','seed_transaction_operator','num_seed_per_plot','subplot_number','plant_number','pedigree','location_name','trial_name','year','synonyms','tier','plot_geo_json');
my @possible_cols = ('plant_name','plant_id','subplot_name','subplot_id','plot_name','plot_id','accession_name','accession_id','plot_number','block_number','is_a_control','range_number','rep_number','row_number','col_number','seedlot_name','seed_transaction_operator','num_seed_per_plot','subplot_number','plant_number','pedigree','location_name','trial_name','year', 'planting_date', 'synonyms','tier','plot_geo_json');

my @header;
foreach (@possible_cols){
Expand All @@ -76,6 +76,7 @@ sub retrieve {
my $trial_name = $trial->get_name ? $trial->get_name : '';
my $location_name = $trial->get_location ? $trial->get_location->[1] : '';
my $trial_year = $trial->get_year ? $trial->get_year : '';
my $trial_planting_date = $trial->get_planting_date ? $trial->get_planting_date : '';
my $pedigree_strings = $self->_get_all_pedigrees(\%design);

#Turn plot level design into a plant level design that can be sorted on plot_number and then plant index number..
Expand Down Expand Up @@ -145,6 +146,8 @@ sub retrieve {
push @$line, $trial_name;
} elsif ($c eq 'year'){
push @$line, $trial_year;
} elsif ($c eq 'planting_date') {
push @$line, $trial_planting_date;
} elsif ($c eq 'tier'){
my $row = $design_info->{"row_number"} ? $design_info->{"row_number"} : '';
my $col = $design_info->{"col_number"} ? $design_info->{"col_number"} : '';
Expand Down
5 changes: 4 additions & 1 deletion lib/CXGN/Trial/TrialLayoutDownload/PlotLayout.pm
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ sub retrieve {
my @output;
my $trial_stock_type = $self->trial_stock_type();

my @possible_cols = ('plot_name','plot_id','accession_name','accession_id','plot_number','block_number','is_a_control','rep_number','range_number','row_number','col_number','seedlot_name','seed_transaction_operator','num_seed_per_plot','pedigree','location_name','trial_name','year','synonyms','tier','plot_geo_json');
my @possible_cols = ('plot_name','plot_id','accession_name','accession_id','plot_number','block_number','is_a_control','rep_number','range_number','row_number','col_number','seedlot_name','seed_transaction_operator','num_seed_per_plot','pedigree','location_name','trial_name','year', 'planting_date', 'synonyms','tier','plot_geo_json',);

my @header;
foreach (@possible_cols){
Expand All @@ -75,6 +75,7 @@ sub retrieve {
my $trial_name = $trial->get_name ? $trial->get_name : '';
my $location_name = $trial->get_location ? $trial->get_location->[1] : '';
my $trial_year = $trial->get_year ? $trial->get_year : '';
my $trial_planting_date = $trial->get_planting_date ? $trial->get_planting_date : '';

my @plot_design = values %design;
@plot_design = sort { $a->{plot_number} <=> $b->{plot_number} } @plot_design;
Expand All @@ -96,6 +97,8 @@ sub retrieve {
push @$line, $trial_name;
} elsif ($_ eq 'year'){
push @$line, $trial_year;
} elsif ($_ eq 'planting_date') {
push @$line, $trial_planting_date;
} elsif ($_ eq 'tier'){
my $row = $design_info->{"row_number"} ? $design_info->{"row_number"} : '';
my $col = $design_info->{"col_number"} ? $design_info->{"col_number"} : '';
Expand Down
5 changes: 4 additions & 1 deletion lib/CXGN/Trial/TrialLayoutDownload/SamplingTrialLayout.pm
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ sub retrieve {
my $trial = $self->trial;
my @output;

my @possible_cols = ('trial_name', 'year', 'location', 'sampling_facility', 'sampling_trial_sample_type', 'acquisition_date', 'tissue_sample_name', 'plot_number', 'rep_number', 'source_observation_unit_name', 'accession_name', 'synonyms', 'dna_person', 'notes', 'tissue_type', 'extraction', 'concentration', 'volume');
my @possible_cols = ('trial_name', 'year', 'planting_date', 'location', 'sampling_facility', 'sampling_trial_sample_type', 'acquisition_date', 'tissue_sample_name', 'plot_number', 'rep_number', 'source_observation_unit_name', 'accession_name', 'synonyms', 'dna_person', 'notes', 'tissue_type', 'extraction', 'concentration', 'volume');

my @header;
foreach (@possible_cols){
Expand All @@ -56,6 +56,7 @@ sub retrieve {
my $trial_name = $trial->get_name ? $trial->get_name : '';
my $location_name = $trial->get_location ? $trial->get_location->[1] : '';
my $trial_year = $trial->get_year ? $trial->get_year : '';
my $trial_planting_date = $trial->get_planting_date ? $trial->get_planting_date : '';
my $sampling_facility_cvterm_id = SGN::Model::Cvterm->get_cvterm_row($schema, 'sampling_facility', 'project_property')->cvterm_id();
my $sampling_trial_sample_type_cvterm_id = SGN::Model::Cvterm->get_cvterm_row($schema, 'sampling_trial_sample_type', 'project_property')->cvterm_id();
my $sampling_facility = $schema->resultset("Project::Projectprop")->search({ project_id => $trial->get_trial_id(), type_id => $sampling_facility_cvterm_id } )->first->value();
Expand All @@ -72,6 +73,8 @@ sub retrieve {
push @$line, $trial_name;
} elsif ($_ eq 'year'){
push @$line, $trial_year;
} elsif ($_ eq 'planting_date') {
push @$line, $trial_planting_date;
} elsif ($_ eq 'location'){
push @$line, $location_name;
} elsif ($_ eq 'sampling_facility'){
Expand Down
5 changes: 4 additions & 1 deletion lib/CXGN/Trial/TrialLayoutDownload/SubplotLayout.pm
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ sub retrieve {
my @output;
my $trial_stock_type = $self->trial_stock_type();

my @possible_cols = ('subplot_name','subplot_id','plot_name','plot_id','accession_name','accession_id','plot_number','block_number','is_a_control','rep_number','range_number','row_number','col_number','seedlot_name','seed_transaction_operator','num_seed_per_plot','subplot_number','pedigree','location_name','trial_name','year','synonyms','tier','plot_geo_json');
my @possible_cols = ('subplot_name','subplot_id','plot_name','plot_id','accession_name','accession_id','plot_number','block_number','is_a_control','rep_number','range_number','row_number','col_number','seedlot_name','seed_transaction_operator','num_seed_per_plot','subplot_number','pedigree','location_name','trial_name','year', 'planting_date', 'synonyms','tier','plot_geo_json',);

my @header;
foreach (@possible_cols){
Expand All @@ -76,6 +76,7 @@ sub retrieve {
my $trial_name = $trial->get_name ? $trial->get_name : '';
my $location_name = $trial->get_location ? $trial->get_location->[1] : '';
my $trial_year = $trial->get_year ? $trial->get_year : '';
my $trial_planting_date = $trial->get_planting_date ? $trial->get_planting_date : '';
my $pedigree_strings = $self->_get_all_pedigrees(\%design);

my @overall_trait_names = sort keys %$overall_performance_hash;
Expand Down Expand Up @@ -125,6 +126,8 @@ sub retrieve {
push @$line, $trial_name;
} elsif ($c eq 'year'){
push @$line, $trial_year;
} elsif ($c eq 'planting_date') {
push @$line, $trial_planting_date;
} elsif ($c eq 'tier'){
my $row = $design_info->{"row_number"} ? $design_info->{"row_number"} : '';
my $col = $design_info->{"col_number"} ? $design_info->{"col_number"} : '';
Expand Down
5 changes: 4 additions & 1 deletion lib/CXGN/Trial/TrialLayoutDownload/TissueSampleLayout.pm
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ sub retrieve {
my @output;
my $trial_stock_type = $self->trial_stock_type();

my @possible_cols = ('tissue_sample_name','tissue_sample_id','plant_name','plant_id','subplot_name','subplot_id','plot_name','plot_id','accession_name','accession_id','plot_number','block_number','is_a_control','range_number','rep_number','row_number','col_number','seedlot_name','seed_transaction_operator','num_seed_per_plot','subplot_number','plant_number','tissue_sample_number','pedigree','location_name','trial_name','year','synonyms','tier','plot_geo_json');
my @possible_cols = ('tissue_sample_name','tissue_sample_id','plant_name','plant_id','subplot_name','subplot_id','plot_name','plot_id','accession_name','accession_id','plot_number','block_number','is_a_control','range_number','rep_number','row_number','col_number','seedlot_name','seed_transaction_operator','num_seed_per_plot','subplot_number','plant_number','tissue_sample_number','pedigree','location_name','trial_name','year', 'planting_date','synonyms','tier','plot_geo_json');

my @header;
foreach (@possible_cols){
Expand All @@ -76,6 +76,7 @@ sub retrieve {
my $trial_name = $trial->get_name ? $trial->get_name : '';
my $location_name = $trial->get_location ? $trial->get_location->[1] : '';
my $trial_year = $trial->get_year ? $trial->get_year : '';
my $trial_planting_date = $trial->get_planting_date ? $trial->get_planting_date : '';
my $pedigree_strings = $self->_get_all_pedigrees(\%design);

print STDERR "TrialLayoutDownload::TissueSample turning plot design into tissue design ".localtime()."\n";
Expand Down Expand Up @@ -169,6 +170,8 @@ sub retrieve {
push @$line, $trial_name;
} elsif ($c eq 'year'){
push @$line, $trial_year;
} elsif ($c eq 'planting_date') {
push @$line, $trial_planting_date;
} elsif ($c eq 'tier'){
my $row = $design_info->{"row_number"} ? $design_info->{"row_number"} : '';
my $col = $design_info->{"col_number"} ? $design_info->{"col_number"} : '';
Expand Down
10 changes: 5 additions & 5 deletions lib/SGN/Controller/AJAX/LabelDesigner.pm
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ __PACKAGE__->config(

# Adjust starting y-position to center the block vertically
my $total_text_height = scalar(@lines) * $line_spacing;
my $start_y = $elementy;
my $start_y = $elementy;

foreach my $line (@lines) {
$text->font($font, $adjusted_size);
Expand Down Expand Up @@ -770,10 +770,10 @@ sub get_trial_design {
my $type = shift;
my %selected_columns = (
plate => {genotyping_project_name=>1,genotyping_facility=>1,trial_name=>1,acquisition_date=>1,exported_tissue_sample_name=>1,tissue_sample_name=>1,well_A01=>1,row_number=>1,col_number=>1,source_observation_unit_name=>1,accession_name=>1,synonyms=>0,accession_id=>1,pedigree=>1,dna_person=>1,notes=>1,tissue_type=>1,extraction=>1,concentration=>1,volume=>1,is_blank=>1,year=>1,location_name=>1},
plots => {plot_name=>1,plot_id=>1,accession_name=>1,synonyms=>0,accession_id=>1,plot_number=>1,block_number=>1,is_a_control=>1,rep_number=>1,range_number=>1,row_number=>1,col_number=>1,seedlot_name=>1,seed_transaction_operator=>1,num_seed_per_plot=>1,pedigree=>1,location_name=>1,trial_name=>1,year=>1,tier=>1,plot_geo_json=>1},
plants => {plant_name=>1,plant_id=>1,subplot_name=>1,subplot_id=>1,plot_name=>1,plot_id=>1,accession_name=>1,synonyms=>0,accession_id=>1,plot_number=>1,block_number=>1,is_a_control=>1,range_number=>1,rep_number=>1,row_number=>1,col_number=>1,seedlot_name=>1,seed_transaction_operator=>1,num_seed_per_plot=>1,subplot_number=>1,plant_number=>1,pedigree=>1,location_name=>1,trial_name=>1,year=>1,tier=>1,plot_geo_json=>1},
subplots => {subplot_name=>1,subplot_id=>1,plot_name=>1,plot_id=>1,accession_name=>1,synonyms=>0,accession_id=>1,plot_number=>1,block_number=>1,is_a_control=>1,rep_number=>1,range_number=>1,row_number=>1,col_number=>1,seedlot_name=>1,seed_transaction_operator=>1,num_seed_per_plot=>1,subplot_number=>1,pedigree=>1,location_name=>1,trial_name=>1,year=>1,tier=>1,plot_geo_json=>1},
field_trial_tissue_samples => {tissue_sample_name=>1,tissue_sample_id=>1,plant_name=>1,plant_id=>1,subplot_name=>1,subplot_id=>1,plot_name=>1,plot_id=>1,accession_name=>1,synonyms=>0,accession_id=>1,plot_number=>1,block_number=>1,is_a_control=>1,range_number=>1,rep_number=>1,row_number=>1,col_number=>1,seedlot_name=>1,seed_transaction_operator=>1,num_seed_per_plot=>1,subplot_number=>1,plant_number=>1,tissue_sample_number=>1,pedigree=>1,location_name=>1,trial_name=>1,year=>1,tier=>1,plot_geo_json=>1}
plots => {plot_name=>1,plot_id=>1,accession_name=>1,synonyms=>0,accession_id=>1,plot_number=>1,block_number=>1,is_a_control=>1,rep_number=>1,range_number=>1,row_number=>1,col_number=>1,seedlot_name=>1,seed_transaction_operator=>1,num_seed_per_plot=>1,pedigree=>1,location_name=>1,trial_name=>1,year=>1,tier=>1,plot_geo_json=>1, planting_date=>1},
plants => {plant_name=>1,plant_id=>1,subplot_name=>1,subplot_id=>1,plot_name=>1,plot_id=>1,accession_name=>1,synonyms=>0,accession_id=>1,plot_number=>1,block_number=>1,is_a_control=>1,range_number=>1,rep_number=>1,row_number=>1,col_number=>1,seedlot_name=>1,seed_transaction_operator=>1,num_seed_per_plot=>1,subplot_number=>1,plant_number=>1,pedigree=>1,location_name=>1,trial_name=>1,year=>1,tier=>1,plot_geo_json=>1, planting_date=>1},
subplots => {subplot_name=>1,subplot_id=>1,plot_name=>1,plot_id=>1,accession_name=>1,synonyms=>0,accession_id=>1,plot_number=>1,block_number=>1,is_a_control=>1,rep_number=>1,range_number=>1,row_number=>1,col_number=>1,seedlot_name=>1,seed_transaction_operator=>1,num_seed_per_plot=>1,subplot_number=>1,pedigree=>1,location_name=>1,trial_name=>1,year=>1,tier=>1,plot_geo_json=>1, planting_date=>1},
field_trial_tissue_samples => {tissue_sample_name=>1,tissue_sample_id=>1,plant_name=>1,plant_id=>1,subplot_name=>1,subplot_id=>1,plot_name=>1,plot_id=>1,accession_name=>1,synonyms=>0,accession_id=>1,plot_number=>1,block_number=>1,is_a_control=>1,range_number=>1,rep_number=>1,row_number=>1,col_number=>1,seedlot_name=>1,seed_transaction_operator=>1,num_seed_per_plot=>1,subplot_number=>1,plant_number=>1,tissue_sample_number=>1,pedigree=>1,location_name=>1,trial_name=>1,year=>1,tier=>1,plot_geo_json=>1, planting_date=>1}
);
my %unique_identifier = (
plate => 'tissue_sample_name',
Expand Down
Loading