From c3e50833cfb5681864a5ff443e208753488ab9d4 Mon Sep 17 00:00:00 2001 From: David Waring Date: Mon, 30 Oct 2023 16:30:17 -0400 Subject: [PATCH 01/62] Label Designer: Move sorting options to main page --- js/source/legacy/tools/LabelDesigner.js | 10 +-- .../label_designer/label_designer_modals.mas | 29 ++------- .../label_designer/save_and_download.mas | 62 +++++++++++-------- 3 files changed, 44 insertions(+), 57 deletions(-) diff --git a/js/source/legacy/tools/LabelDesigner.js b/js/source/legacy/tools/LabelDesigner.js index 2b8717f113..56426b66ad 100644 --- a/js/source/legacy/tools/LabelDesigner.js +++ b/js/source/legacy/tools/LabelDesigner.js @@ -307,11 +307,7 @@ $(document).ready(function($) { }); $('#design_label_button').click(function() { - $("#d3-draw-area").prependTo("#save_and_download"); - }); - - $('#design_label_button').click(function() { - $("#d3-draw-area").prependTo("#save_and_download"); + $("#d3-draw-area").prependTo("#save-labels-display"); $(".workflow-complete").click(function() { var title = $(this).children().text(); //console.log("workflow element with title "+title+" was just clicked\n"); @@ -319,7 +315,7 @@ $(document).ready(function($) { if (title == "Design Your Label") { $("#d3-draw-area").prependTo("#d3-draw-div"); } else if (title == "More Options, Save, And Download") { - $("#d3-draw-area").prependTo("#save_and_download"); + $("#d3-draw-area").prependTo("#save-labels-display"); } }); @@ -327,7 +323,7 @@ $(document).ready(function($) { var title = $(this).children().text(); //console.log("workflow element with title "+title+" was just clicked\n"); if (title == "More Options, Save, And Download") { - $("#d3-draw-area").prependTo("#save_and_download"); + $("#d3-draw-area").prependTo("#save-labels-display"); } }); diff --git a/mason/tools/label_designer/label_designer_modals.mas b/mason/tools/label_designer/label_designer_modals.mas index e943845427..65d951a85c 100644 --- a/mason/tools/label_designer/label_designer_modals.mas +++ b/mason/tools/label_designer/label_designer_modals.mas @@ -114,26 +114,6 @@
-
-
-
- - - - -
-

@@ -141,22 +121,23 @@
-
-
-
-

+
+
+
+

+
diff --git a/mason/tools/label_designer/save_and_download.mas b/mason/tools/label_designer/save_and_download.mas index e7ca2912f2..35072de72f 100644 --- a/mason/tools/label_designer/save_and_download.mas +++ b/mason/tools/label_designer/save_and_download.mas @@ -2,33 +2,43 @@

Last Step! Here you can edit additional layout settings and/or save your design.

When you are ready, click 'download' to generate your labels. If you are trying to download a very large set, you will be given the option to download your labels in batches.

-
-
-
-
-
+
+
+
+
+ + +
+ + +
+
+
+ +
-

Edit margins, gaps, # of rows/cols, label sorting, etc

-
-


-
-
- -
- - - - -
-
+
+
+
+ +
+ + + + +
-
-
-
- - -
-   -   +
+ +
+ + +
From 9a922302aad675c3aa42552e7ee42b3f2b9ec5c0 Mon Sep 17 00:00:00 2001 From: David Waring Date: Tue, 31 Oct 2023 13:21:36 -0400 Subject: [PATCH 02/62] Label Designer: Add UI for trial layout sorting --- js/source/legacy/tools/LabelDesigner.js | 29 +++++++++++++++++-- .../label_designer/save_and_download.mas | 22 ++++++++++++++ 2 files changed, 48 insertions(+), 3 deletions(-) diff --git a/js/source/legacy/tools/LabelDesigner.js b/js/source/legacy/tools/LabelDesigner.js index 56426b66ad..6a5ff64788 100644 --- a/js/source/legacy/tools/LabelDesigner.js +++ b/js/source/legacy/tools/LabelDesigner.js @@ -700,7 +700,7 @@ function updateFields(data_type, source_id, data_level){ reps = response.reps; num_units = response.num_units; addPlotFilter(reps); - addSortOrders(add_fields); + addSortOrders(add_fields, data_type, data_level); createAdders(add_fields); initializeCustomModal(add_fields); showLoadOption(); @@ -1295,10 +1295,27 @@ function addPlotFilter(reps) { } -function addSortOrders(add_fields) { +function addSortOrders(add_fields, data_type, data_level) { + + // Set type-specific sorting options + let data_type_fields = []; + // Sort by trial layout for plot-level labels... + if ( data_type === 'Field Trials' && data_level === 'plots' ) { + data_type_fields = ['Trial Layout: Plot Order'] + } + //load options d3.selectAll("#sort_order_1, #sort_order_2, #sort_order_3").selectAll("option").remove(); - d3.selectAll("#sort_order_1, #sort_order_2, #sort_order_3").selectAll("option") + d3.selectAll("#sort_order_1").selectAll("option") + .data(["Select a field", ...data_type_fields, ...Object.keys(add_fields).sort()]) + .enter().append("option") + .text(function(d) { + return d + }) + .attr("value", function(d) { + return d + }); + d3.selectAll("#sort_order_2, #sort_order_3").selectAll("option") .data(["Select a field", ...Object.keys(add_fields).sort()]) .enter().append("option") .text(function(d) { @@ -1311,9 +1328,15 @@ function addSortOrders(add_fields) { const sel = jQuery("#sort_order_1").val(); if ( sel === 'Select a field' ) { jQuery("#sort_order_2_container, #sort_order_3_container").hide(); + jQuery("#sort_order_layout_order_container, #sort_order_layout_start_container").hide(); + } + else if ( sel === 'Trial Layout: Plot Order' ) { + jQuery("#sort_order_2_container, #sort_order_3_container").hide(); + jQuery("#sort_order_layout_order_container, #sort_order_layout_start_container").show(); } else { jQuery("#sort_order_2_container").show(); + jQuery("#sort_order_layout_order_container, #sort_order_layout_start_container").hide(); } }); jQuery("#sort_order_2").off("change").on("change", () => { diff --git a/mason/tools/label_designer/save_and_download.mas b/mason/tools/label_designer/save_and_download.mas index 35072de72f..6a68e9dc6f 100644 --- a/mason/tools/label_designer/save_and_download.mas +++ b/mason/tools/label_designer/save_and_download.mas @@ -9,6 +9,8 @@ + + + + + +
From 405bd8e8a56166ad47ae12803475c9f35de878c4 Mon Sep 17 00:00:00 2001 From: David Waring Date: Tue, 31 Oct 2023 13:57:08 -0400 Subject: [PATCH 03/62] Field Map: update UI for plot order download --- .../trial/phenotype_heatmap.mas | 61 +++++++++++-------- 1 file changed, 37 insertions(+), 24 deletions(-) diff --git a/mason/breeders_toolbox/trial/phenotype_heatmap.mas b/mason/breeders_toolbox/trial/phenotype_heatmap.mas index 009a6e2d14..ff2a28436d 100644 --- a/mason/breeders_toolbox/trial/phenotype_heatmap.mas +++ b/mason/breeders_toolbox/trial/phenotype_heatmap.mas @@ -47,7 +47,6 @@ $data_level => 'plot' overflow: auto; /*overflow: scroll;*/ display: none; - margin: 10px; transition: all 1s ease-in-out; } @@ -158,29 +157,6 @@ $data_level => 'plot'

-
-
- - -
- -
- - -
- -
-
@@ -227,6 +203,43 @@ $data_level => 'plot'
+
+

Download Plot Order

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+
From 5d8fba805f644dee4319e1f1e523898f61669ae5 Mon Sep 17 00:00:00 2001 From: David Waring Date: Tue, 31 Oct 2023 16:27:04 -0400 Subject: [PATCH 04/62] [WIP] Trial: backend function for ordering plots --- js/source/entries/fieldmap.js | 2 +- lib/SGN/Controller/AJAX/TrialMetadata.pm | 184 ++++++++++++++++++ .../trial/phenotype_heatmap.mas | 7 +- 3 files changed, 191 insertions(+), 2 deletions(-) diff --git a/js/source/entries/fieldmap.js b/js/source/entries/fieldmap.js index 70ee521751..1e7bd0d94a 100644 --- a/js/source/entries/fieldmap.js +++ b/js/source/entries/fieldmap.js @@ -234,7 +234,7 @@ export function init() { hiddenElement.click(); } - get_plot_order(type, order, include_borders) { + get_plot_order(type, order, start, include_borders) { let k = type === 'planting' ? 'planting_order_layout' : 'harvesting_order_layout'; this.meta_data[k] = order; this.traverse_map(this.plot_arr.filter(plot => include_borders || plot.type !== "border"), k); diff --git a/lib/SGN/Controller/AJAX/TrialMetadata.pm b/lib/SGN/Controller/AJAX/TrialMetadata.pm index cc45676369..446e9a5195 100644 --- a/lib/SGN/Controller/AJAX/TrialMetadata.pm +++ b/lib/SGN/Controller/AJAX/TrialMetadata.pm @@ -4901,6 +4901,190 @@ sub update_trial_design_type_POST : Args(0) { } + +# +# GET TRIAL PLOT ORDERS +# Get the ordered plots of one or more trials based on the requested ordering parameters +# Arguments: +# - trial_ids: array of trial ids +# - type: plot order download type ('planting' or 'harvest') +# - order: the order to traverse the plots ('by_col_serpentine', 'by_col_zigzag', 'by_row_serpentine', 'by_row_zigzag') +# - start: the corner of the trial layout to start the traversal ('bottom_left', 'top_left', 'top_right', 'bottom_right') +# +sub get_trial_plot_order : Path('/ajax/breeders/trial_plot_order') : Args(0) { + my $self = shift; + my $c = shift; + my $schema = $c->dbic_schema('Bio::Chado::Schema'); + my @trial_ids = split(',', $c->req->param('trial_ids') || ''); + my $type = $c->req->param('type') || 'planting'; + my $order = $c->req->param('order') || 'by_row_zigzag'; + my $start = $c->req->param('start') || 'bottom_left'; + + # Check parameters + if ( scalar(@trial_ids) eq 0 ) { + $c->stash->{rest} = { error => "No trial_ids provided!" }; + return; + } + if ( $type ne 'planting' && $type ne 'harvest' ) { + $c->stash->{rest} = { error => "Unrecognized type!" }; + return; + } + if ( $order ne 'by_col_serpentine'&& $order ne 'by_col_zigzag' && $order ne 'by_row_serpentine'&& $order ne 'by_row_zigzag' ) { + $c->stash->{rest} = { error => "Unrecognized order!" }; + return; + } + if ( $start ne 'bottom_left' && $start ne 'top_left' && $start ne 'top_right' && $start ne 'bottom_right' ) { + $c->stash->{rest} = { error => "Unrecognized start!" }; + return; + } + + # Parse each trial + # Get the min and max row and col + my @plot_details; + my ($min_row, $max_row, $min_col, $max_col, %seen_row_cols); + foreach my $trial_id (@trial_ids) { + + # Get plot details from the stored layout information + my $trial_layout_download = CXGN::Trial::TrialLayoutDownload->new({ + schema => $schema, + trial_id => $trial_id, + data_level => 'plots', + selected_columns => {"trial_name"=>1,"plot_name"=>1,"plot_id"=>1,"plot_number"=>1,"row_number"=>1,"col_number"=>1}, + }); + my $output = $trial_layout_download->get_layout_output()->{output}; + my @outer_array = @{$output}; + my ($inner_array, @keys); + for my $i (0 .. $#outer_array) { + $inner_array = $outer_array[$i]; + if (scalar @keys > 0) { + my %detail_hash; + @detail_hash{@keys} = @{$outer_array[$i]}; + my $row = $detail_hash{'row_number'}; + my $col = $detail_hash{'col_number'}; + my $key = "$row|$col"; + + # Check for undefined row and column positions + if ( !defined($row) || !defined($col) ) { + $c->stash->{rest} = { error => "One or more plots do not have a row and/or column defined!" }; + return; + } + + # Check for duplicate positions (plots with the same row / col positions) + if ( exists $seen_row_cols{$key} ) { + $c->stash->{rest} = { error => "One or more plots share the same row and column position!" }; + return; + } + + # Set the min/max row/col + $row = int($row); + $col = int($col); + if ( !defined($min_row) || $row < $min_row ) { + $min_row = $row; + } + if ( !defined($max_row) || $row > $max_row ) { + $max_row = $row; + } + if ( !defined($min_col) || $col < $min_col ) { + $min_col = $col; + } + if ( !defined($max_col) || $col > $max_col ) { + $max_col = $col; + } + + push(@plot_details, \%detail_hash); + } + else { + @keys = @{$inner_array}; + } + } + } + + # Set starting position + my ($start_row, $end_row, $delta_row); + my ($start_col, $end_col, $delta_col); + if ( $start =~ /right/ ) { + $start_col = $max_col; + $end_col = $min_col; + $delta_col = -1; + } + else { + $start_col = $min_col; + $end_col = $max_col; + $delta_col = 1; + } + if ( $start =~ /top/ ) { + $start_row = $max_row; + $end_row = $min_row; + $delta_row = -1; + } + else { + $start_row = $min_row; + $end_row = $max_row; + $delta_row = 1; + } + + # Set traversal order + my ($outerloop_key, $outerloop_start, $outerloop_end, $outerloop_delta); + my ($innerloop_key, $innerloop_start, $innerloop_end, $innerloop_delta); + if ( $order =~ /by_col/ ) { + $outerloop_key = 'col_number'; + $outerloop_start = $start_col; + $outerloop_end = $end_col; + $outerloop_delta = $delta_col; + $innerloop_key = 'row_number'; + $innerloop_start = $start_row; + $innerloop_end = $end_row; + $innerloop_delta = $delta_row; + } + else { + $outerloop_key = 'row_number'; + $outerloop_start = $start_row; + $outerloop_end = $end_row; + $outerloop_delta = $delta_row; + $innerloop_key = 'col_number'; + $innerloop_start = $start_col; + $innerloop_end = $end_col; + $innerloop_delta = $delta_col; + } + + # Start the traversal + my @ordered_plots; + my $o_count = 0; + + # Start the outerloop... + for ( my $o = $outerloop_start; $outerloop_delta > 0 ? $o <= $outerloop_end : $o >= $outerloop_end; $o=$o+$outerloop_delta ) { + my $i_start = $innerloop_start; + my $i_end = $innerloop_end; + my $i_delta = $innerloop_delta; + + # Invert the order of every other innerloop when serpentine + if ( $order =~ /serpentine/ ) { + if ( $o_count % 2 ) { + $i_start = $innerloop_end; + $i_end = $innerloop_start; + $i_delta = $innerloop_delta*-1; + } + } + + # Start the innerloop... + for ( my $i = $i_start; $i_delta > 0 ? $i <= $i_end : $i >= $i_end; $i=$i+$i_delta ) { + + # Find the matching plot and add it to the ordered plots + my ($p) = grep { $_->{$outerloop_key} == $o && $_->{$innerloop_key} == $i } @plot_details; + if ( defined($p) ) { + push(@ordered_plots, $p); + } + + } + + $o_count++; + } + + $c->stash->{rest} = \@ordered_plots; + return; +} + + # # GET LINKED FIELD TRIALS # Get additional field trials that share the same physical field (to display together in the plot layout tool) diff --git a/mason/breeders_toolbox/trial/phenotype_heatmap.mas b/mason/breeders_toolbox/trial/phenotype_heatmap.mas index ff2a28436d..e1a58f659e 100644 --- a/mason/breeders_toolbox/trial/phenotype_heatmap.mas +++ b/mason/breeders_toolbox/trial/phenotype_heatmap.mas @@ -868,6 +868,7 @@ jQuery(document).ready( function() { jQuery("#plot_download_button").click(() => { let type = jQuery("#plot_download_type").val(); let order = jQuery("#plot_download_order").val(); + let start = jQuery("#plot_download_start").val(); let include_borders = jQuery("#plot_download_borders").is(":checked"); if ( !type || type === '' ) { alert("Please select a type"); @@ -877,7 +878,11 @@ jQuery(document).ready( function() { alert("Please select a plot layout"); return; } - FieldMap.get_plot_order(type, order, include_borders) + if ( !start || start === '' ) { + alert("Please select a starting plot"); + return; + } + FieldMap.get_plot_order(type, order, start, include_borders) }); jQuery("#invert_row_checkmark").change(function() { From b2a5038f74fe3dfbdfe2e70a23c36a13b3bcd899 Mon Sep 17 00:00:00 2001 From: David Waring Date: Thu, 2 Nov 2023 14:00:09 -0400 Subject: [PATCH 05/62] Plot Ordering: add additional fields order index accession name, seedlot name, location name --- lib/SGN/Controller/AJAX/TrialMetadata.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/SGN/Controller/AJAX/TrialMetadata.pm b/lib/SGN/Controller/AJAX/TrialMetadata.pm index 446e9a5195..9854ec7e10 100644 --- a/lib/SGN/Controller/AJAX/TrialMetadata.pm +++ b/lib/SGN/Controller/AJAX/TrialMetadata.pm @@ -4949,7 +4949,7 @@ sub get_trial_plot_order : Path('/ajax/breeders/trial_plot_order') : Args(0) { schema => $schema, trial_id => $trial_id, data_level => 'plots', - selected_columns => {"trial_name"=>1,"plot_name"=>1,"plot_id"=>1,"plot_number"=>1,"row_number"=>1,"col_number"=>1}, + selected_columns => {"location_name"=>1,"trial_name"=>1,"plot_name"=>1,"plot_id"=>1,"plot_number"=>1,"row_number"=>1,"col_number"=>1,"accession_name"=>1,"seedlot_name"=>1}, }); my $output = $trial_layout_download->get_layout_output()->{output}; my @outer_array = @{$output}; @@ -5050,6 +5050,7 @@ sub get_trial_plot_order : Path('/ajax/breeders/trial_plot_order') : Args(0) { # Start the traversal my @ordered_plots; my $o_count = 0; + my $p_order = 1; # Start the outerloop... for ( my $o = $outerloop_start; $outerloop_delta > 0 ? $o <= $outerloop_end : $o >= $outerloop_end; $o=$o+$outerloop_delta ) { @@ -5072,7 +5073,9 @@ sub get_trial_plot_order : Path('/ajax/breeders/trial_plot_order') : Args(0) { # Find the matching plot and add it to the ordered plots my ($p) = grep { $_->{$outerloop_key} == $o && $_->{$innerloop_key} == $i } @plot_details; if ( defined($p) ) { + $p->{order} = $p_order; push(@ordered_plots, $p); + $p_order++; } } From 2cd1db025ef3abb3286434090651cdbb8cb760be Mon Sep 17 00:00:00 2001 From: David Waring Date: Thu, 2 Nov 2023 14:26:39 -0400 Subject: [PATCH 06/62] Plot Sorting: move function to CXGN::Trial class --- lib/CXGN/Trial.pm | 170 +++++++++++++++++++++++ lib/SGN/Controller/AJAX/TrialMetadata.pm | 150 +------------------- 2 files changed, 174 insertions(+), 146 deletions(-) diff --git a/lib/CXGN/Trial.pm b/lib/CXGN/Trial.pm index 10b01268df..1f1f88c268 100644 --- a/lib/CXGN/Trial.pm +++ b/lib/CXGN/Trial.pm @@ -255,4 +255,174 @@ sub get_all_phenotype_metadata { } + + +=head2 function get_sorted_plots() + + Usage: CXGN::Trial->get_sorted_plots($schema, $trials, $order, $start) + Desc: Get an array of plot metadata (plot_id, plot_name, row_number, col_number, etc) + for plots in the trial. Sort the plots by the provided traversal parameters. + Ret: An array of sorted plot metadata + Args: trials = an arrayref of trial ids to include + order = the order to travers the plots ('by_col_serpentine', 'by_col_zigzag', 'by_row_serpentine', 'by_row_zigzag') + start = the corner of the trial layout to start the traversal ('bottom_left', 'top_left', 'top_right', 'bottom_right') + Side Effects: + Example: + +=cut + +sub get_sorted_plots { + my $class = shift; + my $schema = shift; + my $trials = shift; + my $order = shift; + my $start = shift; + + # Parse each trial + # Get the min and max row and col + my @plot_details; + my ($min_row, $max_row, $min_col, $max_col, %seen_row_cols); + foreach my $trial_id (@$trials) { + + # Get plot details from the stored layout information + my $trial_layout_download = CXGN::Trial::TrialLayoutDownload->new({ + schema => $schema, + trial_id => $trial_id, + data_level => 'plots', + selected_columns => {"location_name"=>1,"trial_name"=>1,"plot_name"=>1,"plot_id"=>1,"plot_number"=>1,"row_number"=>1,"col_number"=>1,"accession_name"=>1,"seedlot_name"=>1}, + }); + my $output = $trial_layout_download->get_layout_output()->{output}; + my @outer_array = @{$output}; + my ($inner_array, @keys); + for my $i (0 .. $#outer_array) { + $inner_array = $outer_array[$i]; + if (scalar @keys > 0) { + my %detail_hash; + @detail_hash{@keys} = @{$outer_array[$i]}; + my $row = $detail_hash{'row_number'}; + my $col = $detail_hash{'col_number'}; + my $key = "$row|$col"; + + # Check for undefined row and column positions + if ( !defined($row) || !defined($col) ) { + return { error => "One or more plots do not have a row and/or column defined!" }; + } + + # Check for duplicate positions (plots with the same row / col positions) + if ( exists $seen_row_cols{$key} ) { + return { error => "One or more plots share the same row and column position!" }; + } + + # Set the min/max row/col + $row = int($row); + $col = int($col); + if ( !defined($min_row) || $row < $min_row ) { + $min_row = $row; + } + if ( !defined($max_row) || $row > $max_row ) { + $max_row = $row; + } + if ( !defined($min_col) || $col < $min_col ) { + $min_col = $col; + } + if ( !defined($max_col) || $col > $max_col ) { + $max_col = $col; + } + + push(@plot_details, \%detail_hash); + } + else { + @keys = @{$inner_array}; + } + } + } + + # Set starting position + my ($start_row, $end_row, $delta_row); + my ($start_col, $end_col, $delta_col); + if ( $start =~ /right/ ) { + $start_col = $max_col; + $end_col = $min_col; + $delta_col = -1; + } + else { + $start_col = $min_col; + $end_col = $max_col; + $delta_col = 1; + } + if ( $start =~ /top/ ) { + $start_row = $max_row; + $end_row = $min_row; + $delta_row = -1; + } + else { + $start_row = $min_row; + $end_row = $max_row; + $delta_row = 1; + } + + # Set traversal order + my ($outerloop_key, $outerloop_start, $outerloop_end, $outerloop_delta); + my ($innerloop_key, $innerloop_start, $innerloop_end, $innerloop_delta); + if ( $order =~ /by_col/ ) { + $outerloop_key = 'col_number'; + $outerloop_start = $start_col; + $outerloop_end = $end_col; + $outerloop_delta = $delta_col; + $innerloop_key = 'row_number'; + $innerloop_start = $start_row; + $innerloop_end = $end_row; + $innerloop_delta = $delta_row; + } + else { + $outerloop_key = 'row_number'; + $outerloop_start = $start_row; + $outerloop_end = $end_row; + $outerloop_delta = $delta_row; + $innerloop_key = 'col_number'; + $innerloop_start = $start_col; + $innerloop_end = $end_col; + $innerloop_delta = $delta_col; + } + + # Start the traversal + my @ordered_plots; + my $o_count = 0; + my $p_order = 1; + + # Start the outerloop... + for ( my $o = $outerloop_start; $outerloop_delta > 0 ? $o <= $outerloop_end : $o >= $outerloop_end; $o=$o+$outerloop_delta ) { + my $i_start = $innerloop_start; + my $i_end = $innerloop_end; + my $i_delta = $innerloop_delta; + + # Invert the order of every other innerloop when serpentine + if ( $order =~ /serpentine/ ) { + if ( $o_count % 2 ) { + $i_start = $innerloop_end; + $i_end = $innerloop_start; + $i_delta = $innerloop_delta*-1; + } + } + + # Start the innerloop... + for ( my $i = $i_start; $i_delta > 0 ? $i <= $i_end : $i >= $i_end; $i=$i+$i_delta ) { + + # Find the matching plot and add it to the ordered plots + my ($p) = grep { $_->{$outerloop_key} == $o && $_->{$innerloop_key} == $i } @plot_details; + if ( defined($p) ) { + $p->{order} = $p_order; + push(@ordered_plots, $p); + $p_order++; + } + + } + + $o_count++; + } + + return { plots => \@ordered_plots }; +} + + 1; diff --git a/lib/SGN/Controller/AJAX/TrialMetadata.pm b/lib/SGN/Controller/AJAX/TrialMetadata.pm index 9854ec7e10..cb1031dbfc 100644 --- a/lib/SGN/Controller/AJAX/TrialMetadata.pm +++ b/lib/SGN/Controller/AJAX/TrialMetadata.pm @@ -4907,7 +4907,7 @@ sub update_trial_design_type_POST : Args(0) { # Get the ordered plots of one or more trials based on the requested ordering parameters # Arguments: # - trial_ids: array of trial ids -# - type: plot order download type ('planting' or 'harvest') +# - type: plot order file type ('planting' or 'harvest') # - order: the order to traverse the plots ('by_col_serpentine', 'by_col_zigzag', 'by_row_serpentine', 'by_row_zigzag') # - start: the corner of the trial layout to start the traversal ('bottom_left', 'top_left', 'top_right', 'bottom_right') # @@ -4938,152 +4938,10 @@ sub get_trial_plot_order : Path('/ajax/breeders/trial_plot_order') : Args(0) { return; } - # Parse each trial - # Get the min and max row and col - my @plot_details; - my ($min_row, $max_row, $min_col, $max_col, %seen_row_cols); - foreach my $trial_id (@trial_ids) { + # Get the sorted plots + my $results = CXGN::Trial->get_sorted_plots($schema, \@trial_ids, $order, $start); - # Get plot details from the stored layout information - my $trial_layout_download = CXGN::Trial::TrialLayoutDownload->new({ - schema => $schema, - trial_id => $trial_id, - data_level => 'plots', - selected_columns => {"location_name"=>1,"trial_name"=>1,"plot_name"=>1,"plot_id"=>1,"plot_number"=>1,"row_number"=>1,"col_number"=>1,"accession_name"=>1,"seedlot_name"=>1}, - }); - my $output = $trial_layout_download->get_layout_output()->{output}; - my @outer_array = @{$output}; - my ($inner_array, @keys); - for my $i (0 .. $#outer_array) { - $inner_array = $outer_array[$i]; - if (scalar @keys > 0) { - my %detail_hash; - @detail_hash{@keys} = @{$outer_array[$i]}; - my $row = $detail_hash{'row_number'}; - my $col = $detail_hash{'col_number'}; - my $key = "$row|$col"; - - # Check for undefined row and column positions - if ( !defined($row) || !defined($col) ) { - $c->stash->{rest} = { error => "One or more plots do not have a row and/or column defined!" }; - return; - } - - # Check for duplicate positions (plots with the same row / col positions) - if ( exists $seen_row_cols{$key} ) { - $c->stash->{rest} = { error => "One or more plots share the same row and column position!" }; - return; - } - - # Set the min/max row/col - $row = int($row); - $col = int($col); - if ( !defined($min_row) || $row < $min_row ) { - $min_row = $row; - } - if ( !defined($max_row) || $row > $max_row ) { - $max_row = $row; - } - if ( !defined($min_col) || $col < $min_col ) { - $min_col = $col; - } - if ( !defined($max_col) || $col > $max_col ) { - $max_col = $col; - } - - push(@plot_details, \%detail_hash); - } - else { - @keys = @{$inner_array}; - } - } - } - - # Set starting position - my ($start_row, $end_row, $delta_row); - my ($start_col, $end_col, $delta_col); - if ( $start =~ /right/ ) { - $start_col = $max_col; - $end_col = $min_col; - $delta_col = -1; - } - else { - $start_col = $min_col; - $end_col = $max_col; - $delta_col = 1; - } - if ( $start =~ /top/ ) { - $start_row = $max_row; - $end_row = $min_row; - $delta_row = -1; - } - else { - $start_row = $min_row; - $end_row = $max_row; - $delta_row = 1; - } - - # Set traversal order - my ($outerloop_key, $outerloop_start, $outerloop_end, $outerloop_delta); - my ($innerloop_key, $innerloop_start, $innerloop_end, $innerloop_delta); - if ( $order =~ /by_col/ ) { - $outerloop_key = 'col_number'; - $outerloop_start = $start_col; - $outerloop_end = $end_col; - $outerloop_delta = $delta_col; - $innerloop_key = 'row_number'; - $innerloop_start = $start_row; - $innerloop_end = $end_row; - $innerloop_delta = $delta_row; - } - else { - $outerloop_key = 'row_number'; - $outerloop_start = $start_row; - $outerloop_end = $end_row; - $outerloop_delta = $delta_row; - $innerloop_key = 'col_number'; - $innerloop_start = $start_col; - $innerloop_end = $end_col; - $innerloop_delta = $delta_col; - } - - # Start the traversal - my @ordered_plots; - my $o_count = 0; - my $p_order = 1; - - # Start the outerloop... - for ( my $o = $outerloop_start; $outerloop_delta > 0 ? $o <= $outerloop_end : $o >= $outerloop_end; $o=$o+$outerloop_delta ) { - my $i_start = $innerloop_start; - my $i_end = $innerloop_end; - my $i_delta = $innerloop_delta; - - # Invert the order of every other innerloop when serpentine - if ( $order =~ /serpentine/ ) { - if ( $o_count % 2 ) { - $i_start = $innerloop_end; - $i_end = $innerloop_start; - $i_delta = $innerloop_delta*-1; - } - } - - # Start the innerloop... - for ( my $i = $i_start; $i_delta > 0 ? $i <= $i_end : $i >= $i_end; $i=$i+$i_delta ) { - - # Find the matching plot and add it to the ordered plots - my ($p) = grep { $_->{$outerloop_key} == $o && $_->{$innerloop_key} == $i } @plot_details; - if ( defined($p) ) { - $p->{order} = $p_order; - push(@ordered_plots, $p); - $p_order++; - } - - } - - $o_count++; - } - - $c->stash->{rest} = \@ordered_plots; + $c->stash->{rest} = $results; return; } From 0d10b5ab251c7c4bbb275327d29e58e019eb0fb7 Mon Sep 17 00:00:00 2001 From: David Waring Date: Thu, 2 Nov 2023 16:30:16 -0400 Subject: [PATCH 07/62] Trial Layout: download plot order using new backend function --- js/source/entries/fieldmap.js | 177 ++++++++++++----------- lib/CXGN/Trial.pm | 1 + lib/SGN/Controller/AJAX/TrialMetadata.pm | 43 +++++- 3 files changed, 136 insertions(+), 85 deletions(-) diff --git a/js/source/entries/fieldmap.js b/js/source/entries/fieldmap.js index 1e7bd0d94a..80b65d2518 100644 --- a/js/source/entries/fieldmap.js +++ b/js/source/entries/fieldmap.js @@ -148,96 +148,105 @@ export function init() { } } - traverse_map(plot_arr, planting_or_harvesting_order_layout) { - var local_this = this; - let coord_matrix = []; - var row = this.meta_data[planting_or_harvesting_order_layout].includes('row') ? "positionCoordinateY" : "positionCoordinateX"; - var col = this.meta_data[planting_or_harvesting_order_layout].includes('row') ? "positionCoordinateX" : "positionCoordinateY"; + /** + * This function has been deprecated! It is not performed by the backend function CXGN::Trial->get_sorted_plots and + * the AJAX call to /ajax/breeders/trial_plot_order + */ + // traverse_map(plot_arr, planting_or_harvesting_order_layout) { + // var local_this = this; + // let coord_matrix = []; + // var row = this.meta_data[planting_or_harvesting_order_layout].includes('row') ? "positionCoordinateY" : "positionCoordinateX"; + // var col = this.meta_data[planting_or_harvesting_order_layout].includes('row') ? "positionCoordinateX" : "positionCoordinateY"; - for (let plot of plot_arr) { - if (!coord_matrix[plot.observationUnitPosition[row]]) { - coord_matrix[plot.observationUnitPosition[row]] = []; - coord_matrix[plot.observationUnitPosition[row]][plot.observationUnitPosition[col]] = plot; - } else { - coord_matrix[plot.observationUnitPosition[row]][plot.observationUnitPosition[col]] = plot; - } - } - - coord_matrix = coord_matrix.filter(plot_arr => Array.isArray(plot_arr)); - if (!document.getElementById("invert_row_checkmark").checked && this.meta_data[planting_or_harvesting_order_layout].includes('row') && planting_or_harvesting_order_layout.includes('planting')) { - if ((this.meta_data.top_border_selection && !this.meta_data.bottom_border_selection) || (!this.meta_data.top_border_selection && this.meta_data.bottom_border_selection)) { - if (this.meta_data.top_border_selection) { - var top_borders = coord_matrix.shift(); - coord_matrix.push(top_borders); - } else if (this.meta_data.bottom_border_selection) { - var bottom_borders = coord_matrix.pop(); - coord_matrix.unshift(bottom_borders); - } - } - } + // for (let plot of plot_arr) { + // if (!coord_matrix[plot.observationUnitPosition[row]]) { + // coord_matrix[plot.observationUnitPosition[row]] = []; + // coord_matrix[plot.observationUnitPosition[row]][plot.observationUnitPosition[col]] = plot; + // } else { + // coord_matrix[plot.observationUnitPosition[row]][plot.observationUnitPosition[col]] = plot; + // } + // } + + // coord_matrix = coord_matrix.filter(plot_arr => Array.isArray(plot_arr)); + // if (!document.getElementById("invert_row_checkmark").checked && this.meta_data[planting_or_harvesting_order_layout].includes('row') && planting_or_harvesting_order_layout.includes('planting')) { + // if ((this.meta_data.top_border_selection && !this.meta_data.bottom_border_selection) || (!this.meta_data.top_border_selection && this.meta_data.bottom_border_selection)) { + // if (this.meta_data.top_border_selection) { + // var top_borders = coord_matrix.shift(); + // coord_matrix.push(top_borders); + // } else if (this.meta_data.bottom_border_selection) { + // var bottom_borders = coord_matrix.pop(); + // coord_matrix.unshift(bottom_borders); + // } + // } + // } - if (this.meta_data[planting_or_harvesting_order_layout].includes('serpentine')) { - for (let i = 0; i < coord_matrix.length; i++) { - if (i % 2 == 1) { - coord_matrix[i].reverse(); - } - } - } - - var final_arr = []; - for (let plot_arr of coord_matrix) { - plot_arr = plot_arr.filter(plot => plot !== undefined); - if (!document.getElementById("invert_row_checkmark").checked && local_this.meta_data[planting_or_harvesting_order_layout].includes('col') && planting_or_harvesting_order_layout.includes('planting')) { - if ((local_this.meta_data.top_border_selection && !local_this.meta_data.bottom_border_selection) || (!local_this.meta_data.top_border_selection && local_this.meta_data.bottom_border_selection)) { - if (local_this.meta_data.top_border_selection) { - var top_border_plot = plot_arr.shift(); - plot_arr.push(top_border_plot); - } else if (local_this.meta_data.bottom_border_selection) { - var bottom_border_plot = plot_arr.pop(); - plot_arr.unshift(bottom_border_plot); - } - } - } - final_arr.push(...plot_arr); - } - - var csv = [ - planting_or_harvesting_order_layout == "planting_order_layout" ? 'planting_order': "harvesting_order", - 'location_name', - 'trial_name', - 'plot_number', - 'plot_name', - 'accession_name', - 'seedlot_name', - ].join(','); - csv += "\n"; - final_arr = final_arr.filter(plot => plot !== undefined); - let order_number = 1; - final_arr.forEach(function(plot) { - csv += [ - order_number++, - "\"" + plot.locationName + "\"", - plot.studyName, - plot.observationUnitPosition.observationLevel ? plot.observationUnitPosition.observationLevel.levelCode : "N/A", - plot.observationUnitName, - plot.germplasmName, - plot.seedLotName ? plot.seedLotName : '' - ].join(','); - csv += "\n"; - }); + // if (this.meta_data[planting_or_harvesting_order_layout].includes('serpentine')) { + // for (let i = 0; i < coord_matrix.length; i++) { + // if (i % 2 == 1) { + // coord_matrix[i].reverse(); + // } + // } + // } + + // var final_arr = []; + // for (let plot_arr of coord_matrix) { + // plot_arr = plot_arr.filter(plot => plot !== undefined); + // if (!document.getElementById("invert_row_checkmark").checked && local_this.meta_data[planting_or_harvesting_order_layout].includes('col') && planting_or_harvesting_order_layout.includes('planting')) { + // if ((local_this.meta_data.top_border_selection && !local_this.meta_data.bottom_border_selection) || (!local_this.meta_data.top_border_selection && local_this.meta_data.bottom_border_selection)) { + // if (local_this.meta_data.top_border_selection) { + // var top_border_plot = plot_arr.shift(); + // plot_arr.push(top_border_plot); + // } else if (local_this.meta_data.bottom_border_selection) { + // var bottom_border_plot = plot_arr.pop(); + // plot_arr.unshift(bottom_border_plot); + // } + // } + // } + // final_arr.push(...plot_arr); + // } + + // var csv = [ + // planting_or_harvesting_order_layout == "planting_order_layout" ? 'planting_order': "harvesting_order", + // 'location_name', + // 'trial_name', + // 'plot_number', + // 'plot_name', + // 'accession_name', + // 'seedlot_name', + // ].join(','); + // csv += "\n"; + // final_arr = final_arr.filter(plot => plot !== undefined); + // let order_number = 1; + // final_arr.forEach(function(plot) { + // csv += [ + // order_number++, + // "\"" + plot.locationName + "\"", + // plot.studyName, + // plot.observationUnitPosition.observationLevel ? plot.observationUnitPosition.observationLevel.levelCode : "N/A", + // plot.observationUnitName, + // plot.germplasmName, + // plot.seedLotName ? plot.seedLotName : '' + // ].join(','); + // csv += "\n"; + // }); - var hiddenElement = document.createElement('a'); - hiddenElement.href = 'data:text/csv;charset=utf-8,' + encodeURI(csv); - hiddenElement.target = '_blank'; - hiddenElement.download = `Trial_${this.trial_id}_${this.meta_data[planting_or_harvesting_order_layout]}_${planting_or_harvesting_order_layout}.csv`; - hiddenElement.click(); - } + // var hiddenElement = document.createElement('a'); + // hiddenElement.href = 'data:text/csv;charset=utf-8,' + encodeURI(csv); + // hiddenElement.target = '_blank'; + // hiddenElement.download = `Trial_${this.trial_id}_${this.meta_data[planting_or_harvesting_order_layout]}_${planting_or_harvesting_order_layout}.csv`; + // hiddenElement.click(); + // } get_plot_order(type, order, start, include_borders) { - let k = type === 'planting' ? 'planting_order_layout' : 'harvesting_order_layout'; - this.meta_data[k] = order; - this.traverse_map(this.plot_arr.filter(plot => include_borders || plot.type !== "border"), k); + // TODO: The backend function doesn't yet take into account the borders defined in the frontend + let q = new URLSearchParams({ + 'trial_ids': [this.trial_id, ...Object.keys(this.linked_trials).map((e) => x[e].id)].join(','), + 'type': type, + 'order': order, + 'start': start, + }).toString(); + window.open(`/ajax/breeders/trial_plot_order?${q}`, '_blank'); } set_meta_data() { diff --git a/lib/CXGN/Trial.pm b/lib/CXGN/Trial.pm index 1f1f88c268..9b42830f20 100644 --- a/lib/CXGN/Trial.pm +++ b/lib/CXGN/Trial.pm @@ -415,6 +415,7 @@ sub get_sorted_plots { push(@ordered_plots, $p); $p_order++; } + # TODO: Add option to include empty plots (not plot defined for row/col position) } diff --git a/lib/SGN/Controller/AJAX/TrialMetadata.pm b/lib/SGN/Controller/AJAX/TrialMetadata.pm index cb1031dbfc..224199ef8d 100644 --- a/lib/SGN/Controller/AJAX/TrialMetadata.pm +++ b/lib/SGN/Controller/AJAX/TrialMetadata.pm @@ -4941,7 +4941,48 @@ sub get_trial_plot_order : Path('/ajax/breeders/trial_plot_order') : Args(0) { # Get the sorted plots my $results = CXGN::Trial->get_sorted_plots($schema, \@trial_ids, $order, $start); - $c->stash->{rest} = $results; + # Return error message, if set + if ( !defined $results->{plots} ) { + $results->{error} = "An unknown error occurred"; + } + if ( defined $results->{error} ) { + $c->stash->{rest} = { error => $results->{error} }; + return; + } + + # Generate CSV file + my $filename; + my @data; + if ( $type eq 'planting' || $type eq 'harvest' ) { + $filename = $type . "_order.csv"; + my $col = $type . "_order"; + + # Add CSV headers + my @headers = ($col, "location_name", "trial_name", "plot_number", "plot_name", "accession_name", "seedlot_name", "row_number", "col_number"); + push(@data, \@headers); + + # Add plot rows + my $plots = $results->{plots}; + foreach (@$plots) { + my @d = ( + $_->{order}, + "\"$_->{location_name}\"", + $_->{trial_name}, + $_->{plot_number}, + $_->{plot_name}, + $_->{accession_name}, + $_->{seedlot_name}, + $_->{row_number}, + $_->{col_number} + ); + push(@data, \@d); + } + } + + # Return the generated file + $c->res->content_type('text/csv'); + $c->res->headers->push_header("Content-disposition', 'attachment; filename=\"$filename\""); + $c->res->body( join("\n", map { $_ = join(",", @{$_}) } @data) ); return; } From a0ec81eab810974be4c9066a3cb49ce3518392de Mon Sep 17 00:00:00 2001 From: David Waring Date: Tue, 7 Nov 2023 15:45:01 -0500 Subject: [PATCH 08/62] Plot Sorting: add support for including border plots --- js/source/entries/fieldmap.js | 95 +---------- lib/CXGN/Trial.pm | 193 ++++++++++++++++++++--- lib/SGN/Controller/AJAX/TrialMetadata.pm | 60 +++++-- 3 files changed, 220 insertions(+), 128 deletions(-) diff --git a/js/source/entries/fieldmap.js b/js/source/entries/fieldmap.js index 80b65d2518..992eb080fd 100644 --- a/js/source/entries/fieldmap.js +++ b/js/source/entries/fieldmap.js @@ -148,103 +148,16 @@ export function init() { } } - /** - * This function has been deprecated! It is not performed by the backend function CXGN::Trial->get_sorted_plots and - * the AJAX call to /ajax/breeders/trial_plot_order - */ - // traverse_map(plot_arr, planting_or_harvesting_order_layout) { - // var local_this = this; - // let coord_matrix = []; - // var row = this.meta_data[planting_or_harvesting_order_layout].includes('row') ? "positionCoordinateY" : "positionCoordinateX"; - // var col = this.meta_data[planting_or_harvesting_order_layout].includes('row') ? "positionCoordinateX" : "positionCoordinateY"; - - // for (let plot of plot_arr) { - // if (!coord_matrix[plot.observationUnitPosition[row]]) { - // coord_matrix[plot.observationUnitPosition[row]] = []; - // coord_matrix[plot.observationUnitPosition[row]][plot.observationUnitPosition[col]] = plot; - // } else { - // coord_matrix[plot.observationUnitPosition[row]][plot.observationUnitPosition[col]] = plot; - // } - // } - - // coord_matrix = coord_matrix.filter(plot_arr => Array.isArray(plot_arr)); - // if (!document.getElementById("invert_row_checkmark").checked && this.meta_data[planting_or_harvesting_order_layout].includes('row') && planting_or_harvesting_order_layout.includes('planting')) { - // if ((this.meta_data.top_border_selection && !this.meta_data.bottom_border_selection) || (!this.meta_data.top_border_selection && this.meta_data.bottom_border_selection)) { - // if (this.meta_data.top_border_selection) { - // var top_borders = coord_matrix.shift(); - // coord_matrix.push(top_borders); - // } else if (this.meta_data.bottom_border_selection) { - // var bottom_borders = coord_matrix.pop(); - // coord_matrix.unshift(bottom_borders); - // } - // } - // } - - - // if (this.meta_data[planting_or_harvesting_order_layout].includes('serpentine')) { - // for (let i = 0; i < coord_matrix.length; i++) { - // if (i % 2 == 1) { - // coord_matrix[i].reverse(); - // } - // } - // } - - // var final_arr = []; - // for (let plot_arr of coord_matrix) { - // plot_arr = plot_arr.filter(plot => plot !== undefined); - // if (!document.getElementById("invert_row_checkmark").checked && local_this.meta_data[planting_or_harvesting_order_layout].includes('col') && planting_or_harvesting_order_layout.includes('planting')) { - // if ((local_this.meta_data.top_border_selection && !local_this.meta_data.bottom_border_selection) || (!local_this.meta_data.top_border_selection && local_this.meta_data.bottom_border_selection)) { - // if (local_this.meta_data.top_border_selection) { - // var top_border_plot = plot_arr.shift(); - // plot_arr.push(top_border_plot); - // } else if (local_this.meta_data.bottom_border_selection) { - // var bottom_border_plot = plot_arr.pop(); - // plot_arr.unshift(bottom_border_plot); - // } - // } - // } - // final_arr.push(...plot_arr); - // } - - // var csv = [ - // planting_or_harvesting_order_layout == "planting_order_layout" ? 'planting_order': "harvesting_order", - // 'location_name', - // 'trial_name', - // 'plot_number', - // 'plot_name', - // 'accession_name', - // 'seedlot_name', - // ].join(','); - // csv += "\n"; - // final_arr = final_arr.filter(plot => plot !== undefined); - // let order_number = 1; - // final_arr.forEach(function(plot) { - // csv += [ - // order_number++, - // "\"" + plot.locationName + "\"", - // plot.studyName, - // plot.observationUnitPosition.observationLevel ? plot.observationUnitPosition.observationLevel.levelCode : "N/A", - // plot.observationUnitName, - // plot.germplasmName, - // plot.seedLotName ? plot.seedLotName : '' - // ].join(','); - // csv += "\n"; - // }); - - // var hiddenElement = document.createElement('a'); - // hiddenElement.href = 'data:text/csv;charset=utf-8,' + encodeURI(csv); - // hiddenElement.target = '_blank'; - // hiddenElement.download = `Trial_${this.trial_id}_${this.meta_data[planting_or_harvesting_order_layout]}_${planting_or_harvesting_order_layout}.csv`; - // hiddenElement.click(); - // } - get_plot_order(type, order, start, include_borders) { - // TODO: The backend function doesn't yet take into account the borders defined in the frontend let q = new URLSearchParams({ 'trial_ids': [this.trial_id, ...Object.keys(this.linked_trials).map((e) => x[e].id)].join(','), 'type': type, 'order': order, 'start': start, + 'top_border': include_borders && !!this.meta_data.top_border_selection, + 'right_border': include_borders && !!this.meta_data.right_border_selection, + 'bottom_border': include_borders && !!this.meta_data.bottom_border_selection, + 'left_border': include_borders && !!this.meta_data.left_border_selection }).toString(); window.open(`/ajax/breeders/trial_plot_order?${q}`, '_blank'); } diff --git a/lib/CXGN/Trial.pm b/lib/CXGN/Trial.pm index 9b42830f20..5c44f49d0f 100644 --- a/lib/CXGN/Trial.pm +++ b/lib/CXGN/Trial.pm @@ -262,10 +262,13 @@ sub get_all_phenotype_metadata { Usage: CXGN::Trial->get_sorted_plots($schema, $trials, $order, $start) Desc: Get an array of plot metadata (plot_id, plot_name, row_number, col_number, etc) for plots in the trial. Sort the plots by the provided traversal parameters. + Requirements: The Trial(s) MUST have row/col positions for every plot AND there must not + be any overlapping plots (more than one plot with the same row/col position). Ret: An array of sorted plot metadata Args: trials = an arrayref of trial ids to include order = the order to travers the plots ('by_col_serpentine', 'by_col_zigzag', 'by_row_serpentine', 'by_row_zigzag') start = the corner of the trial layout to start the traversal ('bottom_left', 'top_left', 'top_right', 'bottom_right') + borders = a hashref with keys top, right, bottom, left. If the value is 1, then include that side as a border Side Effects: Example: @@ -277,9 +280,9 @@ sub get_sorted_plots { my $trials = shift; my $order = shift; my $start = shift; + my $borders = shift; # Parse each trial - # Get the min and max row and col my @plot_details; my ($min_row, $max_row, $min_col, $max_col, %seen_row_cols); foreach my $trial_id (@$trials) { @@ -292,6 +295,10 @@ sub get_sorted_plots { selected_columns => {"location_name"=>1,"trial_name"=>1,"plot_name"=>1,"plot_id"=>1,"plot_number"=>1,"row_number"=>1,"col_number"=>1,"accession_name"=>1,"seedlot_name"=>1}, }); my $output = $trial_layout_download->get_layout_output()->{output}; + + # Convert plot layout array into hash and add each plot to the plot_details array (of hashes) + # Check for plot row/col requirements + # Set the overall min/max row/col positions my @outer_array = @{$output}; my ($inner_array, @keys); for my $i (0 .. $#outer_array) { @@ -337,31 +344,38 @@ sub get_sorted_plots { } } - # Set starting position + # Set starting position: + # right = col from max to min + # left = col from min to max + # top = row from max to min + # bottom = row from min to max + # Add a row/col on either side for the borders my ($start_row, $end_row, $delta_row); my ($start_col, $end_col, $delta_col); if ( $start =~ /right/ ) { - $start_col = $max_col; - $end_col = $min_col; + $start_col = $max_col + 1; + $end_col = $min_col - 1; $delta_col = -1; } else { - $start_col = $min_col; - $end_col = $max_col; + $start_col = $min_col - 1; + $end_col = $max_col + 1; $delta_col = 1; } if ( $start =~ /top/ ) { - $start_row = $max_row; - $end_row = $min_row; + $start_row = $max_row + 1; + $end_row = $min_row - 1; $delta_row = -1; } else { - $start_row = $min_row; - $end_row = $max_row; + $start_row = $min_row - 1; + $end_row = $max_row + 1; $delta_row = 1; } - # Set traversal order + # Set traversal order: + # by_col = first by column (outer loop) then by row (inner loop) + # by_row = first by row (outer loop) then by col (inner loop) my ($outerloop_key, $outerloop_start, $outerloop_end, $outerloop_delta); my ($innerloop_key, $innerloop_start, $innerloop_end, $innerloop_delta); if ( $order =~ /by_col/ ) { @@ -392,11 +406,12 @@ sub get_sorted_plots { # Start the outerloop... for ( my $o = $outerloop_start; $outerloop_delta > 0 ? $o <= $outerloop_end : $o >= $outerloop_end; $o=$o+$outerloop_delta ) { + my $starting_p_order = $p_order; + + # Invert the order of every other innerloop when serpentine my $i_start = $innerloop_start; my $i_end = $innerloop_end; my $i_delta = $innerloop_delta; - - # Invert the order of every other innerloop when serpentine if ( $order =~ /serpentine/ ) { if ( $o_count % 2 ) { $i_start = $innerloop_end; @@ -408,18 +423,154 @@ sub get_sorted_plots { # Start the innerloop... for ( my $i = $i_start; $i_delta > 0 ? $i <= $i_end : $i >= $i_end; $i=$i+$i_delta ) { - # Find the matching plot and add it to the ordered plots - my ($p) = grep { $_->{$outerloop_key} == $o && $_->{$innerloop_key} == $i } @plot_details; - if ( defined($p) ) { - $p->{order} = $p_order; - push(@ordered_plots, $p); - $p_order++; + # + # ADD BORDERS + # + + # Determine border type based on current position + my $obt_start = $outerloop_key eq 'row_number' ? ($outerloop_delta > 0 ? 'bottom' : 'top') : ($outerloop_delta > 0 ? 'left' : 'right'); + my $obt_end = $outerloop_key eq 'row_number' ? ($outerloop_delta > 0 ? 'top' : 'bottom') : ($outerloop_delta > 0 ? 'right' : 'left'); + my $ibt_start = $innerloop_key eq 'col_number' ? ($innerloop_delta > 0 ? 'left' : 'right') : ($innerloop_delta > 0 ? 'bottom' : 'top'); + my $ibt_end = $innerloop_key eq 'col_number' ? ($innerloop_delta > 0 ? 'right' : 'left') : ($innerloop_delta > 0 ? 'top' : 'bottom'); + + # Add corner 1 + if ( $o == $outerloop_start && $i == $innerloop_start ) { + if ( $borders->{$obt_start} && $borders->{$ibt_start} ) { + push(@ordered_plots, { + order => $p_order, + type => 'border', + border => $obt_start . "_" . $ibt_start, + $outerloop_key => $o, + $innerloop_key => $i + }); + $p_order++; + } + } + + # Add corner 2 + elsif ( $o == $outerloop_end && $i == $innerloop_start ) { + if ( $borders->{$obt_end} && $borders->{$ibt_start} ) { + push(@ordered_plots, { + order => $p_order, + type => 'border', + border => $obt_end . "_" . $ibt_start, + $outerloop_key => $o, + $innerloop_key => $i + }); + $p_order++; + } + } + + # Add corner 3 + elsif ( $o == $outerloop_end && $i == $innerloop_end ) { + if ( $borders->{$obt_end} && $borders->{$ibt_end} ) { + push(@ordered_plots, { + order => $p_order, + type => 'border', + border => $obt_end . "_" . $ibt_end, + $outerloop_key => $o, + $innerloop_key => $i + }); + $p_order++; + } + } + + # Add corner 4 + elsif ( $o == $outerloop_start && $i == $innerloop_end ) { + if ( $borders->{$obt_start} && $borders->{$ibt_end} ) { + push(@ordered_plots, { + order => $p_order, + type => 'border', + border => $obt_start . "_" . $ibt_end, + $outerloop_key => $o, + $innerloop_key => $i + }); + $p_order++; + } + } + + # Add outer start border + elsif ( $o == $outerloop_start ) { + if ( $borders->{$obt_start} ) { + push(@ordered_plots, { + order => $p_order, + type => 'border', + border => $obt_start, + $outerloop_key => $o, + $innerloop_key => $i + }); + $p_order++; + } + } + + # Add outer end border + elsif ( $o == $outerloop_end ) { + if ( $borders->{$obt_end} ) { + push(@ordered_plots, { + order => $p_order, + type => 'border', + border => $obt_end, + $outerloop_key => $o, + $innerloop_key => $i + }); + $p_order++; + } + } + + # Add inner start border + elsif ( $i == $innerloop_start ) { + if ( $borders->{$ibt_start} ) { + push(@ordered_plots, { + order => $p_order, + type => 'border', + border => $ibt_start, + $outerloop_key => $o, + $innerloop_key => $i + }); + $p_order++; + } + } + + # Add inner end border + elsif ( $i == $innerloop_end ) { + if ( $borders->{$ibt_end} ) { + push(@ordered_plots, { + order => $p_order, + type => 'border', + border => $ibt_end, + $outerloop_key => $o, + $innerloop_key => $i + }); + $p_order++; + } + } + + + # + # ADD PLOTS + # + else { + + # Find the plot with the matching row / col position + my ($p) = grep { $_->{$outerloop_key} == $o && $_->{$innerloop_key} == $i } @plot_details; + + # Add the plot, if it's found + if ( defined($p) ) { + $p->{order} = $p_order; + $p->{type} = 'plot'; + push(@ordered_plots, $p); + $p_order++; + } + + # TODO: add a gap item when there is no plot, if requested + } - # TODO: Add option to include empty plots (not plot defined for row/col position) } - $o_count++; + if ( $p_order > $starting_p_order ) { + $o_count++; + } } return { plots => \@ordered_plots }; diff --git a/lib/SGN/Controller/AJAX/TrialMetadata.pm b/lib/SGN/Controller/AJAX/TrialMetadata.pm index 224199ef8d..3a26741c38 100644 --- a/lib/SGN/Controller/AJAX/TrialMetadata.pm +++ b/lib/SGN/Controller/AJAX/TrialMetadata.pm @@ -4919,6 +4919,10 @@ sub get_trial_plot_order : Path('/ajax/breeders/trial_plot_order') : Args(0) { my $type = $c->req->param('type') || 'planting'; my $order = $c->req->param('order') || 'by_row_zigzag'; my $start = $c->req->param('start') || 'bottom_left'; + my $top_border = $c->req->param('top_border') || 'false'; + my $right_border = $c->req->param('right_border') || 'false'; + my $bottom_border = $c->req->param('bottom_border') || 'false'; + my $left_border = $c->req->param('left_border') || 'false'; # Check parameters if ( scalar(@trial_ids) eq 0 ) { @@ -4929,17 +4933,23 @@ sub get_trial_plot_order : Path('/ajax/breeders/trial_plot_order') : Args(0) { $c->stash->{rest} = { error => "Unrecognized type!" }; return; } - if ( $order ne 'by_col_serpentine'&& $order ne 'by_col_zigzag' && $order ne 'by_row_serpentine'&& $order ne 'by_row_zigzag' ) { + if ( ( $order !~ /by_col/ && $order !~ /by_row/ ) || ( $order !~ /serpentine/ && $order !~ /zigzag/ ) ) { $c->stash->{rest} = { error => "Unrecognized order!" }; return; } - if ( $start ne 'bottom_left' && $start ne 'top_left' && $start ne 'top_right' && $start ne 'bottom_right' ) { + if ( ( $start !~ /bottom/ && $start !~ /top/ ) || ( $start !~ /left/ && $start !~ /right/ ) ) { $c->stash->{rest} = { error => "Unrecognized start!" }; return; } + my %borders = ( + top => $top_border eq 'true' || 0, + right => $right_border eq 'true' || 0, + bottom => $bottom_border eq 'true' || 0, + left => $left_border eq 'true' || 0 + ); # Get the sorted plots - my $results = CXGN::Trial->get_sorted_plots($schema, \@trial_ids, $order, $start); + my $results = CXGN::Trial->get_sorted_plots($schema, \@trial_ids, $order, $start, \%borders); # Return error message, if set if ( !defined $results->{plots} ) { @@ -4958,24 +4968,42 @@ sub get_trial_plot_order : Path('/ajax/breeders/trial_plot_order') : Args(0) { my $col = $type . "_order"; # Add CSV headers - my @headers = ($col, "location_name", "trial_name", "plot_number", "plot_name", "accession_name", "seedlot_name", "row_number", "col_number"); + my @headers = ($col, "type", "location_name", "trial_name", "plot_number", "plot_name", "accession_name", "seedlot_name", "row_number", "col_number"); push(@data, \@headers); # Add plot rows my $plots = $results->{plots}; foreach (@$plots) { - my @d = ( - $_->{order}, - "\"$_->{location_name}\"", - $_->{trial_name}, - $_->{plot_number}, - $_->{plot_name}, - $_->{accession_name}, - $_->{seedlot_name}, - $_->{row_number}, - $_->{col_number} - ); - push(@data, \@d); + if ( $_->{type} eq 'plot' ) { + my @d = ( + $_->{order}, + $_->{type}, + "\"$_->{location_name}\"", + $_->{trial_name}, + $_->{plot_number}, + $_->{plot_name}, + $_->{accession_name}, + $_->{seedlot_name}, + $_->{row_number}, + $_->{col_number} + ); + push(@data, \@d); + } + else { + my @d = ( + $_->{order}, + $_->{type}, + "", # location + "", # trial + "", # plot number + "", # plot name + "", # accession + "", # seedlot + $_->{row_number}, + $_->{col_number} + ); + push(@data, \@d); + } } } From 1ccdecc6eb91fb5ad1800add673494bf465a94a8 Mon Sep 17 00:00:00 2001 From: David Waring Date: Wed, 8 Nov 2023 13:58:56 -0500 Subject: [PATCH 09/62] Plot Sorting: add option to include gaps / missing plots --- js/source/entries/fieldmap.js | 13 +++++++------ lib/CXGN/Trial.pm | 13 ++++++++++++- lib/SGN/Controller/AJAX/TrialMetadata.pm | 3 ++- .../breeders_toolbox/trial/phenotype_heatmap.mas | 15 +++++++++++---- 4 files changed, 32 insertions(+), 12 deletions(-) diff --git a/js/source/entries/fieldmap.js b/js/source/entries/fieldmap.js index 992eb080fd..b032e804e7 100644 --- a/js/source/entries/fieldmap.js +++ b/js/source/entries/fieldmap.js @@ -148,16 +148,17 @@ export function init() { } } - get_plot_order(type, order, start, include_borders) { + get_plot_order(type, order, start, include_borders, include_gaps) { let q = new URLSearchParams({ - 'trial_ids': [this.trial_id, ...Object.keys(this.linked_trials).map((e) => x[e].id)].join(','), + 'trial_ids': [this.trial_id, ...Object.keys(this.linked_trials).map((e) => this.linked_trials[e].id)].join(','), 'type': type, 'order': order, 'start': start, - 'top_border': include_borders && !!this.meta_data.top_border_selection, - 'right_border': include_borders && !!this.meta_data.right_border_selection, - 'bottom_border': include_borders && !!this.meta_data.bottom_border_selection, - 'left_border': include_borders && !!this.meta_data.left_border_selection + 'top_border': !!include_borders && !!this.meta_data.top_border_selection, + 'right_border': !!include_borders && !!this.meta_data.right_border_selection, + 'bottom_border': !!include_borders && !!this.meta_data.bottom_border_selection, + 'left_border': !!include_borders && !!this.meta_data.left_border_selection, + 'gaps': !!include_gaps }).toString(); window.open(`/ajax/breeders/trial_plot_order?${q}`, '_blank'); } diff --git a/lib/CXGN/Trial.pm b/lib/CXGN/Trial.pm index 5c44f49d0f..955a1941f5 100644 --- a/lib/CXGN/Trial.pm +++ b/lib/CXGN/Trial.pm @@ -269,6 +269,7 @@ sub get_all_phenotype_metadata { order = the order to travers the plots ('by_col_serpentine', 'by_col_zigzag', 'by_row_serpentine', 'by_row_zigzag') start = the corner of the trial layout to start the traversal ('bottom_left', 'top_left', 'top_right', 'bottom_right') borders = a hashref with keys top, right, bottom, left. If the value is 1, then include that side as a border + gaps = when set to 1, include missing plots / gaps as items in the order Side Effects: Example: @@ -281,6 +282,7 @@ sub get_sorted_plots { my $order = shift; my $start = shift; my $borders = shift; + my $gaps = shift; # Parse each trial my @plot_details; @@ -562,7 +564,16 @@ sub get_sorted_plots { $p_order++; } - # TODO: add a gap item when there is no plot, if requested + # Add a gap item when there is no plot, if requested + elsif ( $gaps ) { + push(@ordered_plots, { + order => $p_order, + type => 'gap', + $outerloop_key => $o, + $innerloop_key => $i + }); + $p_order++; + } } diff --git a/lib/SGN/Controller/AJAX/TrialMetadata.pm b/lib/SGN/Controller/AJAX/TrialMetadata.pm index 3a26741c38..d058b6e5c7 100644 --- a/lib/SGN/Controller/AJAX/TrialMetadata.pm +++ b/lib/SGN/Controller/AJAX/TrialMetadata.pm @@ -4923,6 +4923,7 @@ sub get_trial_plot_order : Path('/ajax/breeders/trial_plot_order') : Args(0) { my $right_border = $c->req->param('right_border') || 'false'; my $bottom_border = $c->req->param('bottom_border') || 'false'; my $left_border = $c->req->param('left_border') || 'false'; + my $gaps = $c->req->param('gaps') || 'false'; # Check parameters if ( scalar(@trial_ids) eq 0 ) { @@ -4949,7 +4950,7 @@ sub get_trial_plot_order : Path('/ajax/breeders/trial_plot_order') : Args(0) { ); # Get the sorted plots - my $results = CXGN::Trial->get_sorted_plots($schema, \@trial_ids, $order, $start, \%borders); + my $results = CXGN::Trial->get_sorted_plots($schema, \@trial_ids, $order, $start, \%borders, $gaps eq 'true' || 0); # Return error message, if set if ( !defined $results->{plots} ) { diff --git a/mason/breeders_toolbox/trial/phenotype_heatmap.mas b/mason/breeders_toolbox/trial/phenotype_heatmap.mas index e1a58f659e..226b8d034a 100644 --- a/mason/breeders_toolbox/trial/phenotype_heatmap.mas +++ b/mason/breeders_toolbox/trial/phenotype_heatmap.mas @@ -233,9 +233,15 @@ $data_level => 'plot'
-
- - +
+
+ + +
+
+ + +
@@ -870,6 +876,7 @@ jQuery(document).ready( function() { let order = jQuery("#plot_download_order").val(); let start = jQuery("#plot_download_start").val(); let include_borders = jQuery("#plot_download_borders").is(":checked"); + let include_gaps = jQuery("#plot_download_gaps").is(":checked"); if ( !type || type === '' ) { alert("Please select a type"); return; @@ -882,7 +889,7 @@ jQuery(document).ready( function() { alert("Please select a starting plot"); return; } - FieldMap.get_plot_order(type, order, start, include_borders) + FieldMap.get_plot_order(type, order, start, include_borders, include_gaps); }); jQuery("#invert_row_checkmark").change(function() { From 236864ebe68ee9820b8b11c4c7076bae12b4cf6c Mon Sep 17 00:00:00 2001 From: David Waring Date: Wed, 8 Nov 2023 14:17:59 -0500 Subject: [PATCH 10/62] Trial Layout: only display plot order download section for trials with defined layouts --- lib/CXGN/Trial.pm | 2 +- lib/SGN/Controller/AJAX/TrialMetadata.pm | 2 +- mason/analyses/detail.mas | 2 +- mason/breeders_toolbox/trial.mas | 2 +- mason/breeders_toolbox/trial/phenotype_heatmap.mas | 3 +++ mason/page/detail_page_2_col_section.mas | 3 ++- 6 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/CXGN/Trial.pm b/lib/CXGN/Trial.pm index 955a1941f5..435726428f 100644 --- a/lib/CXGN/Trial.pm +++ b/lib/CXGN/Trial.pm @@ -259,7 +259,7 @@ sub get_all_phenotype_metadata { =head2 function get_sorted_plots() - Usage: CXGN::Trial->get_sorted_plots($schema, $trials, $order, $start) + Usage: CXGN::Trial->get_sorted_plots($schema, $trials, $order, $start, $gaps) Desc: Get an array of plot metadata (plot_id, plot_name, row_number, col_number, etc) for plots in the trial. Sort the plots by the provided traversal parameters. Requirements: The Trial(s) MUST have row/col positions for every plot AND there must not diff --git a/lib/SGN/Controller/AJAX/TrialMetadata.pm b/lib/SGN/Controller/AJAX/TrialMetadata.pm index d058b6e5c7..5b25a68af9 100644 --- a/lib/SGN/Controller/AJAX/TrialMetadata.pm +++ b/lib/SGN/Controller/AJAX/TrialMetadata.pm @@ -4953,7 +4953,7 @@ sub get_trial_plot_order : Path('/ajax/breeders/trial_plot_order') : Args(0) { my $results = CXGN::Trial->get_sorted_plots($schema, \@trial_ids, $order, $start, \%borders, $gaps eq 'true' || 0); # Return error message, if set - if ( !defined $results->{plots} ) { + if ( !defined $results->{error} && !defined $results->{plots} ) { $results->{error} = "An unknown error occurred"; } if ( defined $results->{error} ) { diff --git a/mason/analyses/detail.mas b/mason/analyses/detail.mas index 61a4fb7ad5..1f9d4e033b 100644 --- a/mason/analyses/detail.mas +++ b/mason/analyses/detail.mas @@ -52,7 +52,7 @@ $has_col_and_row_numbers % $layout_buttons = '

   This experiment does not have spatial layout info!

'; % } -<& /page/detail_page_2_col_section.mas, trial_id => $analysis_id, info_section_title => "

Field Layout Tools and Phenotype Heatmap

", info_section_subtitle => $subtitle, buttons_html => $layout_buttons, icon_class => "glyphicon glyphicon-th", info_section_id => "pheno_heatmap" &> +<& /page/detail_page_2_col_section.mas, trial_id => $analysis_id, has_col_and_row_numbers => $has_col_and_row_numbers, info_section_title => "

Field Layout Tools and Phenotype Heatmap

", info_section_subtitle => $subtitle, buttons_html => $layout_buttons, icon_class => "glyphicon glyphicon-th", info_section_id => "pheno_heatmap" &> <& /page/detail_page_2_col_section.mas, trial_id => $analysis_id, info_section_title => "

Analysis Tools

", info_section_subtitle => 'Run analyses', icon_class => "glyphicon glyphicon-signal", info_section_id => "analysis_page_analysis_tools" &> diff --git a/mason/breeders_toolbox/trial.mas b/mason/breeders_toolbox/trial.mas index 8328874c92..24cb4f27be 100644 --- a/mason/breeders_toolbox/trial.mas +++ b/mason/breeders_toolbox/trial.mas @@ -95,7 +95,7 @@ $latest_trial_activity => undef % $layout_buttons = '

   This experiment does not have spatial layout info!

'; % } -<& /page/detail_page_2_col_section.mas, trial_id => $trial_id, info_section_title => "

Field Layout Tools and Phenotype Heatmap

", info_section_subtitle => $subtitle, buttons_html => $layout_buttons, icon_class => "glyphicon glyphicon-th", info_section_id => "pheno_heatmap" &> +<& /page/detail_page_2_col_section.mas, trial_id => $trial_id, has_col_and_row_numbers => $has_col_and_row_numbers, info_section_title => "

Field Layout Tools and Phenotype Heatmap

", info_section_subtitle => $subtitle, buttons_html => $layout_buttons, icon_class => "glyphicon glyphicon-th", info_section_id => "pheno_heatmap" &> <& /page/detail_page_2_col_section.mas, trial_id => $trial_id, trial_name => $trial_name, info_section_title => "

Experimental Design

", info_section_subtitle => 'View and add experimental design information. Add plant entries and tissue sample entries.', buttons_html => ' ', icon_class => "glyphicon glyphicon-list-alt", info_section_id => "trial_design_section", has_plant_entries => $has_plant_entries, has_subplot_entries => $has_subplot_entries, has_tissue_sample_entries => $has_tissue_sample_entries, trial_stock_type => $trial_stock_type &> diff --git a/mason/breeders_toolbox/trial/phenotype_heatmap.mas b/mason/breeders_toolbox/trial/phenotype_heatmap.mas index 226b8d034a..5a59633877 100644 --- a/mason/breeders_toolbox/trial/phenotype_heatmap.mas +++ b/mason/breeders_toolbox/trial/phenotype_heatmap.mas @@ -2,6 +2,7 @@ $trial_id $stockref => undef $data_level => 'plot' +$has_col_and_row_numbers => undef <& /util/import_css.mas, paths => ['fieldmap/leaflet-search.min.css', 'fieldmap/leaflet.css'] &> @@ -203,6 +204,7 @@ $data_level => 'plot'
+% if ( $has_col_and_row_numbers ) {

Download Plot Order

@@ -247,6 +249,7 @@ $data_level => 'plot'
+% }
loading...
diff --git a/mason/page/detail_page_2_col_section.mas b/mason/page/detail_page_2_col_section.mas index 23c8cfe0f7..5b2ec0e84a 100644 --- a/mason/page/detail_page_2_col_section.mas +++ b/mason/page/detail_page_2_col_section.mas @@ -54,6 +54,7 @@ $trial_owner => undef $phenotypes_fully_uploaded => undef $user_can_modify => undef $latest_trial_activity => undef +$has_col_and_row_numbers => undef #Specific to stock detail page $type_name => undef @@ -161,7 +162,7 @@ $analytics_protocol_result_summary => {}
% if ($info_section_id eq 'pheno_heatmap'){ - <& /breeders_toolbox/trial/phenotype_heatmap.mas, trial_id => $trial_id, data_level => $data_level &> + <& /breeders_toolbox/trial/phenotype_heatmap.mas, trial_id => $trial_id, data_level => $data_level, has_col_and_row_numbers => $has_col_and_row_numbers &> % } #End pheno_heatmap % if ($info_section_id eq 'trial_design_section'){ <& /breeders_toolbox/trial/design_section.mas, trial_id => $trial_id, trial_name => $trial_name, has_subplot_entries => $has_subplot_entries, has_plant_entries => $has_plant_entries, has_tissue_sample_entries => $has_tissue_sample_entries, design_name => $design_name, trial_stock_type => $trial_stock_type &> From da366f74ca31604d0f347f377942572bb917109b Mon Sep 17 00:00:00 2001 From: David Waring Date: Thu, 9 Nov 2023 10:28:28 -0500 Subject: [PATCH 11/62] Label Designer: Sort labels by plot layout order --- js/source/legacy/tools/LabelDesigner.js | 4 +- lib/CXGN/Trial.pm | 8 ++-- lib/SGN/Controller/AJAX/LabelDesigner.pm | 59 +++++++++++++++++++++--- 3 files changed, 60 insertions(+), 11 deletions(-) diff --git a/js/source/legacy/tools/LabelDesigner.js b/js/source/legacy/tools/LabelDesigner.js index 6a5ff64788..70cbb3d446 100644 --- a/js/source/legacy/tools/LabelDesigner.js +++ b/js/source/legacy/tools/LabelDesigner.js @@ -1300,7 +1300,7 @@ function addSortOrders(add_fields, data_type, data_level) { // Set type-specific sorting options let data_type_fields = []; // Sort by trial layout for plot-level labels... - if ( data_type === 'Field Trials' && data_level === 'plots' ) { + if ( (data_type === 'Field Trials' || data_type === 'Lists') && data_level === 'plots' ) { data_type_fields = ['Trial Layout: Plot Order'] } @@ -1438,6 +1438,8 @@ function retrievePageParams() { sort_order_1: document.getElementById("sort_order_1").value, sort_order_2: document.getElementById("sort_order_2").value, sort_order_3: document.getElementById("sort_order_3").value, + sort_order_layout_order: document.getElementById("sort_order_layout_order").value, + sort_order_layout_start: document.getElementById("sort_order_layout_start").value, copies_per_plot: document.getElementById("copies_per_plot").value, labels_to_download: document.getElementById("label_designer_labels_to_download").value, start_number: document.getElementById("label_designer_start_number").value, diff --git a/lib/CXGN/Trial.pm b/lib/CXGN/Trial.pm index 435726428f..c925029c46 100644 --- a/lib/CXGN/Trial.pm +++ b/lib/CXGN/Trial.pm @@ -279,10 +279,10 @@ sub get_sorted_plots { my $class = shift; my $schema = shift; my $trials = shift; - my $order = shift; - my $start = shift; - my $borders = shift; - my $gaps = shift; + my $order = shift || 'by_row_serpentine'; + my $start = shift || 'bottom_left'; + my $borders = shift || { top => 0, right => 0, bottom => 0, left => 0 }; + my $gaps = shift || 0; # Parse each trial my @plot_details; diff --git a/lib/SGN/Controller/AJAX/LabelDesigner.pm b/lib/SGN/Controller/AJAX/LabelDesigner.pm index 7e9d7f9ad9..eb49907164 100644 --- a/lib/SGN/Controller/AJAX/LabelDesigner.pm +++ b/lib/SGN/Controller/AJAX/LabelDesigner.pm @@ -413,13 +413,60 @@ __PACKAGE__->config( my $sort_order_1 = $design_params->{'sort_order_1'}; my $sort_order_2 = $design_params->{'sort_order_2'}; my $sort_order_3 = $design_params->{'sort_order_3'}; + my @sorted_keys; + + # Sort by Field Layout + if ( $sort_order_1 eq 'Trial Layout: Plot Order') { + my $layout_order = $design_params->{'sort_order_layout_order'}; + my $layout_start = $design_params->{'sort_order_layout_start'}; + + # Set the Trial IDs + # - a single trial = the source id is the trial id + # - a list of trials = the source id is the list id + # get the list contents and convert to database ids + my @trial_ids; + if ( $data_type eq 'Field Trials' ) { + push(@trial_ids, $source_id); + } + elsif ( $data_type eq 'Lists' ) { + my $list = CXGN::List->new({ dbh => $schema->storage->dbh(), list_id => $source_id }); + my $list_elements = $list->retrieve_elements_with_ids($source_id); + my @trial_names = map { $_->[1] } @$list_elements; + my $lt = CXGN::List::Transform->new(); + my $tr = $lt->transform($schema, "projects_2_project_ids", \@trial_names); + @trial_ids = @{$tr->{transform}}; + } - my @sorted_keys = sort { - ncmp($design->{$a}{$sort_order_1}, $design->{$b}{$sort_order_1}) || - ncmp($design->{$a}{$sort_order_2}, $design->{$b}{$sort_order_2}) || - ncmp($design->{$a}{$sort_order_3}, $design->{$b}{$sort_order_3}) || - ncmp($a, $b) - } keys %design; + # Get the sorted plots, individually by trial + # Add a _plot_order key to each plot in the label design + foreach my $trial_id (@trial_ids) { + my $results = CXGN::Trial->get_sorted_plots($schema, [$trial_id], $layout_order, $layout_start); + if ( $results->{plots} ) { + foreach (@{$results->{plots}}) { + $design->{$_->{plot_name}}{_plot_order} = $_->{order}; + } + } + } + + # Sort the label design elements by trial, plot order, plot number + # (if the trial does not have a layout, it will default to sorting by plot number) + @sorted_keys = sort { + ncmp($design->{$a}{trial_name}, $design->{$b}{trial_name}) || + ncmp($design->{$a}{_plot_order}, $design->{$b}{_plot_order}) || + ncmp($design->{$a}{plot_number}, $design->{$b}{plot_numer}) || + ncmp($a, $b) + } keys %design; + } + + # Sort by designated data property(s) + else { + @sorted_keys = sort { + ncmp($design->{$a}{$sort_order_1}, $design->{$b}{$sort_order_1}) || + ncmp($design->{$a}{$sort_order_2}, $design->{$b}{$sort_order_2}) || + ncmp($design->{$a}{$sort_order_3}, $design->{$b}{$sort_order_3}) || + ncmp($a, $b) + } keys %design; + } my $qrcode = Imager::QRCode->new( margin => 0, From 99fa123fbd78bfd38aff28a58565b752d7b9cb93 Mon Sep 17 00:00:00 2001 From: Mirella Flores Date: Tue, 14 Nov 2023 11:21:47 -0500 Subject: [PATCH 12/62] add ajax get_new_vector_uniquename --- lib/SGN/Controller/AJAX/VectorConstruct.pm | 29 ++++++++++++ mason/stock/add_vector.mas | 51 ++++++++++++++-------- 2 files changed, 62 insertions(+), 18 deletions(-) diff --git a/lib/SGN/Controller/AJAX/VectorConstruct.pm b/lib/SGN/Controller/AJAX/VectorConstruct.pm index e714439399..2aef0a5bb6 100644 --- a/lib/SGN/Controller/AJAX/VectorConstruct.pm +++ b/lib/SGN/Controller/AJAX/VectorConstruct.pm @@ -414,6 +414,35 @@ sub verify_vectors_fuzzy_options_POST : Args(0) { } +sub get_new_vector_uniquename : Path('/ajax/get_new_vector_uniquename') : ActionClass('REST') { } + +sub get_new_vector_uniquename_GET : Args(0) { + my ($self, $c) = @_; + my $schema = $c->dbic_schema('Bio::Chado::Schema', 'sgn_chado'); + + my $stock_type_id = SGN::Model::Cvterm->get_cvterm_row($schema, 'vector_construct', 'stock_type')->cvterm_id(); + + my $stocks = $schema->resultset("Stock::Stock")->search({ + type_id => $stock_type_id, + }); + + my $id; + my $max=0; + while (my $r = $stocks->next()) { + $id = $r->uniquename; + if ($id =~ m/T[0-9]+/){ + $id =~ s/T//; + if($max < $id){ + $max = $id; + } + } + } + $max += 1; + + $c->stash->{rest} = [ "T". $max]; +} + + sub _parse_list_from_json { my $c = shift; my $list_json = shift; diff --git a/mason/stock/add_vector.mas b/mason/stock/add_vector.mas index 758bb5d1d3..684e619ba7 100644 --- a/mason/stock/add_vector.mas +++ b/mason/stock/add_vector.mas @@ -31,6 +31,15 @@ $editable_stock_props_definitions => {}
+
+ +
+ +
+ +
+
@@ -38,12 +47,10 @@ $editable_stock_props_definitions => {}
-
- +
- +
@@ -59,12 +66,6 @@ $editable_stock_props_definitions => {}
-
- -
- -
-
@@ -78,7 +79,7 @@ $editable_stock_props_definitions => {}
- +
@@ -169,11 +170,25 @@ function handleSubmit() { From 3eb7f5c49c653aa3eb8b82d7001304ea4cd95eb4 Mon Sep 17 00:00:00 2001 From: David Waring Date: Tue, 14 Nov 2023 11:33:09 -0500 Subject: [PATCH 13/62] Trial Layout: display error messages from layout download --- js/source/entries/fieldmap.js | 55 +++++++++++++++++++++++++++-------- 1 file changed, 43 insertions(+), 12 deletions(-) diff --git a/js/source/entries/fieldmap.js b/js/source/entries/fieldmap.js index b032e804e7..140a9cd68e 100644 --- a/js/source/entries/fieldmap.js +++ b/js/source/entries/fieldmap.js @@ -149,18 +149,49 @@ export function init() { } get_plot_order(type, order, start, include_borders, include_gaps) { - let q = new URLSearchParams({ - 'trial_ids': [this.trial_id, ...Object.keys(this.linked_trials).map((e) => this.linked_trials[e].id)].join(','), - 'type': type, - 'order': order, - 'start': start, - 'top_border': !!include_borders && !!this.meta_data.top_border_selection, - 'right_border': !!include_borders && !!this.meta_data.right_border_selection, - 'bottom_border': !!include_borders && !!this.meta_data.bottom_border_selection, - 'left_border': !!include_borders && !!this.meta_data.left_border_selection, - 'gaps': !!include_gaps - }).toString(); - window.open(`/ajax/breeders/trial_plot_order?${q}`, '_blank'); + (async () => { + jQuery('#working_modal').modal("show"); + let q = new URLSearchParams({ + 'trial_ids': [this.trial_id, ...Object.keys(this.linked_trials).map((e) => this.linked_trials[e].id)].join(','), + 'type': type, + 'order': order, + 'start': start, + 'top_border': !!include_borders && !!this.meta_data.top_border_selection, + 'right_border': !!include_borders && !!this.meta_data.right_border_selection, + 'bottom_border': !!include_borders && !!this.meta_data.bottom_border_selection, + 'left_border': !!include_borders && !!this.meta_data.left_border_selection, + 'gaps': !!include_gaps + }).toString(); + + try { + const resp = await fetch(`/ajax/breeders/trial_plot_order?${q}`); + const blob = await resp.blob(); + jQuery('#working_modal').modal("hide"); + + // Parse JSON response and display error message, if provided + if ( blob && blob.type === "application/json" ) { + var reader = new FileReader(); + reader.onload = (e) => { + const json = JSON.parse(e.target.result); + alert(`ERROR: Could not download layout [${json.error || 'unknown error'}]`) + }; + reader.readAsText(blob); + } + + // Download blob as file + else if ( blob && blob.type === 'text/csv' ) { + var fileName = resp.headers["fileName"] || "layout.csv"; + var link = document.createElement('a'); + link.href = window.URL.createObjectURL(blob); + link.download = fileName; + link.click(); + } + } + catch (err) { + jQuery('#working_modal').modal("hide"); + alert(`ERROR: Could not download layout [${err}]`); + } + })(); } set_meta_data() { From 2f9b706864386bd8639abaf82546a4031bcdc0e9 Mon Sep 17 00:00:00 2001 From: Mirella Flores Date: Fri, 17 Nov 2023 16:15:50 -0500 Subject: [PATCH 14/62] add autogenerated vector names --- lib/CXGN/Stock/Vector/ParseUpload.pm | 91 +++++++++++++++++++ .../ParseUpload/Plugin/VectorsXLS.pm | 39 ++++++-- lib/SGN/Controller/AJAX/Search/Vector.pm | 2 +- lib/SGN/Controller/AJAX/VectorConstruct.pm | 7 +- .../breeders_toolbox/add_vectors_dialogs.mas | 6 ++ mason/stock/add_vector.mas | 2 +- 6 files changed, 136 insertions(+), 11 deletions(-) create mode 100644 lib/CXGN/Stock/Vector/ParseUpload.pm rename lib/CXGN/Stock/{ => Vector}/ParseUpload/Plugin/VectorsXLS.pm (90%) diff --git a/lib/CXGN/Stock/Vector/ParseUpload.pm b/lib/CXGN/Stock/Vector/ParseUpload.pm new file mode 100644 index 0000000000..1c5e9e62c3 --- /dev/null +++ b/lib/CXGN/Stock/Vector/ParseUpload.pm @@ -0,0 +1,91 @@ +package CXGN::Stock::Vector::ParseUpload; + +use Moose; +use Data::Dumper; +use MooseX::FollowPBP; +use Moose::Util::TypeConstraints; + +with 'MooseX::Object::Pluggable'; + + +has 'chado_schema' => ( + is => 'ro', + isa => 'DBIx::Class::Schema', + required => 1, + ); + +has 'filename' => ( + is => 'ro', + isa => 'Str', + required => 1, + ); + +has 'editable_stock_props' => ( + is => 'ro', + isa => 'ArrayRef', + required => 1, +); + +has 'do_fuzzy_search' => ( + is => 'ro', + isa => 'Bool', + default => 1 +); + +has 'autogenerate_uniquename' => ( + is => 'ro', + isa => 'Bool', + default => 0 +); + +has 'parse_errors' => ( + is => 'ro', + isa => 'HashRef', + writer => '_set_parse_errors', + reader => 'get_parse_errors', + predicate => 'has_parse_errors', + ); + +has '_parsed_data' => ( + is => 'ro', + isa => 'HashRef', + writer => '_set_parsed_data', + predicate => '_has_parsed_data', + ); + +sub parse { + my $self = shift; + + if (!$self->_validate_with_plugin()) { + my $errors = $self->get_parse_errors(); + print STDERR "\nCould not validate trial file: ".$self->get_filename()."\nError:".Dumper($errors)."\n"; + return; + } + + print STDERR "Check 3.1: CXGN::Stock::ParseUpload ".localtime(); + + if (!$self->_parse_with_plugin()) { + my $errors = $self->get_parse_errors(); + print STDERR "\nCould not parse trial file: ".$self->get_filename()."\nError:".Dumper($errors)."\n"; + return; + } + + print STDERR "Check 3.2: CXGN::Stock::ParseUpload ".localtime(); + + if (!$self->_has_parsed_data()) { + my $errors = $self->get_parse_errors(); + print STDERR "\nNo parsed data for trial file: ".$self->get_filename()."\nError:".Dumper($errors)."\n"; + return; + } else { + return $self->_parsed_data(); + } + + print STDERR "Check 3.3: CXGN::Stock::ParseUpload ".localtime(); + + my $errors = $self->get_parse_errors(); + print STDERR "\nError parsing trial file: ".$self->get_filename()."\nError:".Dumper($errors)."\n"; + return; +} + + +1; diff --git a/lib/CXGN/Stock/ParseUpload/Plugin/VectorsXLS.pm b/lib/CXGN/Stock/Vector/ParseUpload/Plugin/VectorsXLS.pm similarity index 90% rename from lib/CXGN/Stock/ParseUpload/Plugin/VectorsXLS.pm rename to lib/CXGN/Stock/Vector/ParseUpload/Plugin/VectorsXLS.pm index 4a78db8460..948be1996b 100644 --- a/lib/CXGN/Stock/ParseUpload/Plugin/VectorsXLS.pm +++ b/lib/CXGN/Stock/Vector/ParseUpload/Plugin/VectorsXLS.pm @@ -1,4 +1,4 @@ -package CXGN::Stock::ParseUpload::Plugin::VectorsXLS; +package CXGN::Stock::Vector::ParseUpload::Plugin::VectorsXLS; use Moose::Role; use Spreadsheet::ParseExcel; @@ -16,6 +16,7 @@ sub _validate_with_plugin { my $filename = $self->get_filename(); my $schema = $self->get_chado_schema(); my $editable_stockprops = $self->get_editable_stock_props(); + my $autogenerate_uniquename = $self->get_autogenerate_uniquename(); # Match a dot, extension .xls / .xlsx my $extension = $filename =~ /(\.[^.]+)$/; @@ -106,7 +107,9 @@ sub _validate_with_plugin { } if (!$vector_name || $vector_name eq '' ) { - push @error_messages, "Cell A$row_name: vector_name missing."; + if (! $autogenerate_uniquename ){ + push @error_messages, "Cell A$row_name: vector_name missing."; + } } else { $vector_name =~ s/^\s+|\s+$//g; #trim whitespace from front and end... $seen_vector_names{$vector_name}=$row_name; @@ -154,6 +157,7 @@ sub _parse_with_plugin { my $filename = $self->get_filename(); my $schema = $self->get_chado_schema(); my $do_fuzzy_search = $self->get_do_fuzzy_search(); + my $autogenerate_uniquename = $self->get_autogenerate_uniquename(); # Match a dot, extension .xls / .xlsx my ($extension) = $filename =~ /(\.[^.]+)$/; @@ -181,12 +185,33 @@ sub _parse_with_plugin { my %seen_vector_names; my %seen_species_names; + my $vector_max_id; + + if($autogenerate_uniquename > 0){ + my $stock_type_id = SGN::Model::Cvterm->get_cvterm_row($schema, 'vector_construct', 'stock_type')->cvterm_id(); + + my $stocks = $schema->resultset("Stock::Stock")->search({ type_id => $stock_type_id, }); + + my $id; + $vector_max_id = 0; + while (my $r = $stocks->next()) { + $id = $r->uniquename; + if ($id =~ m/T[0-9]+/){ + $id =~ s/T//; + if($vector_max_id < $id){ + $vector_max_id = $id; + } + } + } + } + for my $row ( 1 .. $row_max ) { my $vector_name; my $species_name; - - if ($worksheet->get_cell($row,0)) { + if($autogenerate_uniquename > 0 ){ + $vector_name = "T" . ($vector_max_id + $row); + } elsif ($worksheet->get_cell($row,0)) { $vector_name = $worksheet->get_cell($row,0)->value(); } if ($worksheet->get_cell($row,1)) { @@ -238,7 +263,9 @@ sub _parse_with_plugin { my $vector_name; my $species_name; - if ($worksheet->get_cell($row,0)) { + if($autogenerate_uniquename > 0 ){ + $vector_name = "T" . ($vector_max_id + $row); + } elsif ($worksheet->get_cell($row,0)) { $vector_name = $worksheet->get_cell($row,0)->value(); } if ($worksheet->get_cell($row,1)) { @@ -336,6 +363,7 @@ sub _parse_with_plugin { } } + %return_data = ( parsed_data => \%parsed_entries, found_vectors => $found_vectors, @@ -345,7 +373,6 @@ sub _parse_with_plugin { fuzzy_organisms => $fuzzy_organisms, absent_organisms => $absent_organisms ); - # print STDERR "\n\nVectorsXLS parsed results :\n".Data::Dumper::Dumper(%return_data)."\n\n"; $self->_set_parsed_data(\%return_data); return 1; diff --git a/lib/SGN/Controller/AJAX/Search/Vector.pm b/lib/SGN/Controller/AJAX/Search/Vector.pm index a0543c034b..78941a4aca 100644 --- a/lib/SGN/Controller/AJAX/Search/Vector.pm +++ b/lib/SGN/Controller/AJAX/Search/Vector.pm @@ -52,7 +52,7 @@ sub stock_search :Path('/ajax/search/vectors') Args(0) { people_schema=>$people_schema, phenome_schema=>$phenome_schema, match_type=>$params->{any_name_matchtype}, - match_name=>$params->{any_name}, + match_name=>$params->{any_name}, operator=>$params->{operator}, stockprops_values=>$stockprops_values, stockprop_columns_view=>$stockprop_columns_view, diff --git a/lib/SGN/Controller/AJAX/VectorConstruct.pm b/lib/SGN/Controller/AJAX/VectorConstruct.pm index 2aef0a5bb6..c85d651124 100644 --- a/lib/SGN/Controller/AJAX/VectorConstruct.pm +++ b/lib/SGN/Controller/AJAX/VectorConstruct.pm @@ -21,6 +21,7 @@ use Data::Dumper; use JSON; use SGN::Model::Cvterm; use CXGN::Stock::Vector; +use CXGN::Stock::Vector::ParseUpload; use Try::Tiny; use Encode; use JSON::XS qw | decode_json |; @@ -254,7 +255,7 @@ sub verify_vectors_file_POST : Args(0) { my $user_name; my $user_role; my $session_id = $c->req->param("sgn_session_id"); - + my $autogenerate_uniquename = 1; if ($session_id){ my $dbh = $c->dbc->dbh; my @user_info = CXGN::Login->new($dbh)->query_from_cookie($session_id); @@ -316,7 +317,7 @@ sub verify_vectors_file_POST : Args(0) { unlink $upload_tempfile; my @editable_vector_props = split ',', $c->config->{editable_vector_props}; - my $parser = CXGN::Stock::ParseUpload->new(chado_schema => $schema, filename => $archived_filename_with_path, editable_stock_props=>\@editable_vector_props, do_fuzzy_search=>$do_fuzzy_search); + my $parser = CXGN::Stock::Vector::ParseUpload->new(chado_schema => $schema, filename => $archived_filename_with_path, editable_stock_props=>\@editable_vector_props, do_fuzzy_search=>$do_fuzzy_search, autogenerate_uniquename=>$autogenerate_uniquename); $parser->load_plugin('VectorsXLS'); my $parsed_data = $parser->parse(); @@ -438,7 +439,7 @@ sub get_new_vector_uniquename_GET : Args(0) { } } $max += 1; - + #Vector construct has letter T before autogenerated number. $c->stash->{rest} = [ "T". $max]; } diff --git a/mason/breeders_toolbox/add_vectors_dialogs.mas b/mason/breeders_toolbox/add_vectors_dialogs.mas index 1d392ee582..2bb260a0fc 100644 --- a/mason/breeders_toolbox/add_vectors_dialogs.mas +++ b/mason/breeders_toolbox/add_vectors_dialogs.mas @@ -52,6 +52,12 @@ $editable_stock_props_definitions Note: Use the fuzzy search to match similar names to prevent uploading of duplicate vectors. Fuzzy searching is much slower than regular search. Only a curator can disable the fuzzy search.
+
+
+
+ +
+
diff --git a/mason/stock/add_vector.mas b/mason/stock/add_vector.mas index 684e619ba7..7427babd01 100644 --- a/mason/stock/add_vector.mas +++ b/mason/stock/add_vector.mas @@ -38,7 +38,7 @@ $editable_stock_props_definitions => {} -
+
+ +
@@ -874,6 +904,16 @@ jQuery(document).ready( function() { FieldMap.load(); }); + jQuery("#plot_download_type").change(() => { + let type = jQuery("#plot_download_type").val(); + if ( type === 'harvestmaster' ) { + jQuery("#plot_download_harvestmaster_options").show(); + } + else { + jQuery("#plot_download_harvestmaster_options").hide(); + } + }); + jQuery("#plot_download_button").click(() => { let type = jQuery("#plot_download_type").val(); let order = jQuery("#plot_download_order").val(); @@ -892,7 +932,12 @@ jQuery(document).ready( function() { alert("Please select a starting plot"); return; } - FieldMap.get_plot_order(type, order, start, include_borders, include_gaps); + let additional_properties = { + hm_pltid: jQuery("#hm_pltid").val(), + hm_range: jQuery("#hm_range").val(), + hm_row: jQuery("#hm_row").val() + } + FieldMap.get_plot_order(type, order, start, include_borders, include_gaps, additional_properties); }); jQuery("#invert_row_checkmark").change(function() { From 58ab530fbfdc317256a9acb46f7d90c4aff8b20f Mon Sep 17 00:00:00 2001 From: Lukas Mueller Date: Tue, 28 Nov 2023 10:55:11 -0500 Subject: [PATCH 17/62] update empty fixture to something that is more up to date. --- t/data/fixture/empty_fixture.sql | 2091 ++++++++++++++---------------- 1 file changed, 976 insertions(+), 1115 deletions(-) diff --git a/t/data/fixture/empty_fixture.sql b/t/data/fixture/empty_fixture.sql index ecd7a337d0..d473e27b86 100644 --- a/t/data/fixture/empty_fixture.sql +++ b/t/data/fixture/empty_fixture.sql @@ -2,8 +2,8 @@ -- PostgreSQL database dump -- --- Dumped from database version 12.7 (Debian 12.7-1.pgdg100+1) --- Dumped by pg_dump version 12.14 (Debian 12.14-1.pgdg110+1) +-- Dumped from database version 12.3 (Debian 12.3-1.pgdg100+1) +-- Dumped by pg_dump version 12.16 (Debian 12.16-1.pgdg110+1) SET statement_timeout = 0; SET lock_timeout = 0; @@ -9208,6 +9208,41 @@ ALTER TABLE phenome.stock_allele_stock_allele_id_seq OWNER TO postgres; ALTER SEQUENCE phenome.stock_allele_stock_allele_id_seq OWNED BY phenome.stock_allele.stock_allele_id; +-- +-- Name: stock_file; Type: TABLE; Schema: phenome; Owner: postgres +-- + +CREATE TABLE phenome.stock_file ( + stock_file_id integer NOT NULL, + stock_id integer NOT NULL, + file_id integer NOT NULL +); + + +ALTER TABLE phenome.stock_file OWNER TO postgres; + +-- +-- Name: stock_file_stock_file_id_seq; Type: SEQUENCE; Schema: phenome; Owner: postgres +-- + +CREATE SEQUENCE phenome.stock_file_stock_file_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE phenome.stock_file_stock_file_id_seq OWNER TO postgres; + +-- +-- Name: stock_file_stock_file_id_seq; Type: SEQUENCE OWNED BY; Schema: phenome; Owner: postgres +-- + +ALTER SEQUENCE phenome.stock_file_stock_file_id_seq OWNED BY phenome.stock_file.stock_file_id; + + -- -- Name: stock_image; Type: TABLE; Schema: phenome; Owner: postgres -- @@ -10692,7 +10727,7 @@ CREATE MATERIALIZED VIEW public.materialized_phenoview AS WHERE ((cvterm.name)::text = 'seedlot'::text)))))) LEFT JOIN public.nd_experiment_stock ON (((stock.stock_id = nd_experiment_stock.stock_id) AND (nd_experiment_stock.type_id IN ( SELECT cvterm.cvterm_id FROM public.cvterm - WHERE ((cvterm.name)::text = ANY ((ARRAY['phenotyping_experiment'::character varying, 'field_layout'::character varying, 'analysis_experiment'::character varying])::text[]))))))) + WHERE ((cvterm.name)::text = ANY (ARRAY[('phenotyping_experiment'::character varying)::text, ('field_layout'::character varying)::text, ('analysis_experiment'::character varying)::text]))))))) LEFT JOIN public.nd_experiment_project ON ((nd_experiment_stock.nd_experiment_id = nd_experiment_project.nd_experiment_id))) FULL JOIN public.project trial ON ((nd_experiment_project.project_id = trial.project_id))) LEFT JOIN public.project_relationship ON (((trial.project_id = project_relationship.subject_project_id) AND (project_relationship.type_id = ( SELECT cvterm.cvterm_id @@ -10865,10 +10900,10 @@ UNION FROM ((((((((public.stock accession JOIN public.stock_relationship ON (((accession.stock_id = stock_relationship.object_id) AND (stock_relationship.type_id IN ( SELECT cvterm.cvterm_id FROM public.cvterm - WHERE ((cvterm.name)::text = ANY ((ARRAY['tissue_sample_of'::character varying, 'plant_of'::character varying, 'plot_of'::character varying])::text[]))))))) + WHERE ((cvterm.name)::text = ANY (ARRAY[('tissue_sample_of'::character varying)::text, ('plant_of'::character varying)::text, ('plot_of'::character varying)::text]))))))) JOIN public.stock ON (((stock_relationship.subject_id = stock.stock_id) AND (stock.type_id IN ( SELECT cvterm.cvterm_id FROM public.cvterm - WHERE ((cvterm.name)::text = ANY ((ARRAY['tissue_sample'::character varying, 'plant'::character varying, 'plot'::character varying])::text[]))))))) + WHERE ((cvterm.name)::text = ANY (ARRAY[('tissue_sample'::character varying)::text, ('plant'::character varying)::text, ('plot'::character varying)::text]))))))) JOIN public.cvterm stock_type ON ((stock_type.cvterm_id = stock.type_id))) JOIN public.nd_experiment_stock ON ((stock.stock_id = nd_experiment_stock.stock_id))) JOIN public.nd_experiment_protocol ON ((nd_experiment_stock.nd_experiment_id = nd_experiment_protocol.nd_experiment_id))) @@ -15197,7 +15232,7 @@ CREATE MATERIALIZED VIEW public.materialized_stockprop AS crosstab."Promotors", crosstab."Terminators", crosstab.ncbi_taxonomy_id - FROM sgn.crosstab('SELECT stockprop.stock_id, stock.uniquename, stock.type_id, stock_cvterm.name, stock.organism_id, stockprop.type_id, jsonb_object_agg(stockprop.value, ''RANK'' || stockprop.rank) FROM public.stockprop JOIN public.stock USING(stock_id) JOIN public.cvterm as stock_cvterm ON (stock_cvterm.cvterm_id=stock.type_id) GROUP BY (stockprop.stock_id, stock.uniquename, stock.type_id, stock_cvterm.name, stock.organism_id, stockprop.type_id) ORDER by stockprop.stock_id ASC'::text, 'SELECT type_id FROM (VALUES + FROM sgn.crosstab('SELECT stockprop.stock_id, stock.uniquename, stock.type_id, stock_cvterm.name, stock.organism_id, stockprop.type_id, jsonb_object_agg(stockprop.value, stockprop.rank) FROM public.stockprop JOIN public.stock USING(stock_id) JOIN public.cvterm as stock_cvterm ON (stock_cvterm.cvterm_id=stock.type_id) GROUP BY (stockprop.stock_id, stock.uniquename, stock.type_id, stock_cvterm.name, stock.organism_id, stockprop.type_id) ORDER by stockprop.stock_id ASC'::text, 'SELECT type_id FROM (VALUES (''76460''), (''76517''), (''76518''), @@ -15250,16 +15285,16 @@ CREATE MATERIALIZED VIEW public.materialized_stockprop AS (''77611''), (''77613''), (''79003''), - (''79111''), - (''79112''), (''79113''), - (''79115''), (''79114''), - (''79116''), - (''79120''), + (''79115''), (''79117''), + (''79116''), (''79118''), + (''79122''), (''79119''), + (''79120''), + (''79121''), (''77614'')) AS t (type_id);'::text) crosstab(stock_id integer, uniquename text, stock_type_id integer, stock_type_name text, organism_id integer, block json, col_number jsonb, igd_synonym jsonb, "is a control" jsonb, location_code jsonb, organization jsonb, plant_index_number jsonb, subplot_index_number jsonb, tissue_sample_index_number jsonb, "plot number" jsonb, plot_geo_json jsonb, range jsonb, replicate jsonb, row_number jsonb, stock_synonym jsonb, "T1" jsonb, "T2" jsonb, transgenic jsonb, variety jsonb, notes jsonb, state jsonb, "accession number" jsonb, "PUI" jsonb, donor jsonb, "donor institute" jsonb, "donor PUI" jsonb, "seed source" jsonb, "institute code" jsonb, "institute name" jsonb, "biological status of accession code" jsonb, "country of origin" jsonb, "type of germplasm storage code" jsonb, "entry number" jsonb, "acquisition date" jsonb, current_count jsonb, current_weight_gram jsonb, crossing_metadata_jsonb jsonb, ploidy_level jsonb, genome_structure jsonb, introgression_parent jsonb, introgression_backcross_parent jsonb, introgression_map_version jsonb, introgression_chromosome jsonb, introgression_start_position_bp jsonb, introgression_end_position_bp jsonb, is_blank jsonb, concentration jsonb, volume jsonb, extraction jsonb, dna_person jsonb, tissue_type jsonb, seedlot_quality jsonb, "SelectionMarker" jsonb, "CloningOrganism" jsonb, "CassetteName" jsonb, "Strain" jsonb, "InherentMarker" jsonb, "Backbone" jsonb, "VectorType" jsonb, "Gene" jsonb, "Promotors" jsonb, "Terminators" jsonb, ncbi_taxonomy_id jsonb) WITH NO DATA; @@ -15733,6 +15768,42 @@ ALTER TABLE public.nd_experimentprop_nd_experimentprop_id_seq OWNER TO postgres; ALTER SEQUENCE public.nd_experimentprop_nd_experimentprop_id_seq OWNED BY public.nd_experimentprop.nd_experimentprop_id; +-- +-- Name: nd_geolocation_dbxref; Type: TABLE; Schema: public; Owner: postgres +-- + +CREATE TABLE public.nd_geolocation_dbxref ( + nd_geolocation_dbxref_id integer NOT NULL, + nd_geolocation_id integer NOT NULL, + dbxref_id integer, + is_current boolean DEFAULT true NOT NULL +); + + +ALTER TABLE public.nd_geolocation_dbxref OWNER TO postgres; + +-- +-- Name: nd_geolocation_dbxref_nd_geolocation_dbxref_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- + +CREATE SEQUENCE public.nd_geolocation_dbxref_nd_geolocation_dbxref_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE public.nd_geolocation_dbxref_nd_geolocation_dbxref_id_seq OWNER TO postgres; + +-- +-- Name: nd_geolocation_dbxref_nd_geolocation_dbxref_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres +-- + +ALTER SEQUENCE public.nd_geolocation_dbxref_nd_geolocation_dbxref_id_seq OWNED BY public.nd_geolocation_dbxref.nd_geolocation_dbxref_id; + + -- -- Name: nd_geolocation_nd_geolocation_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres -- @@ -17285,6 +17356,42 @@ ALTER TABLE public.project_contact_project_contact_id_seq OWNER TO postgres; ALTER SEQUENCE public.project_contact_project_contact_id_seq OWNED BY public.project_contact.project_contact_id; +-- +-- Name: project_dbxref; Type: TABLE; Schema: public; Owner: postgres +-- + +CREATE TABLE public.project_dbxref ( + project_dbxref_id integer NOT NULL, + project_id integer NOT NULL, + dbxref_id integer NOT NULL, + is_current boolean DEFAULT true NOT NULL +); + + +ALTER TABLE public.project_dbxref OWNER TO postgres; + +-- +-- Name: project_dbxref_project_dbxref_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- + +CREATE SEQUENCE public.project_dbxref_project_dbxref_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE public.project_dbxref_project_dbxref_id_seq OWNER TO postgres; + +-- +-- Name: project_dbxref_project_dbxref_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres +-- + +ALTER SEQUENCE public.project_dbxref_project_dbxref_id_seq OWNED BY public.project_dbxref.project_dbxref_id; + + -- -- Name: project_project_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres -- @@ -23597,13 +23704,49 @@ CREATE TABLE sgn_people.list ( owner integer, type_id bigint, is_public boolean DEFAULT false NOT NULL, - "timestamp" character varying, - modify_timestamp character varying + create_date timestamp without time zone DEFAULT now(), + modified_date timestamp without time zone DEFAULT now() ); ALTER TABLE sgn_people.list OWNER TO postgres; +-- +-- Name: list_dbxref; Type: TABLE; Schema: sgn_people; Owner: postgres +-- + +CREATE TABLE sgn_people.list_dbxref ( + list_dbxref_id integer NOT NULL, + list_id integer NOT NULL, + dbxref_id integer NOT NULL, + is_current boolean DEFAULT true NOT NULL +); + + +ALTER TABLE sgn_people.list_dbxref OWNER TO postgres; + +-- +-- Name: list_dbxref_list_dbxref_id_seq; Type: SEQUENCE; Schema: sgn_people; Owner: postgres +-- + +CREATE SEQUENCE sgn_people.list_dbxref_list_dbxref_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE sgn_people.list_dbxref_list_dbxref_id_seq OWNER TO postgres; + +-- +-- Name: list_dbxref_list_dbxref_id_seq; Type: SEQUENCE OWNED BY; Schema: sgn_people; Owner: postgres +-- + +ALTER SEQUENCE sgn_people.list_dbxref_list_dbxref_id_seq OWNED BY sgn_people.list_dbxref.list_dbxref_id; + + -- -- Name: list_item; Type: TABLE; Schema: sgn_people; Owner: postgres -- @@ -23659,6 +23802,43 @@ ALTER TABLE sgn_people.list_list_id_seq OWNER TO postgres; ALTER SEQUENCE sgn_people.list_list_id_seq OWNED BY sgn_people.list.list_id; +-- +-- Name: listprop; Type: TABLE; Schema: sgn_people; Owner: postgres +-- + +CREATE TABLE sgn_people.listprop ( + listprop_id integer NOT NULL, + list_id integer, + type_id integer, + value text, + rank integer DEFAULT 0 NOT NULL +); + + +ALTER TABLE sgn_people.listprop OWNER TO postgres; + +-- +-- Name: listprop_listprop_id_seq; Type: SEQUENCE; Schema: sgn_people; Owner: postgres +-- + +CREATE SEQUENCE sgn_people.listprop_listprop_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE sgn_people.listprop_listprop_id_seq OWNER TO postgres; + +-- +-- Name: listprop_listprop_id_seq; Type: SEQUENCE OWNED BY; Schema: sgn_people; Owner: postgres +-- + +ALTER SEQUENCE sgn_people.listprop_listprop_id_seq OWNED BY sgn_people.listprop.listprop_id; + + -- -- Name: sp_clone_il_mapping_segment_log; Type: TABLE; Schema: sgn_people; Owner: postgres -- @@ -24342,7 +24522,7 @@ ALTER SEQUENCE sgn_people.sp_project_sp_project_id_seq OWNED BY sgn_people.sp_pr CREATE TABLE sgn_people.sp_roles ( sp_role_id integer NOT NULL, - name character varying(20) + name character varying(255) ); @@ -26020,6 +26200,13 @@ ALTER TABLE ONLY phenome.registry ALTER COLUMN registry_id SET DEFAULT nextval(' ALTER TABLE ONLY phenome.stock_allele ALTER COLUMN stock_allele_id SET DEFAULT nextval('phenome.stock_allele_stock_allele_id_seq'::regclass); +-- +-- Name: stock_file stock_file_id; Type: DEFAULT; Schema: phenome; Owner: postgres +-- + +ALTER TABLE ONLY phenome.stock_file ALTER COLUMN stock_file_id SET DEFAULT nextval('phenome.stock_file_stock_file_id_seq'::regclass); + + -- -- Name: stock_image stock_image_id; Type: DEFAULT; Schema: phenome; Owner: postgres -- @@ -26748,6 +26935,13 @@ ALTER TABLE ONLY public.nd_experimentprop ALTER COLUMN nd_experimentprop_id SET ALTER TABLE ONLY public.nd_geolocation ALTER COLUMN nd_geolocation_id SET DEFAULT nextval('public.nd_geolocation_nd_geolocation_id_seq'::regclass); +-- +-- Name: nd_geolocation_dbxref nd_geolocation_dbxref_id; Type: DEFAULT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.nd_geolocation_dbxref ALTER COLUMN nd_geolocation_dbxref_id SET DEFAULT nextval('public.nd_geolocation_dbxref_nd_geolocation_dbxref_id_seq'::regclass); + + -- -- Name: nd_geolocationprop nd_geolocationprop_id; Type: DEFAULT; Schema: public; Owner: postgres -- @@ -26951,6 +27145,13 @@ ALTER TABLE ONLY public.project ALTER COLUMN project_id SET DEFAULT nextval('pub ALTER TABLE ONLY public.project_contact ALTER COLUMN project_contact_id SET DEFAULT nextval('public.project_contact_project_contact_id_seq'::regclass); +-- +-- Name: project_dbxref project_dbxref_id; Type: DEFAULT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.project_dbxref ALTER COLUMN project_dbxref_id SET DEFAULT nextval('public.project_dbxref_project_dbxref_id_seq'::regclass); + + -- -- Name: project_pub project_pub_id; Type: DEFAULT; Schema: public; Owner: postgres -- @@ -27973,6 +28174,13 @@ ALTER TABLE ONLY sgn_people.forum_topic ALTER COLUMN forum_topic_id SET DEFAULT ALTER TABLE ONLY sgn_people.list ALTER COLUMN list_id SET DEFAULT nextval('sgn_people.list_list_id_seq'::regclass); +-- +-- Name: list_dbxref list_dbxref_id; Type: DEFAULT; Schema: sgn_people; Owner: postgres +-- + +ALTER TABLE ONLY sgn_people.list_dbxref ALTER COLUMN list_dbxref_id SET DEFAULT nextval('sgn_people.list_dbxref_list_dbxref_id_seq'::regclass); + + -- -- Name: list_item list_item_id; Type: DEFAULT; Schema: sgn_people; Owner: postgres -- @@ -27980,6 +28188,13 @@ ALTER TABLE ONLY sgn_people.list ALTER COLUMN list_id SET DEFAULT nextval('sgn_p ALTER TABLE ONLY sgn_people.list_item ALTER COLUMN list_item_id SET DEFAULT nextval('sgn_people.list_item_list_item_id_seq'::regclass); +-- +-- Name: listprop listprop_id; Type: DEFAULT; Schema: sgn_people; Owner: postgres +-- + +ALTER TABLE ONLY sgn_people.listprop ALTER COLUMN listprop_id SET DEFAULT nextval('sgn_people.listprop_listprop_id_seq'::regclass); + + -- -- Name: sp_clone_il_mapping_segment_log sp_clone_il_mapping_segment_log_id; Type: DEFAULT; Schema: sgn_people; Owner: postgres -- @@ -29258,11 +29473,34 @@ COPY metadata.md_dbversion (dbversion_id, patch_name, patch_description, metadat 256 AddFacilityIdentifierCvterm This patch adds the 'facility_identifier stock_property cvterm\n 269 257 AddGenotypingProjectCvterms Description of this patch goes here\n 270 258 AddGenomicPredictionStatCvterms Description of this patch goes here\n 271 -259 AddTargetNumbersJsonCvterm This patch adds the 'target_numbers_json' project_property cvterm\n 272 -260 AddVectorStockProps This patch will find_or_create a cvterm for vectors\n 273 -261 AddVectorStockPropsToMatviewStockprop This patch adds required stock prop types for seedlot quality. 274 -262 AddListAdditionalInfoCvterm This patch adds the 'list_additional_info stock_property cvterm\n 275 -263 AddPhenotypeExternalReferencesCvterm This patch adds phenotype_property cvterm for storing external references data for phenotype.\n 276 +259 AddGenotypingProjectRelatedCvterms This patch adds the 'folder_for_genotyping_projects' and 'genotyping_project_type' projectprop cvterms\n 272 +260 AddTargetNumbersJsonCvterm This patch adds the 'target_numbers_json' project_property cvterm\n 273 +261 AddVectorStockProps This patch will find_or_create a cvterm for vectors\n 274 +262 AddVectorStockPropsToMatviewStockprop This patch adds required stock prop types for seedlot quality. 275 +263 AddListAdditionalInfoCvterm This patch adds the 'list_additional_info stock_property cvterm\n 276 +264 AddPhenotypeExternalReferencesCvterm This patch adds phenotype_property cvterm for storing external references data for phenotype.\n 277 +265 AddCascadeDeleteToStockAlleleTable Adds cascade delete to stock_allele linking table\n 278 +266 AddPHGGenotypingCvterms This patch adds the 'vcf_phg_genotyping' and 'phg genotyping' genotype_property cvterms.\n 279 +267 AddVectorStockProps2 This patch will find_or_create a cvterm for vectors\n 280 +268 AddVectorStockPropsToMatviewStockprop2 This patch adds required stock prop types for vectors. 281 +269 MakeRankNumberStockPropViews This patch changes the rank from being stored as a string to being stored as a number. 282 +270 AddTransplantingDateCvterm Description of this patch goes here\n 283 +271 AddTraitCvterms This patch will add system cvterms required for storing BrAPI variable data\n 284 +272 AddNdGeolocationDbXref This patch creates a nd_geolocation_dbxref table to allow projects to store external references for brapi\n 285 +273 AddProjectDbXref This patch creates a project_dbxref table to allow projects to store external references for brapi\n 286 +274 AddCvtermAdditionalInfo This patch adds a system cvterm that is used to store additional info for cvterms.\n 287 +275 UpdateProjectDbxrefTablePermissions This patch adds all permissions for web_usr to the project_dbxref table\n 288 +276 UpdateProjectDbxrefIdSeqPermissions This patch adds permissions for web_usr for project_dbxref_id_seq\n 289 +277 AddListCreateDate This patch add create date to list objects\n 290 +278 AddListDbXref This patch creates a list_dbxref table to allow lists to store external references for brapi\n 291 +279 AddTraitAttributeAndEntityCvterms This patch will add system cvterms required for storing BrAPI trait entity and attribute data.\n 292 +280 IncreaseCharLimitSgnPeopleSPRoles This patch will increase the character limit to 255 for the name field of the sgn_people.sp_roles table.\n 293 +281 AlterListTimestampType This patch modify create/modified date to be timestamp types in the database\n 294 +282 AddPhenotypeStderr This patch adds phenotype_property cvterm for storing phenotype standard error.\n 295 +283 UpdateListTypeCvterms This patch changes the cvterms name from genotyping_trials to genotyping_plates and adds crossing_experiments, genotyping_projects list types\n 296 +284 AddFilesStockLinkingTable Adds the linking table between files and stock to Phenome\n 297 +285 AddCvtermForListprop This patch creates cv term for listprop table to allow\n 298 +286 AddListpropTable This patch creates a listprop table to allow lists to store additional info for brapi\n 299 \. @@ -29328,280 +29566,303 @@ COPY metadata.md_json (json_id, json_type, json) FROM stdin; -- COPY metadata.md_metadata (metadata_id, create_date, create_person_id, modified_date, modified_person_id, modification_note, previous_metadata_id, obsolete, obsolete_note, permission_id) FROM stdin; -216 2023-03-16 23:54:13.240995+00 41 \N \N \N \N 0 \N \N -219 2023-03-16 23:54:17.890869+00 41 \N \N \N \N 0 \N \N -222 2023-03-16 23:54:22.40001+00 41 \N \N \N \N 0 \N \N -225 2023-03-16 23:54:25.948304+00 41 \N \N \N \N 0 \N \N -228 2023-03-16 23:54:29.112524+00 41 \N \N \N \N 0 \N \N -231 2023-03-16 23:54:32.270246+00 41 \N \N \N \N 0 \N \N -234 2023-03-16 23:54:35.860622+00 41 \N \N \N \N 0 \N \N -237 2023-03-16 23:54:38.542045+00 41 \N \N \N \N 0 \N \N -240 2023-03-16 23:54:41.884722+00 41 \N \N \N \N 0 \N \N -243 2023-03-16 23:54:45.345668+00 41 \N \N \N \N 0 \N \N -246 2023-03-16 23:54:49.101723+00 41 \N \N \N \N 0 \N \N -249 2023-03-16 23:54:51.653193+00 41 \N \N \N \N 0 \N \N -252 2023-03-16 23:54:54.883837+00 41 \N \N \N \N 0 \N \N -255 2023-03-16 23:54:59.833435+00 41 \N \N \N \N 0 \N \N -258 2023-03-16 23:55:04.77599+00 41 \N \N \N \N 0 \N \N -261 2023-03-16 23:55:09.270928+00 41 \N \N \N \N 0 \N \N -264 2023-03-16 23:55:18.572545+00 41 \N \N \N \N 0 \N \N -267 2023-03-16 23:55:22.312522+00 41 \N \N \N \N 0 \N \N -270 2023-03-16 23:55:25.832704+00 41 \N \N \N \N 0 \N \N -273 2023-03-16 23:55:30.177299+00 41 \N \N \N \N 0 \N \N -276 2023-03-16 23:55:34.746446+00 41 \N \N \N \N 0 \N \N -217 2023-03-16 23:54:14.543178+00 41 \N \N \N \N 0 \N \N -220 2023-03-16 23:54:18.670938+00 41 \N \N \N \N 0 \N \N -223 2023-03-16 23:54:23.609743+00 41 \N \N \N \N 0 \N \N -226 2023-03-16 23:54:27.165385+00 41 \N \N \N \N 0 \N \N -229 2023-03-16 23:54:30.303194+00 41 \N \N \N \N 0 \N \N -232 2023-03-16 23:54:33.494153+00 41 \N \N \N \N 0 \N \N -235 2023-03-16 23:54:36.637964+00 41 \N \N \N \N 0 \N \N -238 2023-03-16 23:54:39.212095+00 41 \N \N \N \N 0 \N \N -241 2023-03-16 23:54:43.061082+00 41 \N \N \N \N 0 \N \N -244 2023-03-16 23:54:46.476214+00 41 \N \N \N \N 0 \N \N -247 2023-03-16 23:54:50.226733+00 41 \N \N \N \N 0 \N \N -250 2023-03-16 23:54:52.458014+00 41 \N \N \N \N 0 \N \N -253 2023-03-16 23:54:56.07527+00 41 \N \N \N \N 0 \N \N -256 2023-03-16 23:55:01.731235+00 41 \N \N \N \N 0 \N \N -259 2023-03-16 23:55:06.630811+00 41 \N \N \N \N 0 \N \N -262 2023-03-16 23:55:10.422583+00 41 \N \N \N \N 0 \N \N -265 2023-03-16 23:55:20.400031+00 41 \N \N \N \N 0 \N \N -268 2023-03-16 23:55:23.485046+00 41 \N \N \N \N 0 \N \N -271 2023-03-16 23:55:27.04597+00 41 \N \N \N \N 0 \N \N -274 2023-03-16 23:55:32.15323+00 41 \N \N \N \N 0 \N \N -17 2014-01-03 17:44:29.059282+00 41 \N 41 \N \N 0 \N \N -18 2014-01-03 22:13:32.335503+00 41 \N 41 \N \N 1 \N \N -29 2015-02-04 20:06:40.169408+00 41 \N 41 \N \N 0 \N \N -30 2015-02-06 16:07:45.355755+00 41 \N 41 \N \N 0 \N \N -31 2015-02-06 20:07:38.136354+00 41 \N 41 \N \N 0 \N \N -1 2011-12-20 17:58:26.736933+00 41 \N 41 \N \N 0 \N \N -2 2011-12-20 17:59:02.671505+00 41 \N 41 \N \N 0 \N \N -3 2011-12-20 17:59:19.844545+00 41 \N 41 \N \N 0 \N \N -4 2012-01-19 20:46:35.153106+00 41 \N 41 \N \N 0 \N \N -5 2012-01-23 17:25:06.637079+00 41 \N 41 \N \N 0 \N \N -6 2012-06-28 20:34:36.265863+00 41 \N 41 \N \N 0 \N \N -7 2012-06-28 20:35:00.551065+00 41 \N 41 \N \N 0 \N \N -8 2012-06-28 20:36:04.901638+00 41 \N 41 \N \N 0 \N \N -9 2012-06-28 20:36:30.035938+00 41 \N 41 \N \N 0 \N \N -12 2013-10-09 14:47:20.320423+00 41 \N 41 \N \N 0 \N \N -13 2013-10-09 14:49:37.243178+00 41 \N 41 \N \N 0 \N \N -14 2013-10-09 14:49:49.683672+00 41 \N 41 \N \N 0 \N \N -15 2013-10-09 14:50:09.982246+00 41 \N 41 \N \N 0 \N \N -16 2013-10-09 14:50:46.875676+00 41 \N 41 \N \N 0 \N \N -19 2014-01-10 23:11:16.337745+00 41 \N 41 \N \N 0 \N \N -20 2014-02-13 00:42:52.573584+00 41 \N 41 \N \N 0 \N \N -21 2014-12-19 14:12:05.270521+00 41 \N 41 \N \N 0 \N \N -22 2014-12-19 14:14:21.150006+00 41 \N 41 \N \N 0 \N \N -23 2014-12-19 14:14:53.610443+00 41 \N 41 \N \N 0 \N \N -24 2014-12-19 14:15:25.567852+00 41 \N 41 \N \N 0 \N \N -25 2014-12-19 14:16:05.753633+00 41 \N 41 \N \N 0 \N \N -26 2014-12-19 14:16:25.843792+00 41 \N 41 \N \N 0 \N \N -27 2014-12-19 14:26:02.50047+00 41 \N 41 \N \N 0 \N \N -28 2014-12-19 21:22:22.583344+00 41 \N 41 \N \N 0 \N \N -32 2015-06-02 12:16:04.529974+00 41 \N 41 \N \N 0 \N \N -33 2016-02-04 18:58:52.339025+00 41 \N 41 \N \N 0 \N \N -34 2016-02-04 18:59:53.76135+00 41 \N 41 \N \N 0 \N \N -35 2016-02-04 19:00:26.992463+00 41 \N 41 \N \N 0 \N \N -36 2016-02-04 19:00:53.818881+00 41 \N 41 \N \N 0 \N \N -37 2016-02-17 20:34:04.967354+00 41 \N 41 \N \N 0 \N \N -38 2016-02-25 21:29:32.465167+00 41 \N 41 \N \N 0 \N \N -39 2016-03-07 17:28:59.083711+00 41 \N 41 \N \N 0 \N \N -40 2016-03-07 17:29:05.349106+00 41 \N 41 \N \N 0 \N \N -41 2016-03-07 17:30:33.01634+00 41 \N 41 \N \N 0 \N \N -42 2016-03-07 17:30:48.618187+00 41 \N 41 \N \N 0 \N \N -43 2016-03-07 17:30:59.870503+00 41 \N 41 \N \N 0 \N \N -44 2016-03-08 02:08:23.919972+00 41 \N 41 \N \N 0 \N \N -45 2016-03-08 03:35:28.565872+00 41 \N 41 \N \N 0 \N \N -46 2016-05-09 17:54:13.75916+00 41 \N 41 \N \N 0 \N \N -47 2016-05-09 21:49:25.421545+00 41 \N 41 \N \N 0 \N \N -48 2016-05-12 21:14:24.101559+00 41 \N 41 \N \N 0 \N \N -49 2016-08-02 16:57:34.432201+00 41 \N 41 \N \N 0 \N \N -50 2016-08-02 16:57:57.411613+00 41 \N 41 \N \N 0 \N \N -51 2016-08-04 15:35:21.249132+00 41 \N 41 \N \N 0 \N \N -52 2016-10-12 17:29:59.74206+00 41 \N 41 \N \N 0 \N \N -53 2016-10-17 17:51:17.740278+00 41 \N 41 \N \N 0 \N \N -54 2016-11-11 14:47:39.732402+00 41 \N 41 \N \N 0 \N \N -55 2017-01-04 15:25:47.878796+00 41 \N 41 \N \N 0 \N \N -56 2017-02-20 21:54:13.041208+00 41 \N 41 \N \N 0 \N \N -57 2017-03-28 18:48:59.237899+00 41 \N 41 \N \N 0 \N \N -58 2017-04-21 20:38:42.140825+00 41 \N 41 \N \N 0 \N \N -59 2017-04-21 20:38:47.264129+00 41 \N 41 \N \N 0 \N \N -60 2017-04-21 20:40:28.934828+00 41 \N 41 \N \N 0 \N \N -61 2017-04-21 20:40:54.719142+00 41 \N 41 \N \N 0 \N \N -62 2017-04-21 21:12:02.017627+00 41 \N 41 \N \N 0 \N \N -63 2017-05-08 16:12:57.002519+00 41 \N 41 \N \N 0 \N \N -64 2017-05-31 14:08:18.88001+00 41 \N 41 \N \N 0 \N \N -65 2017-06-08 16:11:32.805234+00 41 \N 41 \N \N 0 \N \N -66 2017-06-08 16:53:22.864556+00 41 \N 41 \N \N 0 \N \N -67 2017-06-30 13:41:36.162383+00 41 \N 41 \N \N 0 \N \N -68 2017-06-30 13:41:47.39034+00 41 \N 41 \N \N 0 \N \N -69 2017-07-17 17:31:42.837473+00 41 \N 41 \N \N 0 \N \N -70 2017-07-27 19:09:24.635054+00 41 \N 41 \N \N 0 \N \N -71 2017-07-27 19:09:56.99407+00 41 \N 41 \N \N 0 \N \N -72 2017-08-16 18:07:04.409576+00 41 \N 41 \N \N 0 \N \N -73 2017-08-16 18:07:17.022312+00 41 \N 41 \N \N 0 \N \N -74 2017-08-16 18:07:38.778388+00 41 \N 41 \N \N 0 \N \N -75 2017-09-01 17:08:01.703879+00 41 \N 41 \N \N 0 \N \N -76 2017-09-18 15:42:28.250977+00 41 \N 41 \N \N 0 \N \N -77 2017-09-18 15:43:58.719398+00 41 \N 41 \N \N 0 \N \N -78 2017-10-10 15:10:41.4496+00 41 \N 41 \N \N 0 \N \N -79 2017-10-10 15:10:52.863376+00 41 \N 41 \N \N 0 \N \N -80 2017-10-10 15:11:22.791118+00 41 \N 41 \N \N 0 \N \N -81 2017-10-10 15:13:14.819036+00 41 \N 41 \N \N 0 \N \N -82 2017-10-10 15:13:30.873535+00 41 \N 41 \N \N 0 \N \N -83 2017-10-10 15:17:59.09749+00 41 \N 41 \N \N 0 \N \N -84 2017-10-10 18:46:10.177605+00 41 \N 41 \N \N 0 \N \N -85 2017-10-28 09:27:19.914912+00 41 \N 41 \N \N 0 \N \N -86 2017-10-28 09:27:31.016472+00 41 \N 41 \N \N 0 \N \N -87 2018-03-15 18:22:23.716655+00 41 \N 41 \N \N 0 \N \N -88 2018-03-15 18:22:38.694441+00 41 \N 41 \N \N 0 \N \N -89 2018-03-15 18:22:50.086659+00 41 \N 41 \N \N 0 \N \N -90 2018-03-15 18:23:18.356881+00 41 \N 41 \N \N 0 \N \N -91 2018-03-15 18:23:27.198638+00 41 \N 41 \N \N 0 \N \N -92 2018-03-15 18:23:42.849766+00 41 \N 41 \N \N 0 \N \N -93 2018-03-15 18:23:53.182309+00 41 \N 41 \N \N 0 \N \N -94 2018-03-15 18:24:08.119533+00 41 \N 41 \N \N 0 \N \N -95 2018-03-15 18:24:20.893402+00 41 \N 41 \N \N 0 \N \N -96 2018-03-15 18:24:30.449553+00 41 \N 41 \N \N 0 \N \N -97 2018-03-15 18:24:48.650789+00 41 \N 41 \N \N 0 \N \N -98 2018-03-15 18:25:52.818933+00 41 \N 41 \N \N 0 \N \N -99 2018-03-15 18:27:22.075265+00 41 \N 41 \N \N 0 \N \N -100 2018-03-15 18:27:31.137628+00 41 \N 41 \N \N 0 \N \N -101 2018-03-15 18:27:34.05858+00 41 \N 41 \N \N 0 \N \N -102 2018-03-15 18:27:35.098042+00 41 \N 41 \N \N 0 \N \N -103 2018-03-15 18:27:36.863938+00 41 \N 41 \N \N 0 \N \N -104 2018-03-15 18:27:44.327055+00 41 \N 41 \N \N 0 \N \N -105 2018-03-15 18:27:47.338533+00 41 \N 41 \N \N 0 \N \N -106 2018-03-15 18:27:50.954148+00 41 \N 41 \N \N 0 \N \N -107 2018-03-15 18:27:54.330223+00 41 \N 41 \N \N 0 \N \N -108 2018-03-15 18:28:04.11018+00 41 \N 41 \N \N 0 \N \N -109 2018-03-15 18:28:07.980957+00 41 \N 41 \N \N 0 \N \N -110 2018-03-15 18:28:09.301863+00 41 \N 41 \N \N 0 \N \N -111 2018-03-15 18:28:10.524295+00 41 \N 41 \N \N 0 \N \N -112 2018-03-15 18:28:12.704359+00 41 \N 41 \N \N 0 \N \N -113 2018-03-15 18:28:14.967406+00 41 \N 41 \N \N 0 \N \N -114 2018-03-15 18:28:17.296695+00 41 \N 41 \N \N 0 \N \N -115 2018-03-15 18:28:19.55644+00 41 \N 41 \N \N 0 \N \N -116 2018-03-15 18:33:22.456325+00 41 \N 41 \N \N 0 \N \N -117 2018-03-15 18:34:21.334624+00 41 \N 41 \N \N 0 \N \N -118 2018-03-15 18:35:12.538822+00 41 \N 41 \N \N 0 \N \N -119 2018-03-15 18:36:00.770895+00 41 \N 41 \N \N 0 \N \N -120 2018-03-15 18:36:49.307398+00 41 \N 41 \N \N 0 \N \N -121 2018-03-15 18:39:49.100827+00 41 \N 41 \N \N 0 \N \N -122 2018-03-15 18:40:54.965061+00 41 \N 41 \N \N 0 \N \N -123 2018-03-15 18:41:46.412116+00 41 \N 41 \N \N 0 \N \N -124 2018-03-15 18:42:55.118412+00 41 \N 41 \N \N 0 \N \N -125 2018-03-15 18:43:42.52683+00 41 \N 41 \N \N 0 \N \N -126 2018-03-15 18:44:43.779954+00 41 \N 41 \N \N 0 \N \N -127 2018-03-15 18:46:05.081789+00 41 \N 41 \N \N 0 \N \N -128 2018-03-15 18:47:06.79931+00 41 \N 41 \N \N 0 \N \N -129 2018-03-15 18:47:49.912357+00 41 \N 41 \N \N 0 \N \N -130 2018-03-15 18:48:31.490473+00 41 \N 41 \N \N 0 \N \N -131 2018-03-15 18:49:17.403215+00 41 \N 41 \N \N 0 \N \N -132 2018-03-15 18:50:01.866697+00 41 \N 41 \N \N 0 \N \N -133 2018-03-15 18:52:01.920667+00 41 \N 41 \N \N 0 \N \N -134 2018-03-15 18:56:21.786723+00 41 \N 41 \N \N 0 \N \N -135 2018-03-15 18:57:23.524967+00 41 \N 41 \N \N 0 \N \N -136 2018-03-15 18:59:13.473233+00 41 \N 41 \N \N 0 \N \N -137 2018-08-07 19:33:30.680892+00 41 \N 41 \N \N 0 \N \N -138 2018-08-07 19:33:32.459585+00 41 \N 41 \N \N 0 \N \N -139 2018-08-07 19:33:34.412633+00 41 \N 41 \N \N 0 \N \N -140 2018-08-07 19:33:36.167087+00 41 \N 41 \N \N 0 \N \N -141 2018-08-07 19:33:37.222176+00 41 \N 41 \N \N 0 \N \N -142 2018-08-07 19:33:38.900354+00 41 \N 41 \N \N 0 \N \N -143 2018-08-07 19:33:41.547063+00 41 \N 41 \N \N 0 \N \N -144 2018-08-07 19:33:44.11407+00 41 \N 41 \N \N 0 \N \N -145 2018-08-07 19:33:45.851851+00 41 \N 41 \N \N 0 \N \N -146 2018-08-07 19:33:47.617691+00 41 \N 41 \N \N 0 \N \N -147 2018-08-07 19:33:50.103259+00 41 \N 41 \N \N 0 \N \N -148 2018-08-07 19:33:52.612056+00 41 \N 41 \N \N 0 \N \N -149 2018-08-07 19:33:55.128981+00 41 \N 41 \N \N 0 \N \N -150 2018-08-19 22:28:38.254282+00 41 \N 41 \N \N 0 \N \N -151 2018-08-19 22:28:41.219338+00 41 \N 41 \N \N 0 \N \N -152 2018-10-17 19:34:10.537627+00 41 \N 41 \N \N 0 \N \N -153 2018-10-17 19:34:11.840185+00 41 \N 41 \N \N 0 \N \N -154 2018-10-17 19:34:13.089358+00 41 \N 41 \N \N 0 \N \N -155 2018-10-17 19:34:15.04039+00 41 \N 41 \N \N 0 \N \N -156 2018-10-17 19:34:17.251416+00 41 \N 41 \N \N 0 \N \N -157 2018-10-17 19:34:19.268252+00 41 \N 41 \N \N 0 \N \N -158 2019-04-03 19:07:52.723312+00 41 \N 41 \N \N 0 \N \N -159 2019-04-03 19:07:53.774721+00 41 \N 41 \N \N 0 \N \N -160 2019-04-03 19:07:55.444201+00 41 \N 41 \N \N 0 \N \N -161 2019-04-03 19:07:57.201098+00 41 \N 41 \N \N 0 \N \N -162 2019-04-03 19:07:58.878388+00 41 \N 41 \N \N 0 \N \N -163 2019-06-05 21:33:52.895902+00 41 \N 41 \N \N 0 \N \N -164 2019-06-05 21:33:54.076159+00 41 \N 41 \N \N 0 \N \N -165 2019-08-06 16:35:16.339494+00 41 \N 41 \N \N 0 \N \N -166 2019-08-06 16:35:17.89881+00 41 \N 41 \N \N 0 \N \N -167 2019-08-06 16:35:19.280207+00 41 \N 41 \N \N 0 \N \N -168 2019-08-06 16:35:21.282284+00 41 \N 41 \N \N 0 \N \N -169 2019-08-06 16:35:22.148169+00 41 \N 41 \N \N 0 \N \N -170 2019-08-07 22:56:34.894513+00 41 \N 41 \N \N 0 \N \N -171 2020-01-22 20:12:16.928502+00 41 \N 41 \N \N 0 \N \N -172 2020-01-22 20:12:29.485024+00 41 \N 41 \N \N 0 \N \N -173 2020-01-22 20:12:31.038054+00 41 \N 41 \N \N 0 \N \N -174 2020-01-22 20:12:33.972515+00 41 \N 41 \N \N 0 \N \N -175 2020-01-22 20:12:36.71407+00 41 \N 41 \N \N 0 \N \N -176 2020-01-22 20:12:39.453074+00 41 \N 41 \N \N 0 \N \N -177 2020-01-22 20:12:42.868603+00 41 \N 41 \N \N 0 \N \N -178 2020-01-22 20:12:45.743603+00 41 \N 41 \N \N 0 \N \N -179 2020-01-22 20:12:48.129976+00 41 \N 41 \N \N 0 \N \N -180 2020-02-21 19:26:14.344237+00 41 \N 41 \N \N 0 \N \N -181 2020-02-21 19:26:16.286043+00 41 \N 41 \N \N 0 \N \N -182 2020-02-21 19:26:18.454662+00 41 \N 41 \N \N 0 \N \N -183 2020-04-09 13:28:49.143965+00 41 \N 41 \N \N 0 \N \N -184 2020-04-09 13:28:50.799902+00 41 \N 41 \N \N 0 \N \N -185 2020-04-09 13:28:54.790587+00 41 \N 41 \N \N 0 \N \N -186 2020-04-09 13:28:58.773546+00 41 \N 41 \N \N 0 \N \N -187 2020-04-09 13:29:01.086215+00 41 \N 41 \N \N 0 \N \N -188 2020-04-09 13:29:14.372195+00 41 \N 41 \N \N 0 \N \N -189 2020-04-09 14:43:29.697094+00 41 \N 41 \N \N 0 \N \N -190 2020-04-09 14:43:29.697094+00 41 2020-04-09 14:43:29.697094+00 41 Bulk load of accession information 189 0 \N \N -191 2020-06-27 16:30:33.970546+00 41 \N 41 \N \N 0 \N \N -192 2020-06-27 16:31:08.146366+00 41 \N 41 \N \N 0 \N \N -193 2020-06-27 16:31:34.328798+00 41 \N 41 \N \N 0 \N \N -194 2020-06-27 16:32:05.049948+00 41 \N 41 \N \N 0 \N \N -195 2020-06-27 16:32:20.437788+00 41 \N 41 \N \N 0 \N \N -196 2020-06-27 16:32:38.081425+00 41 \N 41 \N \N 0 \N \N -197 2020-06-27 16:33:02.002609+00 41 \N 41 \N \N 0 \N \N -198 2020-07-16 19:28:30.985547+00 41 \N 41 \N \N 0 \N \N -199 2020-07-16 19:28:34.216065+00 41 \N 41 \N \N 0 \N \N -200 2020-07-16 19:28:35.498009+00 41 \N 41 \N \N 0 \N \N -201 2020-07-30 17:46:20.213307+00 41 \N 41 \N \N 0 \N \N -202 2020-07-30 17:46:33.932416+00 41 \N 41 \N \N 0 \N \N -203 2020-08-21 02:48:39.117945+00 41 \N 41 \N \N 0 \N \N -204 2020-08-21 02:48:40.500789+00 41 \N 41 \N \N 0 \N \N -205 2020-08-21 02:48:42.018041+00 41 \N 41 \N \N 0 \N \N -206 2020-09-04 21:06:50.649866+00 41 \N 41 \N \N 0 \N \N -207 2020-09-04 21:07:35.065837+00 41 \N 41 \N \N 0 \N \N -208 2020-09-14 15:41:40.496852+00 41 \N 41 \N \N 0 \N \N -209 2020-09-17 22:21:38.715859+00 41 \N 41 \N \N 0 \N \N -210 2020-09-17 22:22:05.958752+00 41 \N 41 \N \N 0 \N \N -211 2020-09-23 17:35:58.809559+00 41 \N 41 \N \N 0 \N \N -212 2020-10-03 22:04:01.315147+00 41 \N 41 \N \N 0 \N \N -213 2020-10-30 02:06:28.159077+00 41 \N 41 \N \N 0 \N \N -214 2020-10-30 02:09:20.737725+00 41 \N 41 \N \N 0 \N \N -215 2020-10-30 02:09:39.410676+00 41 \N 41 \N \N 0 \N \N -218 2023-03-16 23:54:16.636187+00 41 \N \N \N \N 0 \N \N -221 2023-03-16 23:54:21.201615+00 41 \N \N \N \N 0 \N \N -224 2023-03-16 23:54:24.771882+00 41 \N \N \N \N 0 \N \N -227 2023-03-16 23:54:28.343298+00 41 \N \N \N \N 0 \N \N -230 2023-03-16 23:54:31.05921+00 41 \N \N \N \N 0 \N \N -233 2023-03-16 23:54:34.64962+00 41 \N \N \N \N 0 \N \N -236 2023-03-16 23:54:37.797284+00 41 \N \N \N \N 0 \N \N -239 2023-03-16 23:54:40.703815+00 41 \N \N \N \N 0 \N \N -242 2023-03-16 23:54:44.204444+00 41 \N \N \N \N 0 \N \N -245 2023-03-16 23:54:48.374165+00 41 \N \N \N \N 0 \N \N -248 2023-03-16 23:54:50.972127+00 41 \N \N \N \N 0 \N \N -251 2023-03-16 23:54:53.579513+00 41 \N \N \N \N 0 \N \N -254 2023-03-16 23:54:58.006512+00 41 \N \N \N \N 0 \N \N -257 2023-03-16 23:55:02.984844+00 41 \N \N \N \N 0 \N \N -260 2023-03-16 23:55:08.519442+00 41 \N \N \N \N 0 \N \N -263 2023-03-16 23:55:11.14479+00 41 \N \N \N \N 0 \N \N -266 2023-03-16 23:55:21.176608+00 41 \N \N \N \N 0 \N \N -269 2023-03-16 23:55:24.671918+00 41 \N \N \N \N 0 \N \N -272 2023-03-16 23:55:29.014802+00 41 \N \N \N \N 0 \N \N -275 2023-03-16 23:55:33.559379+00 41 \N \N \N \N 0 \N \N +8 2012-06-28 20:36:04.901638+00 43 \N 43 \N \N 0 \N \N +9 2012-06-28 20:36:30.035938+00 43 \N 43 \N \N 0 \N \N +12 2013-10-09 14:47:20.320423+00 43 \N 43 \N \N 0 \N \N +13 2013-10-09 14:49:37.243178+00 43 \N 43 \N \N 0 \N \N +14 2013-10-09 14:49:49.683672+00 43 \N 43 \N \N 0 \N \N +15 2013-10-09 14:50:09.982246+00 43 \N 43 \N \N 0 \N \N +16 2013-10-09 14:50:46.875676+00 43 \N 43 \N \N 0 \N \N +19 2014-01-10 23:11:16.337745+00 43 \N 43 \N \N 0 \N \N +20 2014-02-13 00:42:52.573584+00 43 \N 43 \N \N 0 \N \N +21 2014-12-19 14:12:05.270521+00 43 \N 43 \N \N 0 \N \N +22 2014-12-19 14:14:21.150006+00 43 \N 43 \N \N 0 \N \N +23 2014-12-19 14:14:53.610443+00 43 \N 43 \N \N 0 \N \N +24 2014-12-19 14:15:25.567852+00 43 \N 43 \N \N 0 \N \N +25 2014-12-19 14:16:05.753633+00 43 \N 43 \N \N 0 \N \N +26 2014-12-19 14:16:25.843792+00 43 \N 43 \N \N 0 \N \N +27 2014-12-19 14:26:02.50047+00 43 \N 43 \N \N 0 \N \N +28 2014-12-19 21:22:22.583344+00 43 \N 43 \N \N 0 \N \N +32 2015-06-02 12:16:04.529974+00 43 \N 43 \N \N 0 \N \N +33 2016-02-04 18:58:52.339025+00 43 \N 43 \N \N 0 \N \N +34 2016-02-04 18:59:53.76135+00 43 \N 43 \N \N 0 \N \N +35 2016-02-04 19:00:26.992463+00 43 \N 43 \N \N 0 \N \N +36 2016-02-04 19:00:53.818881+00 43 \N 43 \N \N 0 \N \N +37 2016-02-17 20:34:04.967354+00 43 \N 43 \N \N 0 \N \N +38 2016-02-25 21:29:32.465167+00 43 \N 43 \N \N 0 \N \N +39 2016-03-07 17:28:59.083711+00 43 \N 43 \N \N 0 \N \N +40 2016-03-07 17:29:05.349106+00 43 \N 43 \N \N 0 \N \N +41 2016-03-07 17:30:33.01634+00 43 \N 43 \N \N 0 \N \N +42 2016-03-07 17:30:48.618187+00 43 \N 43 \N \N 0 \N \N +43 2016-03-07 17:30:59.870503+00 43 \N 43 \N \N 0 \N \N +44 2016-03-08 02:08:23.919972+00 43 \N 43 \N \N 0 \N \N +45 2016-03-08 03:35:28.565872+00 43 \N 43 \N \N 0 \N \N +46 2016-05-09 17:54:13.75916+00 43 \N 43 \N \N 0 \N \N +47 2016-05-09 21:49:25.421545+00 43 \N 43 \N \N 0 \N \N +48 2016-05-12 21:14:24.101559+00 43 \N 43 \N \N 0 \N \N +49 2016-08-02 16:57:34.432201+00 43 \N 43 \N \N 0 \N \N +50 2016-08-02 16:57:57.411613+00 43 \N 43 \N \N 0 \N \N +51 2016-08-04 15:35:21.249132+00 43 \N 43 \N \N 0 \N \N +52 2016-10-12 17:29:59.74206+00 43 \N 43 \N \N 0 \N \N +53 2016-10-17 17:51:17.740278+00 43 \N 43 \N \N 0 \N \N +54 2016-11-11 14:47:39.732402+00 43 \N 43 \N \N 0 \N \N +55 2017-01-04 15:25:47.878796+00 43 \N 43 \N \N 0 \N \N +56 2017-02-20 21:54:13.041208+00 43 \N 43 \N \N 0 \N \N +57 2017-03-28 18:48:59.237899+00 43 \N 43 \N \N 0 \N \N +58 2017-04-21 20:38:42.140825+00 43 \N 43 \N \N 0 \N \N +59 2017-04-21 20:38:47.264129+00 43 \N 43 \N \N 0 \N \N +60 2017-04-21 20:40:28.934828+00 43 \N 43 \N \N 0 \N \N +61 2017-04-21 20:40:54.719142+00 43 \N 43 \N \N 0 \N \N +62 2017-04-21 21:12:02.017627+00 43 \N 43 \N \N 0 \N \N +63 2017-05-08 16:12:57.002519+00 43 \N 43 \N \N 0 \N \N +64 2017-05-31 14:08:18.88001+00 43 \N 43 \N \N 0 \N \N +65 2017-06-08 16:11:32.805234+00 43 \N 43 \N \N 0 \N \N +66 2017-06-08 16:53:22.864556+00 43 \N 43 \N \N 0 \N \N +67 2017-06-30 13:41:36.162383+00 43 \N 43 \N \N 0 \N \N +68 2017-06-30 13:41:47.39034+00 43 \N 43 \N \N 0 \N \N +69 2017-07-17 17:31:42.837473+00 43 \N 43 \N \N 0 \N \N +70 2017-07-27 19:09:24.635054+00 43 \N 43 \N \N 0 \N \N +71 2017-07-27 19:09:56.99407+00 43 \N 43 \N \N 0 \N \N +72 2017-08-16 18:07:04.409576+00 43 \N 43 \N \N 0 \N \N +73 2017-08-16 18:07:17.022312+00 43 \N 43 \N \N 0 \N \N +74 2017-08-16 18:07:38.778388+00 43 \N 43 \N \N 0 \N \N +75 2017-09-01 17:08:01.703879+00 43 \N 43 \N \N 0 \N \N +76 2017-09-18 15:42:28.250977+00 43 \N 43 \N \N 0 \N \N +77 2017-09-18 15:43:58.719398+00 43 \N 43 \N \N 0 \N \N +78 2017-10-10 15:10:41.4496+00 43 \N 43 \N \N 0 \N \N +79 2017-10-10 15:10:52.863376+00 43 \N 43 \N \N 0 \N \N +80 2017-10-10 15:11:22.791118+00 43 \N 43 \N \N 0 \N \N +81 2017-10-10 15:13:14.819036+00 43 \N 43 \N \N 0 \N \N +82 2017-10-10 15:13:30.873535+00 43 \N 43 \N \N 0 \N \N +83 2017-10-10 15:17:59.09749+00 43 \N 43 \N \N 0 \N \N +84 2017-10-10 18:46:10.177605+00 43 \N 43 \N \N 0 \N \N +85 2017-10-28 09:27:19.914912+00 43 \N 43 \N \N 0 \N \N +86 2017-10-28 09:27:31.016472+00 43 \N 43 \N \N 0 \N \N +87 2018-03-15 18:22:23.716655+00 43 \N 43 \N \N 0 \N \N +88 2018-03-15 18:22:38.694441+00 43 \N 43 \N \N 0 \N \N +89 2018-03-15 18:22:50.086659+00 43 \N 43 \N \N 0 \N \N +90 2018-03-15 18:23:18.356881+00 43 \N 43 \N \N 0 \N \N +91 2018-03-15 18:23:27.198638+00 43 \N 43 \N \N 0 \N \N +92 2018-03-15 18:23:42.849766+00 43 \N 43 \N \N 0 \N \N +93 2018-03-15 18:23:53.182309+00 43 \N 43 \N \N 0 \N \N +94 2018-03-15 18:24:08.119533+00 43 \N 43 \N \N 0 \N \N +95 2018-03-15 18:24:20.893402+00 43 \N 43 \N \N 0 \N \N +96 2018-03-15 18:24:30.449553+00 43 \N 43 \N \N 0 \N \N +97 2018-03-15 18:24:48.650789+00 43 \N 43 \N \N 0 \N \N +98 2018-03-15 18:25:52.818933+00 43 \N 43 \N \N 0 \N \N +99 2018-03-15 18:27:22.075265+00 43 \N 43 \N \N 0 \N \N +100 2018-03-15 18:27:31.137628+00 43 \N 43 \N \N 0 \N \N +101 2018-03-15 18:27:34.05858+00 43 \N 43 \N \N 0 \N \N +102 2018-03-15 18:27:35.098042+00 43 \N 43 \N \N 0 \N \N +103 2018-03-15 18:27:36.863938+00 43 \N 43 \N \N 0 \N \N +104 2018-03-15 18:27:44.327055+00 43 \N 43 \N \N 0 \N \N +105 2018-03-15 18:27:47.338533+00 43 \N 43 \N \N 0 \N \N +106 2018-03-15 18:27:50.954148+00 43 \N 43 \N \N 0 \N \N +107 2018-03-15 18:27:54.330223+00 43 \N 43 \N \N 0 \N \N +108 2018-03-15 18:28:04.11018+00 43 \N 43 \N \N 0 \N \N +109 2018-03-15 18:28:07.980957+00 43 \N 43 \N \N 0 \N \N +110 2018-03-15 18:28:09.301863+00 43 \N 43 \N \N 0 \N \N +111 2018-03-15 18:28:10.524295+00 43 \N 43 \N \N 0 \N \N +112 2018-03-15 18:28:12.704359+00 43 \N 43 \N \N 0 \N \N +113 2018-03-15 18:28:14.967406+00 43 \N 43 \N \N 0 \N \N +114 2018-03-15 18:28:17.296695+00 43 \N 43 \N \N 0 \N \N +115 2018-03-15 18:28:19.55644+00 43 \N 43 \N \N 0 \N \N +116 2018-03-15 18:33:22.456325+00 43 \N 43 \N \N 0 \N \N +117 2018-03-15 18:34:21.334624+00 43 \N 43 \N \N 0 \N \N +118 2018-03-15 18:35:12.538822+00 43 \N 43 \N \N 0 \N \N +119 2018-03-15 18:36:00.770895+00 43 \N 43 \N \N 0 \N \N +120 2018-03-15 18:36:49.307398+00 43 \N 43 \N \N 0 \N \N +121 2018-03-15 18:39:49.100827+00 43 \N 43 \N \N 0 \N \N +122 2018-03-15 18:40:54.965061+00 43 \N 43 \N \N 0 \N \N +123 2018-03-15 18:41:46.412116+00 43 \N 43 \N \N 0 \N \N +124 2018-03-15 18:42:55.118412+00 43 \N 43 \N \N 0 \N \N +125 2018-03-15 18:43:42.52683+00 43 \N 43 \N \N 0 \N \N +126 2018-03-15 18:44:43.779954+00 43 \N 43 \N \N 0 \N \N +127 2018-03-15 18:46:05.081789+00 43 \N 43 \N \N 0 \N \N +128 2018-03-15 18:47:06.79931+00 43 \N 43 \N \N 0 \N \N +129 2018-03-15 18:47:49.912357+00 43 \N 43 \N \N 0 \N \N +130 2018-03-15 18:48:31.490473+00 43 \N 43 \N \N 0 \N \N +131 2018-03-15 18:49:17.403215+00 43 \N 43 \N \N 0 \N \N +132 2018-03-15 18:50:01.866697+00 43 \N 43 \N \N 0 \N \N +133 2018-03-15 18:52:01.920667+00 43 \N 43 \N \N 0 \N \N +17 2014-01-03 17:44:29.059282+00 43 \N 43 \N \N 0 \N \N +18 2014-01-03 22:13:32.335503+00 43 \N 43 \N \N 1 \N \N +29 2015-02-04 20:06:40.169408+00 43 \N 43 \N \N 0 \N \N +30 2015-02-06 16:07:45.355755+00 43 \N 43 \N \N 0 \N \N +31 2015-02-06 20:07:38.136354+00 43 \N 43 \N \N 0 \N \N +1 2011-12-20 17:58:26.736933+00 43 \N 43 \N \N 0 \N \N +2 2011-12-20 17:59:02.671505+00 43 \N 43 \N \N 0 \N \N +3 2011-12-20 17:59:19.844545+00 43 \N 43 \N \N 0 \N \N +4 2012-01-19 20:46:35.153106+00 43 \N 43 \N \N 0 \N \N +5 2012-01-23 17:25:06.637079+00 43 \N 43 \N \N 0 \N \N +6 2012-06-28 20:34:36.265863+00 43 \N 43 \N \N 0 \N \N +7 2012-06-28 20:35:00.551065+00 43 \N 43 \N \N 0 \N \N +134 2018-03-15 18:56:21.786723+00 43 \N 43 \N \N 0 \N \N +135 2018-03-15 18:57:23.524967+00 43 \N 43 \N \N 0 \N \N +136 2018-03-15 18:59:13.473233+00 43 \N 43 \N \N 0 \N \N +137 2018-08-07 19:33:30.680892+00 43 \N 43 \N \N 0 \N \N +138 2018-08-07 19:33:32.459585+00 43 \N 43 \N \N 0 \N \N +139 2018-08-07 19:33:34.412633+00 43 \N 43 \N \N 0 \N \N +140 2018-08-07 19:33:36.167087+00 43 \N 43 \N \N 0 \N \N +141 2018-08-07 19:33:37.222176+00 43 \N 43 \N \N 0 \N \N +142 2018-08-07 19:33:38.900354+00 43 \N 43 \N \N 0 \N \N +143 2018-08-07 19:33:41.547063+00 43 \N 43 \N \N 0 \N \N +144 2018-08-07 19:33:44.11407+00 43 \N 43 \N \N 0 \N \N +145 2018-08-07 19:33:45.851851+00 43 \N 43 \N \N 0 \N \N +146 2018-08-07 19:33:47.617691+00 43 \N 43 \N \N 0 \N \N +147 2018-08-07 19:33:50.103259+00 43 \N 43 \N \N 0 \N \N +148 2018-08-07 19:33:52.612056+00 43 \N 43 \N \N 0 \N \N +149 2018-08-07 19:33:55.128981+00 43 \N 43 \N \N 0 \N \N +150 2018-08-19 22:28:38.254282+00 43 \N 43 \N \N 0 \N \N +172 2020-01-22 20:12:29.485024+00 43 \N 43 \N \N 0 \N \N +173 2020-01-22 20:12:31.038054+00 43 \N 43 \N \N 0 \N \N +174 2020-01-22 20:12:33.972515+00 43 \N 43 \N \N 0 \N \N +175 2020-01-22 20:12:36.71407+00 43 \N 43 \N \N 0 \N \N +176 2020-01-22 20:12:39.453074+00 43 \N 43 \N \N 0 \N \N +177 2020-01-22 20:12:42.868603+00 43 \N 43 \N \N 0 \N \N +178 2020-01-22 20:12:45.743603+00 43 \N 43 \N \N 0 \N \N +179 2020-01-22 20:12:48.129976+00 43 \N 43 \N \N 0 \N \N +180 2020-02-21 19:26:14.344237+00 43 \N 43 \N \N 0 \N \N +181 2020-02-21 19:26:16.286043+00 43 \N 43 \N \N 0 \N \N +182 2020-02-21 19:26:18.454662+00 43 \N 43 \N \N 0 \N \N +183 2020-04-09 13:28:49.143965+00 43 \N 43 \N \N 0 \N \N +184 2020-04-09 13:28:50.799902+00 43 \N 43 \N \N 0 \N \N +185 2020-04-09 13:28:54.790587+00 43 \N 43 \N \N 0 \N \N +186 2020-04-09 13:28:58.773546+00 43 \N 43 \N \N 0 \N \N +187 2020-04-09 13:29:01.086215+00 43 \N 43 \N \N 0 \N \N +188 2020-04-09 13:29:14.372195+00 43 \N 43 \N \N 0 \N \N +189 2020-04-09 14:43:29.697094+00 43 \N 43 \N \N 0 \N \N +190 2020-04-09 14:43:29.697094+00 43 2020-04-09 14:43:29.697094+00 43 Bulk load of accession information 189 0 \N \N +191 2020-06-27 16:30:33.970546+00 43 \N 43 \N \N 0 \N \N +192 2020-06-27 16:31:08.146366+00 43 \N 43 \N \N 0 \N \N +193 2020-06-27 16:31:34.328798+00 43 \N 43 \N \N 0 \N \N +194 2020-06-27 16:32:05.049948+00 43 \N 43 \N \N 0 \N \N +195 2020-06-27 16:32:20.437788+00 43 \N 43 \N \N 0 \N \N +196 2020-06-27 16:32:38.081425+00 43 \N 43 \N \N 0 \N \N +197 2020-06-27 16:33:02.002609+00 43 \N 43 \N \N 0 \N \N +198 2020-07-16 19:28:30.985547+00 43 \N 43 \N \N 0 \N \N +199 2020-07-16 19:28:34.216065+00 43 \N 43 \N \N 0 \N \N +200 2020-07-16 19:28:35.498009+00 43 \N 43 \N \N 0 \N \N +201 2020-07-30 17:46:20.213307+00 43 \N 43 \N \N 0 \N \N +202 2020-07-30 17:46:33.932416+00 43 \N 43 \N \N 0 \N \N +203 2020-08-21 02:48:39.117945+00 43 \N 43 \N \N 0 \N \N +204 2020-08-21 02:48:40.500789+00 43 \N 43 \N \N 0 \N \N +205 2020-08-21 02:48:42.018041+00 43 \N 43 \N \N 0 \N \N +206 2020-09-04 21:06:50.649866+00 43 \N 43 \N \N 0 \N \N +207 2020-09-04 21:07:35.065837+00 43 \N 43 \N \N 0 \N \N +208 2020-09-14 15:41:40.496852+00 43 \N 43 \N \N 0 \N \N +209 2020-09-17 22:21:38.715859+00 43 \N 43 \N \N 0 \N \N +210 2020-09-17 22:22:05.958752+00 43 \N 43 \N \N 0 \N \N +211 2020-09-23 17:35:58.809559+00 43 \N 43 \N \N 0 \N \N +212 2020-10-03 22:04:01.315147+00 43 \N 43 \N \N 0 \N \N +213 2020-10-30 02:06:28.159077+00 43 \N 43 \N \N 0 \N \N +214 2020-10-30 02:09:20.737725+00 43 \N 43 \N \N 0 \N \N +215 2020-10-30 02:09:39.410676+00 43 \N 43 \N \N 0 \N \N +216 2022-02-20 22:29:52.724879+00 43 \N 43 \N \N 0 \N \N +217 2022-02-20 22:29:53.568086+00 43 \N 43 \N \N 0 \N \N +218 2022-02-20 22:29:54.792459+00 43 \N 43 \N \N 0 \N \N +219 2022-02-20 22:29:55.619007+00 43 \N 43 \N \N 0 \N \N +220 2022-02-20 22:29:56.148918+00 43 \N 43 \N \N 0 \N \N +221 2022-02-20 22:29:57.729633+00 43 \N 43 \N \N 0 \N \N +222 2022-02-20 22:29:58.54075+00 43 \N 43 \N \N 0 \N \N +223 2022-02-20 22:29:59.318981+00 43 \N 43 \N \N 0 \N \N +224 2022-02-20 22:30:00.131832+00 43 \N 43 \N \N 0 \N \N +225 2022-02-20 22:30:00.958071+00 43 \N 43 \N \N 0 \N \N +226 2022-02-20 22:30:01.833743+00 43 \N 43 \N \N 0 \N \N +227 2022-02-20 22:30:02.672484+00 43 \N 43 \N \N 0 \N \N +228 2022-02-20 22:30:03.244121+00 43 \N 43 \N \N 0 \N \N +229 2022-02-20 22:30:03.982238+00 43 \N 43 \N \N 0 \N \N +230 2022-02-20 22:30:04.49187+00 43 \N 43 \N \N 0 \N \N +231 2022-02-20 22:30:05.216586+00 43 \N 43 \N \N 0 \N \N +232 2022-02-20 22:30:05.996902+00 43 \N 43 \N \N 0 \N \N +233 2022-02-20 22:30:06.781385+00 43 \N 43 \N \N 0 \N \N +234 2022-02-20 22:30:07.580065+00 43 \N 43 \N \N 0 \N \N +235 2022-02-20 22:30:08.114968+00 43 \N 43 \N \N 0 \N \N +236 2022-02-20 22:30:08.884032+00 43 \N 43 \N \N 0 \N \N +237 2022-02-20 22:30:09.431491+00 43 \N 43 \N \N 0 \N \N +238 2022-02-20 22:30:09.918064+00 43 \N 43 \N \N 0 \N \N +239 2022-02-20 22:30:10.942942+00 43 \N 43 \N \N 0 \N \N +240 2022-02-20 22:30:11.721321+00 43 \N 43 \N \N 0 \N \N +241 2022-02-20 22:30:12.585334+00 43 \N 43 \N \N 0 \N \N +242 2022-02-20 22:30:13.364927+00 43 \N 43 \N \N 0 \N \N +243 2022-02-20 22:30:14.166516+00 43 \N 43 \N \N 0 \N \N +244 2022-02-20 22:30:14.945448+00 43 \N 43 \N \N 0 \N \N +245 2022-02-20 22:30:16.136244+00 43 \N 43 \N \N 0 \N \N +246 2022-02-20 22:30:16.655965+00 43 \N 43 \N \N 0 \N \N +247 2022-02-20 22:30:17.393961+00 43 \N 43 \N \N 0 \N \N +248 2022-02-20 22:30:17.899177+00 43 \N 43 \N \N 0 \N \N +249 2022-02-20 22:30:18.356078+00 43 \N 43 \N \N 0 \N \N +151 2018-08-19 22:28:41.219338+00 43 \N 43 \N \N 0 \N \N +152 2018-10-17 19:34:10.537627+00 43 \N 43 \N \N 0 \N \N +153 2018-10-17 19:34:11.840185+00 43 \N 43 \N \N 0 \N \N +154 2018-10-17 19:34:13.089358+00 43 \N 43 \N \N 0 \N \N +155 2018-10-17 19:34:15.04039+00 43 \N 43 \N \N 0 \N \N +156 2018-10-17 19:34:17.251416+00 43 \N 43 \N \N 0 \N \N +157 2018-10-17 19:34:19.268252+00 43 \N 43 \N \N 0 \N \N +158 2019-04-03 19:07:52.723312+00 43 \N 43 \N \N 0 \N \N +159 2019-04-03 19:07:53.774721+00 43 \N 43 \N \N 0 \N \N +160 2019-04-03 19:07:55.444201+00 43 \N 43 \N \N 0 \N \N +161 2019-04-03 19:07:57.201098+00 43 \N 43 \N \N 0 \N \N +162 2019-04-03 19:07:58.878388+00 43 \N 43 \N \N 0 \N \N +163 2019-06-05 21:33:52.895902+00 43 \N 43 \N \N 0 \N \N +164 2019-06-05 21:33:54.076159+00 43 \N 43 \N \N 0 \N \N +165 2019-08-06 16:35:16.339494+00 43 \N 43 \N \N 0 \N \N +166 2019-08-06 16:35:17.89881+00 43 \N 43 \N \N 0 \N \N +167 2019-08-06 16:35:19.280207+00 43 \N 43 \N \N 0 \N \N +168 2019-08-06 16:35:21.282284+00 43 \N 43 \N \N 0 \N \N +169 2019-08-06 16:35:22.148169+00 43 \N 43 \N \N 0 \N \N +170 2019-08-07 22:56:34.894513+00 43 \N 43 \N \N 0 \N \N +171 2020-01-22 20:12:16.928502+00 43 \N 43 \N \N 0 \N \N +250 2022-02-20 22:30:18.898424+00 43 \N 43 \N \N 0 \N \N +251 2022-02-20 22:30:19.658387+00 43 \N 43 \N \N 0 \N \N +252 2022-02-20 22:30:20.448762+00 43 \N 43 \N \N 0 \N \N +253 2022-02-20 22:30:21.24836+00 43 \N 43 \N \N 0 \N \N +254 2022-02-20 22:30:22.494428+00 43 \N 43 \N \N 0 \N \N +255 2022-02-20 22:30:23.849748+00 43 \N 43 \N \N 0 \N \N +256 2022-02-20 22:30:25.111643+00 43 \N 43 \N \N 0 \N \N +257 2022-02-20 22:30:25.934231+00 43 \N 43 \N \N 0 \N \N +258 2022-02-20 22:30:27.147328+00 43 \N 43 \N \N 0 \N \N +259 2022-02-20 22:30:28.434524+00 43 \N 43 \N \N 0 \N \N +260 2022-02-20 22:30:29.730087+00 43 \N 43 \N \N 0 \N \N +261 2022-02-20 22:30:30.247802+00 43 \N 43 \N \N 0 \N \N +262 2023-11-27 20:03:23.037334+00 43 \N \N \N \N 0 \N \N +263 2023-11-27 20:03:23.280106+00 43 \N \N \N \N 0 \N \N +264 2023-11-27 20:03:25.528796+00 43 \N \N \N \N 0 \N \N +265 2023-11-27 20:03:26.064043+00 43 \N \N \N \N 0 \N \N +266 2023-11-27 20:03:26.310659+00 43 \N \N \N \N 0 \N \N +267 2023-11-27 20:03:26.639512+00 43 \N \N \N \N 0 \N \N +268 2023-11-27 20:03:26.987059+00 43 \N \N \N \N 0 \N \N +269 2023-11-27 20:03:27.344859+00 43 \N \N \N \N 0 \N \N +270 2023-11-27 20:03:27.717939+00 43 \N \N \N \N 0 \N \N +271 2023-11-27 20:03:28.084225+00 43 \N \N \N \N 0 \N \N +272 2023-11-27 20:03:28.660415+00 43 \N \N \N \N 0 \N \N +273 2023-11-27 20:03:29.016723+00 43 \N \N \N \N 0 \N \N +274 2023-11-27 20:03:29.380791+00 43 \N \N \N \N 0 \N \N +275 2023-11-27 20:03:29.939076+00 43 \N \N \N \N 0 \N \N +276 2023-11-27 20:03:30.376096+00 43 \N \N \N \N 0 \N \N +277 2023-11-27 20:03:30.724593+00 43 \N \N \N \N 0 \N \N +278 2023-11-27 20:03:30.961056+00 43 \N \N \N \N 0 \N \N +279 2023-11-27 20:03:31.293072+00 43 \N \N \N \N 0 \N \N +280 2023-11-27 20:03:31.659983+00 43 \N \N \N \N 0 \N \N +281 2023-11-27 20:03:32.198153+00 43 \N \N \N \N 0 \N \N +282 2023-11-27 20:03:32.824777+00 43 \N \N \N \N 0 \N \N +283 2023-11-27 20:03:33.266396+00 43 \N \N \N \N 0 \N \N +284 2023-11-27 20:03:33.625333+00 43 \N \N \N \N 0 \N \N +285 2023-11-27 20:03:33.99317+00 43 \N \N \N \N 0 \N \N +286 2023-11-27 20:03:34.34264+00 43 \N \N \N \N 0 \N \N +287 2023-11-27 20:03:34.719983+00 43 \N \N \N \N 0 \N \N +288 2023-11-27 20:03:35.078359+00 43 \N \N \N \N 0 \N \N +289 2023-11-27 20:03:35.42112+00 43 \N \N \N \N 0 \N \N +290 2023-11-27 20:03:35.763136+00 43 \N \N \N \N 0 \N \N +291 2023-11-27 20:03:36.118337+00 43 \N \N \N \N 0 \N \N +292 2023-11-27 20:03:36.501723+00 43 \N \N \N \N 0 \N \N +293 2023-11-27 20:03:36.863227+00 43 \N \N \N \N 0 \N \N +294 2023-11-27 20:03:37.20604+00 43 \N \N \N \N 0 \N \N +295 2023-11-27 20:03:37.557307+00 43 \N \N \N \N 0 \N \N +296 2023-11-27 20:03:38.100099+00 43 \N \N \N \N 0 \N \N +297 2023-11-27 20:03:38.354032+00 43 \N \N \N \N 0 \N \N +298 2023-11-27 20:03:38.695609+00 43 \N \N \N \N 0 \N \N +299 2023-11-27 20:03:39.048646+00 43 \N \N \N \N 0 \N \N \. @@ -29875,8 +30136,8 @@ COPY phenome.is_public (is_public_id, population_id, is_public, owner_id) FROM s -- COPY phenome.locus (locus_id, locus_name, locus_symbol, original_symbol, gene_activity, locus_notes, obsolete, sp_person_id, create_date, modified_date, description, linkage_group, lg_arm, common_name_id, updated_by, locus, organism_id) FROM stdin; -2 test T1 \N testblablabla \N f 41 2014-01-06 21:25:00.611864+00 2014-01-06 21:47:23.803621+00 \N \N \N 1 41 test \N -3 test2 test2 \N test \N f 41 2014-01-06 22:08:44.539434+00 \N \N \N \N 1 41 test2 \N +2 test T1 \N testblablabla \N f 43 2014-01-06 21:25:00.611864+00 2014-01-06 21:47:23.803621+00 \N \N \N 1 43 test \N +3 test2 test2 \N test \N f 43 2014-01-06 22:08:44.539434+00 \N \N \N \N 1 43 test2 \N \. @@ -29926,9 +30187,9 @@ COPY phenome.locus_dbxref_evidence_history (locus_dbxref_evidence_history_id, lo -- COPY phenome.locus_history (locus_history_id, locus_id, locus_name, locus_symbol, original_symbol, gene_activity, locus_description, locus_notes, linkage_group, lg_arm, sp_person_id, updated_by, obsolete, create_date) FROM stdin; -1 2 test T1 \N \N \N \N \N \N 41 41 f 2014-01-06 21:31:44.678775+00 -2 2 test T1 \N \N \N \N \N \N 41 41 f 2014-01-06 21:35:55.408797+00 -3 2 test T1 \N \N \N \N \N \N 41 41 f 2014-01-06 21:47:23.801806+00 +1 2 test T1 \N \N \N \N \N \N 43 43 f 2014-01-06 21:31:44.678775+00 +2 2 test T1 \N \N \N \N \N \N 43 43 f 2014-01-06 21:35:55.408797+00 +3 2 test T1 \N \N \N \N \N \N 43 43 f 2014-01-06 21:47:23.801806+00 \. @@ -29953,7 +30214,7 @@ COPY phenome.locus_marker (locus_marker_id, locus_id, marker_id, obsolete, sp_pe -- COPY phenome.locus_owner (locus_owner_id, locus_id, sp_person_id, granted_by, obsolete, create_date, modified_date) FROM stdin; -1 3 41 \N f 2014-01-06 22:08:44.546768+00 \N +1 3 43 43 f 2014-01-06 22:08:44.546768+00 \N \. @@ -30109,6 +30370,14 @@ COPY phenome.stock_allele (stock_allele_id, stock_id, allele_id, metadata_id) FR \. +-- +-- Data for Name: stock_file; Type: TABLE DATA; Schema: phenome; Owner: postgres +-- + +COPY phenome.stock_file (stock_file_id, stock_id, file_id) FROM stdin; +\. + + -- -- Data for Name: stock_image; Type: TABLE DATA; Schema: phenome; Owner: postgres -- @@ -30122,7 +30391,7 @@ COPY phenome.stock_image (stock_image_id, stock_id, image_id, metadata_id, displ -- COPY phenome.stock_owner (stock_owner_id, stock_id, sp_person_id, metadata_id) FROM stdin; -152785 41784 41 190 +152785 41784 43 190 \. @@ -30646,6 +30915,7 @@ COPY public.cv (cv_id, name, definition) FROM stdin; 74 cxgn_rtb_cuts \N 75 sequence_metadata_types \N 76 sp_order_property \N +77 list_properties \N \. @@ -38275,6 +38545,7 @@ COPY public.cvterm (cvterm_id, cv_id, name, definition, dbxref_id, is_obsolete, 77229 59 tryptophan An alpha-amino acid that is alanine bearing an indol-3-yl substituent at position 3. 210818 0 0 77333 61 hours Number of hours. 212494 0 0 77334 61 cu mi Cubic mile. 212495 0 0 +77584 36 grafted_accession \N 212745 0 0 77230 59 fumaric acid A butenedioic acid in which the C=C double bond has E geometry. It is an intermediate metabolite in the citric acid cycle. 210830 0 0 77231 59 D-fructose 6-phosphate A ketohexose monophosphate that is D-fructose having a phospahte substituent at position 6. It is an important intermediate in the carbohydrate metabolism. 210856 0 0 77232 59 ribulose 5-phosphate A ribulose phosphate in which the phosphate group is attached at position 5. 210858 0 0 @@ -38607,7 +38878,6 @@ COPY public.cvterm (cvterm_id, cv_id, name, definition, dbxref_id, is_obsolete, 77580 46 current_count \N 212741 0 0 77582 37 female_plot_of \N 212743 0 0 77583 37 male_plot_of \N 212744 0 0 -77584 36 grafted_accession \N 212745 0 0 77585 35 grafting_experiment \N 212746 0 0 77586 47 crossing_trial \N 212747 0 0 77587 47 grafting_trial \N 212748 0 0 @@ -38654,7 +38924,6 @@ COPY public.cvterm (cvterm_id, cv_id, name, definition, dbxref_id, is_obsolete, 77627 51 number_of_seedlings_transplanted \N 212786 0 0 77628 47 Seed Multiplication \N 212787 0 0 77629 47 Screen House \N 212788 0 0 -77630 45 genotyping_trials \N 212789 0 0 77631 52 field_trial_from_field_trial \N 212790 0 0 77632 52 genotyping_trial_from_field_trial \N 212791 0 0 77633 52 crossing_trial_from_field_trial \N 212792 0 0 @@ -38711,6 +38980,7 @@ COPY public.cvterm (cvterm_id, cv_id, name, definition, dbxref_id, is_obsolete, 77684 66 observation_unit_polygon_blue_background_removed_threshold_imagery \N 212843 0 0 77685 66 observation_unit_polygon_green_background_removed_threshold_imagery \N 212844 0 0 78531 62 day 269 213690 0 0 +77916 66 calculate_phenotypes_orb_drone_imagery_vari \N 213075 0 0 77686 66 observation_unit_polygon_red_background_removed_threshold_imagery \N 212845 0 0 77687 66 observation_unit_polygon_red_edge_background_removed_threshold_imagery \N 212846 0 0 77688 66 observation_unit_polygon_nir_background_removed_threshold_imagery \N 212847 0 0 @@ -38941,7 +39211,6 @@ COPY public.cvterm (cvterm_id, cv_id, name, definition, dbxref_id, is_obsolete, 77912 66 calculate_phenotypes_sift_drone_imagery_ndvi \N 213071 0 0 77913 66 calculate_phenotypes_sift_drone_imagery_ndre \N 213072 0 0 77914 66 calculate_phenotypes_orb_drone_imagery \N 213073 0 0 -77916 66 calculate_phenotypes_orb_drone_imagery_vari \N 213075 0 0 77917 66 calculate_phenotypes_orb_drone_imagery_ndvi \N 213076 0 0 77918 66 calculate_phenotypes_orb_drone_imagery_ndre \N 213077 0 0 77919 66 calculate_phenotypes_surf_drone_imagery \N 213078 0 0 @@ -39009,6 +39278,7 @@ COPY public.cvterm (cvterm_id, cv_id, name, definition, dbxref_id, is_obsolete, 77981 66 calculate_fourier_transform_hpf20_nir_threshold_background_removed_stitched_drone_imagery_channel_1 \N 213140 0 0 78093 38 drone_run_band_rotate_angle \N 213252 0 0 78532 62 day 295 213691 0 0 +78094 38 drone_run_band_cropped_polygon \N 213253 0 0 77982 66 calculate_fourier_transform_hpf30_nir_threshold_background_removed_stitched_drone_imagery_channel_1 \N 213141 0 0 77983 66 calculate_fourier_transform_hpf40_nir_threshold_background_removed_stitched_drone_imagery_channel_1 \N 213142 0 0 77984 66 calculate_fourier_transform_hpf20_mir_threshold_background_removed_stitched_drone_imagery_channel_1 \N 213143 0 0 @@ -39121,7 +39391,6 @@ COPY public.cvterm (cvterm_id, cv_id, name, definition, dbxref_id, is_obsolete, 78090 38 drone_run_project_type \N 213249 0 0 78091 38 drone_run_camera_type \N 213250 0 0 78092 38 drone_run_band_project_type \N 213251 0 0 -78094 38 drone_run_band_cropped_polygon \N 213253 0 0 78095 38 drone_run_band_background_removed_tgi_threshold \N 213254 0 0 78096 38 drone_run_band_background_removed_vari_threshold \N 213255 0 0 78097 38 drone_run_band_background_removed_ndvi_threshold \N 213256 0 0 @@ -39261,6 +39530,7 @@ COPY public.cvterm (cvterm_id, cv_id, name, definition, dbxref_id, is_obsolete, 78232 69 FIR (50000-1000000nm) A single channel image capturing the far infrared spectrum between 50000 to 1000000 nm 213391 0 0 78533 62 day 54 213692 0 0 78534 62 day 347 213693 0 0 +78291 69 RGB Color Image Masked with VARI Vegetative Index Image 213450 0 0 78233 69 Fourier Transform High Pass Filter 30 Red Image From RGB Color Denoised Thresholded VARI Vegetative Index Masked Image 213392 0 0 78234 69 Thermal IR (9000-14000nm) A single channel image capturing the thermal infrared spectrum between 9000 to 14000 nm 213393 0 0 78235 69 ISOL \N 213394 0 0 @@ -39319,7 +39589,6 @@ COPY public.cvterm (cvterm_id, cv_id, name, definition, dbxref_id, is_obsolete, 78288 69 Fourier Transform High Pass Filter 30 Red Image from Denoised RGB Color Image 213447 0 0 78289 69 Fourier Transform High Pass Filter 20 NDRE Vegetative Index Image 213448 0 0 78290 69 Fourier Transform High Pass Filter 40 NDRE Vegetative Index Image 213449 0 0 -78291 69 RGB Color Image Masked with VARI Vegetative Index Image 213450 0 0 78292 69 Fourier Transform High Pass Filter 40 MIR Denoised Image 213451 0 0 78293 69 Fourier Transform High Pass Filter 30 Black and White Denoised Image 213452 0 0 78294 69 Red Image from Merged 3 Channels NRN Image Masked with NDVI Vegetative Index Image 213453 0 0 @@ -39380,6 +39649,8 @@ COPY public.cvterm (cvterm_id, cv_id, name, definition, dbxref_id, is_obsolete, 78349 69 Thresholded Red Denoised Original Image 213508 0 0 78350 69 Blue (450-520nm) A single channel image capturing the blue spectrum between 450 to 520 nm 213509 0 0 78351 69 Fourier Transform High Pass Filter 40 Green Image From RGB Color Denoised Thresholded TGI Vegetative Index Masked Image 213510 0 0 +78535 62 after harvest 213694 0 0 +78536 62 day 179 213695 0 0 78352 69 Fourier Transform High Pass Filter 30 Thresholded NDRE Vegetative Index Image 213511 0 0 78353 69 Green Image From RGB Denoised Original Image 213512 0 0 78354 69 Fourier Transform High Pass Filter 30 VARI Vegetative Index Image 213513 0 0 @@ -39558,8 +39829,6 @@ COPY public.cvterm (cvterm_id, cv_id, name, definition, dbxref_id, is_obsolete, 78526 62 day 196 213685 0 0 78527 62 day 90 213686 0 0 78528 62 day 189 213687 0 0 -78535 62 after harvest 213694 0 0 -78536 62 day 179 213695 0 0 78537 62 day 180 213696 0 0 78538 62 day 103 213697 0 0 78539 62 day 257 213698 0 0 @@ -39910,6 +40179,7 @@ COPY public.cvterm (cvterm_id, cv_id, name, definition, dbxref_id, is_obsolete, 78884 71 cycle 1 First cycle (or ratoon one). 214043 0 0 78885 71 cycle 3 tallest sucker Third cycle (ratoon three-tallest sucker). 214044 0 0 78886 71 cycle 5 Fifth cycle (or ratoon five). 214045 0 0 +79109 47 genotyping_project \N 214268 0 0 78887 71 cycle 1 main plant First cycle (ratoon one-main plant). 214046 0 0 78888 72 1st most distal hand rank Record the most distal hand rand 214047 0 0 78889 72 leaf rank 25 Twenty fifth standing leaf, counting the rank by starting with youngest completly unrolled leaf as 1 and moving downwards. 214048 0 0 @@ -39967,8 +40237,6 @@ COPY public.cvterm (cvterm_id, cv_id, name, definition, dbxref_id, is_obsolete, 78941 72 leaf rank 15 Fifteenth standing leaf, counting the rank by starting with youngest completly unrolled leaf as 1 and moving downwards. 214100 0 0 78942 72 hand rank 03 Record the third rank hand 214101 0 0 78943 72 leaf rank 24 Twenty fourth standing leaf, counting the rank by starting with youngest completly unrolled leaf as 1 and moving downwards. 214102 0 0 -79105 47 Sensory Trial \N 214264 0 0 -79107 46 facility_identifier \N 214266 0 0 78944 72 hand rank Record the rank (order) of a hand in the bunch, starting with the hand at the proximal end (closest to the pseudostem) of the bunch as 1 and continuing to the hand at the most distal end (closest to the male bud). 214103 0 0 78945 72 hand rank 12 Record the twelfth rank hand 214104 0 0 78946 72 hand rank 13 Record the thirteenth rank hand 214105 0 0 @@ -40053,8 +40321,8 @@ COPY public.cvterm (cvterm_id, cv_id, name, definition, dbxref_id, is_obsolete, 79025 70 Support vector machine (SVM) with linear kernel as implemented with the kernLab package in R \N 214184 0 0 79026 70 Multivariate linear mixed model genetic BLUPs using genetic relationship matrix and temporal Legendre polynomial random regression on days after planting computed using AIREMLf90 \N 214185 0 0 79027 70 Multivariate linear mixed model permanent environment BLUPs using genetic relationship matrix and temporal Legendre polynomial random regression on days after planting computed using AIREMLf90 \N 214186 0 0 -79106 38 soil_data_json \N 214265 0 0 79028 70 Multivariate linear mixed model permanent environment BLUPs using genetic relationship matrix and temporal Legendre polynomial random regression on growing degree days computed using AIREMLf90 \N 214187 0 0 +79110 38 folder_for_genotyping_projects \N 214269 0 0 79029 70 Multivariate linear mixed model genetic BLUPs using genetic relationship matrix and temporal Legendre polynomial random regression on growing degree days computed using AIREMLf90 \N 214188 0 0 79030 67 airemlf90_grm_random_regression_dap_blups \N 214189 0 0 79031 67 airemlf90_grm_random_regression_gdd_blups \N 214190 0 0 @@ -40084,12 +40352,12 @@ COPY public.cvterm (cvterm_id, cv_id, name, definition, dbxref_id, is_obsolete, 79055 70 Adjusted means from BLUEs using LMER R \N 214214 0 0 79056 70 Multivariate linear mixed model residual using genetic relationship matrix and temporal Legendre polynomial random regression on growing degree days computed using AIREMLf90 \N 214215 0 0 79057 70 Multivariate linear mixed model residual using genetic relationship matrix and temporal Legendre polynomial random regression on days after planting computed using AIREMLf90 \N 214216 0 0 -79058 67 high_dimensional_phenotype_nirs_protocol \N 214217 0 0 -79059 67 high_dimensional_phenotype_transcriptomics_protocol \N 214218 0 0 -79060 67 high_dimensional_phenotype_metabolomics_protocol \N 214219 0 0 -79061 56 high_dimensional_phenotype_protocol_properties \N 214220 0 0 -79062 35 sampling_layout \N 214221 0 0 -79063 52 sampling_trial_from_field_trial \N 214222 0 0 +79058 52 sampling_trial_from_field_trial \N 214217 0 0 +79059 67 high_dimensional_phenotype_nirs_protocol \N 214218 0 0 +79060 67 high_dimensional_phenotype_transcriptomics_protocol \N 214219 0 0 +79061 67 high_dimensional_phenotype_metabolomics_protocol \N 214220 0 0 +79062 56 high_dimensional_phenotype_protocol_properties \N 214221 0 0 +79063 35 sampling_layout \N 214222 0 0 79064 38 sampling_facility \N 214223 0 0 79065 38 sampling_trial_sample_type \N 214224 0 0 79066 46 released_variety_name \N 214225 0 0 @@ -40113,8 +40381,8 @@ COPY public.cvterm (cvterm_id, cv_id, name, definition, dbxref_id, is_obsolete, 79084 76 order_batch_json \N 214243 0 0 79085 76 order_progress_json \N 214244 0 0 79086 56 analysis_model_properties_multi_trial \N 214245 0 0 -79087 67 drone_imagery_analytics_env_simulation_protocol \N 214246 0 0 -79088 35 analytics_protocol_experiment \N 214247 0 0 +79087 35 analytics_protocol_experiment \N 214246 0 0 +79088 67 drone_imagery_analytics_env_simulation_protocol \N 214247 0 0 79089 56 analytics_protocol_properties \N 214248 0 0 79090 56 analytics_protocol_result_summary \N 214249 0 0 79091 38 drone_run_opendronemap_process_running \N 214250 0 0 @@ -40122,30 +40390,53 @@ COPY public.cvterm (cvterm_id, cv_id, name, definition, dbxref_id, is_obsolete, 79093 38 drone_run_camera_rig_description \N 214252 0 0 79094 38 drone_run_geoparam_coordinates \N 214253 0 0 79095 38 drone_run_geoparam_coordinates_type \N 214254 0 0 -79096 42 pcr_marker_genotyping \N 214255 0 0 -79097 67 pcr_marker_protocol \N 214256 0 0 -79098 56 pcr_marker_details \N 214257 0 0 +79096 56 pcr_marker_details \N 214255 0 0 +79097 42 pcr_marker_genotyping \N 214256 0 0 +79098 67 pcr_marker_protocol \N 214257 0 0 79099 46 seedlot_maintenance_json \N 214258 0 0 79100 65 phenotype_additional_info \N 214259 0 0 79101 38 project_entry_number_map \N 214260 0 0 79102 46 family_type \N 214261 0 0 79103 38 file_metadata_json \N 214262 0 0 79104 38 trial_status_json \N 214263 0 0 +79105 47 Sensory Trial \N 214264 0 0 +79106 38 soil_data_json \N 214265 0 0 +79107 46 facility_identifier \N 214266 0 0 79108 52 genotyping_project_and_plate_relationship \N 214267 0 0 -79109 47 genotyping_project \N 214268 0 0 -79110 38 target_numbers_json \N 214269 0 0 -79111 46 SelectionMarker \N 214270 0 0 -79112 46 CloningOrganism \N 214271 0 0 -79113 46 CassetteName \N 214272 0 0 -79114 46 InherentMarker \N 214273 0 0 -79115 46 Strain \N 214274 0 0 -79116 46 Backbone \N 214275 0 0 -79117 46 Gene \N 214276 0 0 -79118 46 Promotors \N 214277 0 0 -79119 46 Terminators \N 214278 0 0 -79120 46 VectorType \N 214279 0 0 -79121 45 list_additional_info \N 214280 0 0 -79122 65 phenotype_external_references \N 214281 0 0 +79111 38 genotyping_project_type \N 214270 0 0 +79112 38 target_numbers_json \N 214271 0 0 +79113 46 SelectionMarker \N 214272 0 0 +79114 46 CloningOrganism \N 214273 0 0 +79115 46 CassetteName \N 214274 0 0 +79116 46 InherentMarker \N 214275 0 0 +79117 46 Strain \N 214276 0 0 +79118 46 Backbone \N 214277 0 0 +79119 46 Gene \N 214278 0 0 +79120 46 Promotors \N 214279 0 0 +79121 46 Terminators \N 214280 0 0 +79122 46 VectorType \N 214281 0 0 +79123 45 list_additional_info \N 214282 0 0 +79124 65 phenotype_external_references \N 214283 0 0 +79125 42 vcf_phg_genotyping \N 214284 0 0 +79126 42 phg genotyping \N 214285 0 0 +79127 46 PlantAntibioticResistantMarker \N 214286 0 0 +79128 46 BacterialResistantMarker \N 214287 0 0 +79129 38 project_transplanting_date \N 214288 0 0 +79130 48 trait_method_name \N 214289 0 0 +79131 48 trait_method_description \N 214290 0 0 +79132 48 trait_method_class \N 214291 0 0 +79133 48 trait_method_formula \N 214292 0 0 +79134 48 trait_decimal_places \N 214293 0 0 +79135 48 trait_categories_label \N 214294 0 0 +79136 48 trait_categories_value \N 214295 0 0 +79137 48 cvterm_additional_info \N 214296 0 0 +79138 48 trait_entity \N 214297 0 0 +79139 48 trait_attribute \N 214298 0 0 +79140 65 phenotype_stderr \N 214299 0 0 +77630 45 genotyping_plates \N 212789 0 0 +79141 45 crossing_experiments \N 214300 0 0 +79142 45 genotyping_projects \N 214301 0 0 +79143 77 list_additional_info \N 214302 0 0 \. @@ -131178,12 +131469,12 @@ COPY public.dbxref (dbxref_id, db_id, accession, version, description) FROM stdi 214214 308 0000036 \N 214215 308 0000027 \N 214216 308 0000026 \N -214217 2 autocreated:high_dimensional_phenotype_nirs_protocol \N -214218 2 autocreated:high_dimensional_phenotype_transcriptomics_protocol \N -214219 2 autocreated:high_dimensional_phenotype_metabolomics_protocol \N -214220 2 autocreated:high_dimensional_phenotype_protocol_properties \N -214221 2 autocreated:sampling_layout \N -214222 2 autocreated:sampling_trial_from_field_trial \N +214217 2 autocreated:sampling_trial_from_field_trial \N +214218 2 autocreated:high_dimensional_phenotype_nirs_protocol \N +214219 2 autocreated:high_dimensional_phenotype_transcriptomics_protocol \N +214220 2 autocreated:high_dimensional_phenotype_metabolomics_protocol \N +214221 2 autocreated:high_dimensional_phenotype_protocol_properties \N +214222 2 autocreated:sampling_layout \N 214223 2 autocreated:sampling_facility \N 214224 2 autocreated:sampling_trial_sample_type \N 214225 2 autocreated:released_variety_name \N @@ -131207,8 +131498,8 @@ COPY public.dbxref (dbxref_id, db_id, accession, version, description) FROM stdi 214243 2 autocreated:order_batch_json \N 214244 2 autocreated:order_progress_json \N 214245 2 autocreated:analysis_model_properties_multi_trial \N -214246 2 autocreated:drone_imagery_analytics_env_simulation_protocol \N -214247 2 autocreated:analytics_protocol_experiment \N +214246 2 autocreated:analytics_protocol_experiment \N +214247 2 autocreated:drone_imagery_analytics_env_simulation_protocol \N 214248 2 autocreated:analytics_protocol_properties \N 214249 2 autocreated:analytics_protocol_result_summary \N 214250 2 autocreated:drone_run_opendronemap_process_running \N @@ -131216,9 +131507,9 @@ COPY public.dbxref (dbxref_id, db_id, accession, version, description) FROM stdi 214252 2 autocreated:drone_run_camera_rig_description \N 214253 2 autocreated:drone_run_geoparam_coordinates \N 214254 2 autocreated:drone_run_geoparam_coordinates_type \N -214255 2 autocreated:pcr_marker_genotyping \N -214256 2 autocreated:pcr_marker_protocol \N -214257 2 autocreated:pcr_marker_details \N +214255 2 autocreated:pcr_marker_details \N +214256 2 autocreated:pcr_marker_genotyping \N +214257 2 autocreated:pcr_marker_protocol \N 214258 2 autocreated:seedlot_maintenance_json \N 214259 2 autocreated:phenotype_additional_info \N 214260 2 autocreated:project_entry_number_map \N @@ -131230,19 +131521,40 @@ COPY public.dbxref (dbxref_id, db_id, accession, version, description) FROM stdi 214266 2 autocreated:facility_identifier \N 214267 2 autocreated:genotyping_project_and_plate_relationship \N 214268 2 autocreated:genotyping_project \N -214269 2 autocreated:target_numbers_json \N -214270 2 autocreated:SelectionMarker \N -214271 2 autocreated:CloningOrganism \N -214272 2 autocreated:CassetteName \N -214273 2 autocreated:InherentMarker \N -214274 2 autocreated:Strain \N -214275 2 autocreated:Backbone \N -214276 2 autocreated:Gene \N -214277 2 autocreated:Promotors \N -214278 2 autocreated:Terminators \N -214279 2 autocreated:VectorType \N -214280 2 autocreated:list_additional_info \N -214281 2 autocreated:phenotype_external_references \N +214269 2 autocreated:folder_for_genotyping_projects \N +214270 2 autocreated:genotyping_project_type \N +214271 2 autocreated:target_numbers_json \N +214272 2 autocreated:SelectionMarker \N +214273 2 autocreated:CloningOrganism \N +214274 2 autocreated:CassetteName \N +214275 2 autocreated:InherentMarker \N +214276 2 autocreated:Strain \N +214277 2 autocreated:Backbone \N +214278 2 autocreated:Gene \N +214279 2 autocreated:Promotors \N +214280 2 autocreated:Terminators \N +214281 2 autocreated:VectorType \N +214282 2 autocreated:list_additional_info \N +214283 2 autocreated:phenotype_external_references \N +214284 2 autocreated:vcf_phg_genotyping \N +214285 2 autocreated:phg genotyping \N +214286 2 autocreated:PlantAntibioticResistantMarker \N +214287 2 autocreated:BacterialResistantMarker \N +214288 2 autocreated:project_transplanting_date \N +214289 2 autocreated:trait_method_name \N +214290 2 autocreated:trait_method_description \N +214291 2 autocreated:trait_method_class \N +214292 2 autocreated:trait_method_formula \N +214293 2 autocreated:trait_decimal_places \N +214294 2 autocreated:trait_categories_label \N +214295 2 autocreated:trait_categories_value \N +214296 2 autocreated:cvterm_additional_info \N +214297 2 autocreated:trait_entity \N +214298 2 autocreated:trait_attribute \N +214299 2 autocreated:phenotype_stderr \N +214300 2 autocreated:crossing_experiments \N +214301 2 autocreated:genotyping_projects \N +214302 273 autocreated:list_additional_info \N \. @@ -131670,6 +131982,14 @@ COPY public.nd_geolocation (nd_geolocation_id, description, latitude, longitude, \. +-- +-- Data for Name: nd_geolocation_dbxref; Type: TABLE DATA; Schema: public; Owner: postgres +-- + +COPY public.nd_geolocation_dbxref (nd_geolocation_dbxref_id, nd_geolocation_id, dbxref_id, is_current) FROM stdin; +\. + + -- -- Data for Name: nd_geolocationprop; Type: TABLE DATA; Schema: public; Owner: postgres -- @@ -131690,7 +132010,7 @@ COPY public.nd_geolocationprop (nd_geolocationprop_id, nd_geolocation_id, type_i -- COPY public.nd_protocol (nd_protocol_id, name, type_id, create_date, description) FROM stdin; -2 NIRS Protocol 79058 2023-03-16 23:54:16.693608 Default NIRS protocol +2 NIRS Protocol 79059 2022-02-20 22:29:54.829706 Default NIRS protocol \. @@ -131707,7 +132027,7 @@ COPY public.nd_protocol_reagent (nd_protocol_reagent_id, nd_protocol_id, reagent -- COPY public.nd_protocolprop (nd_protocolprop_id, nd_protocol_id, type_id, value, rank) FROM stdin; -1 2 79061 {"device_type": "SCIO"} 0 +1 2 79062 {"device_type": "SCIO"} 0 \. @@ -241304,6 +241624,14 @@ COPY public.project_contact (project_contact_id, project_id, contact_id) FROM st \. +-- +-- Data for Name: project_dbxref; Type: TABLE DATA; Schema: public; Owner: postgres +-- + +COPY public.project_dbxref (project_dbxref_id, project_id, dbxref_id, is_current) FROM stdin; +\. + + -- -- Data for Name: project_pub; Type: TABLE DATA; Schema: public; Owner: postgres -- @@ -243694,15 +244022,16 @@ COPY sgn_people.forum_topic (forum_topic_id, person_id, topic_name, parent_topic -- Data for Name: list; Type: TABLE DATA; Schema: sgn_people; Owner: postgres -- -COPY sgn_people.list (list_id, is_hotlist, sent_by, name, description, owner, type_id, is_public, "timestamp", modify_timestamp) FROM stdin; -3 f \N test_stocks \N 41 76451 f \N \N -5 f \N accessions_for_solgs_tests \N 41 76451 f \N \N -6 f \N accessions_for_trial2 \N 41 76451 f \N \N -7 f \N selection_acc \N 41 \N f \N \N -809 f \N janedoe_1_public \N 41 \N t \N \N -811 f \N janedoe_1_private \N 41 \N f \N \N -12 f \N desynonymize_test_list \N 41 76451 f \N \N -13 f \N traits \N 41 76455 f \N \N +COPY sgn_people.list (list_id, is_hotlist, sent_by, name, description, owner, type_id, is_public, create_date, modified_date) FROM stdin; +14 f \N test_accession_list Adds the first accession to database 43 76451 f 2023-11-27 20:03:35.771926 \N +\. + + +-- +-- Data for Name: list_dbxref; Type: TABLE DATA; Schema: sgn_people; Owner: postgres +-- + +COPY sgn_people.list_dbxref (list_dbxref_id, list_id, dbxref_id, is_current) FROM stdin; \. @@ -243711,732 +244040,15 @@ COPY sgn_people.list (list_id, is_hotlist, sent_by, name, description, owner, ty -- COPY sgn_people.list_item (list_item_id, content, list_id) FROM stdin; -11 test_accession4 3 -12 test_accession5 3 -16 test_accession1 3 -17 test_accession2 3 -18 test_accession3 3 -24 UG120001 5 -25 UG120002 5 -26 UG120003 5 -27 UG120004 5 -28 UG120005 5 -29 UG120006 5 -30 UG120007 5 -31 UG120008 5 -32 UG120009 5 -33 UG120010 5 -34 UG120011 5 -35 UG120012 5 -36 UG120013 5 -37 UG120014 5 -38 UG120015 5 -39 UG120016 5 -40 UG120017 5 -41 UG120018 5 -42 UG120019 5 -43 UG120020 5 -44 UG120021 5 -45 UG120022 5 -46 UG120023 5 -47 UG120024 5 -48 UG120025 5 -49 UG120026 5 -50 UG120027 5 -51 UG120028 5 -52 UG120029 5 -53 UG120030 5 -54 UG120031 5 -55 UG120032 5 -56 UG120033 5 -57 UG120034 5 -58 UG120035 5 -59 UG120036 5 -60 UG120037 5 -61 UG120038 5 -62 UG120039 5 -63 UG120040 5 -64 UG120042 5 -65 UG120043 5 -66 UG120044 5 -67 UG120046 5 -68 UG120048 5 -69 UG120049 5 -70 UG120051 5 -71 UG120053 5 -72 UG120054 5 -73 UG120055 5 -74 UG120057 5 -75 UG120058 5 -76 UG120059 5 -77 UG120060 5 -78 UG120061 5 -79 UG120062 5 -80 UG120063 5 -81 UG120064 5 -82 UG120065 5 -83 UG120066 5 -84 UG120067 5 -85 UG120069 5 -86 UG120070 5 -87 UG120071 5 -88 UG120072 5 -89 UG120073 5 -90 UG120074 5 -91 UG120076 5 -92 UG120077 5 -93 UG120078 5 -94 UG120079 5 -95 UG120080 5 -96 UG120081 5 -97 UG120082 5 -98 UG120084 5 -99 UG120085 5 -100 UG120086 5 -101 UG120087 5 -102 UG120088 5 -103 UG120089 5 -104 UG120090 5 -105 UG120091 5 -106 UG120092 5 -107 UG120093 5 -108 UG120095 5 -109 UG120096 5 -110 UG120097 5 -111 UG120098 5 -112 UG120099 5 -113 UG120100 5 -114 UG120101 5 -115 UG120102 5 -116 UG120103 5 -117 UG120105 5 -118 UG120106 5 -119 UG120107 5 -120 UG120108 5 -121 UG120109 5 -122 UG120111 5 -123 UG120113 5 -124 UG120115 5 -125 UG120116 5 -126 UG120117 5 -127 UG120120 5 -128 UG120121 5 -129 UG120122 5 -130 UG120124 5 -131 UG120126 5 -132 UG120127 5 -133 UG120128 5 -134 UG120132 5 -135 UG120133 5 -136 UG120134 5 -137 UG120135 5 -138 UG120137 5 -139 UG120138 5 -140 UG120139 5 -141 UG120141 5 -142 UG120143 5 -143 UG120144 5 -144 UG120145 5 -145 UG120146 5 -146 UG120148 5 -147 UG120149 5 -148 UG120150 5 -149 UG120151 5 -150 UG120152 5 -151 UG120153 5 -152 UG120154 5 -153 UG120156 5 -154 UG120157 5 -155 UG120158 5 -156 UG120160 5 -157 UG120161 5 -158 UG120162 5 -159 UG120163 5 -160 UG120164 5 -161 UG120165 5 -162 UG120166 5 -163 UG120167 5 -164 UG120169 5 -165 UG120170 5 -166 UG120171 5 -167 UG120172 5 -168 UG120173 5 -169 UG120174 5 -170 UG120175 5 -171 UG120176 5 -172 UG120177 5 -173 UG120178 5 -174 UG120179 5 -175 UG120181 5 -176 UG120182 5 -177 UG120183 5 -178 UG120184 5 -179 UG120185 5 -180 UG120186 5 -181 UG120187 5 -182 UG120188 5 -183 UG120189 5 -184 UG120190 5 -185 UG120191 5 -186 UG120192 5 -187 UG120193 5 -188 UG120194 5 -189 UG120195 5 -190 UG120196 5 -191 UG120197 5 -192 UG120198 5 -193 UG120199 5 -194 UG120201 5 -195 UG120202 5 -196 UG120205 5 -197 UG120206 5 -198 UG120207 5 -199 UG120208 5 -200 UG120210 5 -201 UG120211 5 -202 UG120213 5 -203 UG120215 5 -204 UG120216 5 -205 UG120218 5 -206 UG120219 5 -207 UG120220 5 -208 UG120221 5 -209 UG120222 5 -210 UG120223 5 -211 UG120224 5 -212 UG120225 5 -213 UG120226 5 -214 UG120227 5 -215 UG120228 5 -216 UG120229 5 -217 UG120230 5 -218 UG120231 5 -219 UG120232 5 -220 UG120234 5 -221 UG120235 5 -222 UG120238 5 -223 UG120239 5 -224 UG120240 5 -225 UG120242 5 -226 UG120243 5 -227 UG120244 5 -228 UG120245 5 -229 UG120246 5 -230 UG120247 5 -231 UG120248 5 -232 UG120250 5 -233 UG120251 5 -234 UG120253 5 -235 UG120254 5 -236 UG120255 5 -237 UG120256 5 -238 UG120257 5 -239 UG120258 5 -240 UG120260 5 -241 UG120261 5 -242 UG120262 5 -243 UG120264 5 -244 UG120265 5 -245 UG120266 5 -246 UG120267 5 -247 UG120268 5 -248 UG120269 5 -249 UG120270 5 -250 UG120272 5 -251 UG120273 5 -252 UG120274 5 -253 UG120276 5 -254 UG120277 5 -255 UG120278 5 -256 UG120279 5 -257 UG120280 5 -258 UG120283 5 -259 UG120284 5 -260 UG120286 5 -261 UG120287 5 -262 UG120288 5 -263 UG120289 5 -264 UG120290 5 -265 UG120291 5 -266 UG120292 5 -267 UG120293 5 -268 UG120296 5 -269 UG120297 5 -270 UG120298 5 -271 UG120299 5 -272 UG120300 5 -273 UG120301 5 -274 UG120303 5 -275 UG120305 5 -276 UG120306 5 -277 UG120307 5 -278 UG130001 5 -279 UG130002 5 -280 UG130003 5 -281 UG130004 5 -282 UG130005 5 -283 UG130006 5 -284 UG130007 5 -285 UG130008 5 -286 UG130009 5 -287 UG130010 5 -288 UG130011 5 -289 UG130012 5 -290 UG130013 5 -291 UG130017 5 -292 UG130018 5 -293 UG130019 5 -294 UG130020 5 -295 UG130021 5 -296 UG130022 5 -297 UG130023 5 -298 UG130024 5 -299 UG130025 5 -300 UG130026 5 -301 UG130028 5 -302 UG130029 5 -303 UG130030 5 -304 UG130031 5 -305 UG130032 5 -306 UG130033 5 -307 UG130034 5 -308 UG130035 5 -309 UG130036 5 -310 UG130037 5 -311 UG130038 5 -312 UG130040 5 -313 UG130042 5 -314 UG130043 5 -315 UG130044 5 -316 UG130045 5 -317 UG130046 5 -318 UG130047 5 -319 UG130049 5 -320 UG130050 5 -321 UG130051 5 -322 UG130052 5 -323 UG130056 5 -324 UG130057 5 -325 UG130058 5 -326 UG130059 5 -327 UG130060 5 -328 UG130061 5 -329 UG130062 5 -330 UG130063 5 -331 UG130065 5 -332 UG130066 5 -333 UG130067 5 -334 UG130068 5 -335 UG130069 5 -336 UG130070 5 -337 UG130071 5 -338 UG130073 5 -339 UG130074 5 -340 UG130076 5 -341 UG130077 5 -342 UG130078 5 -343 UG130080 5 -344 UG130081 5 -345 UG130082 5 -346 UG130083 5 -347 UG130085 5 -348 UG130086 5 -349 UG130087 5 -350 UG130088 5 -351 UG130089 5 -352 UG130090 5 -353 UG130091 5 -354 UG130092 5 -355 UG130093 5 -356 UG130094 5 -357 UG130095 5 -358 UG130096 5 -359 UG130097 5 -360 UG130098 5 -361 UG130099 5 -362 UG130100 5 -363 UG130101 5 -364 UG130102 5 -365 UG130103 5 -366 UG130104 5 -367 UG130105 5 -368 UG130106 5 -369 UG130107 5 -370 UG130108 5 -371 UG130109 5 -372 UG130110 5 -373 UG130111 5 -374 UG130113 5 -375 UG130114 5 -376 UG130116 5 -377 UG130117 5 -378 UG130118 5 -379 UG130119 5 -380 UG130120 5 -381 UG130121 5 -382 UG130122 5 -383 UG130123 5 -384 UG130124 5 -385 UG130125 5 -386 UG130126 5 -387 UG130128 5 -388 UG130131 5 -389 UG130133 5 -390 UG130135 5 -391 UG130136 5 -392 UG130137 5 -393 UG130139 5 -394 UG130140 5 -395 UG130143 5 -396 UG130144 5 -397 UG130145 5 -398 UG120001 6 -399 UG120002 6 -400 UG120003 6 -401 UG120004 6 -402 UG120005 6 -403 UG120006 6 -404 UG120007 6 -405 UG120008 6 -406 UG120009 6 -407 UG120010 6 -408 UG120011 6 -409 UG120012 6 -410 UG120013 6 -411 UG120014 6 -412 UG120015 6 -413 UG120016 6 -414 UG120017 6 -415 UG120018 6 -416 UG120019 6 -417 UG120020 6 -418 UG120021 6 -419 UG120022 6 -420 UG120023 6 -421 UG120024 6 -422 UG120025 6 -423 UG120026 6 -424 UG120027 6 -425 UG120028 6 -426 UG120029 6 -427 UG120030 6 -428 UG120031 6 -429 UG120032 6 -430 UG120033 6 -431 UG120034 6 -432 UG120035 6 -433 UG120036 6 -434 UG120037 6 -435 UG120038 6 -436 UG120039 6 -437 UG120040 6 -438 UG120041 6 -439 UG120042 6 -440 UG120043 6 -441 UG120044 6 -442 UG120045 6 -443 UG120046 6 -444 UG120047 6 -445 UG120048 6 -446 UG120049 6 -447 UG120050 6 -448 UG120051 6 -449 UG120052 6 -450 UG120053 6 -451 UG120054 6 -452 UG120055 6 -453 UG120056 6 -454 UG120057 6 -455 UG120058 6 -456 UG120059 6 -457 UG120060 6 -458 UG120061 6 -459 UG120062 6 -460 UG120063 6 -461 UG120064 6 -462 UG120065 6 -463 UG120066 6 -464 UG120067 6 -465 UG120068 6 -466 UG120069 6 -467 UG120070 6 -468 UG120071 6 -469 UG120072 6 -470 UG120073 6 -471 UG120074 6 -472 UG120075 6 -473 UG120076 6 -474 UG120077 6 -475 UG120078 6 -476 UG120079 6 -477 UG120080 6 -478 UG120081 6 -479 UG120082 6 -480 UG120083 6 -481 UG120084 6 -482 UG120085 6 -483 UG120086 6 -484 UG120087 6 -485 UG120088 6 -486 UG120089 6 -487 UG120090 6 -488 UG120091 6 -489 UG120092 6 -490 UG120093 6 -491 UG120094 6 -492 UG120095 6 -493 UG120096 6 -494 UG120097 6 -495 UG120098 6 -496 UG120099 6 -497 UG120100 6 -498 UG120101 6 -499 UG120102 6 -500 UG120103 6 -501 UG120104 6 -502 UG120105 6 -503 UG120106 6 -504 UG120107 6 -505 UG120108 6 -506 UG120109 6 -507 UG120110 6 -508 UG120111 6 -509 UG120112 6 -510 UG120113 6 -511 UG120114 6 -512 UG120115 6 -513 UG120116 6 -514 UG120117 6 -515 UG120118 6 -516 UG120119 6 -517 UG120120 6 -518 UG120121 6 -519 UG120122 6 -520 UG120123 6 -521 UG120124 6 -522 UG120125 6 -523 UG120126 6 -524 UG120127 6 -525 UG120128 6 -526 UG120129 6 -527 UG120130 6 -528 UG120131 6 -529 UG120132 6 -530 UG120133 6 -531 UG120134 6 -532 UG120135 6 -533 UG120136 6 -534 UG120137 6 -535 UG120138 6 -536 UG120139 6 -537 UG120140 6 -538 UG120141 6 -539 UG120142 6 -540 UG120143 6 -541 UG120144 6 -542 UG120145 6 -543 UG120146 6 -544 UG120147 6 -545 UG120148 6 -546 UG120149 6 -547 UG120150 6 -548 UG120151 6 -549 UG120152 6 -550 UG120153 6 -551 UG120154 6 -552 UG120155 6 -553 UG120156 6 -554 UG120157 6 -555 UG120158 6 -556 UG120159 6 -557 UG120160 6 -558 UG120161 6 -559 UG120162 6 -560 UG120163 6 -561 UG120164 6 -562 UG120165 6 -563 UG120166 6 -564 UG120167 6 -565 UG120168 6 -566 UG120169 6 -567 UG120170 6 -568 UG120171 6 -569 UG120172 6 -570 UG120173 6 -571 UG120174 6 -572 UG120175 6 -573 UG120176 6 -574 UG120177 6 -575 UG120178 6 -576 UG120179 6 -577 UG120180 6 -578 UG120181 6 -579 UG120182 6 -580 UG120183 6 -581 UG120184 6 -582 UG120185 6 -583 UG120186 6 -584 UG120187 6 -585 UG120188 6 -586 UG120189 6 -587 UG120190 6 -588 UG120191 6 -589 UG120192 6 -590 UG120193 6 -591 UG120194 6 -592 UG120195 6 -593 UG120196 6 -594 UG120197 6 -595 UG120198 6 -596 UG120199 6 -597 UG120200 6 -598 UG120201 6 -599 UG120202 6 -600 UG120203 6 -601 UG120204 6 -602 UG120205 6 -603 UG120206 6 -604 UG120207 6 -605 UG120208 6 -606 UG120209 6 -607 UG120210 6 -608 UG120211 6 -609 UG120212 6 -610 UG120213 6 -611 UG120214 6 -612 UG120215 6 -613 UG120216 6 -614 UG120217 6 -615 UG120218 6 -616 UG120219 6 -617 UG120220 6 -618 UG120221 6 -619 UG120222 6 -620 UG120223 6 -621 UG120224 6 -622 UG120225 6 -623 UG120226 6 -624 UG120227 6 -625 UG120228 6 -626 UG120229 6 -627 UG120230 6 -628 UG120231 6 -629 UG120232 6 -630 UG120233 6 -631 UG120234 6 -632 UG120235 6 -633 UG120236 6 -634 UG120237 6 -635 UG120238 6 -636 UG120239 6 -637 UG120240 6 -638 UG120241 6 -639 UG120242 6 -640 UG120243 6 -641 UG120244 6 -642 UG120245 6 -643 UG120246 6 -644 UG120247 6 -645 UG120248 6 -646 UG120249 6 -647 UG120250 6 -648 UG120251 6 -649 UG120252 6 -650 UG120253 6 -651 UG120254 6 -652 UG120255 6 -653 UG120256 6 -654 UG120257 6 -655 UG120258 6 -656 UG120259 6 -657 UG120260 6 -658 UG120261 6 -659 UG120262 6 -660 UG120263 6 -661 UG120264 6 -662 UG120265 6 -663 UG120266 6 -664 UG120267 6 -665 UG120268 6 -666 UG120269 6 -667 UG120270 6 -668 UG120271 6 -669 UG120272 6 -670 UG120273 6 -671 UG120274 6 -672 UG120275 6 -673 UG120276 6 -674 UG120277 6 -675 UG120278 6 -676 UG120279 6 -677 UG120280 6 -678 UG120281 6 -679 UG120282 6 -680 UG120283 6 -681 UG120284 6 -682 UG120285 6 -683 UG120286 6 -684 UG120287 6 -685 UG120288 6 -686 UG120289 6 -687 UG120290 6 -688 UG120291 6 -689 UG120292 6 -690 UG120293 6 -691 UG120294 6 -692 UG120295 6 -693 UG120296 6 -694 UG120297 6 -695 UG120298 6 -696 UG120299 6 -697 UG120300 6 -698 UG120301 6 -699 UG120303 6 -700 UG120304 6 -701 UG120305 6 -702 UG120306 6 -703 UG120307 6 -704 UG120308 6 -705 XG120113 7 -706 XG120073 7 -707 XG120123 7 -708 XG120131 7 -709 XG120261 7 -710 XG120068 7 -711 XG120251 7 -712 XG120198 7 -713 XG120021 7 -714 XG120221 7 -715 XG120273 7 -716 XG120015 7 -717 XG120030 7 -718 XG120171 7 -719 XG120287 7 -720 XG120155 7 -721 XG120061 7 -722 XG120104 7 -723 XG120071 7 -724 XG120083 7 -802 item1 809 -803 item2 809 -806 item11 811 -807 item12 811 -1430 new_test_crossP005 12 -1431 new_test_crossP009 12 -1432 test_accession1 12 -1433 test_accession2 12 -1434 test_accession2_synonym1 12 -1435 test_accession3_synonym1 12 -1436 CO_334:0000008 13 -1437 CO_334:0000009 13 -1438 CO_334:0000010 13 -1439 CO_334:0000011 13 -1440 CO_334:0000012 13 -1441 CO_334:0000013 13 -1442 CO_334:0000014 13 -1443 CO_334:0000015 13 -1444 CO_334:0000016 13 -1445 CO_334:0000017 13 +1446 test_accession 14 +\. + + +-- +-- Data for Name: listprop; Type: TABLE DATA; Schema: sgn_people; Owner: postgres +-- + +COPY sgn_people.listprop (listprop_id, list_id, type_id, value, rank) FROM stdin; \. @@ -244533,7 +244145,7 @@ COPY sgn_people.sp_papers (sp_paper_id, person_id, title, author_list, journal, -- COPY sgn_people.sp_person (sp_person_id, censor, salutation, last_name, first_name, organization, address, country, phone_number, fax, contact_email, webpage, research_keywords, user_format, research_interests, formatted_interests, contact_update, research_update, sp_login_id, username, private_email, pending_email, password, confirm_code, disabled, user_type, cookie_string, last_access_time, user_prefs, developer_settings) FROM stdin; -41 0 \N admin admin \N \N \N \N \N \N \N \N \N \N \N \N \N \N admin \N \N $2a$06$qgEw8U6C05g6zWv7djWDyekjZRlD6VOEsSsogI4YRvNYoKHBdTSjC \N \N user yxuijzwyblqemqxvfmeklhvumzpvonlxqhcxmsttjpiqwsgzhllknaewreyytzsibiacnyq 2020-08-21 02:50:52.101952 \N \N +43 0 \N admin admin BTI \N \N \N \N \N \N \N auto \N \N \N 2020-04-09 \N admin \N admintest@admin.test $2a$06$7ktfwu1jfuVbVOpAoM/IyuI.NWp1eyglukY1thDJNldayA3RUjWna 3WZZIlbaM1d29TnJ \N user \N 2020-04-09 10:43:13.62851 \N \N \. @@ -244550,9 +244162,9 @@ COPY sgn_people.sp_person_organisms (sp_person_organisms_id, sp_person_id, organ -- COPY sgn_people.sp_person_roles (sp_person_role_id, sp_person_id, sp_role_id) FROM stdin; -72 41 1 -75 41 6 -79 41 7 +76 43 4 +77 43 1 +78 43 7 \. @@ -244609,7 +244221,7 @@ COPY sgn_people.sp_roles (sp_role_id, name) FROM stdin; -- COPY sgn_people.sp_token (sp_token_id, cookie_string, last_access_time, source_ip_address, sp_person_id) FROM stdin; -1 yylrebthmsdgbiwvguatberxcbfmmksxxlumquxxbmzdffdfyddzesopehlhapltdrsgjdf 2023-03-16 23:55:56.065168 \N 41 +2 gnsrlrdluxptabisvabunssxkabxyyfnaizujovzqmgixjmfkjmjqrwuhvuztsjjaoxsatw 2022-02-20 22:53:04.639101 \N 43 \. @@ -245407,7 +245019,7 @@ SELECT pg_catalog.setval('metadata.md_dbiref_dbiref_id_seq', 1, false); -- Name: md_dbversion_dbversion_id_seq; Type: SEQUENCE SET; Schema: metadata; Owner: postgres -- -SELECT pg_catalog.setval('metadata.md_dbversion_dbversion_id_seq', 263, true); +SELECT pg_catalog.setval('metadata.md_dbversion_dbversion_id_seq', 286, true); -- @@ -245463,7 +245075,7 @@ SELECT pg_catalog.setval('metadata.md_json_json_id_seq', 1, false); -- Name: md_metadata_metadata_id_seq; Type: SEQUENCE SET; Schema: metadata; Owner: postgres -- -SELECT pg_catalog.setval('metadata.md_metadata_metadata_id_seq', 276, true); +SELECT pg_catalog.setval('metadata.md_metadata_metadata_id_seq', 299, true); -- @@ -245879,6 +245491,13 @@ SELECT pg_catalog.setval('phenome.registry_registry_id_seq', 1, false); SELECT pg_catalog.setval('phenome.stock_allele_stock_allele_id_seq', 1, false); +-- +-- Name: stock_file_stock_file_id_seq; Type: SEQUENCE SET; Schema: phenome; Owner: postgres +-- + +SELECT pg_catalog.setval('phenome.stock_file_stock_file_id_seq', 1, false); + + -- -- Name: stock_image_stock_image_id_seq; Type: SEQUENCE SET; Schema: phenome; Owner: postgres -- @@ -246170,7 +245789,7 @@ SELECT pg_catalog.setval('public.contact_relationship_contact_relationship_id_se -- Name: cv_cv_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres -- -SELECT pg_catalog.setval('public.cv_cv_id_seq', 76, true); +SELECT pg_catalog.setval('public.cv_cv_id_seq', 77, true); -- @@ -246184,7 +245803,7 @@ SELECT pg_catalog.setval('public.cvprop_cvprop_id_seq', 6, true); -- Name: cvterm_cvterm_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres -- -SELECT pg_catalog.setval('public.cvterm_cvterm_id_seq', 79122, true); +SELECT pg_catalog.setval('public.cvterm_cvterm_id_seq', 79143, true); -- @@ -246261,7 +245880,7 @@ SELECT pg_catalog.setval('public.db_db_id_seq', 312, true); -- Name: dbxref_dbxref_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres -- -SELECT pg_catalog.setval('public.dbxref_dbxref_id_seq', 214281, true); +SELECT pg_catalog.setval('public.dbxref_dbxref_id_seq', 214302, true); -- @@ -246614,6 +246233,13 @@ SELECT pg_catalog.setval('public.nd_experiment_stockprop_nd_experiment_stockprop SELECT pg_catalog.setval('public.nd_experimentprop_nd_experimentprop_id_seq', 7048, true); +-- +-- Name: nd_geolocation_dbxref_nd_geolocation_dbxref_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres +-- + +SELECT pg_catalog.setval('public.nd_geolocation_dbxref_nd_geolocation_dbxref_id_seq', 1, false); + + -- -- Name: nd_geolocation_nd_geolocation_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres -- @@ -246817,6 +246443,13 @@ SELECT pg_catalog.setval('public.phylotree_pub_phylotree_pub_id_seq', 1, false); SELECT pg_catalog.setval('public.project_contact_project_contact_id_seq', 1, false); +-- +-- Name: project_dbxref_project_dbxref_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres +-- + +SELECT pg_catalog.setval('public.project_dbxref_project_dbxref_id_seq', 1, false); + + -- -- Name: project_project_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres -- @@ -247846,6 +247479,13 @@ SELECT pg_catalog.setval('sgn_people.forum_post_forum_post_id_seq', 6, true); SELECT pg_catalog.setval('sgn_people.forum_topic_forum_topic_id_seq', 4, true); +-- +-- Name: list_dbxref_list_dbxref_id_seq; Type: SEQUENCE SET; Schema: sgn_people; Owner: postgres +-- + +SELECT pg_catalog.setval('sgn_people.list_dbxref_list_dbxref_id_seq', 1, false); + + -- -- Name: list_item_list_item_id_seq; Type: SEQUENCE SET; Schema: sgn_people; Owner: postgres -- @@ -247860,6 +247500,13 @@ SELECT pg_catalog.setval('sgn_people.list_item_list_item_id_seq', 724, true); SELECT pg_catalog.setval('sgn_people.list_list_id_seq', 14, true); +-- +-- Name: listprop_listprop_id_seq; Type: SEQUENCE SET; Schema: sgn_people; Owner: postgres +-- + +SELECT pg_catalog.setval('sgn_people.listprop_listprop_id_seq', 1, false); + + -- -- Name: sp_clone_il_mapping_segment_l_sp_clone_il_mapping_segment_l_seq; Type: SEQUENCE SET; Schema: sgn_people; Owner: postgres -- @@ -247941,14 +247588,14 @@ SELECT pg_catalog.setval('sgn_people.sp_person_organisms_sp_person_organisms_id_ -- Name: sp_person_roles_sp_person_role_id_seq; Type: SEQUENCE SET; Schema: sgn_people; Owner: postgres -- -SELECT pg_catalog.setval('sgn_people.sp_person_roles_sp_person_role_id_seq', 79, true); +SELECT pg_catalog.setval('sgn_people.sp_person_roles_sp_person_role_id_seq', 82, true); -- -- Name: sp_person_sp_person_id_seq; Type: SEQUENCE SET; Schema: sgn_people; Owner: postgres -- -SELECT pg_catalog.setval('sgn_people.sp_person_sp_person_id_seq', 43, true); +SELECT pg_catalog.setval('sgn_people.sp_person_sp_person_id_seq', 44, true); -- @@ -247990,7 +247637,7 @@ SELECT pg_catalog.setval('sgn_people.sp_roles_sp_role_id_seq', 8, true); -- Name: sp_token_sp_token_id_seq; Type: SEQUENCE SET; Schema: sgn_people; Owner: postgres -- -SELECT pg_catalog.setval('sgn_people.sp_token_sp_token_id_seq', 1, true); +SELECT pg_catalog.setval('sgn_people.sp_token_sp_token_id_seq', 2, true); -- @@ -249663,6 +249310,14 @@ ALTER TABLE ONLY phenome.stock_allele ADD CONSTRAINT stock_allele_pkey PRIMARY KEY (stock_allele_id); +-- +-- Name: stock_file stock_file_pkey; Type: CONSTRAINT; Schema: phenome; Owner: postgres +-- + +ALTER TABLE ONLY phenome.stock_file + ADD CONSTRAINT stock_file_pkey PRIMARY KEY (stock_file_id); + + -- -- Name: stock_image stock_image_pkey; Type: CONSTRAINT; Schema: phenome; Owner: postgres -- @@ -250887,6 +250542,14 @@ ALTER TABLE ONLY public.nd_experimentprop ADD CONSTRAINT nd_experimentprop_pkey PRIMARY KEY (nd_experimentprop_id); +-- +-- Name: nd_geolocation_dbxref nd_geolocation_dbxref_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.nd_geolocation_dbxref + ADD CONSTRAINT nd_geolocation_dbxref_pkey PRIMARY KEY (nd_geolocation_dbxref_id); + + -- -- Name: nd_geolocation nd_geolocation_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres -- @@ -251319,6 +250982,22 @@ ALTER TABLE ONLY public.project_contact ADD CONSTRAINT project_contact_pkey PRIMARY KEY (project_contact_id); +-- +-- Name: project_dbxref project_dbxref_c1; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.project_dbxref + ADD CONSTRAINT project_dbxref_c1 UNIQUE (project_id, dbxref_id); + + +-- +-- Name: project_dbxref project_dbxref_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.project_dbxref + ADD CONSTRAINT project_dbxref_pkey PRIMARY KEY (project_dbxref_id); + + -- -- Name: project project_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres -- @@ -252975,6 +252654,30 @@ ALTER TABLE ONLY sgn_people.forum_topic ADD CONSTRAINT forum_topic_pkey PRIMARY KEY (forum_topic_id); +-- +-- Name: list_dbxref list_dbxref_c1; Type: CONSTRAINT; Schema: sgn_people; Owner: postgres +-- + +ALTER TABLE ONLY sgn_people.list_dbxref + ADD CONSTRAINT list_dbxref_c1 UNIQUE (list_id, dbxref_id); + + +-- +-- Name: list_dbxref list_dbxref_pkey; Type: CONSTRAINT; Schema: sgn_people; Owner: postgres +-- + +ALTER TABLE ONLY sgn_people.list_dbxref + ADD CONSTRAINT list_dbxref_pkey PRIMARY KEY (list_dbxref_id); + + +-- +-- Name: list list_id_unique; Type: CONSTRAINT; Schema: sgn_people; Owner: postgres +-- + +ALTER TABLE ONLY sgn_people.list + ADD CONSTRAINT list_id_unique UNIQUE (list_id); + + -- -- Name: list_item list_item_pkey; Type: CONSTRAINT; Schema: sgn_people; Owner: postgres -- @@ -252991,6 +252694,14 @@ ALTER TABLE ONLY sgn_people.list ADD CONSTRAINT list_pkey PRIMARY KEY (list_id); +-- +-- Name: listprop listprop_pkey; Type: CONSTRAINT; Schema: sgn_people; Owner: postgres +-- + +ALTER TABLE ONLY sgn_people.listprop + ADD CONSTRAINT listprop_pkey PRIMARY KEY (listprop_id); + + -- -- Name: sp_dataset sp_dataset_pkey; Type: CONSTRAINT; Schema: sgn_people; Owner: postgres -- @@ -255548,6 +255259,20 @@ CREATE INDEX project_contact_idx1 ON public.project_contact USING btree (project CREATE INDEX project_contact_idx2 ON public.project_contact USING btree (contact_id); +-- +-- Name: project_dbxref_idx1; Type: INDEX; Schema: public; Owner: postgres +-- + +CREATE INDEX project_dbxref_idx1 ON public.project_dbxref USING btree (project_id); + + +-- +-- Name: project_dbxref_idx2; Type: INDEX; Schema: public; Owner: postgres +-- + +CREATE INDEX project_dbxref_idx2 ON public.project_dbxref USING btree (dbxref_id); + + -- -- Name: project_idx1; Type: INDEX; Schema: public; Owner: postgres -- @@ -256710,6 +256435,20 @@ CREATE INDEX bac_status_idx ON sgn_people.bac_status USING btree (bac_id, status CREATE INDEX country_idx ON sgn_people.sp_person USING btree (country); +-- +-- Name: list_dbxref_idx1; Type: INDEX; Schema: sgn_people; Owner: postgres +-- + +CREATE INDEX list_dbxref_idx1 ON sgn_people.list_dbxref USING btree (list_id); + + +-- +-- Name: list_dbxref_idx2; Type: INDEX; Schema: sgn_people; Owner: postgres +-- + +CREATE INDEX list_dbxref_idx2 ON sgn_people.list_dbxref USING btree (dbxref_id); + + -- -- Name: name_idx; Type: INDEX; Schema: sgn_people; Owner: postgres -- @@ -260033,23 +259772,31 @@ ALTER TABLE ONLY phenome.registry -- ALTER TABLE ONLY phenome.stock_allele - ADD CONSTRAINT stock_allele_allele_id_fkey FOREIGN KEY (allele_id) REFERENCES phenome.allele(allele_id); + ADD CONSTRAINT stock_allele_allele_id_fkey FOREIGN KEY (allele_id) REFERENCES phenome.allele(allele_id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; -- --- Name: stock_allele stock_allele_metadata_id_fkey; Type: FK CONSTRAINT; Schema: phenome; Owner: postgres +-- Name: stock_allele stock_allele_stock_id_fkey; Type: FK CONSTRAINT; Schema: phenome; Owner: postgres -- ALTER TABLE ONLY phenome.stock_allele - ADD CONSTRAINT stock_allele_metadata_id_fkey FOREIGN KEY (metadata_id) REFERENCES metadata.md_metadata(metadata_id); + ADD CONSTRAINT stock_allele_stock_id_fkey FOREIGN KEY (stock_id) REFERENCES public.stock(stock_id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; -- --- Name: stock_allele stock_allele_stock_id_fkey; Type: FK CONSTRAINT; Schema: phenome; Owner: postgres +-- Name: stock_file stock_file_file_id_fkey; Type: FK CONSTRAINT; Schema: phenome; Owner: postgres -- -ALTER TABLE ONLY phenome.stock_allele - ADD CONSTRAINT stock_allele_stock_id_fkey FOREIGN KEY (stock_id) REFERENCES public.stock(stock_id); +ALTER TABLE ONLY phenome.stock_file + ADD CONSTRAINT stock_file_file_id_fkey FOREIGN KEY (file_id) REFERENCES metadata.md_files(file_id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: stock_file stock_file_stock_id_fkey; Type: FK CONSTRAINT; Schema: phenome; Owner: postgres +-- + +ALTER TABLE ONLY phenome.stock_file + ADD CONSTRAINT stock_file_stock_id_fkey FOREIGN KEY (stock_id) REFERENCES public.stock(stock_id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; -- @@ -260068,6 +259815,14 @@ ALTER TABLE ONLY phenome.stock_image ADD CONSTRAINT stock_image_metadata_id_fkey FOREIGN KEY (metadata_id) REFERENCES metadata.md_metadata(metadata_id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; +-- +-- Name: stock_allele stock_image_metadata_id_fkey; Type: FK CONSTRAINT; Schema: phenome; Owner: postgres +-- + +ALTER TABLE ONLY phenome.stock_allele + ADD CONSTRAINT stock_image_metadata_id_fkey FOREIGN KEY (metadata_id) REFERENCES metadata.md_metadata(metadata_id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; + + -- -- Name: stock_image stock_image_stock_id_fkey; Type: FK CONSTRAINT; Schema: phenome; Owner: postgres -- @@ -260932,6 +260687,22 @@ ALTER TABLE ONLY public.featureprop ADD CONSTRAINT featureprop_type_id_fkey FOREIGN KEY (type_id) REFERENCES public.cvterm(cvterm_id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; +-- +-- Name: project_dbxref fkey_dbxref_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.project_dbxref + ADD CONSTRAINT fkey_dbxref_id FOREIGN KEY (dbxref_id) REFERENCES public.dbxref(dbxref_id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: project_dbxref fkey_project_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.project_dbxref + ADD CONSTRAINT fkey_project_id FOREIGN KEY (project_id) REFERENCES public.project(project_id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; + + -- -- Name: fpc_band fpc_band_fpc_fingerprint_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- @@ -261228,6 +260999,22 @@ ALTER TABLE ONLY public.nd_experimentprop ADD CONSTRAINT nd_experimentprop_type_id_fkey FOREIGN KEY (type_id) REFERENCES public.cvterm(cvterm_id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; +-- +-- Name: nd_geolocation_dbxref nd_geolocation_dbxref_dbxref_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.nd_geolocation_dbxref + ADD CONSTRAINT nd_geolocation_dbxref_dbxref_id_fkey FOREIGN KEY (dbxref_id) REFERENCES public.dbxref(dbxref_id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: nd_geolocation_dbxref nd_geolocation_dbxref_nd_geolocation_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.nd_geolocation_dbxref + ADD CONSTRAINT nd_geolocation_dbxref_nd_geolocation_id_fkey FOREIGN KEY (nd_geolocation_id) REFERENCES public.nd_geolocation(nd_geolocation_id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; + + -- -- Name: nd_geolocationprop nd_geolocationprop_nd_geolocation_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- @@ -263548,6 +263335,22 @@ ALTER TABLE ONLY sgn_people.forum_post ADD CONSTRAINT forum_topic_id_fk FOREIGN KEY (forum_topic_id) REFERENCES sgn_people.forum_topic(forum_topic_id); +-- +-- Name: list_dbxref list_dbxref_dbxref_id_fkey; Type: FK CONSTRAINT; Schema: sgn_people; Owner: postgres +-- + +ALTER TABLE ONLY sgn_people.list_dbxref + ADD CONSTRAINT list_dbxref_dbxref_id_fkey FOREIGN KEY (dbxref_id) REFERENCES public.dbxref(dbxref_id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: list_dbxref list_dbxref_list_id_fkey; Type: FK CONSTRAINT; Schema: sgn_people; Owner: postgres +-- + +ALTER TABLE ONLY sgn_people.list_dbxref + ADD CONSTRAINT list_dbxref_list_id_fkey FOREIGN KEY (list_id) REFERENCES sgn_people.list(list_id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; + + -- -- Name: list_item list_item_list_id_fkey; Type: FK CONSTRAINT; Schema: sgn_people; Owner: postgres -- @@ -263572,6 +263375,22 @@ ALTER TABLE ONLY sgn_people.list ADD CONSTRAINT list_type_id_fkey FOREIGN KEY (type_id) REFERENCES public.cvterm(cvterm_id); +-- +-- Name: listprop listprop_list_id_fkey; Type: FK CONSTRAINT; Schema: sgn_people; Owner: postgres +-- + +ALTER TABLE ONLY sgn_people.listprop + ADD CONSTRAINT listprop_list_id_fkey FOREIGN KEY (list_id) REFERENCES sgn_people.list(list_id); + + +-- +-- Name: listprop listprop_type_id_fkey; Type: FK CONSTRAINT; Schema: sgn_people; Owner: postgres +-- + +ALTER TABLE ONLY sgn_people.listprop + ADD CONSTRAINT listprop_type_id_fkey FOREIGN KEY (type_id) REFERENCES public.cvterm(cvterm_id); + + -- -- Name: bac_status person_id_fk; Type: FK CONSTRAINT; Schema: sgn_people; Owner: postgres -- @@ -266086,6 +265905,20 @@ GRANT ALL ON TABLE phenome.stock_allele TO web_usr; GRANT SELECT,USAGE ON SEQUENCE phenome.stock_allele_stock_allele_id_seq TO web_usr; +-- +-- Name: TABLE stock_file; Type: ACL; Schema: phenome; Owner: postgres +-- + +GRANT SELECT,INSERT,UPDATE ON TABLE phenome.stock_file TO web_usr; + + +-- +-- Name: SEQUENCE stock_file_stock_file_id_seq; Type: ACL; Schema: phenome; Owner: postgres +-- + +GRANT USAGE ON SEQUENCE phenome.stock_file_stock_file_id_seq TO web_usr; + + -- -- Name: TABLE stock_image; Type: ACL; Schema: phenome; Owner: postgres -- @@ -268096,6 +267929,20 @@ GRANT ALL ON TABLE public.project_contact TO web_usr; GRANT SELECT,USAGE ON SEQUENCE public.project_contact_project_contact_id_seq TO web_usr; +-- +-- Name: TABLE project_dbxref; Type: ACL; Schema: public; Owner: postgres +-- + +GRANT ALL ON TABLE public.project_dbxref TO web_usr; + + +-- +-- Name: SEQUENCE project_dbxref_project_dbxref_id_seq; Type: ACL; Schema: public; Owner: postgres +-- + +GRANT SELECT,USAGE ON SEQUENCE public.project_dbxref_project_dbxref_id_seq TO web_usr; + + -- -- Name: SEQUENCE project_project_id_seq; Type: ACL; Schema: public; Owner: postgres -- @@ -270172,6 +270019,20 @@ GRANT ALL ON SEQUENCE sgn_people.list_item_list_item_id_seq TO web_usr; GRANT ALL ON SEQUENCE sgn_people.list_list_id_seq TO web_usr; +-- +-- Name: TABLE listprop; Type: ACL; Schema: sgn_people; Owner: postgres +-- + +GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE sgn_people.listprop TO web_usr; + + +-- +-- Name: SEQUENCE listprop_listprop_id_seq; Type: ACL; Schema: sgn_people; Owner: postgres +-- + +GRANT USAGE ON SEQUENCE sgn_people.listprop_listprop_id_seq TO web_usr; + + -- -- Name: TABLE sp_clone_il_mapping_segment_log; Type: ACL; Schema: sgn_people; Owner: postgres -- From 391cac287309a36d2da5ab81d0baaaaea2774d6d Mon Sep 17 00:00:00 2001 From: David Waring Date: Tue, 28 Nov 2023 13:59:35 -0500 Subject: [PATCH 18/62] Seedlot Upload: check if name already exists as any stock --- .../Seedlot/ParseUpload/Plugin/SeedlotXLS.pm | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/lib/CXGN/Stock/Seedlot/ParseUpload/Plugin/SeedlotXLS.pm b/lib/CXGN/Stock/Seedlot/ParseUpload/Plugin/SeedlotXLS.pm index 543b7c18fe..f7c4f86a18 100644 --- a/lib/CXGN/Stock/Seedlot/ParseUpload/Plugin/SeedlotXLS.pm +++ b/lib/CXGN/Stock/Seedlot/ParseUpload/Plugin/SeedlotXLS.pm @@ -237,15 +237,17 @@ sub _validate_with_plugin { push @error_messages, "The following source seedlots could not be found in the database: ".join(',',@sources_missing); $errors{'missing_sources'} = \@sources_missing; } - # Not checking if seedlot name already exists because the database will just update the seedlot entries - # my @seedlots = keys %seen_seedlot_names; - # my $rs = $schema->resultset("Stock::Stock")->search({ - # 'is_obsolete' => { '!=' => 't' }, - # 'uniquename' => { -in => \@seedlots } - # }); - # while (my $r=$rs->next){ - # push @error_messages, "Cell A".$seen_seedlot_names{$r->uniquename}.": seedlot name already exists in database: ".$r->uniquename; - # } + + # Check if Seedlot names already exist as other stock names + my @seedlots = keys %seen_seedlot_names; + my $rs = $schema->resultset("Stock::Stock")->search({ + 'uniquename' => { -in => \@seedlots } + }); + while (my $r=$rs->next) { + if ( $r->type->name ne 'seedlot' ) { + push @error_messages, "Cell A".$seen_seedlot_names{$r->uniquename}.": stock name already exists in database: ".$r->uniquename.". The seedlot name must be unique."; + } + } #store any errors found in the parsed file to parse_errors accessor if (scalar(@error_messages) >= 1) { From 1ea700eed8f0d3c812b98b8d68e4941d5ef121c2 Mon Sep 17 00:00:00 2001 From: Isaak Date: Wed, 29 Nov 2023 15:09:57 +0100 Subject: [PATCH 19/62] update ... _stock_no getters and setters names --- t/unit/CXGN/PRepDesign.t | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/unit/CXGN/PRepDesign.t b/t/unit/CXGN/PRepDesign.t index 3403174f30..f4a4a33840 100644 --- a/t/unit/CXGN/PRepDesign.t +++ b/t/unit/CXGN/PRepDesign.t @@ -29,10 +29,10 @@ my @stock_list = (1..319); ok(my $trial_design = CXGN::Trial::TrialDesign->new(), "Create TrialDesign object"); $trial_design->set_trial_name("TESTTRIAL"); -ok($trial_design->set_replicated_accession_no($number_of_replicated_accession), "Set replicated accessions for trial design"); -is_deeply($trial_design->get_replicated_accession_no(),$number_of_replicated_accession, "Get replicated accessions for trial design"); -ok($trial_design->set_unreplicated_accession_no($number_of_unreplicated_accession), "Set unreplicated accessions for trial design"); -is_deeply($trial_design->get_unreplicated_accession_no(),$number_of_unreplicated_accession, "Get unreplicated accessions for trial design"); +ok($trial_design->set_replicated_stock_no($number_of_replicated_accession), "Set replicated accessions for trial design"); +is_deeply($trial_design->get_replicated_stock_no(),$number_of_replicated_accession, "Get replicated accessions for trial design"); +ok($trial_design->set_unreplicated_stock_no($number_of_unreplicated_accession), "Set unreplicated accessions for trial design"); +is_deeply($trial_design->get_unreplicated_stock_no(),$number_of_unreplicated_accession, "Get unreplicated accessions for trial design"); ok($trial_design->set_num_of_replicated_times($num_of_replicated_times), "Set number of replicated times for trial design"); is_deeply($trial_design->get_num_of_replicated_times(),$num_of_replicated_times, "Get number of replicated times for trial design"); ok($trial_design->set_sub_block_sequence($sub_block_sequence), "Set sub-block sequence for trial design"); From c02473dd4f15078c9d28359765d0278993cd1e33 Mon Sep 17 00:00:00 2001 From: Mirella Flores Date: Wed, 29 Nov 2023 11:59:35 -0500 Subject: [PATCH 20/62] add upload vectors test --- t/unit_mech/AJAX/Stocks/UploadVectors.t | 129 ++++++++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 t/unit_mech/AJAX/Stocks/UploadVectors.t diff --git a/t/unit_mech/AJAX/Stocks/UploadVectors.t b/t/unit_mech/AJAX/Stocks/UploadVectors.t new file mode 100644 index 0000000000..f33f71043a --- /dev/null +++ b/t/unit_mech/AJAX/Stocks/UploadVectors.t @@ -0,0 +1,129 @@ + +use strict; +use warnings; + +use lib 't/lib'; +use SGN::Test::Fixture; +use Test::More; +use Test::WWW::Mechanize; +use LWP::UserAgent; +use CXGN::List; +use CXGN::Stock::Seedlot; +use JSON; +use Data::Dumper; +use JSON::XS; +use SGN::Model::Cvterm; +local $Data::Dumper::Indent = 0; + +my $f = SGN::Test::Fixture->new(); +my $schema = $f->bcs_schema; +my $phenome_schema = $f->phenome_schema; +my $json = JSON->new->allow_nonref; + +my $mech = Test::WWW::Mechanize->new; + +my $rs = $f->bcs_schema()->resultset('NaturalDiversity::NdExperiment')->search({}); + +my $max_nd_experiment_id = $rs->get_column('nd_experiment_id')->max(); + +print STDERR "MAX ND EXPERIMENT ID = $max_nd_experiment_id\n"; + +$mech->post_ok('http://localhost:3010/brapi/v1/token', [ "username"=> "janedoe", "password"=> "secretpw", "grant_type"=> "password" ]); +my $response = JSON::XS->new->decode($mech->content); +print STDERR Dumper $response; +is($response->{'metadata'}->{'status'}->[2]->{'message'}, 'Login Successfull'); +my $sgn_session_id = $response->{access_token}; + + +### Upload file autogenerating uniquename + +my $file = $f->config->{basepath}."/t/data/stock/vector_upload_no_uniquename.xls"; +my $ua = LWP::UserAgent->new; +$response = $ua->post( + 'http://localhost:3010/ajax/vectors/verify_vectors_file', + Content_Type => 'form-data', + Content => [ + new_vectors_upload_file => [ $file, 'new_vectors_upload_file.xls', Content_Type => 'text/html', ], + sgn_session_id => $sgn_session_id, + fuzzy_check_upload_vectors => 1, + autogenerate_uniquename => 1, + ] + ); + + +ok($response->is_success); +my $message = $response->decoded_content; +my $message_hash = JSON::XS->new->decode($message); +is_deeply($message_hash->{'success'}, 1); + +my $verified_vectors = $message_hash->{'full_data'}; +my $data; +while (my ($key, $value) = each %{$verified_vectors}) { + push @$data, $value; +} + +$mech->post_ok('http://localhost:3010/ajax/create_vector_construct', [ 'data'=>$json->encode($data), 'allowed_organisms'=>$json->encode(['Manihot esculenta']) ]); + +my $response = JSON::XS->new->decode($mech->content); +print STDERR Dumper $response; +is($response->{'success'}, 1); + +my $ids = $response->{'added'}; +my @stock_ids; + +foreach (@$ids) { + push @stock_ids,$_->[0]; +} + +### Upload file with uniquename + +my $file = $f->config->{basepath}."/t/data/stock/vector_upload_with_uniquename.xls"; +my $ua = LWP::UserAgent->new; +$response = $ua->post( + 'http://localhost:3010/ajax/vectors/verify_vectors_file', + Content_Type => 'form-data', + Content => [ + new_vectors_upload_file => [ $file, 'new_vectors_upload_file.xls', Content_Type => 'text/html', ], + sgn_session_id => $sgn_session_id, + fuzzy_check_upload_vectors => 1, + autogenerate_uniquename => 0, + ] + ); + +ok($response->is_success); +my $message = $response->decoded_content; +my $message_hash = JSON::XS->new->decode($message); +is_deeply($message_hash->{'success'}, 1); + +my $verified_vectors = $message_hash->{'full_data'}; print STDERR "\n\nverified:" . Dumper \$verified_vectors; +my $data; +while (my ($key, $value) = each %{$verified_vectors}) { + push @$data, $value; +} + +$mech->post_ok('http://localhost:3010/ajax/create_vector_construct', [ 'data'=>$json->encode($data), 'allowed_organisms'=>$json->encode(['Manihot esculenta']) ]); + +my $response = JSON::XS->new->decode($mech->content); +is($response->{'success'}, 1); + +my $ids2 = $response->{'added'}; + +foreach (@$ids2) { + push @stock_ids,$_->[0]; +} + +#Clean up +# Delete stocks created +my $dbh = $schema->storage->dbh; +my $q = "delete from phenome.stock_owner where stock_id=?"; +my $h = $dbh->prepare($q); + +foreach (@stock_ids){ + my $row = $schema->resultset('Stock::Stock')->find({stock_id=>$_}); + $h->execute($_); + $row->delete(); +} + +$f->clean_up_db(); + +done_testing(); From e546758ce3f42fb51e721a879a89a678027f1ddd Mon Sep 17 00:00:00 2001 From: Mirella Flores Date: Wed, 29 Nov 2023 12:03:40 -0500 Subject: [PATCH 21/62] add upload vectors test files --- t/data/stock/vector_upload_no_uniquename.xls | Bin 0 -> 6656 bytes t/data/stock/vector_upload_with_uniquename.xls | Bin 0 -> 6656 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 t/data/stock/vector_upload_no_uniquename.xls create mode 100644 t/data/stock/vector_upload_with_uniquename.xls diff --git a/t/data/stock/vector_upload_no_uniquename.xls b/t/data/stock/vector_upload_no_uniquename.xls new file mode 100644 index 0000000000000000000000000000000000000000..bc2617df01ec390c547feefbbf89aeb954769c14 GIT binary patch literal 6656 zcmeHLU2IfE6h3#m+uqVbOZgE&@U}wvE4AAKEm5RU5QqXzThR~<-Y%E++U?!CdmAOe zSpE_pBvE0pCy`7K0%q!1{eNciC;zrG*d;rn5PB z<~wKRo-=38%$&R5e>e5Q@sDR;lo91IDUzF+QYp^k8)#3;;!2Sa+T`8LWHMPcniJ(d z^1zM2R<2fM%}YQgs1!t5Sy10cQ=2e#93JS91b)6)vOzr5N!g2)9)FpMh{;zo zo{{E_^Ze#HUIZ$%|9R$f|CfU%gQkEgK)3>ADyRxH4Ky7z z12hx#0B9EILC|c_9MD6cxuAKVhd~yo8dL*%1T-JC08|TF2wDVM3|azO3ZmW1f|~6H zw4(uT3hJCECR*e1K&gpUERM(*lfU7Sug?C9h=`BEXH;DL2Hs8?U~IJ6@tE~*m37Jn z+hA;-Mv$&X%aCK>PLWfJ`=xrWR?&w}tzxyHVn%YsXjQf!QO_FnoPwtzpQ$nD6(@?g z{2Ki;ue}*;f{3ve=btOK#1U7+r093=r1Rt#yw8-Z-V&ot>2#%A>7N%amlM2!H#(k^ zwBr}l&N?A~XDp1%meUsbG+ptpjE_%$j@G{rpKl$l|NobN0zS1ky`W_Myj1%kJ(9n; z0KcvPe@Ov;>8N}`Bp5sid6=rA?TIM9rIWOPe>8+$IwTp^l|x0Uo;p;l>Z+lzs;3Q= zsCxQPB=dsW4TrI#URP;;v2^x2jvsvkyWPO=jA4RAx{es~hwR{)pYBk)iqpy*sAJqP z2J@*&%F?_OzCw(fvfn@sX`aTO6th+4UFNNUTg1d|V&axCui_%PE-B6)_Sl}A>c_3L+3R(Zj^}T&lYLGS z>FYW>*4Lfz9Q5vV;!ezW6P_00y=`_X<@mm{74O9rw;kd{vTN^vgK2T+!R+>AqCWv{ z3PyD~$$r-lcCoABLOhm&$sK3Mwg@D5b_PSUmGBSg3`x4_=sgl{>i z*kByy+EBQD(+UeaenY(#OT=B6j%hjrzSV?;eB=6cRunVe;Ur?N2UD|_Tg&0Vt*&o( zFRx#*tD&JG+T60Lr=hX2p}r9p`id2uaCFW{E82u<=i$bjp5=j_Tawfb)jaaIl2UOqb$S@FLwQaRE zU2eaVvbH)eTOEmh+pFtvdIsZmvZglLSi5!xvJOP!82#Gq9>=O}Kd2NOQqNi#)1=C! zH4F3Fi_ku}?A(E6=hABy=e3VZ4L-1TV|x4@kUFEz$d1p}hCG9JoARpip~#^!re2~j zN1d$9;Se@%zC42De0x<+ju>C6zfCfh%ASEFx*kVh?3g?ViUgT{(r6N7Oqew)8-~h(u<-)fWFQ{9>`DLU> z6)Fwa<7g)na*b#wQ*(`ICzEuIXeZNkjc6wmca3N#Q+SPNXU;O(X+id8QkfL-0aD{}^ixj^!t)mYhuY_ch8prTpOgs^)l1~{9(#l6r=JI`78d z;cyS`mL6&h3LM6Cn21qvs~GsIC<2GVN>j)EX)S${j@jbIl8IDek8f>wCFaDfRn5z~ z>~1F>cT`labNB3Nx%INUXuu&_>0ONFkeiqi=RC5|(H9QC``5K?y_F~5GG*z)Pky4q z_krj?%4s+^Oe=^^c^bq`@*IfUV>gH!V*o@Amu~29H?}#p6*Tl~&r{sUY-dX=8uQ=V zxBYkXyutS8)u*0MRi9UD4>+t8vY$FaXTLprtbR`A(RW~f-L((bgBKaW+X>z*5MNGW z5OFMREyRa-q68kem;e7L|Bu*1qdA)Kq5=!mv-tNZDSi0z;r~#5qjkS6uL`Tp_2%Bs zZt&X<2!vOIQ^1fm=geIBK7FR>xd;Hoid2|_u~tc|NU*ozkqwxnvmn;Yd8T;;j$>u&%=4V^M4e5KL}nK mk@e6JQ#Ls2AILkir{yl@-w54)p#NS}ck2KA|KI*={r>>vNT7uP literal 0 HcmV?d00001 diff --git a/t/data/stock/vector_upload_with_uniquename.xls b/t/data/stock/vector_upload_with_uniquename.xls new file mode 100644 index 0000000000000000000000000000000000000000..0d9d4a699a2a14bf02784f5ee755b38bbc7efcba GIT binary patch literal 6656 zcmeHLU2IfE6h3#`ZEtByOZibj@KT@@Xlu7Ee^F$iAdm<&ZAC*!@OHVhSGITS?roF= zLn-p6iAth85Df{5AsT;Tq7Rw~Z$4-=CM1YHfN!V|3&9u?VEw+CyX>-d!$OD#!fei+ z`OeJTbLPxBGw1G)KTJ7y?6aBYrJy_^WpX`JB^7ym1MNv!TrUzro4o6pOeV`l^Fg_X zEO0H*m3vr@O$>v$=anE6R0U#Rbx_|!OM9Sd2^Q#;1b)6)vR*vYN!g2?F1^fv$K;DC zWoG_)QOfvRjd>tHXMtPUiv9Wa=lRWZybM$<{(0sz{%b(Bpvj;*5Uv230%`zF1x*7@ z2h9LI1bP_s2xul~7U)sXY|tFgV;~DO7t{!v2bvFB0BQm)1T}*effj?7fLcJ*y)CHO zj-cHU;I5#~S>r+LRu-r-v5OU9`KtCi9{K9*KM#-iwEUFvi{HT8AtUsSZaW^c{;RT9 z>0lf5&69A_RcIM<6x_-3iQ;~(o~xAiVNg`86{whzTsERg_czqDQ9UQ)X~>sq&RNBY zz%ReW_{{z{gCGbSYjFO#VoO{KdNJ3wf&szXD&8X+T zH0pTvuw!9VYQ%}TPHHDH^z8GKw(CKc?s&p;y}_-?LECdv!?=|;c|%Up@%+tpa*vZV zMb_G}Jp&2P!RS6G?!NxF8tpbJ`QNv#pwotvTh zP{OyIRBSX3&27kDw{fY3;9uWn#S(EBr%~YehO?fjr!i(~HeOWLF@v3oI?t z>V#RcLOTj&c2Z^}(%#kynah^-@wvS3W=YF4_=ub*Z)2tCkeE3ggho)9K(K_cIMKIL z{Y|%14Sa4Fe39q*6y<;Q@Up8XF8;K6pl9_?#UBGFTNW@X;GhT4bEF921?01Kql(ofq+3HOU+g?krGdLQzlZ{Q0j;1x!k&7TRxy861d(g3(dJZZ9 zuc>Dfl<8FE!s>;2?PjzOww@VpJ(FI&D6f4?8u8h+3(MngTw074BRfA^8}cmPZOW_4 zh9cwDOvprG&N@+_!y$xoet#G#dw)Z&AMRvi`z6HWPN#!9(KAB~Shjy*tYd7QkjH?Z zEKjn!!Q+5@-nHQG0==gi8AuU1Nuv-DXK7Rh1eXa=IS{u__l1G@ajH=T5cCdEB@nY0 z-Dd)E`!%Wpg3AVI5)d6r_f-QSvIA5DM32;cwLnaEiKuTKR+dEu5bdY?LTJ-Q8kGSt zDb}bQh)1DDVIU^T8dU%>W!9(?h<4Jb3Q086XpJVJ51|&I>YGpv5D#NLvKELbHxcbx zr;=}t^0f}3H>Y(7R?lfof2mUmyPij_nYwF4t(nAYM6H?5YecP?*lR?sts971&%J@D zbxu!e-H5(Fr3bB0dL!Bh>NIzewx=7^Nm;rb%{nPhH!FTsT6-o3tBgEackxB)_!}yiN_t~ziZvyyI1JpclN{zw9q@74(+uC3a8UD=MKGp z>B`oj`VZeSWy!+Nf2R5OfoM(kQ*nk?6hsp}17bKm4`Lwg0x^U}KveR=HT~_!5Rc$x zQPi^k$Pos)Y7?VGLGwS@x9xZHtig8Or3LStZ#+wp|0>1wr@YYV?@u3Xn^k}KUFhF( z<>PhWg$sB)z+?FEiWWy7_U>5J&7D28-H?l63GD|C2KGjHQb`CJcWvy?Km6@xYf0}aTH zi&M(93CHl5*OK*f!a)Vh$ANkAu!N;gMzQ{3e1Y=6zfJfTaJSkMa(sLZC%`FQngjVf wYD--|&ykOUSB7OBB*c^sj`|1k_VihC2kY;IY(J2HH>%sUfBye(|F`^q048pvhX4Qo literal 0 HcmV?d00001 From 45d505b6f2325888197f2f469ac5168e0c7072f4 Mon Sep 17 00:00:00 2001 From: Mirella Flores Date: Wed, 29 Nov 2023 13:40:49 -0500 Subject: [PATCH 22/62] change stock name by vector name in the results table --- mason/search/vectors.mas | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mason/search/vectors.mas b/mason/search/vectors.mas index e3093f547c..02cb3d8767 100644 --- a/mason/search/vectors.mas +++ b/mason/search/vectors.mas @@ -167,7 +167,7 @@ my $stock_type_select = simple_selectbox_html( - + @@ -231,7 +231,7 @@ my $stock_type_select = simple_selectbox_html( stockprop_extra_columns_view[selected_property] = 1; stockprop_extra_columns_view_array.push(selected_property); - var table_header_html = '
Stock NameVector Name Stock Type Organism Synonyms
'; + var table_header_html = '
Stock NameStock TypeOrganismSynonymsSubmitters
'; for (var i=0; i' + stockprop_extra_columns_view_array[i] + ''; } @@ -253,7 +253,7 @@ my $stock_type_select = simple_selectbox_html( var index = stockprop_extra_columns_view_array.indexOf(selected_property); stockprop_extra_columns_view_array.splice(index, 1); - var table_header_html = '
Vector NameStock TypeOrganismSynonymsSubmitters
'; + var table_header_html = '
Stock NameStock TypeOrganismSynonymsSubmitters
'; for (var i=0; i' + stockprop_extra_columns_view_array[i] + ''; } From c9a8424858b1a93a02f4b318392d31adc9c3e1bb Mon Sep 17 00:00:00 2001 From: David Waring Date: Thu, 30 Nov 2023 14:08:34 -0500 Subject: [PATCH 23/62] Seedlot Upload: Add name check to Seedlot Harvested template --- .../ParseUpload/Plugin/SeedlotHarvestedXLS.pm | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/CXGN/Stock/Seedlot/ParseUpload/Plugin/SeedlotHarvestedXLS.pm b/lib/CXGN/Stock/Seedlot/ParseUpload/Plugin/SeedlotHarvestedXLS.pm index 1f80b8a2aa..8ecff84de0 100644 --- a/lib/CXGN/Stock/Seedlot/ParseUpload/Plugin/SeedlotHarvestedXLS.pm +++ b/lib/CXGN/Stock/Seedlot/ParseUpload/Plugin/SeedlotHarvestedXLS.pm @@ -197,15 +197,16 @@ sub _validate_with_plugin { $errors{'missing_crosses'} = \@crosses_missing; } - # Not checking if seedlot name already exists because the database will just update the seedlot entries - # my @seedlots = keys %seen_seedlot_names; - # my $rs = $schema->resultset("Stock::Stock")->search({ - # 'is_obsolete' => { '!=' => 't' }, - # 'uniquename' => { -in => \@seedlots } - # }); - # while (my $r=$rs->next){ - # push @error_messages, "Cell A".$seen_seedlot_names{$r->uniquename}.": seedlot name already exists in database: ".$r->uniquename; - # } + # Check if Seedlot names already exist as other stock names + my @seedlots = keys %seen_seedlot_names; + my $rs = $schema->resultset("Stock::Stock")->search({ + 'uniquename' => { -in => \@seedlots } + }); + while (my $r=$rs->next) { + if ( $r->type->name ne 'seedlot' ) { + push @error_messages, "Cell A".$seen_seedlot_names{$r->uniquename}.": stock name already exists in database: ".$r->uniquename.". The seedlot name must be unique."; + } + } #store any errors found in the parsed file to parse_errors accessor if (scalar(@error_messages) >= 1) { From c7a3fce6d2ae70ebe34c57122b91915bf4c37422 Mon Sep 17 00:00:00 2001 From: titima15 Date: Thu, 30 Nov 2023 15:38:17 -0500 Subject: [PATCH 24/62] fixed seedlot table and added weight --- mason/breeders_toolbox/seedlots_section.mas | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mason/breeders_toolbox/seedlots_section.mas b/mason/breeders_toolbox/seedlots_section.mas index 0a2923f8f9..104aa952cb 100644 --- a/mason/breeders_toolbox/seedlots_section.mas +++ b/mason/breeders_toolbox/seedlots_section.mas @@ -38,6 +38,11 @@ jQuery(document).ready(function(){ jQuery('#related_seedlots_to_accessions_onswitch').one("click", function(){ var seedlots_table = jQuery('#seedlots_of_accession_table').DataTable({ + 'destroy' : true, + 'ordering' : false, + 'processing': true, + 'serverSide': true, + 'lengthMenu': [10,20,50,100,1000], 'ajax': { 'url': '/ajax/breeders/seedlots', 'data': function(d) { % if ($stock_type eq 'accession'){ @@ -53,6 +58,7 @@ jQuery(document).ready(function(){ { title: "Contents", "data": "contents_html" }, { title: "Seedlot Location", "data": "location" }, { title: "Count", "data": "count" }, + { title: "Weight(g)", "data": "weight_gram" }, ], "fnInitComplete": function(oSettings, json) { //console.log(json); From f8e423f87f60d08766bed0f57b374e4aaf87c5c1 Mon Sep 17 00:00:00 2001 From: Lukas Mueller Date: Thu, 30 Nov 2023 15:57:49 -0500 Subject: [PATCH 25/62] fix test by adding no_plan directive. --- t/unit/CXGN/PRepDesign.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/unit/CXGN/PRepDesign.t b/t/unit/CXGN/PRepDesign.t index 3403174f30..ac6f265713 100644 --- a/t/unit/CXGN/PRepDesign.t +++ b/t/unit/CXGN/PRepDesign.t @@ -1,7 +1,7 @@ use strict; use warnings; -use Test::More; +use Test::More qw | no_plan |; use Test::Exception; use Data::Dumper; From 63512f2bc61ed7c3ec9647cc3ab9f78512bb1d4b Mon Sep 17 00:00:00 2001 From: Isaak Date: Fri, 1 Dec 2023 13:25:41 +0100 Subject: [PATCH 26/62] replace hardcoded design key and pass test --- t/unit/CXGN/PRepDesign.t | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/t/unit/CXGN/PRepDesign.t b/t/unit/CXGN/PRepDesign.t index 86171682f5..241cd7cdc1 100644 --- a/t/unit/CXGN/PRepDesign.t +++ b/t/unit/CXGN/PRepDesign.t @@ -50,16 +50,19 @@ ok($trial_design->set_design_type("p-rep"), "Set design type to p-rep"); SKIP: { - print STDERR "SKIPPING...\n"; skip "DiGGer not installed, skipping", 6, unless ( -e $ENV{R_LIBS_USER}."/DiGGer" ); ok($trial_design->calculate_design(), "Calculate p-rep trial design"); ok(%design = %{$trial_design->get_design()}, "Get p-rep trial design"); - ok($design{'1'}->{row_number} == 1, "First plot row_number is 1"); - ok($design{'1'}->{col_number} == 1, "First plot col_number is 1"); + + my $key = (keys %design)[0]; + print STDERR "\ndesign key -- $key\n"; + + ok($design{$key}->{row_number}, "There is row_number"); + ok($design{$key}->{col_number}, "There is col_number"); is(scalar(keys %design), $row_in_design_number * $col_in_design_number, "Result of p-rep design has a number of plots equal to the product of row and column number in the design"); print STDERR $stock_names[0] ."($plot_start_number) vs. ".$design{$plot_start_number}->{stock_name}."\n"; - print STDERR Dumper \%design; + # print STDERR Dumper \%design; }; done_testing(); From eb6e2af77bf159e4bec5622040699393ad61bca7 Mon Sep 17 00:00:00 2001 From: Mirella Flores Date: Thu, 30 Nov 2023 17:24:41 -0500 Subject: [PATCH 27/62] change vector uniquename input as readonly --- mason/stock/add_vector.mas | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/mason/stock/add_vector.mas b/mason/stock/add_vector.mas index 7427babd01..551f235c0b 100644 --- a/mason/stock/add_vector.mas +++ b/mason/stock/add_vector.mas @@ -145,7 +145,7 @@ function handleSubmit() { const data = {}; dataForm.forEach((value, key) => (data[key] = value)); - + console.log(data); jQuery.ajax({ type: 'POST', data: {'data': JSON.stringify([data])}, @@ -157,14 +157,9 @@ function handleSubmit() { error: function(response) { alert( 'An Error occured while storing vectors.'); } - }); - - console.log(data); - + }); } - - @@ -180,7 +175,7 @@ function handleSubmit() { function jqueryAutoUniqueName() { jQuery('#uniqueNameAutoCheck').on('change', function () { var checked = jQuery(this).prop('checked'); - jQuery('#uniqueName').prop('disabled', checked); + jQuery('#uniqueName').prop('readonly', checked); if(checked){ jQuery.get('/ajax/get_new_vector_uniquename', function (value) { From 5d31f689c481b6fd2a146f44e46f40bd75941a5d Mon Sep 17 00:00:00 2001 From: Mirella Flores Date: Thu, 30 Nov 2023 18:30:00 -0500 Subject: [PATCH 28/62] fix xlsx not readed --- lib/CXGN/Stock/Vector/ParseUpload/Plugin/VectorsXLS.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CXGN/Stock/Vector/ParseUpload/Plugin/VectorsXLS.pm b/lib/CXGN/Stock/Vector/ParseUpload/Plugin/VectorsXLS.pm index 948be1996b..0bc3a88732 100644 --- a/lib/CXGN/Stock/Vector/ParseUpload/Plugin/VectorsXLS.pm +++ b/lib/CXGN/Stock/Vector/ParseUpload/Plugin/VectorsXLS.pm @@ -19,7 +19,7 @@ sub _validate_with_plugin { my $autogenerate_uniquename = $self->get_autogenerate_uniquename(); # Match a dot, extension .xls / .xlsx - my $extension = $filename =~ /(\.[^.]+)$/; + my ($extension) = $filename =~ /(\.[^.]+)$/; my $parser; if ($extension eq '.xlsx') { From c20011a371edbfa5c8161e55222a7fad346d73ee Mon Sep 17 00:00:00 2001 From: Mirella Flores Date: Thu, 30 Nov 2023 18:45:38 -0500 Subject: [PATCH 29/62] add xlsx vector upload test --- t/unit_mech/AJAX/Stocks/UploadVectors.t | 82 ++++++++++++++++++++++++- 1 file changed, 80 insertions(+), 2 deletions(-) diff --git a/t/unit_mech/AJAX/Stocks/UploadVectors.t b/t/unit_mech/AJAX/Stocks/UploadVectors.t index f33f71043a..87bea5c70e 100644 --- a/t/unit_mech/AJAX/Stocks/UploadVectors.t +++ b/t/unit_mech/AJAX/Stocks/UploadVectors.t @@ -35,7 +35,7 @@ is($response->{'metadata'}->{'status'}->[2]->{'message'}, 'Login Successfull'); my $sgn_session_id = $response->{access_token}; -### Upload file autogenerating uniquename +### Upload XLS file autogenerating uniquename my $file = $f->config->{basepath}."/t/data/stock/vector_upload_no_uniquename.xls"; my $ua = LWP::UserAgent->new; @@ -75,7 +75,7 @@ foreach (@$ids) { push @stock_ids,$_->[0]; } -### Upload file with uniquename +### Upload XLS file with uniquename my $file = $f->config->{basepath}."/t/data/stock/vector_upload_with_uniquename.xls"; my $ua = LWP::UserAgent->new; @@ -112,6 +112,84 @@ foreach (@$ids2) { push @stock_ids,$_->[0]; } + +### Upload XLSX file autogenerating uniquename + +my $file = $f->config->{basepath}."/t/data/stock/vector_upload_no_uniquename.xlsx"; +my $ua = LWP::UserAgent->new; +$response = $ua->post( + 'http://localhost:3010/ajax/vectors/verify_vectors_file', + Content_Type => 'form-data', + Content => [ + new_vectors_upload_file => [ $file, 'new_vectors_upload_file.xlsx', Content_Type => 'text/html', ], + sgn_session_id => $sgn_session_id, + fuzzy_check_upload_vectors => 1, + autogenerate_uniquename => 1, + ] + ); + + +ok($response->is_success); +my $message = $response->decoded_content; +my $message_hash = JSON::XS->new->decode($message); +is_deeply($message_hash->{'success'}, 1); + +my $verified_vectors = $message_hash->{'full_data'}; +my $data; +while (my ($key, $value) = each %{$verified_vectors}) { + push @$data, $value; +} + +$mech->post_ok('http://localhost:3010/ajax/create_vector_construct', [ 'data'=>$json->encode($data), 'allowed_organisms'=>$json->encode(['Manihot esculenta']) ]); + +my $response = JSON::XS->new->decode($mech->content); +print STDERR Dumper $response; +is($response->{'success'}, 1); + +my $ids3 = $response->{'added'}; +my @stock_ids; + +foreach (@$ids3) { + push @stock_ids,$_->[0]; +} + +### Upload XLSX file with uniquename + +my $file = $f->config->{basepath}."/t/data/stock/vector_upload_with_uniquename.xlsx"; +my $ua = LWP::UserAgent->new; +$response = $ua->post( + 'http://localhost:3010/ajax/vectors/verify_vectors_file', + Content_Type => 'form-data', + Content => [ + new_vectors_upload_file => [ $file, 'new_vectors_upload_file.xlsx', Content_Type => 'text/html', ], + sgn_session_id => $sgn_session_id, + fuzzy_check_upload_vectors => 1, + autogenerate_uniquename => 0, + ] + ); + +ok($response->is_success); +my $message = $response->decoded_content; +my $message_hash = JSON::XS->new->decode($message); +is_deeply($message_hash->{'success'}, 1); + +my $verified_vectors = $message_hash->{'full_data'}; print STDERR "\n\nverified:" . Dumper \$verified_vectors; +my $data; +while (my ($key, $value) = each %{$verified_vectors}) { + push @$data, $value; +} + +$mech->post_ok('http://localhost:3010/ajax/create_vector_construct', [ 'data'=>$json->encode($data), 'allowed_organisms'=>$json->encode(['Manihot esculenta']) ]); + +my $response = JSON::XS->new->decode($mech->content); +is($response->{'success'}, 1); + +my $ids4 = $response->{'added'}; + +foreach (@$ids4) { + push @stock_ids,$_->[0]; +} + #Clean up # Delete stocks created my $dbh = $schema->storage->dbh; From faae8c3a5a72a59ae3ef942d813455fbeb9432d6 Mon Sep 17 00:00:00 2001 From: Mirella Date: Fri, 1 Dec 2023 13:44:24 -0500 Subject: [PATCH 30/62] add vector xlsx files --- t/data/stock/vector_upload_no_uniquename.xlsx | Bin 0 -> 5383 bytes t/data/stock/vector_upload_with_uniquename.xlsx | Bin 0 -> 5722 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 t/data/stock/vector_upload_no_uniquename.xlsx create mode 100644 t/data/stock/vector_upload_with_uniquename.xlsx diff --git a/t/data/stock/vector_upload_no_uniquename.xlsx b/t/data/stock/vector_upload_no_uniquename.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..d382dbefb5094af9fa39443729ba03c81934caf8 GIT binary patch literal 5383 zcmaJ_1z1#D*QRTTp#&+Vln`bBX$k3+W~iY-x*Mcpq#2P$8UzJKX{80ETcklk=~h7M zo4NNspZtFRb)9F9;^R%)CVR*L^PsL03yDQ<*?5P;(QUXB`deD?q>)Cu zp0UW1X%SsRl;xbIf4C#m1oO&r?FX#%$Gpw_S)6Xvad;}CbW<+Md&L+-PIzPqlAp+R z%q9ooYa~@0lF`!1rFrz;0pxw^{|Jw5!tl)^%r(1SyDB!V#q&W!lv}n0`M2?YVs% z9pbcloMynlrejX5c}Ff|JK7XXNPHsN9I&J(9WHmnKANI?KPCTap46&{eOj7CKp3#l znC@#ZpJl&J-=>$R)8B5^`ar#bJAArxYsNw(jc14nf}Lvcu%Fv>YG7mTpm0EZ%x`zZ z-^xOlQ2?+|=Zno>Cp{OOuTZKwkfc&|=x7m4Rg2MT@KXb*a*+Y(6bX+wy+sI3VTy_y zB;jY0R zXbEV_yE{o_Nt3s75%0?b>SOjGNt;3y4(Y*(eU?SbppS-QjPth4#??~Xbqyn$U4#Q) z4B}w<-B*-TwPAiM>D$@g9_JA}iN0CBcJMXO?ek*|Q&~V(y!G}19OIh ztvq_|{yXSmoDpxBg%bIEwx7HU2hD5Ona%YTN>y;ePyKza+*8=I-phCq=j1S-TF*+KW6Xu^{ zhUo8@arf|buyRL5%(foXITK9rWT6sq-Yg}aQA@7wnV$B8SI3@1HRH!(F#4-Y$=b2V z%b!zeK!pq^rB7VhaH=!o1@{1<$!J%X21|-ri&EGkBVE=B(DVf?dGA4ZUDe5jFqRVY z3nmUBVzUU!#@KmmB?!d=1+~2?bv=Pup66-Xp|+-J~k%gJS8RGh*yRxAla3NoX|6;5M?Q(#gcg2u?(1iWpZ zACwHU=1Yo&`pXbKb?y^3pX`Ldg(3-gq&QRQCX$Kkac3p8Pg;ptLkaLL#YxQQ&c0U; ziO44Rv-%Duzk6d%u4Gshg`6Q*#=xS-f;_lb;+4{2SG~Sed~wB@swcMwKlKYQG*64K z*?{y6))^=_H@0S|TN`N;mvkCq8Q4K9rvuZ3wIFy&h1Oj0puN^0`338U0eDQ`Y->Ee zVLNS|TxC5DdbLpXee5jKBi*qQVvK8TsK2fHnTH>pL)oCS9d6Ums=8zW9aV;Ez}+JS z2`Y<*g+{*rC?C@Z){V#o!XMDsonahWzn`3|P&C)t@nszLDQ&@zql+0ix~(D1*E1p0 zKIUi6S4^OIGN;l}NG~Apyqr){)-7u6d3R_b&UEQf%2cG*<#b6~vpBzqVBALW`$y#| zZ8M~N52B|St#_L|Dct|LsuI%n*Ag$;KZb>A@`Z)9w3POxFT90{&cg_$!2+6*O_)Noi zZs#0l^RfOkR9&?`rqQug8yuPcbGl-| z&%PwyKPYx+`Z^lJZn%wv)hnmeq~Fmq*^_Pg3niD+_)F@L2+2zEr--Nig_7&5YoNbTvxF->qs9%! zUfu`pCI}aa!K;j&n?YpwU8CrsD*dxEz32UhGHHtxPtp5aaX5LF+2JldbuYSw<&v7& zi;Tf^j~XeG`nhfno)`-0(LDp2AP@?!ca+KE+2O!u1qE)q+HY&B0i^Q&3N`U1luNP= zqkE_FV$I3nS@<{l9(Ip%R0pP%%-h}_x*woy%D$u~d&vNES8$SMO9F|=d5eEq@t%E( z|2%C0fww`%%mIGAY7=t{ah|g2dD^|xst)o$EQQQH$dSWh(YEpyihsP*5LC;+9*%P^ zy=Po~DavGa#@YcGWwz? zkWA*t0Pf7|&^T+JkM!JK{0X6@)5LV$@qS*6!Y3O3!2$W>#cn&eT}6v1wzWsz*Du? zvhO1n+(vxWVOR3_v}Rc|wJVj(=l;#uk4kq{p9Qo4@q42%&yk!Ic{9Jx!Lo1h=ww9T1qX8iq8)~d~ zTTT|l1uQ6326Vh!M`}`he@B8Jn;*!|_>dMkcoosfwy|-XNDJtgRI>-HbkEZiTs82^ zwKx+2Ivh~HIB^!RUdjzvo10Y#HIbKNNE%6;Mhky`iCm7Ar8xgR;9;rR(@u47M>G7` zi9G}7;;d&X^I!eMy~wD$O^d|{U1mP)SsR$b9OkoPpFvU-WvIX&7V~~X?L80Sh?d3Y z&(?^R3^C$M8TKQ?mY*%V@*mT4oAHj`O>lLY4ajvCRFNu})+G~zFyNVYS#D0-7cVkJ zec}9g9@5yJc}|gRPvqw(Qc+U0@isldNM2*sZTqhI*%nXR6qhByKZ0CAH%G|YX|R3; z)~Z*R#}*(ml)sCgG|;-;dYaEa8wp+kFG>j z4P8~6yk59W(W!rvKu6{JRF813YAiIg72-c3AI;y$_cwRG&JzFT(MhWIAHal>yBCyl z$DN9}7O_H2u@5URPSCqFmWDe7;1e}hf!wr)1Xf$a&xSuAHYyReIDa*%- zXzTRCYYMs8+5U1QG3Z+q^wd6k6D$^r-Z6&%3Z~ z4N%{K;#d~?0Hs#BA!fA`r}}&M_A7+NXCh*g0{d zRcuv)iGGr~w=yh8Q@|VllZiFMt{=b|f2LeLaO<4q@SrYTw!CtFE&u~%8MVDrzft7A zS^vnKkqHCEoZW5A+^j6MJlt%Z9{)v#vUOCoX22AU#}FHjk16DEG>c63JQG|ttx<-0 zaP$F3wqs|Mb4A$X7al9#DF=xdA;?#zy;T=?`OYuM zBcBo;M>|u37Z->z{%t#xCW%6eS>PQr&0sGX6t~Sh2?y4AD7I?)G}YH|DY4B7ftfp; zN^bGh3L$Q{I?AnCP;&2W%;iVolrs{oxrw!zpZY6=xSM*JY7e^;a%ZSqs?oKfnue*& zKW_QZwfeT6B{4G1YJNqR9cHEd;PhnBkX8(b^qbb!ZRtYJ%v-l(*r+DNUJGMPoeYOD z#~-1E6v<*S)u;F!#j$D{ixKgj-~x$*o@prr@J0`FcDKoMb}bwUjLs+oZj<{SV-F`> zh=U12w;Zn|Ryds$Qx(wPL5C<2OcSdg(_gRe5(H{DrKZr~Xlm&Pq*9fUG49?LUZ0ur zencO$`1!@w&-%1ET8pyIp7jZpJH=_R`l_jNyki3*ot~`IFh*Ld-S=CA1-rZ}F}v+T zL873{6VP%=!M=_aLHcL_H(y}0kWg+XXWq&!%`*VX&CJ8D>P1MhJBahA13-#&v!%0z zx|_3$JIKP>%?g$CBQ&9E?MT9V47vAY;ax)Rqyw|Yhi5EzB=0wW`oUXf__;cwt)*^e zQj&Fl`-T6bp$j_^QSG8STt^u$J_>Bc1If1;0DViFri?SKm7B_}C01OF((+)Nl!ZbS zQeAtWks1s~Z0ez#iqdJl!xILwU;zgJC4Y#Pg1nO*RAV!j8ib0c^e+}KH}*IQat z&wuo34fZG{D=x*Zq;D{okC0XSc6ply@JrQ1Xhr`gTzdDs*WqFu^&Irw8c)FH6auQ` z_Z9DYUdW#~?l*49eUET}bfT@Umy)*MR|m|x;}n7f!IeGBV|MWeLb2o$1Q#bxlo2e= zcQwvmESc;Yeh{zloPYax(VRHaHt+R&Gqp#7n;^#V&3CUO3Hr7x@Le zMH2aMuB?I{+SzVb@f4oSs@*Isif%lkro%cD2&(Ocz7psNX)QE!?&DqXOu~H(Dnm2n zwK3_FZxUY@P);&l79F=nI%(#QXAyYaNoFoCC?91fsyer$u<49ar=v#ERzFIerrLHI z-&WMarjA3|sCztsO;O|Y7?6wp?bNcRmSF}2RrBj6UJQF%{LtMfmoOHgnGOvTpQ#IY z`WD!b6o9~?@dyu|*a`{s*=&`^W>m%^r>RaDDaXS%C&|Fgn!e-dx5=MSdL(LoW{mGs zV?J)m#2%A>2P_LFv)rkW^kA$Y-fvO2?Obn0I3{rKQ#(FJUcoeCtj_D$@!|# zg!AXtY%W$p4_U3o0>k`}Xg7Jq9!6?a9Pje@6Ryn)V@q#L=+7^>GAueg{x?6}K7_;l zC!aPp`3!tbs8?`hI2mJWnCcDu3*HGTbIHz-X30bv@88RRa^xF^(#}pER!$x!+P*GU z?$EzDt+uGz2QYB{jFYL7&8sgMs5Bk&5$`!0AMZXZPu#7ybEB93gY4Qm`0OxP&)ePR zR5dSwnU{C;!wyH+vQ*a6SaJc(g%xfG)%D7t9tV-$8-@V!Hsft~%_!4K>O)zgXn(tV zHm{Sr*cn_lIjnu(tWY8j_fJA8<#2}?iIT!ps%Y6x%kX=)aT2`W;oa@|UI9{C4L6+W z4#mA!rDv5bgd4YuUQr|DmKrEj0CVsU;3}6mGj7}1P>?K3yZ6GI*_g{idK$x=Veefw zMPh#g;Mm9v(?4F3nqEjPb+p*bxr@srR)6%;epj8(iX8wf)?*J>ccypwVjrAKGhLzW zTB^2ohHz{pDW8X5-u4CTy@uYw%$z*T*?U8K{Dtn)_Ne(QafgM=Ni%LvE2DP~Nykw3 z8-^ep+!n$8bkTgR7@5V;ty>qyq@`C`G)sn5x0~$}cqamr$GlM?o$zB-Kp*K92sX+y z=ol1ezj{{Jn>MJP)&G@i9jxCKuUGDyk5&W)x{nVjA>6a`Zz4Bl6e<132?dy?&I+?$O8u=~%&pB0B U#ztBh4GkZ8NgxsOEg5R`9~_4&qyPW_ literal 0 HcmV?d00001 diff --git a/t/data/stock/vector_upload_with_uniquename.xlsx b/t/data/stock/vector_upload_with_uniquename.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..d31067460465fb3c073b1313290d7baf81e47a51 GIT binary patch literal 5722 zcmaJ_1z1#Tw;q}qy1P-NJETLD?vNUC25`Bx>6C7y1pyVfGoE{o z{NDeZwV%EB%=7HE_P1BQ->asGgiHuPM@I)(wfgA-?g$3#w=ooA=fcSWzm_F-sC?wY z3_bFWWVzs9ltj;c)2t-dOvgvv&gei<8^ z&G#(;Vv=D{BW-t{8;kI*V7>ild}k}2yjg$bmSAOjTYd+58cHv5-ZfqNmvqnj6qNFP ziiBG5u^^!!&n1X&-Pm}*B5qNCTH<43+epH`la##MB|JzW z^Slg>z(b7XmNZZOrA*shs*b0*+C!bD?V@Up9KrM5`wQm6ued+a>!PIUOAT?D%nk1? zo)!#?Pk0@Tc|*)~=map9>pfBU>tz-L^5lw@hZB^lzuKDzkklcz>wj0rRk}{c=oStR zxuU@|N}&&n8NuOyurG-z7u&U@lUHR|%N7z`R8AKsIBW$bI0zohyn3fQZyb|);^S|v zF%YZQUx@OoX1s`V&b==|cuj++Vg-Fwl=OnxU(&ijiA82)`h;=C!oSyGf^Nx%0bC=^ zQQtVG(Std>svi@c*LO=aR~O{9k#>-^ZIui1jU+4EIono*zb=Td16-A52(4XN6R6e3i~q72-tCFb8~+wD6jl@QxR-2;cRYYQJ?l=VM?sd<{$cpoy>Jx}r(*t?@LJN&jx7bRgJjvyJgHEZg`qdXnleM3STtH;ZWEE6Gb&?vmg{H2t)2?d;b+~8l z$xG3!35F~Mr=H>KvyOf;Qy86dhE)=Znwqmf(@b{)o*wM*7m=hg$>F(y^WRI$O>|J$ zc$p@;uIYt!3#en_yn^2Z_-$(xR+j!y9FTedVN88-{Dq~9Y&Cri`#bGX7bqH0g%_za zax;WIrc{*GESfF%{n~7K7F0LzkYL~{d6B`m`h3S1*T@oQrpB7Q^1Sq-ZZBybwU`Cm zJ03||`O<~=;ypWBj+Yea@4J;|r zPG>yH?K6s|w=MI&J4tB1gB*JeMPFEEb5)-&&1cO0-_bL);govA%#@!6<(*>|TsMNc ze2*LUxL$7-8M+ub30t6EPo0z5_LcZlb2C43_DO!>NcECnS&B1(Z)R$FaBiaz`i-WP zuVS&LRrSOHN!1xg_FEo9SI)sO{?R>$43q2+R@-K?*J81CKA2oZQ z-wtb)@`V4E`lP?xrHeHL;_AZr>&6YQf>vE+mwX}I)}xBoLPIvaq?95wL1M|X&O8z8 z1&Ko{Q%e@OkBKCs8TT36{0!DU(rQ%~mldCP)al2~ELKohUl|)ubj_Rg0EgeyiIC0{ zk06pK+KJS*NpMQ!%o3A4z)+Xw6|G(7s&5;)Ilf40Jtj3bMUd(#dd~L9Z%art+&S_x zU`r?{EBrkn@ag-qk1nC=Z#fhQdMU7(R3hapQ!%af87TQ8#T!;@27bMCT`$}|$R860VK6Ge}?iQie$-Td69hFmgnf=c9M2V(d%~6DRxtJsS ziVgt?nPU&lFZMmmE_;HX3-HHl*)F>!j@$JEo)7`o__KJx-1y~kp&cww)yZgf{ZwAs z;vx#aYdsM}?S6*Dus}+0xGKk&glM1b^a3gH<2Sd95V`jL34^9wc^TX_bfSoOx&V=Z zXFss%v***2co7uR6-it&8F`c!K#bogj#XprzGRJ`F-ro&H?YIX&h?GT4GJ?^&mLpk zQ>c?&M%1kqN?_|7aAL!C8^^GQ z8)j0I2BOxblr)}<;i1WXEYnhhI`A1Zrf{ut7i*=?FHC@xJbbIWunqG^yEGUV`2Gt z2Il<|1OJLa`Aw)9)RTv_v4j!wep3?>$oG|O(O}fa;hrAL02NW^+%Xo5SCU zn~lpFUf}f_b=8Zn6+|`cGN?3%8w8o9zhy;wqXBtRNLNTxX&XA&=<11m~nC4@^O;ukNT2J`-v! z+sa>QEjYNhOy>@JCZHC9N5K8lj{jk{x&%+zA&IYCg*PT{>tAP;bv(=l|7J%<; z@%rGbh=cg(JO#_^RArGWaupn8yu!TN=jrNAeWou4xxML+xNtIGK+9~@V`k6$wAnM5 z2kRKS#Wek-n?7ZmXD-UrIf-y1_LrCsPL41WVB)>P5(I+4Bh|-GlpgWc8aT<>DEA>K zMY^O9e8owXaR@Cm?g^n(o{??p*nFVj)G|5j#Z3G#5G`1#puD34e>BtNJQR^#p*BT< zft67m*=-ep+7yqVGswV?z(49e=? zwi%W>@q&^wK-*q>+n?RB`4X!zx7xTBl-bU2rN(p&KTM1eqzp5=f5U+{L0f4Rfi`3S zfEfl0{~0rq|J4NlLf3bZ<6lTSLD}{f(!M5oe9&HQ10D|m~z8szT`a$k|k1u8~yh{cXwImNYq@(*edTZeI;lV1I&T!t+iuJv?N*erk zEd;XxB=Vg4)nA45ILtcZMT`pi6;z66`kR6d)Hw%F%5*#GD%jCY7D*A!qBKav;6DNR}6F51Bi&{^318 z^`U-!?`+O(4M;z~VykDN06M;3T53FV>UVN*EC*sd&~3t?es+cUKs6%>l<+9gs}!O* znX~aQoj9|H?QCTtb(v0Bd6&D~WuIY(s1C5vFYt1 zGjj&WUbB_>VFx%vOC;+BZjPjY!K^J>-av8jY2bBmFLgAE4=EvA2UYhZEk;&RM}duR zob3U-aLU#|J#NQDZEPH_ULvnOb!tB%_{V5quEj1j$`(0Z_)4fqeopbD@Tk=6Fk?XV z)dH!Z91}wnSkiUcR=|J3M%7q!t`N&&7)MfM!&{XVJ#T99HoRU_gtB_&3t_Q9Jb*8Q zV^g+TYdiIxBl`zS8zhmzMf4r{{H{;d}9U=g=)G*^Q^7$vRqHRC^w8MAf z3xNW8Da`az;iB;^BOz=WHTokzfv3?B9xDhtoh%xcb-K|#Lv^sN$5<_*Jqqb3GI^Os zg|QxeS#ALzBqH8GO}QuKwnp4vUUO8M{fr_C$meS5CVHB}JLqJ)^KJ}}irqzAzod*q zBq-DTK`x>V)_sHyrZNaD2X(W7h+_^!wIpDtq6VF70nxb{?OH z*y(m7K>Dlj2Kc!!8n-d6jU7zD>%B#rm=JZ+ZgJrCj)S~3`JyI%E7Rr7kLk)d+pOAs zV1p3a$6B@N#Y!fBMoNw}wmOGZGCBX+9Y*sKF-U)OR&#y@$_5VFwlkfes}_~ZZS13; zLWYUJ)>!7ohZHtkJ1n-d5#Np=!LHg*KG)gT(d4w-OH7~}+J&&^s^YBX;H3E?!Q;ew zwT5d0i__5G{L;U(50FtC5qR5$GSCiUN?zpOsrDUAeSnc*&|h0U`kDc` z#uDeu+=)8$Ev-d_iA>Np?(al&Qu`gp0h$YMRE|(TnzMvaIr~;1w+M5SS0-r5R?%|F zR^nS6R!F+im1Cc@sqJ>{eyFsM6F(uf@9-FA;8Jj~`9eQa#?!vXvpW+h?p=|*!mZaS zu;(3c@fG_tc)Ouz$}WFj$jx|Aw*GB(b0Ej{F%o^EC$~3Qa*C&Hzu5kxC2))7CIg2? zCfW_3fh6WsNixtoitqx~<}jZ}d;xd=m67mLv67PQb3 z#%rR4M6@pAm+BB)9Q%}`e7zZ79L9#xh^tJ9UCWf>&fz_4@LA#P$O=~KLvs!WSx1d*XAQpCk_V}+Au`QO5E|(nXyzTS-tQLOlVOOUC0jaQ6pTN$4|1JX=M+aAk zgR8NYrxV1*=og098dm*COW1Z)Vcn44xz#~B;eaL)+tlSLfL_5~?t?u0`NlhU3X)dq zqPHH=?%l=-rp>Uo$SUm+&ee{+?-7l!rsR@4K-tPhJ#NdF5&OP-IzUmn0{XC|MNlwU zNGGrW+ZKsM3uJ%q+|*Xl?18~Je&42tkL)WQ>LgX)4atdpY*15)FSHHVTjmguzfpG( zrSUMYXYz$Q%>bj0JkyBufmeWSH_qom;}IuG0kLxY9;2V-CR(1fv=&OlpPKQGP@CwK z=}fXa-3&VD(lo!&6k}p-@ZYENSP?Z+$Vm6GZuXh*iuh5{Dx*viV$#lU&=2SsdHVXZ zHUK=`pjTBOO*Q83XAnf8-%58abBekmSFMC9P_-_xmQQtYLwRF!R-Q+ESzW*Ciz6QB zdnitWAW=WxaLoHuXtB%vFkD5M7V(Sh?T&k7;P?GW++|@jzY+n1hZUQ1r|iS3C+d&W zjlI4D;YGV9QjcQ+OT0-Gc#sef2?4)Zyt~8|oW=W3xx?xGsd$&Yfb&|vg$eemKUl6m zmGAEV-~`8SF@TXF@S*-U-SMaDUDO2MApRB|)W6^R|F(;NTDglb;0Wut7{I&$Tfjfy ztv~JDom+4`@>|?6|N4+W(aE0{?sio8eETg{*#BkP{i%MpvB2BzZ^426{d-vcZxjAg z`)>Kdo6m1~0$a=9+P_=Tp9b!x)_)qH!3O~TOU Date: Fri, 1 Dec 2023 14:18:21 -0500 Subject: [PATCH 31/62] fixed copy seedlots to list --- mason/breeders_toolbox/seedlots_section.mas | 36 ++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/mason/breeders_toolbox/seedlots_section.mas b/mason/breeders_toolbox/seedlots_section.mas index 104aa952cb..be9c91d534 100644 --- a/mason/breeders_toolbox/seedlots_section.mas +++ b/mason/breeders_toolbox/seedlots_section.mas @@ -15,12 +15,11 @@ $stock_type => undef <&| /page/info_section.mas, id=>'related_seedlots_to_accessions', title => 'Seedlots of this '.ucfirst($stock_type), collapsible=>1, collapsed=>1, subtitle=>"" &>
-
+
Vector NameStock TypeOrganismSynonymsSubmitters
-
<&| /page/info_section.mas, title => 'Copy Seedlots to a List', collapsible=>1, collapsed=>1, subtitle=>'Copy the seedlot names showing in table to a new or exisiting list'&>
@@ -59,24 +58,25 @@ jQuery(document).ready(function(){ { title: "Seedlot Location", "data": "location" }, { title: "Count", "data": "count" }, { title: "Weight(g)", "data": "weight_gram" }, + { title: "", "data": "seedlot_stock_uniquename"} ], - "fnInitComplete": function(oSettings, json) { - //console.log(json); - if (!isLoggedIn()) { - jQuery('#accession_seedlots_to_list_menu').html("

Please login to use lists!

"); - } else { - var html = ""; - for(var i=0; i Date: Fri, 1 Dec 2023 14:29:00 -0500 Subject: [PATCH 32/62] added box name and quality info --- mason/breeders_toolbox/seedlots_section.mas | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mason/breeders_toolbox/seedlots_section.mas b/mason/breeders_toolbox/seedlots_section.mas index be9c91d534..2265f31691 100644 --- a/mason/breeders_toolbox/seedlots_section.mas +++ b/mason/breeders_toolbox/seedlots_section.mas @@ -58,15 +58,17 @@ jQuery(document).ready(function(){ { title: "Seedlot Location", "data": "location" }, { title: "Count", "data": "count" }, { title: "Weight(g)", "data": "weight_gram" }, + { title: "Box Name", "data": "box" }, + { title: "Quality", "data": "seedlot_quality" }, { title: "", "data": "seedlot_stock_uniquename"} ], }); seedlots_table.draw(); - seedlots_table.column(6).visible(false); + seedlots_table.column(8).visible(false); jQuery('#seedlots_of_accession_table').on( 'draw.dt', function () { - var seedlot_names = seedlots_table.column(6).data(); + var seedlot_names = seedlots_table.column(8).data(); var names = ""; for (var i = 0; i < seedlot_names.length; i++) { From 1887d4cb1431fcc474d867d4d6e987d382d465ca Mon Sep 17 00:00:00 2001 From: titima15 Date: Fri, 1 Dec 2023 14:39:04 -0500 Subject: [PATCH 33/62] updated system_cvterms --- system_cvterms.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/system_cvterms.txt b/system_cvterms.txt index 2a66cb6f19..3f9dbd873b 100644 --- a/system_cvterms.txt +++ b/system_cvterms.txt @@ -52,6 +52,8 @@ geolocation_property local_name From BrAPI 03/27/2017 nm529 00076 geolocation_property location_type From BrAPI 03/27/2017 nm529 00076 geolocation_property noaa_station_id For storing the nearest NOAA Station ID for a location 09/02/2019 nm529 00114 geolocation_property region From BrAPI 03/27/2017 nm529 00076ff +list_types crossing_experiments tt15 00178 +list_types genotyping_projects tt15 00178 list_types identifier_generation 08/21/2018 nm529 00102 list_types genotyping_trials ##### obsoleted, replaced with genotyping_plates 03/23/2018 nm529 00092 list_types tissue_samples 02/15/2018 nm529 00091 @@ -712,6 +714,7 @@ stock_property crossing_metadata_json 00087 stock_property cross_transaction_json For storing crossing activities, then the summary of these data is stored as crossing_metadata_json 11/30/2020 tt15 00132 stock_property current_count For keeping current count of seedlot 09/06/2017 nm529 00086 stock_property current_weight_gram For keeping current count of seedlot 09/06/2017 nm529 00092 +stock_property discarded_metadata For storing metadata of discarded seedlot tt15 00181 stock_property dna_person For indicating dna_person in genotype plate well 2/15/2018 nm529 00091 stock_property donor From BrAPI 03/27/2017 nm529 00076 stock_property donor institute From BrAPI 03/27/2017 nm529 00076 From 7ead84937b5fc52535cd7cde97f18f2793a84ed0 Mon Sep 17 00:00:00 2001 From: titima15 Date: Mon, 4 Dec 2023 15:57:57 -0500 Subject: [PATCH 34/62] moved related stock section --- mason/stock/index.mas | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/mason/stock/index.mas b/mason/stock/index.mas index a9753ca662..bf2c754f04 100644 --- a/mason/stock/index.mas +++ b/mason/stock/index.mas @@ -246,7 +246,7 @@ function jqueryStuff() { alternate_ghosted_delete_button => '' &> - +


@@ -260,13 +260,13 @@ function jqueryStuff() { <&| /page/info_section.mas, title => "Released variety name", subtitle=>$released_variety_link, is_subsection => 1 &> <& /stock/stockprops.mas, stock_id =>$stock_id, - form_div_id => 'released_variety_link', + form_div_id => 'released_variety_link', props => ['released_variety_name'], div_name => 'released_variety_name', edit_privs => $edit_privs, subset => ['released_variety_name'], editable => ['released_variety_name'] &> - +
@@ -278,18 +278,22 @@ function jqueryStuff() { - + <&| /page/info_section.mas, title => "Navigator" , collapsible=> 1, collapsed=>0 &> % my $subtitle = $edit_privs ? "" : ""; % my $props_subtitle = $edit_privs ? "" : ""; +% if ($type_name eq 'plot' || $type_name eq 'plant' || $type_name eq 'subplot' || $type_name eq 'tissue_sample') { + <& /page/detail_page_2_col_section.mas, stock_id => $stock_id, info_section_title => "

Related Stocks

", info_section_subtitle => 'View any accession, plot, plant, and/or tissue_sample that are linked to this stock.', icon_class => "glyphicon glyphicon-retweet", info_section_id => "stock_related_stock_section", stock_uniquename => $uniquename, type_name => $type_name &> +% } + % if ($type_name ne 'vector_construct' ){ <& /page/detail_page_2_col_section.mas, stock_id => $stock_id, type_name => $type_name, stockref => $stockref, buttons_html => $subtitle.$props_subtitle, info_section_title => "

Additional Info

", info_section_subtitle => 'View and edit additional properties such as synonyms, editors, and all types of properties.', icon_class => "glyphicon glyphicon-info-sign", info_section_id => "stock_additional_info_section", stockprops => $stockprops, edit_privs => $edit_privs, editable_stock_props => \@editable_stock_props, editor_link => $editor_link_table, source_dbs => \%source_dbs, locus_add_uri => $locus_add_uri, new_locus_link => $new_locus_link, allele_div => $allele_div, is_owner => $is_owner &> % } else { <& /page/detail_page_2_col_section.mas, stock_id => $stock_id, type_name => $type_name, stockref => $stockref, buttons_html => $subtitle.$props_subtitle, info_section_title => "

Additional Info

", info_section_subtitle => 'View and edit additional properties such as synonyms, editors, and all types of properties.', icon_class => "glyphicon glyphicon-info-sign", info_section_id => "stock_additional_info_section", stockprops => $stockprops, edit_privs => $edit_privs, editable_stock_props => \@editable_vector_props, editor_link => $editor_link_table, source_dbs => \%source_dbs, locus_add_uri => $locus_add_uri, new_locus_link => $new_locus_link, allele_div => $allele_div, is_owner => $is_owner &> -% } +% } % if ($type_name eq 'accession' || $type_name eq 'plant' || $type_name eq 'plot' || $type_name eq 'subplot' || $type_name eq 'tissue_sample'){ <& /page/detail_page_2_col_section.mas, stock_id => $stock_id, info_section_title => "

Experiment Usage

", info_section_subtitle => 'View experiments that this stock has been used in.', icon_class => "glyphicon glyphicon-leaf", info_section_id => "stock_trials_section" &> @@ -313,9 +317,9 @@ function jqueryStuff() { % } <& /page/detail_page_2_col_section.mas, stock_id => $stock_id, info_section_title => "

Sequencing Status

", info_section_subtitle => 'View and edit sequencing status info for this stock.', icon_class => "glyphicon glyphicon-inbox", info_section_id => "stock_sequencing_status_section", buttons_html => "$sequencing_status_button", map_html => $map_html &> - + - + <& /page/detail_page_2_col_section.mas, stock_id => $stock_id, info_section_title => "

Genotype Marker Data

", info_section_subtitle => 'View and download phenotypic data for this stock.', icon_class => "glyphicon glyphicon-map-marker", info_section_id => "stock_genotypes_section", map_html => $map_html &> % } @@ -334,9 +338,9 @@ function jqueryStuff() { <& /page/detail_page_2_col_section.mas, stock_id => $stock_id, info_section_title => "

Pedigree

", info_section_subtitle => 'View and edit pedigree information.', icon_class => "glyphicon glyphicon-random", info_section_id => "stock_pedigree_section", buttons_html => $add_parent_link.$remove_parent_link, has_pedigree => $has_pedigree, info_section_collapsed => 0 &> + <& /page/detail_page_2_col_section.mas, stock_id => $stock_id, info_section_title => "

Related Stocks

", info_section_subtitle => 'View any plots, plants, tissue_sample, and/or accessions that are linked to this stock.', icon_class => "glyphicon glyphicon-retweet", info_section_id => "stock_related_stock_section", stock_uniquename => $uniquename, type_name => $type_name &> % } - <& /page/detail_page_2_col_section.mas, stock_id => $stock_id, info_section_title => "

Related Stocks

", info_section_subtitle => 'View any plots, plants, tissue_sample, and/or accessions that are linked to this stock.', icon_class => "glyphicon glyphicon-retweet", info_section_id => "stock_related_stock_section", stock_uniquename => $uniquename, type_name => $type_name &> <& /page/detail_page_2_col_section.mas, stock_id => $stock_id, info_section_title => "

Images

", info_section_subtitle => 'View and add images of this stock and of related stocks.', icon_class => "glyphicon glyphicon-camera", info_section_id => "stock_images_section", image_ids => $image_ids, related_image_ids => $related_image_ids, dbh => $dbh, buttons_html => qq|Add new imageCompare Images| &> From 854defe0e924953f432d36ab36c5c0a091362973 Mon Sep 17 00:00:00 2001 From: titima15 Date: Mon, 4 Dec 2023 19:39:43 -0500 Subject: [PATCH 35/62] organize different stock types --- lib/SGN/Controller/AJAX/Stock.pm | 84 ++++++++++++++++++++---- mason/stock/related_stock.mas | 5 +- t/unit_mech/AJAX/Stocks/Related_stocks.t | 8 +-- 3 files changed, 79 insertions(+), 18 deletions(-) diff --git a/lib/SGN/Controller/AJAX/Stock.pm b/lib/SGN/Controller/AJAX/Stock.pm index ccf0ac27aa..935b3e198f 100644 --- a/lib/SGN/Controller/AJAX/Stock.pm +++ b/lib/SGN/Controller/AJAX/Stock.pm @@ -1924,15 +1924,75 @@ sub get_trial_related_stock:Chained('/stock/get_stock') PathPart('datatables/tri my $trial_related_stock = CXGN::Stock::RelatedStocks->new({dbic_schema => $schema, stock_id =>$stock_id}); my $result = $trial_related_stock->get_trial_related_stock(); my @stocks; + my @accessions; + my @crosses; + my @family_names; + my @plots; + my @subplots; + my @plants; + my @tissue_samples; + my @seedlots; + my @others; foreach my $r (@$result){ - my ($stock_id, $stock_name, $cvterm_name) = @$r; - my $url; - if ($cvterm_name eq 'seedlot'){ - $url = qq{$stock_name}; - } else { - $url = qq{$stock_name}; - } - push @stocks, [$url, $cvterm_name, $stock_name]; + my ($stock_id, $stock_name, $cvterm_name) = @$r; + my $url; + if ($cvterm_name eq 'seedlot'){ + $url = qq{$stock_name}; + } elsif ($cvterm_name eq 'cross') { + $url = qq{$stock_name}; + } elsif ($cvterm_name eq 'family_name') { + $url = qq{$stock_name}; + } else { + $url = qq{$stock_name}; + } + + if ($cvterm_name eq 'accession') { + push @accessions, [$cvterm_name, $url, $stock_name]; + } elsif ($cvterm_name eq 'cross') { + push @crosses, [$cvterm_name, $url, $stock_name]; + } elsif ($cvterm_name eq 'family_name') { + push @family_names, [$cvterm_name, $url, $stock_name]; + } elsif ($cvterm_name eq 'plot') { + push @plots, [$cvterm_name, $url, $stock_name]; + } elsif ($cvterm_name eq 'subplot') { + push @subplots, [$cvterm_name, $url, $stock_name]; + } elsif ($cvterm_name eq 'plant') { + push @plants, [$cvterm_name, $url, $stock_name]; + } elsif ($cvterm_name eq 'tissue_sample') { + push @tissue_samples, [$cvterm_name, $url, $stock_name]; + } elsif ($cvterm_name eq 'seedlot') { + push @seedlots, [$cvterm_name, $url, $stock_name]; + } else { + push @others, [$cvterm_name, $url, $stock_name]; + } + } + + if (scalar(@accessions) > 0) { + push @stocks, @accessions; + } + if (scalar(@crosses) > 0) { + push @stocks, @crosses; + } + if (scalar(@family_names) > 0) { + push @stocks, @family_names; + } + if (scalar(@plots) > 0) { + push @stocks, @plots; + } + if (scalar(@subplots) > 0) { + push @stocks, @subplots; + } + if (scalar(@plants) > 0) { + push @stocks, @plants; + } + if (scalar(@tissue_samples) > 0) { + push @stocks, @tissue_samples; + } + if (scalar(@seedlots) > 0) { + push @stocks, @seedlots; + } + if (scalar(@others) > 0) { + push @stocks, @others; } $c->stash->{rest}={data=>\@stocks}; @@ -2277,7 +2337,7 @@ sub stock_additional_file_upload :Chained('/stock/get_stock') PathPart('upload_a $c->stash->{rest} = {error=>$result->{error}}; $c->detach(); } - + $c->stash->{rest} = { success => 1, file_id => $result->{file_id} }; } @@ -2294,11 +2354,11 @@ sub get_accession_additional_file_uploaded :Chained('/stock/get_stock') PathPart my @file_array; my %file_info; - my $q = "SELECT file_id, m.create_date, p.sp_person_id, p.username, basename, dirname, filetype + my $q = "SELECT file_id, m.create_date, p.sp_person_id, p.username, basename, dirname, filetype FROM phenome.stock_file - JOIN metadata.md_files using(file_id) + JOIN metadata.md_files using(file_id) LEFT JOIN metadata.md_metadata as m using(metadata_id) - LEFT JOIN sgn_people.sp_person as p ON (p.sp_person_id=m.create_person_id) + LEFT JOIN sgn_people.sp_person as p ON (p.sp_person_id=m.create_person_id) WHERE stock_id=? and m.obsolete = 0 and metadata.md_files.filetype='accession_additional_file_upload' ORDER BY file_id ASC"; my $h = $c->dbc->dbh()->prepare($q); diff --git a/mason/stock/related_stock.mas b/mason/stock/related_stock.mas index 3c2fb86a91..89aa0b080c 100644 --- a/mason/stock/related_stock.mas +++ b/mason/stock/related_stock.mas @@ -7,15 +7,15 @@ $stock_type => undef % if ($stock_type eq 'accession' || $stock_type eq 'plant' || $stock_type eq 'plot' || $stock_type eq 'subplot' || $stock_type eq 'tissue_sample'){ - <&| /page/info_section.mas, id=>'related_stocks_in_trial', title => 'Related stocks in trials', collapsible=>1, collapsed=>1 &> + <&| /page/info_section.mas, id=>'related_stocks_in_trial', title => 'Related stocks in trial', collapsible=>1, collapsed=>1 &>
- + @@ -156,6 +156,7 @@ jQuery(document).ready(function(){ jQuery('#related_stocks_in_trial_onswitch').one("click", function(){ var trial_stock_table = jQuery('#trial_related_stock').DataTable({ + 'order': false, 'ajax':'/stock/'+ <% $stock_id %> + '/datatables/trial_related_stock', "fnInitComplete": function(oSettings, json) { //console.log(json); diff --git a/t/unit_mech/AJAX/Stocks/Related_stocks.t b/t/unit_mech/AJAX/Stocks/Related_stocks.t index bb6d16935d..ec76b811cd 100644 --- a/t/unit_mech/AJAX/Stocks/Related_stocks.t +++ b/t/unit_mech/AJAX/Stocks/Related_stocks.t @@ -27,10 +27,10 @@ $response = decode_json $mech->content; #print STDERR Dumper $response; is_deeply($response, {'data'=> [ -['test_trial21', 'plot', 'test_trial21'], -['test_trial26', 'plot', 'test_trial26'], -['test_trial214', 'plot', 'test_trial214'], -['test_accession4_001','seedlot','test_accession4_001'] +['plot', 'test_trial21', 'test_trial21'], +['plot', 'test_trial26', 'test_trial26'], +['plot', 'test_trial214', 'test_trial214'], +['seedlot', 'test_accession4_001','test_accession4_001'] ]}, 'trial_related_stock'); $mech->get_ok("http://localhost:3010/stock/$accession_1_id/datatables/progenies"); From 4630c5c48543e99ee9cbc30b5d0963353b939a64 Mon Sep 17 00:00:00 2001 From: David Waring Date: Tue, 5 Dec 2023 11:11:54 -0500 Subject: [PATCH 36/62] Trial Layout Download: add rep, block, and control columns --- lib/CXGN/Trial.pm | 6 +++++- lib/SGN/Controller/AJAX/TrialMetadata.pm | 20 ++++++++++++++++---- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/lib/CXGN/Trial.pm b/lib/CXGN/Trial.pm index c41173ccc4..cdd9db5d9d 100644 --- a/lib/CXGN/Trial.pm +++ b/lib/CXGN/Trial.pm @@ -294,7 +294,11 @@ sub get_sorted_plots { schema => $schema, trial_id => $trial_id, data_level => 'plots', - selected_columns => {"location_name"=>1,"trial_name"=>1,"plot_name"=>1,"plot_id"=>1,"plot_number"=>1,"row_number"=>1,"col_number"=>1,"accession_name"=>1,"seedlot_name"=>1}, + selected_columns => { + "location_name"=>1,"trial_name"=>1,"plot_name"=>1,"plot_id"=>1,"plot_number"=>1, + "row_number"=>1,"col_number"=>1,"accession_name"=>1,"seedlot_name"=>1, + "rep_number"=>1,"block_number"=>1,"is_a_control"=>1 + }, }); my $output = $trial_layout_download->get_layout_output()->{output}; diff --git a/lib/SGN/Controller/AJAX/TrialMetadata.pm b/lib/SGN/Controller/AJAX/TrialMetadata.pm index c926452e5f..00cd91cfcd 100644 --- a/lib/SGN/Controller/AJAX/TrialMetadata.pm +++ b/lib/SGN/Controller/AJAX/TrialMetadata.pm @@ -4980,7 +4980,7 @@ sub get_trial_plot_order : Path('/ajax/breeders/trial_plot_order') : Args(0) { my $col = $type . "_order"; # Add CSV headers - my @headers = ($col, "type", "location_name", "trial_name", "plot_number", "plot_name", "accession_name", "seedlot_name", "row_number", "col_number"); + my @headers = ($col, "type", "location_name", "trial_name", "plot_number", "plot_name", "accession_name", "seedlot_name", "row_number", "col_number", "rep_number", "block_number", "is_a_control"); push(@data, \@headers); # Add plot rows @@ -4997,7 +4997,10 @@ sub get_trial_plot_order : Path('/ajax/breeders/trial_plot_order') : Args(0) { $_->{accession_name}, $_->{seedlot_name}, $_->{row_number}, - $_->{col_number} + $_->{col_number}, + $_->{rep_number}, + $_->{block_number}, + $_->{is_a_control} ); push(@data, \@d); } @@ -5012,7 +5015,10 @@ sub get_trial_plot_order : Path('/ajax/breeders/trial_plot_order') : Args(0) { "", # accession "", # seedlot $_->{row_number}, - $_->{col_number} + $_->{col_number}, + "", # rep + "", # block + "", # control ); push(@data, \@d); } @@ -5023,7 +5029,7 @@ sub get_trial_plot_order : Path('/ajax/breeders/trial_plot_order') : Args(0) { $filename = "harvest_master.csv"; # Add CSV headers - my @headers = ("PLTID", "Range", "Row", "type", "location_name", "trial_name", "plot_number", "plot_name", "accession_name", "seedlot_name"); + my @headers = ("PLTID", "Range", "Row", "type", "location_name", "trial_name", "plot_number", "plot_name", "accession_name", "seedlot_name", "rep_number", "block_number", "is_a_control"); push(@data, \@headers); # Add plot rows @@ -5041,6 +5047,9 @@ sub get_trial_plot_order : Path('/ajax/breeders/trial_plot_order') : Args(0) { $_->{plot_name}, $_->{accession_name}, $_->{seedlot_name}, + $_->{rep_number}, + $_->{block_number}, + $_->{is_a_control} ); push(@data, \@d); } @@ -5056,6 +5065,9 @@ sub get_trial_plot_order : Path('/ajax/breeders/trial_plot_order') : Args(0) { "", # plot name "", # accession "", # seedlot + "", # rep + "", # block + "", # control ); push(@data, \@d); } From dbe2b2d899da3e40896f1c995d36b5fe933d9afb Mon Sep 17 00:00:00 2001 From: David Waring Date: Tue, 5 Dec 2023 11:36:50 -0500 Subject: [PATCH 37/62] CXGN::List exists_list - return info for public lists --- lib/CXGN/List.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CXGN/List.pm b/lib/CXGN/List.pm index afe813c9cb..4af022270d 100644 --- a/lib/CXGN/List.pm +++ b/lib/CXGN/List.pm @@ -222,7 +222,7 @@ sub exists_list { my $name = shift; my $owner = shift; - my $q = "SELECT list_id, cvterm.name FROM sgn_people.list AS list LEFT JOIN cvterm ON (type_id=cvterm_id) WHERE list.name = ? AND list.owner=?"; + my $q = "SELECT list_id, cvterm.name FROM sgn_people.list AS list LEFT JOIN cvterm ON (type_id=cvterm_id) WHERE list.name=? AND (list.owner=? OR list.is_public=TRUE)"; my $h = $dbh->prepare($q); $h->execute($name, $owner); my ($list_id, $list_type) = $h->fetchrow_array(); From 0f1feb03c18bd1a7279bc8f3f53afed31222a9ab Mon Sep 17 00:00:00 2001 From: David Waring Date: Tue, 5 Dec 2023 13:30:51 -0500 Subject: [PATCH 38/62] Label Designer: support Public Lists for sorting by trial layout --- js/source/legacy/tools/LabelDesigner.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/source/legacy/tools/LabelDesigner.js b/js/source/legacy/tools/LabelDesigner.js index 70cbb3d446..d44dae8199 100644 --- a/js/source/legacy/tools/LabelDesigner.js +++ b/js/source/legacy/tools/LabelDesigner.js @@ -1300,8 +1300,8 @@ function addSortOrders(add_fields, data_type, data_level) { // Set type-specific sorting options let data_type_fields = []; // Sort by trial layout for plot-level labels... - if ( (data_type === 'Field Trials' || data_type === 'Lists') && data_level === 'plots' ) { - data_type_fields = ['Trial Layout: Plot Order'] + if ( ['Field Trials', 'Lists', 'Public Lists'].includes(data_type) && data_level === 'plots' ) { + data_type_fields = ['Trial Layout: Plot Order']; } //load options From 5d81899d795fb09a9e3973b5c6990c81e8ddc033 Mon Sep 17 00:00:00 2001 From: titima15 Date: Tue, 5 Dec 2023 14:06:19 -0500 Subject: [PATCH 39/62] removed seedlot from related stocks in trial --- lib/CXGN/Stock/RelatedStocks.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/CXGN/Stock/RelatedStocks.pm b/lib/CXGN/Stock/RelatedStocks.pm index d0235e5c76..746c859d33 100644 --- a/lib/CXGN/Stock/RelatedStocks.pm +++ b/lib/CXGN/Stock/RelatedStocks.pm @@ -24,14 +24,14 @@ sub get_trial_related_stock { my $plant_of_type_id = SGN::Model::Cvterm->get_cvterm_row($schema, 'plant_of', 'stock_relationship')->cvterm_id(); my $subplot_of_type_id = SGN::Model::Cvterm->get_cvterm_row($schema, 'subplot_of', 'stock_relationship')->cvterm_id(); my $plant_of_subplot_type_id = SGN::Model::Cvterm->get_cvterm_row($schema, 'plant_of_subplot', 'stock_relationship')->cvterm_id(); - my $seed_transaction_type_id = SGN::Model::Cvterm->get_cvterm_row($schema, 'seed transaction', 'stock_relationship')->cvterm_id(); +# my $seed_transaction_type_id = SGN::Model::Cvterm->get_cvterm_row($schema, 'seed transaction', 'stock_relationship')->cvterm_id(); my $tissue_sample_of_type_id = SGN::Model::Cvterm->get_cvterm_row($schema, 'tissue_sample_of', 'stock_relationship')->cvterm_id(); my $q = "SELECT stock.stock_id, stock.uniquename, cvterm.name FROM stock_relationship INNER JOIN stock ON (stock_relationship.subject_id = stock.stock_id) INNER JOIN cvterm ON (stock.type_id = cvterm.cvterm_id) WHERE stock_relationship.object_id = ? AND (stock_relationship.type_id = ? - OR stock_relationship.type_id = ? OR stock_relationship.type_id = ? OR stock_relationship.type_id = ? OR stock_relationship.type_id = ? OR stock_relationship.type_id = ?) + OR stock_relationship.type_id = ? OR stock_relationship.type_id = ? OR stock_relationship.type_id = ? OR stock_relationship.type_id = ? ) UNION ALL @@ -39,11 +39,11 @@ sub get_trial_related_stock { INNER JOIN stock ON (stock_relationship.object_id = stock.stock_id) INNER JOIN cvterm ON (stock.type_id = cvterm.cvterm_id) WHERE stock_relationship.subject_id = ? AND (stock_relationship.type_id = ? - OR stock_relationship.type_id = ? OR stock_relationship.type_id = ? OR stock_relationship.type_id = ? OR stock_relationship.type_id = ? OR stock_relationship.type_id = ?) "; + OR stock_relationship.type_id = ? OR stock_relationship.type_id = ? OR stock_relationship.type_id = ? OR stock_relationship.type_id = ? ) "; my $h = $schema->storage->dbh()->prepare($q); - $h->execute($stock_id, $plot_of_type_id, $plant_of_type_id, $subplot_of_type_id, $plant_of_subplot_type_id, $seed_transaction_type_id, $tissue_sample_of_type_id, $stock_id, $plot_of_type_id, $plant_of_type_id, $subplot_of_type_id, $plant_of_subplot_type_id, $seed_transaction_type_id, $tissue_sample_of_type_id); + $h->execute($stock_id, $plot_of_type_id, $plant_of_type_id, $subplot_of_type_id, $plant_of_subplot_type_id, $tissue_sample_of_type_id, $stock_id, $plot_of_type_id, $plant_of_type_id, $subplot_of_type_id, $plant_of_subplot_type_id, $tissue_sample_of_type_id); my @trial_related_stock =(); while(my($stock_id, $stock_name, $cvterm_name) = $h->fetchrow_array()){ From d0f9b78843328bd66e4bfa35bcaa3e8d43d3f3d1 Mon Sep 17 00:00:00 2001 From: titima15 Date: Tue, 5 Dec 2023 15:55:51 -0500 Subject: [PATCH 40/62] seedlot section specific to plot and plant --- lib/CXGN/Stock/RelatedStocks.pm | 39 ++++++++++++++++++++++ lib/SGN/Controller/AJAX/Stock.pm | 19 +++++++++++ mason/stock/related_stock.mas | 56 ++++++++++++++++++++++++++++---- 3 files changed, 108 insertions(+), 6 deletions(-) diff --git a/lib/CXGN/Stock/RelatedStocks.pm b/lib/CXGN/Stock/RelatedStocks.pm index 746c859d33..1b02404ed8 100644 --- a/lib/CXGN/Stock/RelatedStocks.pm +++ b/lib/CXGN/Stock/RelatedStocks.pm @@ -175,4 +175,43 @@ sub get_cross_of_progeny { } +sub get_plot_plant_related_seedlots { + my $self = shift; + my $stock_id = $self->stock_id; + my $schema = $self->dbic_schema(); + my $seed_transaction_type_id = SGN::Model::Cvterm->get_cvterm_row($schema, 'seed transaction', 'stock_relationship')->cvterm_id(); + + my @related_seedlots; + + my $q1 = "SELECT distinct(stock.stock_id), stock.uniquename, cvterm.name FROM stock_relationship + INNER JOIN stock ON (stock_relationship.subject_id = stock.stock_id) + INNER JOIN cvterm ON (stock.type_id = cvterm.cvterm_id) + WHERE stock_relationship.object_id = ? AND stock_relationship.type_id = ? "; + + my $h1 = $schema->storage->dbh()->prepare($q1); + + $h1->execute($stock_id, $seed_transaction_type_id); + + while(my($stock_id, $stock_name, $stock_type) = $h1->fetchrow_array()){ + push @related_seedlots, ['source of', $stock_type, $stock_id, $stock_name] + } + + my $q2 = "SELECT distinct(stock.stock_id), stock.uniquename, cvterm.name FROM stock_relationship + INNER JOIN stock ON (stock_relationship.object_id = stock.stock_id) + INNER JOIN cvterm ON (stock.type_id = cvterm.cvterm_id) + WHERE stock_relationship.subject_id = ? AND stock_relationship.type_id = ? "; + + my $h2 = $schema->storage->dbh()->prepare($q2); + + $h2->execute($stock_id, $seed_transaction_type_id); + + while(my($stock_id, $stock_name, $stock_type) = $h2->fetchrow_array()){ + push @related_seedlots, ['derived from', $stock_type, $stock_id, $stock_name] + } + + return\@related_seedlots; + +} + + 1; diff --git a/lib/SGN/Controller/AJAX/Stock.pm b/lib/SGN/Controller/AJAX/Stock.pm index 935b3e198f..e016e54ab7 100644 --- a/lib/SGN/Controller/AJAX/Stock.pm +++ b/lib/SGN/Controller/AJAX/Stock.pm @@ -2086,6 +2086,25 @@ sub get_stock_for_tissue:Chained('/stock/get_stock') PathPart('datatables/stock_ } + +sub get_plot_plant_related_seedlots:Chained('/stock/get_stock') PathPart('datatables/plot_plant_related_seedlots') Args(0){ + my $self = shift; + my $c = shift; + my $stock_id = $c->stash->{stock_row}->stock_id(); + + my $schema = $c->dbic_schema("Bio::Chado::Schema", 'sgn_chado'); + my $progenies = CXGN::Stock::RelatedStocks->new({dbic_schema => $schema, stock_id =>$stock_id}); + my $result = $progenies->get_plot_plant_related_seedlots(); + my @stocks; + foreach my $r (@$result){ + my ($transaction_type, $stock_type, $stock_id, $stock_name) = @$r; + push @stocks, [$transaction_type, $stock_type, qq{$stock_name}, $stock_name]; + } + + $c->stash->{rest}={data=>\@stocks}; +} + + sub get_stock_datatables_genotype_data : Chained('/stock/get_stock') :PathPart('datatables/genotype_data') : ActionClass('REST') { } sub get_stock_datatables_genotype_data_GET { diff --git a/mason/stock/related_stock.mas b/mason/stock/related_stock.mas index 89aa0b080c..bff36147bb 100644 --- a/mason/stock/related_stock.mas +++ b/mason/stock/related_stock.mas @@ -6,7 +6,6 @@ $stock_type => undef % if ($stock_type eq 'accession' || $stock_type eq 'plant' || $stock_type eq 'plot' || $stock_type eq 'subplot' || $stock_type eq 'tissue_sample'){ - <&| /page/info_section.mas, id=>'related_stocks_in_trial', title => 'Related stocks in trial', collapsible=>1, collapsed=>1 &>
@@ -30,17 +29,39 @@ $stock_type => undef
- % } -% if ($stock_type eq 'accession'){ - - <& /breeders_toolbox/seedlots_section.mas, stock_id=>$stock_id, stock_type=>$stock_type, stock_uniquename=>$stock_uniquename &> +% if ($stock_type eq 'plot' || $stock_type eq 'plant'){ + <&| /page/info_section.mas, id=>'related_seedlots', title => 'Related seedlots', collapsible=>1, collapsed=>1 &> +
+
+
+ + + + + + + + + +
+
+
+ <&| /page/info_section.mas, title => 'Copy Stocks to a List', collapsible=>1, collapsed=>1, subtitle=>'Copy the seedlot names showing in table to a new or exisiting list'&> +
+
+ + +
+ % } % if ($stock_type eq 'accession'){ + <& /breeders_toolbox/seedlots_section.mas, stock_id=>$stock_id, stock_type=>$stock_type, stock_uniquename=>$stock_uniquename &> + <&| /page/info_section.mas, id=>'related_stock_progenies', title => 'Progenies of this Accession (as female or male parent)', collapsible=>1, collapsed=>1 &>
@@ -123,7 +144,7 @@ $stock_type => undef % if ($stock_type eq 'accession' || $stock_type eq 'plant' || $stock_type eq 'plot' || $stock_type eq 'subplot' || $stock_type eq 'tissue_sample'){ - <&| /page/info_section.mas, id=>'related_stock_tissues', title => 'Related stocks for tissue sample', collapsible=>1, collapsed=>1 &> + <&| /page/info_section.mas, id=>'related_stock_tissues', title => 'Related tissue samples', collapsible=>1, collapsed=>1 &>
@@ -177,6 +198,29 @@ jQuery(document).ready(function(){ }); }); + jQuery('#related_seedlots_onswitch').one("click", function(){ + var related_seedlots_table = jQuery('#plot_plant_related_seedlots').DataTable({ + 'order': false, + 'ajax':'/stock/'+ <% $stock_id %> + '/datatables/plot_plant_related_seedlots', + "fnInitComplete": function(oSettings, json) { + //console.log(json); + if (!isLoggedIn()) { + jQuery('#seedlots_to_list_menu').html("

Please login to use lists!

"); + } else { + var html = ""; + for(var i=0; i Date: Wed, 6 Dec 2023 11:06:50 -0500 Subject: [PATCH 41/62] re-organized tissue samples --- lib/SGN/Controller/AJAX/Stock.pm | 18 +++------- mason/stock/related_stock.mas | 61 +++++++++++++++++--------------- 2 files changed, 36 insertions(+), 43 deletions(-) diff --git a/lib/SGN/Controller/AJAX/Stock.pm b/lib/SGN/Controller/AJAX/Stock.pm index e016e54ab7..24d8b63c4b 100644 --- a/lib/SGN/Controller/AJAX/Stock.pm +++ b/lib/SGN/Controller/AJAX/Stock.pm @@ -1936,9 +1936,8 @@ sub get_trial_related_stock:Chained('/stock/get_stock') PathPart('datatables/tri foreach my $r (@$result){ my ($stock_id, $stock_name, $cvterm_name) = @$r; my $url; - if ($cvterm_name eq 'seedlot'){ - $url = qq{$stock_name}; - } elsif ($cvterm_name eq 'cross') { + + if ($cvterm_name eq 'cross') { $url = qq{$stock_name}; } elsif ($cvterm_name eq 'family_name') { $url = qq{$stock_name}; @@ -1958,12 +1957,6 @@ sub get_trial_related_stock:Chained('/stock/get_stock') PathPart('datatables/tri push @subplots, [$cvterm_name, $url, $stock_name]; } elsif ($cvterm_name eq 'plant') { push @plants, [$cvterm_name, $url, $stock_name]; - } elsif ($cvterm_name eq 'tissue_sample') { - push @tissue_samples, [$cvterm_name, $url, $stock_name]; - } elsif ($cvterm_name eq 'seedlot') { - push @seedlots, [$cvterm_name, $url, $stock_name]; - } else { - push @others, [$cvterm_name, $url, $stock_name]; } } @@ -1985,9 +1978,6 @@ sub get_trial_related_stock:Chained('/stock/get_stock') PathPart('datatables/tri if (scalar(@plants) > 0) { push @stocks, @plants; } - if (scalar(@tissue_samples) > 0) { - push @stocks, @tissue_samples; - } if (scalar(@seedlots) > 0) { push @stocks, @seedlots; } @@ -2079,7 +2069,7 @@ sub get_stock_for_tissue:Chained('/stock/get_stock') PathPart('datatables/stock_ my ($stock_id, $stock_name, $cvterm_name) = @$r; - push @stocks, [qq{$stock_name}, $cvterm_name, $stock_name]; + push @stocks, [$cvterm_name, qq{$stock_name}, $stock_name]; } $c->stash->{rest}={data=>\@stocks}; @@ -2098,7 +2088,7 @@ sub get_plot_plant_related_seedlots:Chained('/stock/get_stock') PathPart('datata my @stocks; foreach my $r (@$result){ my ($transaction_type, $stock_type, $stock_id, $stock_name) = @$r; - push @stocks, [$transaction_type, $stock_type, qq{$stock_name}, $stock_name]; + push @stocks, [$transaction_type, $stock_type, qq{$stock_name}, $stock_name]; } $c->stash->{rest}={data=>\@stocks}; diff --git a/mason/stock/related_stock.mas b/mason/stock/related_stock.mas index bff36147bb..31eecd68a3 100644 --- a/mason/stock/related_stock.mas +++ b/mason/stock/related_stock.mas @@ -58,9 +58,39 @@ $stock_type => undef % } -% if ($stock_type eq 'accession'){ - +% if ($stock_type eq 'accession') { <& /breeders_toolbox/seedlots_section.mas, stock_id=>$stock_id, stock_type=>$stock_type, stock_uniquename=>$stock_uniquename &> +% } + +% if ($stock_type eq 'accession' || $stock_type eq 'plant' || $stock_type eq 'plot' || $stock_type eq 'subplot' || $stock_type eq 'tissue_sample'){ + + <&| /page/info_section.mas, id=>'related_stock_tissues', title => 'Related tissue samples', collapsible=>1, collapsed=>1 &> +
+
+
+ + + + + + + +
TypeName
+
+
+ +
+ <&| /page/info_section.mas, title => 'Copy Stocks to a List', collapsible=>1, collapsed=>1, subtitle=>'Copy the stock names showing in table to a new or exisiting list'&> +
+
+ + +
+ + +% } + +% if ($stock_type eq 'accession'){ <&| /page/info_section.mas, id=>'related_stock_progenies', title => 'Progenies of this Accession (as female or male parent)', collapsible=>1, collapsed=>1 &>
@@ -142,33 +172,6 @@ $stock_type => undef % } -% if ($stock_type eq 'accession' || $stock_type eq 'plant' || $stock_type eq 'plot' || $stock_type eq 'subplot' || $stock_type eq 'tissue_sample'){ - - <&| /page/info_section.mas, id=>'related_stock_tissues', title => 'Related tissue samples', collapsible=>1, collapsed=>1 &> -
-
-
- - - - - - - -
NameType
-
-
- -
- <&| /page/info_section.mas, title => 'Copy Stocks to a List', collapsible=>1, collapsed=>1, subtitle=>'Copy the stock names showing in table to a new or exisiting list'&> -
-
- - -
- - -% }