From 3f206556a32caa7bae4e824d28d04de22220a86a Mon Sep 17 00:00:00 2001 From: titima15 Date: Fri, 6 Oct 2023 13:54:02 -0400 Subject: [PATCH 1/7] download function for snp data on project page --- .../Controller/BreedersToolbox/Download.pm | 19 +++++++++++++++---- .../genotype_data_project.mas | 4 ++-- .../genotyping_data_project/genotype_data.mas | 17 +++++++++++++++++ 3 files changed, 34 insertions(+), 6 deletions(-) diff --git a/lib/SGN/Controller/BreedersToolbox/Download.pm b/lib/SGN/Controller/BreedersToolbox/Download.pm index b1e936de50..116a738983 100644 --- a/lib/SGN/Controller/BreedersToolbox/Download.pm +++ b/lib/SGN/Controller/BreedersToolbox/Download.pm @@ -1057,7 +1057,7 @@ sub download_gbs_action : Path('/breeders/download_gbs_action') { my $forbid_cache = defined($c->req->param('forbid_cache')) ? $c->req->param('forbid_cache') : 0; my $dl_token = $c->req->param("gbs_download_token") || "no_token"; my $dl_cookie = "download".$dl_token; - + my $genotyping_project_id = $c->req->param("genotyping_project_id"); my (@accession_ids, @accession_list, @accession_genotypes, @unsorted_markers, $accession_data, $id_string, $protocol_id, $trial_id_string, @trial_ids); $trial_id_string = $c->req->param("trial_ids"); @@ -1069,11 +1069,12 @@ sub download_gbs_action : Path('/breeders/download_gbs_action') { $id_string = $c->req->param("ids"); @accession_ids = split(',',$id_string); $protocol_id = $c->req->param("protocol_id"); - if (!$protocol_id){ + if ((!defined $protocol_id) && (!defined $genotyping_project_id)){ my $default_genotyping_protocol = $c->config->{default_genotyping_protocol}; $protocol_id = $schema->resultset('NaturalDiversity::NdProtocol')->find({name=>$default_genotyping_protocol})->nd_protocol_id(); } } + elsif ($format eq 'list_id') { #get accession names from list and tranform them to ids my $accession_list_id = $c->req->param("genotype_accession_list_list_select"); $protocol_id = $c->req->param("genotyping_protocol_select"); @@ -1115,6 +1116,16 @@ sub download_gbs_action : Path('/breeders/download_gbs_action') { } } + my @protocol_list; + if (defined $protocol_id) { + push @protocol_list, $protocol_id; + } + + my @genotyping_project_list; + if (defined $genotyping_project_id) { + push @genotyping_project_list, $genotyping_project_id; + } + my $geno = CXGN::Genotype::DownloadFactory->instantiate( $download_format, #can be either 'VCF' or 'DosageMatrix' { @@ -1124,7 +1135,7 @@ sub download_gbs_action : Path('/breeders/download_gbs_action') { accession_list=>\@accession_ids, #tissue_sample_list=>$tissue_sample_list, trial_list=>\@trial_ids, - protocol_id_list=>[$protocol_id], + protocol_id_list=>\@protocol_list, chromosome_list=>$chromosome_numbers, start_position=>$start_position, end_position=>$end_position, @@ -1133,7 +1144,7 @@ sub download_gbs_action : Path('/breeders/download_gbs_action') { marker_name_list=>\@marker_name_list, return_only_first_genotypeprop_for_stock=>$return_only_first_genotypeprop_for_stock, #markerprofile_id_list=>$markerprofile_id_list, - #genotype_data_project_list=>$genotype_data_project_list, + genotype_data_project_list=>\@genotyping_project_list, #limit=>$limit, #offset=>$offset } diff --git a/mason/breeders_toolbox/genotype_data_project.mas b/mason/breeders_toolbox/genotype_data_project.mas index 9c10604d0e..71d9cf64e2 100644 --- a/mason/breeders_toolbox/genotype_data_project.mas +++ b/mason/breeders_toolbox/genotype_data_project.mas @@ -61,9 +61,9 @@ $marker_names => undef <& /page/detail_page_2_col_section.mas, trial_id => $trial_id, info_section_title => "

Genotyping Protocols

", info_section_subtitle => 'View basic information about the genotyping protocols used in this genotyping project.', icon_class => "glyphicon glyphicon-cog", info_section_id => "genotyping_data_project_protocols" &> % if ($genotype_data_type ne 'SSR') { -<& /page/detail_page_2_col_section.mas, trial_id => $trial_id, info_section_title => "

Genotyping Data

", info_section_subtitle => 'View and download genotyping data.', icon_class => "glyphicon glyphicon-map-marker", info_section_id => "genotyping_data_project_data" &> + <& /page/detail_page_2_col_section.mas, trial_id => $trial_id, info_section_title => "

Genotyping Data

", info_section_subtitle => 'View and download genotyping data.', icon_class => "glyphicon glyphicon-map-marker", buttons_html => '', info_section_id => "genotyping_data_project_data" &> % } elsif ($genotype_data_type eq 'SSR') { -<& /page/detail_page_2_col_section.mas, trial_id => $trial_id, marker_names => $marker_names, info_section_title => "

Genotype Data

", info_section_subtitle => 'View and download genotyping data from this project.',buttons_html => '', icon_class => "glyphicon glyphicon-save-file", info_section_id => "project_pcr_genotype_data" &> + <& /page/detail_page_2_col_section.mas, trial_id => $trial_id, marker_names => $marker_names, info_section_title => "

Genotype Data

", info_section_subtitle => 'View and download genotyping data from this project.',buttons_html => '', icon_class => "glyphicon glyphicon-save-file", info_section_id => "project_pcr_genotype_data" &> % } % my $data_agreement_link = ''; diff --git a/mason/breeders_toolbox/genotyping_data_project/genotype_data.mas b/mason/breeders_toolbox/genotyping_data_project/genotype_data.mas index 675c530e42..2740cfea48 100644 --- a/mason/breeders_toolbox/genotyping_data_project/genotype_data.mas +++ b/mason/breeders_toolbox/genotyping_data_project/genotype_data.mas @@ -36,8 +36,10 @@ jQuery(document).ready(function () { 'ajax': '/ajax/genotyping_data/search?genotyping_data_project_id_list=<% $trial_id %>', }); + var refresh_results; jQuery("#project_genotype_data_forbid_cache").change(function(){ if (jQuery(this).is(":checked")) { + refresh_results = '1'; var project_genotypes_data_table = jQuery('#genotyping_data_project_genotype_data').DataTable({ 'destroy' : true, 'searching' : false, @@ -50,6 +52,21 @@ jQuery(document).ready(function () { } }); + jQuery('#project_genotype_data_download_all_vcf').click(function(){ + if (refresh_results) { + window.location.replace("/breeders/download_gbs_action/?genotyping_project_id=<% $trial_id %>&download_format=VCF&format=accession_ids&forbid_cache=1"); + } else { + window.location.replace("/breeders/download_gbs_action/?genotyping_project_id=<% $trial_id %>&download_format=VCF&format=accession_ids"); + } + }); + jQuery('#project_genotype_data_download_all_dosagematrix').click(function(){ + if (refresh_results) { + window.location.replace("/breeders/download_gbs_action/?genotyping_project_id=<% $trial_id %>&download_format=DosageMatrix&format=accession_ids&forbid_cache=1"); + } else { + window.location.replace("/breeders/download_gbs_action/?genotyping_project_id=<% $trial_id %>&download_format=DosageMatrix&format=accession_ids"); + } + }); + }); From d2627a4c53667d504919d00004d5e147bec6ca72 Mon Sep 17 00:00:00 2001 From: titima15 Date: Fri, 6 Oct 2023 15:44:41 -0400 Subject: [PATCH 2/7] retrieve protocol info for project page --- lib/SGN/Controller/BreedersToolbox/Trial.pm | 64 +++++++++++++++++-- .../genotype_data_project.mas | 1 + 2 files changed, 59 insertions(+), 6 deletions(-) diff --git a/lib/SGN/Controller/BreedersToolbox/Trial.pm b/lib/SGN/Controller/BreedersToolbox/Trial.pm index 3b074be0b6..a297599b2b 100644 --- a/lib/SGN/Controller/BreedersToolbox/Trial.pm +++ b/lib/SGN/Controller/BreedersToolbox/Trial.pm @@ -209,20 +209,72 @@ sub trial_info : Chained('trial_init') PathPart('') Args(0) { $c->stash->{genotype_data_type} = 'SNP' } - my $plate_info = CXGN::Genotype::GenotypingProject->new({ + my $project_info = CXGN::Genotype::GenotypingProject->new({ bcs_schema => $schema, project_id => $project_id }); - my ($data, $tc) = $plate_info->get_plate_info(); + my ($data, $tc) = $project_info->get_plate_info(); my $has_plate; if (!$data) { $has_plate = 'none'; } $c->stash->{has_plate} = $has_plate; - my @genotyping_project_list = ($project_id); - my $protocol_info = CXGN::Genotype::Protocol::list($schema, undef, undef, undef, undef, undef, \@genotyping_project_list); - if ($protocol_info) { - $c->stash->{marker_names} = $protocol_info->[0]->{marker_names} || []; + + my $associated_protocol = $project_info->get_associated_protocol(); + + if ( defined $associated_protocol && scalar(@$associated_protocol)>0) { + my $protocol_id = $associated_protocol->[0]->[0]; + my $protocol_info = CXGN::Genotype::Protocol->new({ + bcs_schema => $schema, + nd_protocol_id => $protocol_id + }); + + my $marker_names = $protocol_info->{marker_names}; + my $assay_type = $protocol_info->{assay_type}; + + $c->stash->{marker_names} = $marker_names; + $c->stash->{assay_type} = $assay_type; + + my $marker_info_keys = $protocol_info->marker_info_keys; + my @marker_info_headers = (); + if (defined $marker_info_keys) { + foreach my $info_key (@$marker_info_keys) { + if ($info_key eq 'name') { + push @marker_info_headers, 'Marker Name'; + } elsif (($info_key eq 'intertek_name') || ($info_key eq 'facility_name')) { + push @marker_info_headers, 'Facility Marker Name'; + } elsif ($info_key eq 'chrom') { + push @marker_info_headers, 'Chromosome'; + } elsif ($info_key eq 'pos') { + push @marker_info_headers, 'Position'; + } elsif ($info_key eq 'alt') { + if ($assay_type eq 'KASP') { + push @marker_info_headers, 'Y-allele'; + } else { + push @marker_info_headers, 'Alternate'; + } + } elsif ($info_key eq 'ref') { + if ($assay_type eq 'KASP') { + push @marker_info_headers, 'X-allele'; + } else { + push @marker_info_headers, 'Reference'; + } + } elsif ($info_key eq 'qual') { + push @marker_info_headers, 'Quality'; + } elsif ($info_key eq 'filter') { + push @marker_info_headers, 'Filter'; + } elsif ($info_key eq 'info') { + push @marker_info_headers, 'Info'; + } elsif ($info_key eq 'format') { + push @marker_info_headers, 'Format'; + } elsif ($info_key eq 'sequence') { + push @marker_info_headers, 'Sequence'; + } + } + } else { + @marker_info_headers = ('Marker Name','Chromosome','Position','Alternate','Reference','Quality','Filter','Info','Format'); + } + $c->stash->{marker_info_headers} = \@marker_info_headers; } $c->stash->{template} = '/breeders_toolbox/genotype_data_project.mas'; diff --git a/mason/breeders_toolbox/genotype_data_project.mas b/mason/breeders_toolbox/genotype_data_project.mas index 71d9cf64e2..15b125fb1f 100644 --- a/mason/breeders_toolbox/genotype_data_project.mas +++ b/mason/breeders_toolbox/genotype_data_project.mas @@ -46,6 +46,7 @@ $genotype_data_type => undef $trial_owner => undef $has_plate => undef $marker_names => undef +$marker_info_headers => undef <& /util/import_javascript.mas, classes => [ 'jquery.iframe-post-form', 'CXGN.Trial' , 'jstree/dist/jstree', 'CXGN.BreedersToolbox.HTMLSelect', 'moment_min', 'daterangepicker' ] &> From 51fcb4a4c6841a2985774cfd787941669808634f Mon Sep 17 00:00:00 2001 From: titima15 Date: Mon, 9 Oct 2023 11:10:39 -0400 Subject: [PATCH 3/7] download kasp data on project page --- lib/CXGN/Genotype/Download/KASPdata.pm | 9 ++++++++- lib/SGN/Controller/BreedersToolbox/Download.pm | 15 ++++++++++++++- lib/SGN/Controller/BreedersToolbox/Trial.pm | 13 ++++++------- mason/breeders_toolbox/genotype_data_project.mas | 9 ++++++--- .../genotyping_data_project/genotype_data.mas | 5 +++++ 5 files changed, 39 insertions(+), 12 deletions(-) diff --git a/lib/CXGN/Genotype/Download/KASPdata.pm b/lib/CXGN/Genotype/Download/KASPdata.pm index 6d3d810fe2..212b219046 100644 --- a/lib/CXGN/Genotype/Download/KASPdata.pm +++ b/lib/CXGN/Genotype/Download/KASPdata.pm @@ -42,6 +42,11 @@ has 'protocol_id_list' => ( is => 'rw', ); +has 'genotype_data_project_list' => ( + isa => 'ArrayRef[Int]|Undef', + is => 'ro', +); + has 'genotypeprop_hash_select' => ( isa => 'ArrayRef[Str]', is => 'ro', @@ -64,13 +69,15 @@ sub download { my $schema = $self->bcs_schema; my $people_schema = $self->people_schema; my $protocol_id_list = $self->protocol_id_list; + my $genotyping_project_list = $self->genotype_data_project_list; my $genotypeprop_hash_select = ['NT', 'XV', 'YV']; my $return_only_first_genotypeprop_for_stock = $self->return_only_first_genotypeprop_for_stock; - + my $genotypes_search = CXGN::Genotype::Search->new({ bcs_schema=>$schema, people_schema=>$people_schema, protocol_id_list=>$protocol_id_list, + genotype_data_project_list=>$genotyping_project_list, genotypeprop_hash_select=>$genotypeprop_hash_select }); diff --git a/lib/SGN/Controller/BreedersToolbox/Download.pm b/lib/SGN/Controller/BreedersToolbox/Download.pm index 116a738983..fb13e5c4d4 100644 --- a/lib/SGN/Controller/BreedersToolbox/Download.pm +++ b/lib/SGN/Controller/BreedersToolbox/Download.pm @@ -1660,6 +1660,18 @@ sub download_kasp_genotyping_data_csv : Path('/breeders/download_kasp_genotyping my $schema = $c->dbic_schema("Bio::Chado::Schema", "sgn_chado"); my $people_schema = $c->dbic_schema("CXGN::People::Schema"); my $protocol_id = $c->req->param("protocol_id"); + my $genotyping_project_id = $c->req->param("genotyping_project_id"); + + my @protocol_list; + if (defined $protocol_id) { + push @protocol_list, $protocol_id; + } + + my @genotyping_project_list; + if (defined $genotyping_project_id) { + push @genotyping_project_list, $genotyping_project_id; + } + my $dir = $c->tempfiles_subdir('download'); my $temp_file_name = $protocol_id . "_" . "KASP_data" . "XXXX"; @@ -1675,7 +1687,8 @@ sub download_kasp_genotyping_data_csv : Path('/breeders/download_kasp_genotyping { bcs_schema=>$schema, people_schema=>$people_schema, - protocol_id_list=>[$protocol_id], + protocol_id_list=>\@protocol_list, + genotype_data_project_list=>\@genotyping_project_list, filename => $tempfile, } ); diff --git a/lib/SGN/Controller/BreedersToolbox/Trial.pm b/lib/SGN/Controller/BreedersToolbox/Trial.pm index a297599b2b..f4dc6bf698 100644 --- a/lib/SGN/Controller/BreedersToolbox/Trial.pm +++ b/lib/SGN/Controller/BreedersToolbox/Trial.pm @@ -31,7 +31,7 @@ sub trial_init : Chained('/') PathPart('breeders/trial') CaptureArgs(1) { my $trial_id = shift; $c->stash->{trial_id} = $trial_id; - print STDERR "TRIAL ID = $trial_id\n"; +# print STDERR "TRIAL ID = $trial_id\n"; my $schema = $c->dbic_schema("Bio::Chado::Schema"); $c->stash->{schema} = $schema; @@ -231,7 +231,6 @@ sub trial_info : Chained('trial_init') PathPart('') Args(0) { my $marker_names = $protocol_info->{marker_names}; my $assay_type = $protocol_info->{assay_type}; - $c->stash->{marker_names} = $marker_names; $c->stash->{assay_type} = $assay_type; @@ -374,8 +373,8 @@ sub trial_download : Chained('trial_init') PathPart('download') Args(1) { my $self = shift; my $c = shift; my $what = shift; - print STDERR "WHAT =".Dumper($what)."\n"; - print STDERR Dumper $c->req->params(); +# print STDERR "WHAT =".Dumper($what)."\n"; +# print STDERR Dumper $c->req->params(); my $schema = $c->dbic_schema('Bio::Chado::Schema', 'sgn_chado'); my $user = $c->user(); if (!$user) { @@ -487,7 +486,7 @@ sub trial_download : Chained('trial_init') PathPart('download') Args(1) { $rel_file = $rel_file . ".$format"; my $tempfile = $c->config->{basepath}."/".$rel_file; - print STDERR "TEMPFILE : $tempfile\n"; +# print STDERR "TEMPFILE : $tempfile\n"; my $download = CXGN::Trial::Download->new({ bcs_schema => $schema, @@ -526,7 +525,7 @@ sub trial_download : Chained('trial_init') PathPart('download') Args(1) { sub trials_download_layouts : Path('/breeders/trials/download/layout') Args(0) { my $self = shift; my $c = shift; - print STDERR Dumper $c->req->params(); +# print STDERR Dumper $c->req->params(); my $schema = $c->dbic_schema('Bio::Chado::Schema', 'sgn_chado'); my $user = $c->user(); if (!$user) { @@ -562,7 +561,7 @@ sub trials_download_layouts : Path('/breeders/trials/download/layout') Args(0) { $rel_file = $rel_file . ".$format"; my $tempfile = $c->config->{basepath}."/".$rel_file; - print STDERR "TEMPFILE : $tempfile\n"; +# print STDERR "TEMPFILE : $tempfile\n"; my $trial_download_args = { bcs_schema => $schema, diff --git a/mason/breeders_toolbox/genotype_data_project.mas b/mason/breeders_toolbox/genotype_data_project.mas index 15b125fb1f..18c7f18199 100644 --- a/mason/breeders_toolbox/genotype_data_project.mas +++ b/mason/breeders_toolbox/genotype_data_project.mas @@ -47,6 +47,7 @@ $trial_owner => undef $has_plate => undef $marker_names => undef $marker_info_headers => undef +$assay_type => undef <& /util/import_javascript.mas, classes => [ 'jquery.iframe-post-form', 'CXGN.Trial' , 'jstree/dist/jstree', 'CXGN.BreedersToolbox.HTMLSelect', 'moment_min', 'daterangepicker' ] &> @@ -61,10 +62,12 @@ $marker_info_headers => undef <& /page/detail_page_2_col_section.mas, trial_id => $trial_id, info_section_title => "

Genotyping Protocols

", info_section_subtitle => 'View basic information about the genotyping protocols used in this genotyping project.', icon_class => "glyphicon glyphicon-cog", info_section_id => "genotyping_data_project_protocols" &> -% if ($genotype_data_type ne 'SSR') { - <& /page/detail_page_2_col_section.mas, trial_id => $trial_id, info_section_title => "

Genotyping Data

", info_section_subtitle => 'View and download genotyping data.', icon_class => "glyphicon glyphicon-map-marker", buttons_html => '', info_section_id => "genotyping_data_project_data" &> -% } elsif ($genotype_data_type eq 'SSR') { +% if ($genotype_data_type eq 'SSR') { <& /page/detail_page_2_col_section.mas, trial_id => $trial_id, marker_names => $marker_names, info_section_title => "

Genotype Data

", info_section_subtitle => 'View and download genotyping data from this project.',buttons_html => '', icon_class => "glyphicon glyphicon-save-file", info_section_id => "project_pcr_genotype_data" &> +% } elsif ($assay_type eq 'KASP') { + <& /page/detail_page_2_col_section.mas, trial_id => $trial_id, info_section_title => "

Genotyping Data

", info_section_subtitle => 'View and download genotyping data.', icon_class => "glyphicon glyphicon-map-marker", buttons_html => '', info_section_id => "genotyping_data_project_data" &> +% } else { + <& /page/detail_page_2_col_section.mas, trial_id => $trial_id, info_section_title => "

Genotyping Data

", info_section_subtitle => 'View and download genotyping data.', icon_class => "glyphicon glyphicon-map-marker", buttons_html => '', info_section_id => "genotyping_data_project_data" &> % } % my $data_agreement_link = ''; diff --git a/mason/breeders_toolbox/genotyping_data_project/genotype_data.mas b/mason/breeders_toolbox/genotyping_data_project/genotype_data.mas index 2740cfea48..88ee562dba 100644 --- a/mason/breeders_toolbox/genotyping_data_project/genotype_data.mas +++ b/mason/breeders_toolbox/genotyping_data_project/genotype_data.mas @@ -59,6 +59,7 @@ jQuery(document).ready(function () { window.location.replace("/breeders/download_gbs_action/?genotyping_project_id=<% $trial_id %>&download_format=VCF&format=accession_ids"); } }); + jQuery('#project_genotype_data_download_all_dosagematrix').click(function(){ if (refresh_results) { window.location.replace("/breeders/download_gbs_action/?genotyping_project_id=<% $trial_id %>&download_format=DosageMatrix&format=accession_ids&forbid_cache=1"); @@ -67,6 +68,10 @@ jQuery(document).ready(function () { } }); + jQuery('#kasp_project_genotype_data_download_all_csv').click(function(){ + window.location.replace("/breeders/download_kasp_genotyping_data_csv/?genotyping_project_id=<% $trial_id %>"); + }); + }); From 577fcddfb946ea9a42f8b725a19829e9381d3e3f Mon Sep 17 00:00:00 2001 From: titima15 Date: Mon, 9 Oct 2023 14:14:34 -0400 Subject: [PATCH 4/7] test vcf download --- t/unit_fixture/CXGN/Uploading/VCFGenotypes.t | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/t/unit_fixture/CXGN/Uploading/VCFGenotypes.t b/t/unit_fixture/CXGN/Uploading/VCFGenotypes.t index 93d91b4922..701cb46f59 100644 --- a/t/unit_fixture/CXGN/Uploading/VCFGenotypes.t +++ b/t/unit_fixture/CXGN/Uploading/VCFGenotypes.t @@ -495,6 +495,10 @@ $message = $response->decoded_content; #print STDERR Dumper $message; is($message, $dosage_matrix_string); +#testing genotype data download from project page +my $project_response = $ua->get("http://localhost:3010/breeders/download_gbs_action/?genotyping_project_id=$project_id&download_format=VCF&format=accession_ids&forbid_cache=1"); +my $project_message = $project_response->decoded_content; +is($project_message, $dosage_matrix_string); #Testing genotype search with marker names filter from marker set list object my $marker_names_filtered = ["S1_21594", "S1_21597", "S1_75465"]; From e9c09c17c4bc22e925cf066f487c4ab9805ca7b7 Mon Sep 17 00:00:00 2001 From: titima15 Date: Mon, 9 Oct 2023 14:44:11 -0400 Subject: [PATCH 5/7] test for kasp data download --- t/unit_fixture/CXGN/Uploading/KASPGenotypes.t | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/t/unit_fixture/CXGN/Uploading/KASPGenotypes.t b/t/unit_fixture/CXGN/Uploading/KASPGenotypes.t index 3fdf675be8..994b4a3acf 100644 --- a/t/unit_fixture/CXGN/Uploading/KASPGenotypes.t +++ b/t/unit_fixture/CXGN/Uploading/KASPGenotypes.t @@ -134,6 +134,41 @@ my $genotypes_search_1 = CXGN::Genotype::Search->new({ my ($total_count_1, $data_1) = $genotypes_search_1->get_genotype_info(); is($total_count_1, 5); +#test KASP data download from project page + +my $kasp_project_response = $ua->get("http://localhost:3010/breeders/download_kasp_genotyping_data_csv/?genotyping_project_id=$genotyping_project_id_1"); +my $kasp_project_message = $kasp_project_response->decoded_content; + +my $kasp_data = '"MARKER NAME","SAMPLE NAME","SNP CALL (X,Y)","X VALUE","Y VALUE" +"S01_0001","new_accession_1","T,T","1.36",".58" +"S01_0001","new_accession_2","T,T","1.25",".49" +"S01_0001","new_accession_3","T,G","1.57","1.38" +"S01_0001","new_accession_4","T,G","1.24","1.56" +"S01_0001","new_accession_5","./.",".65",".58" +"S01_0002","new_accession_1","A,A","1.43",".59" +"S01_0002","new_accession_2","A,G","1.25","1.43" +"S01_0002","new_accession_3","A,G","1.22","1.41" +"S01_0002","new_accession_4","A,G","1.11","1.27" +"S01_0002","new_accession_5","A,A","1.65",".62" +"S02_0001","new_accession_1","T,T","1.75",".75" +"S02_0001","new_accession_2","T,T","1.21",".61" +"S02_0001","new_accession_3","T,T","1.17",".46" +"S02_0001","new_accession_4","T,C","1.59","1.46" +"S02_0001","new_accession_5","T,C","1.26","1.31" +"S02_0002","new_accession_1","A,A","1.75",".32" +"S02_0002","new_accession_2","A,A","1.38",".59" +"S02_0002","new_accession_3","A,C","1.36","1.47" +"S02_0002","new_accession_4","A,A","1.75",".74" +"S02_0002","new_accession_5","A,C","1.32","1.46" +"S03_0001","new_accession_1","C,C","1.76",".38" +"S03_0001","new_accession_2","C,C","1.47",".24" +"S03_0001","new_accession_3","C,T","1.86","1.48" +"S03_0001","new_accession_4","C,T","1.23","1.49" +"S03_0001","new_accession_5","C,T","1.11","1.23" +'; + +is($kasp_project_message, $kasp_data); + #test upload kasp data using facility names #store facility sample Names my $plate_file = $f->config->{basepath} . "/t/data/genotype_trial_upload/plate_with_identifier_upload.xls"; From 836b88584690b8d5758f27eea02326c1171a4002 Mon Sep 17 00:00:00 2001 From: titima15 Date: Mon, 9 Oct 2023 15:27:35 -0400 Subject: [PATCH 6/7] replace protocol link with project link --- js/source/legacy/CXGN/BreedersToolbox/GenotypingTrial.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/source/legacy/CXGN/BreedersToolbox/GenotypingTrial.js b/js/source/legacy/CXGN/BreedersToolbox/GenotypingTrial.js index 1936f7e8cf..620c5422ac 100644 --- a/js/source/legacy/CXGN/BreedersToolbox/GenotypingTrial.js +++ b/js/source/legacy/CXGN/BreedersToolbox/GenotypingTrial.js @@ -470,7 +470,7 @@ jQuery(document).ready(function ($) { return; } if (response.success) { - var success_string = "

Go to new protocol detail page

"; + var success_string = "

Go to your genotyping project page

"; console.log(success_string); jQuery('#upload_genotype_submit_complete').html(success_string); Workflow.complete('#upload_genotype_submit'); From 801e0301ea339c212f58d451e34f7b301d56a592 Mon Sep 17 00:00:00 2001 From: titima15 Date: Mon, 9 Oct 2023 15:53:23 -0400 Subject: [PATCH 7/7] fixed syntax --- lib/CXGN/Genotype/Search.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CXGN/Genotype/Search.pm b/lib/CXGN/Genotype/Search.pm index a854392df1..d9e5bff15b 100644 --- a/lib/CXGN/Genotype/Search.pm +++ b/lib/CXGN/Genotype/Search.pm @@ -773,7 +773,7 @@ sub init_genotype_iterator { } #For genotyping_data_project - if ($genotype_data_project_list && scalar($genotype_data_project_list)>0) { + if ($genotype_data_project_list && scalar(@$genotype_data_project_list)>0) { my $sql = join ("," , @$genotype_data_project_list); push @where_clause, "project.project_id in ($sql)"; }