diff --git a/lib/CXGN/BrAPI/v2/BreedingMethods.pm b/lib/CXGN/BrAPI/v2/BreedingMethods.pm index 76ae99697f..ea784d9d1d 100644 --- a/lib/CXGN/BrAPI/v2/BreedingMethods.pm +++ b/lib/CXGN/BrAPI/v2/BreedingMethods.pm @@ -32,9 +32,12 @@ sub search { } foreach (@crosstypes){ + my $id = $_; + $id =~ s/ /_/g; + push @data, { abbreviation=>$_, - breedingMethodDbId=>$_ =~ s/ /_/g, + breedingMethodDbId=>$id, breedingMethodName=>$_, description=>$_, }; diff --git a/lib/SGN/Controller/AJAX/BrAPI.pm b/lib/SGN/Controller/AJAX/BrAPI.pm index cf0190cd36..50f0c70976 100644 --- a/lib/SGN/Controller/AJAX/BrAPI.pm +++ b/lib/SGN/Controller/AJAX/BrAPI.pm @@ -725,7 +725,7 @@ sub germplasm_search_old_GET { sub germplasm_search_old_POST { my $self = shift; my $c = shift; - my ($auth) = _authenticate_user($c); + # my ($auth) = _authenticate_user($c); my $clean_inputs = $c->stash->{clean_inputs}; my $brapi = $self->brapi_module; my $brapi_module = $brapi->brapi_wrapper('Germplasm'); @@ -1537,7 +1537,7 @@ sub allelematrix_GET { sub allelematrix_search_process { my $self = shift; my $c = shift; - my ($auth) = _authenticate_user($c); + # my ($auth) = _authenticate_user($c); my $clean_inputs = $c->stash->{clean_inputs}; my $format = $clean_inputs->{format}->[0]; @@ -1899,7 +1899,7 @@ sub studies_search : Chained('brapi') PathPart('studies-search') Args(0) : Acti sub studies_search_POST { my $self = shift; my $c = shift; - my ($auth) = _authenticate_user($c); + # my ($auth) = _authenticate_user($c); my $clean_inputs = $c->stash->{clean_inputs}; my $brapi = $self->brapi_module; my $brapi_module = $brapi->brapi_wrapper('Studies'); @@ -2497,7 +2497,7 @@ sub phenotypes_search : Chained('brapi') PathPart('phenotypes-search') Args(0) : sub phenotypes_search_POST { my $self = shift; my $c = shift; - my ($auth) = _authenticate_user($c); + # my ($auth) = _authenticate_user($c); my $clean_inputs = $c->stash->{clean_inputs}; my $brapi = $self->brapi_module; my $brapi_module = $brapi->brapi_wrapper('ObservationUnits'); @@ -2652,7 +2652,7 @@ sub phenotypes_search_table_GET { sub process_phenotypes_search_table { my $self = shift; my $c = shift; - my ($auth) = _authenticate_user($c); + # my ($auth) = _authenticate_user($c); my $clean_inputs = $c->stash->{clean_inputs}; my $brapi = $self->brapi_module; my $brapi_module = $brapi->brapi_wrapper('ObservationTables'); @@ -2692,7 +2692,7 @@ sub phenotypes_search_csv_GET { sub process_phenotypes_search_csv { my $self = shift; my $c = shift; - my ($auth) = _authenticate_user($c); + # my ($auth) = _authenticate_user($c); my $clean_inputs = $c->stash->{clean_inputs}; my $dir = $c->tempfiles_subdir('download'); my $time_stamp = strftime "%Y-%m-%dT%H%M%S", localtime(); @@ -2735,7 +2735,7 @@ sub phenotypes_search_tsv_GET { sub process_phenotypes_search_tsv { my $self = shift; my $c = shift; - my ($auth) = _authenticate_user($c); + # my ($auth) = _authenticate_user($c); my $clean_inputs = $c->stash->{clean_inputs}; my $dir = $c->tempfiles_subdir('download'); my $time_stamp = strftime "%Y-%m-%dT%H%M%S", localtime(); @@ -3238,7 +3238,7 @@ sub observationvariable_search_GET { sub _observationvariable_search_process { my $self = shift; my $c = shift; - my ($auth) = _authenticate_user($c); + # my ($auth) = _authenticate_user($c); my $clean_inputs = $c->stash->{clean_inputs}; my $brapi = $self->brapi_module; @@ -3327,7 +3327,7 @@ sub samples_list_GET { sub _sample_search_process { my $self = shift; my $c = shift; - my ($auth) = _authenticate_user($c); + # my ($auth) = _authenticate_user($c); my $clean_inputs = $c->stash->{clean_inputs}; my $brapi = $self->brapi_module; my $brapi_module = $brapi->brapi_wrapper('Samples'); @@ -4009,7 +4009,7 @@ sub observations_search_GET { sub observations_search_process { my $self = shift; my $c = shift; - my ($auth) = _authenticate_user($c); + # my ($auth) = _authenticate_user($c); my $clean_inputs = $c->stash->{clean_inputs}; my $brapi = $self->brapi_module; my $brapi_module = $brapi->brapi_wrapper('Observations'); diff --git a/t/unit_mech/AJAX/BrAPI_v1.t b/t/unit_mech/AJAX/BrAPI_v1.t index 33f3947ae4..d37cc68dd5 100644 --- a/t/unit_mech/AJAX/BrAPI_v1.t +++ b/t/unit_mech/AJAX/BrAPI_v1.t @@ -238,12 +238,12 @@ is_deeply($response, {"result"=>{"data"=>[{"plantNumber"=>undef,"observationUnit $mech->get_ok('http://localhost:3010/brapi/v1/studies/165/table?access_token='.$access_token); $response = decode_json $mech->content; print STDERR Dumper $response; -is_deeply($response, {'metadata' => {'pagination' => {'currentPage' => 0,'pageSize' => 10,'totalCount' => 19,'totalPages' => 2},'status' => [{'message' => 'BrAPI base call found with page=0, pageSize=10','messageType' => 'INFO'},{'message' => 'Loading CXGN::BrAPI::v1::Studies','messageType' => 'INFO'},{'messageType' => 'INFO','message' => 'Studies observations table result constructed'}],'datafiles' => []},'result' => {'observationVariableNames' => ['cass sink leaf|3-phosphoglyceric acid|ug/g|week 16|COMP:0000013','cass sink leaf|ADP alpha-D-glucoside|ug/g|week 16|COMP:0000011','cass sink leaf|ADP|ug/g|week 16|COMP:0000010','cass source leaf|3-phosphoglyceric acid|ug/g|week 16|COMP:0000002','cass source leaf|ADP alpha-D-glucoside|ug/g|week 16|COMP:0000007','cass source leaf|ADP|ug/g|week 16|COMP:0000003','cass storage root|3-phosphoglyceric acid|ug/g|week 16|COMP:0000006','cass storage root|ADP alpha-D-glucoside|ug/g|week 16|COMP:0000004','cass storage root|ADP|ug/g|week 16|COMP:0000005','cass upper stem|3-phosphoglyceric acid|ug/g|week 16|COMP:0000012','cass upper stem|ADP alpha-D-glucoside|ug/g|week 16|COMP:0000008','cass upper stem|ADP|ug/g|week 16|COMP:0000009','notes'],'data' => [['studyYear','programDbId','programName','programDescription','studyDbId','studyName','studyDescription','studyDesign','plotWidth','plotLength','fieldSize','fieldTrialIsPlannedToBeGenotyped','fieldTrialIsPlannedToCross','plantingDate','harvestDate','locationDbId','locationName','germplasmDbId','germplasmName','germplasmSynonyms','observationLevel','observationUnitDbId','observationUnitName','replicate','blockNumber','plotNumber','rowNumber','colNumber','entryType','plantNumber','plantedSeedlotStockDbId','plantedSeedlotStockUniquename','plantedSeedlotCurrentCount','plantedSeedlotCurrentWeightGram','plantedSeedlotBoxName','plantedSeedlotTransactionCount','plantedSeedlotTransactionWeight','plantedSeedlotTransactionDescription','availableGermplasmSeedlotUniquenames','cass sink leaf|3-phosphoglyceric acid|ug/g|week 16|COMP:0000013','cass sink leaf|ADP alpha-D-glucoside|ug/g|week 16|COMP:0000011','cass sink leaf|ADP|ug/g|week 16|COMP:0000010','cass source leaf|3-phosphoglyceric acid|ug/g|week 16|COMP:0000002','cass source leaf|ADP alpha-D-glucoside|ug/g|week 16|COMP:0000007','cass source leaf|ADP|ug/g|week 16|COMP:0000003','cass storage root|3-phosphoglyceric acid|ug/g|week 16|COMP:0000006','cass storage root|ADP alpha-D-glucoside|ug/g|week 16|COMP:0000004','cass storage root|ADP|ug/g|week 16|COMP:0000005','cass upper stem|3-phosphoglyceric acid|ug/g|week 16|COMP:0000012','cass upper stem|ADP alpha-D-glucoside|ug/g|week 16|COMP:0000008','cass upper stem|ADP|ug/g|week 16|COMP:0000009','notes'],['2017',134,'test','test',165,'CASS_6Genotypes_Sampling_2015','"Copy of trial with postcomposed phenotypes from cassbase."','RCBD',undef,undef,undef,undef,undef,undef,undef,'23','test_location',41283,'IITA-TMS-IBA980581','','plot',41284,'CASS_6Genotypes_103','1','1','103',undef,undef,'test',undef,undef,undef,undef,undef,undef,undef,undef,undef,'','601.518','39.84365','655.92','1259.08','17.38275','192.1495','67.9959','20.3038','102.0875','108.56995','28.83915','379.16',undef],['2017',134,'test','test',165,'CASS_6Genotypes_Sampling_2015','"Copy of trial with postcomposed phenotypes from cassbase."','RCBD',undef,undef,undef,undef,undef,undef,undef,'23','test_location',41282,'IITA-TMS-IBA980002','','plot',41295,'CASS_6Genotypes_104','1','1','104',undef,undef,'test',undef,undef,undef,undef,undef,undef,undef,undef,undef,'','221.6135','36.12425','316.489','908.9045','29.6934','162.9475','23.09545','14.3795','85.9106','54.2099','13.8628','341.041',undef],['2017',134,'test','test',165,'CASS_6Genotypes_Sampling_2015','"Copy of trial with postcomposed phenotypes from cassbase."','RCBD',undef,undef,undef,undef,undef,undef,undef,'23','test_location',41279,'IITA-TMS-IBA30572','','plot',41296,'CASS_6Genotypes_105','1','1','105',undef,undef,'test',undef,undef,undef,undef,undef,undef,undef,undef,undef,'','662.087','46.1458','559.441','1974.265','38.1064','484.765','33.1455','16.7238','98.71395','97.8179','35.4435','439.9695',undef],['2017',134,'test','test',165,'CASS_6Genotypes_Sampling_2015','"Copy of trial with postcomposed phenotypes from cassbase."','RCBD',undef,undef,undef,undef,undef,undef,undef,'23','test_location',41281,'IITA-TMS-IBA011412','','plot',41297,'CASS_6Genotypes_106','1','1','106',undef,undef,'test',undef,undef,undef,undef,undef,undef,undef,undef,undef,'','612.37','23.788','604.5625','646.902','26.60415','192.46','39.6698','16.78125','107.74','78.72305','28.3805','469.818',undef],['2017',134,'test','test',165,'CASS_6Genotypes_Sampling_2015','"Copy of trial with postcomposed phenotypes from cassbase."','RCBD',undef,undef,undef,undef,undef,undef,undef,'23','test_location',41280,'TMEB693','','plot',41298,'CASS_6Genotypes_107','1','1','107',undef,undef,'test',undef,undef,undef,undef,undef,undef,undef,undef,undef,'','198.089','47.64845','485.944','779.191','21.12875','147.0405','31.554','10.59626','46.41935','101.7506','30.86975','423.355',undef],['2017',134,'test','test',165,'CASS_6Genotypes_Sampling_2015','"Copy of trial with postcomposed phenotypes from cassbase."','RCBD',undef,undef,undef,undef,undef,undef,undef,'23','test_location',40326,'BLANK','','plot',41299,'CASS_6Genotypes_201','1','2','201',undef,undef,'test',undef,undef,undef,undef,undef,undef,undef,undef,undef,'',undef,undef,undef,undef,undef,undef,undef,undef,undef,undef,undef,undef,undef],['2017',134,'test','test',165,'CASS_6Genotypes_Sampling_2015','"Copy of trial with postcomposed phenotypes from cassbase."','RCBD',undef,undef,undef,undef,undef,undef,undef,'23','test_location',41280,'TMEB693','','plot',41300,'CASS_6Genotypes_202','1','2','202',undef,undef,'test',undef,undef,undef,undef,undef,undef,undef,undef,undef,'','250.228','39.2627','478.0445','1295.29','21.56485','169.757','26.2744','5.31292','39.4774','61.51325','36.2316','241.418',undef],['2017',134,'test','test',165,'CASS_6Genotypes_Sampling_2015','"Copy of trial with postcomposed phenotypes from cassbase."','RCBD',undef,undef,undef,undef,undef,undef,undef,'23','test_location',41282,'IITA-TMS-IBA980002','','plot',41301,'CASS_6Genotypes_203','1','2','203',undef,undef,'test',undef,undef,undef,undef,undef,undef,undef,undef,undef,'','245.679','29.4029','299.096','1013.111','17.04795','202.893','40.306','7.442495','75.2132','57.47695','20.43645','303.3225',undef]],'observationVariableDbIds' => [77559,77557,77556,77548,77553,77549,77552,77550,77551,77558,77554,77555,0],'headerRow' => ['studyYear','programDbId','programName','programDescription','studyDbId','studyName','studyDescription','studyDesign','plotWidth','plotLength','fieldSize','fieldTrialIsPlannedToBeGenotyped','fieldTrialIsPlannedToCross','plantingDate','harvestDate','locationDbId','locationName','germplasmDbId','germplasmName','germplasmSynonyms','observationLevel','observationUnitDbId','observationUnitName','replicate','blockNumber','plotNumber','rowNumber','colNumber','entryType','plantNumber','plantedSeedlotStockDbId','plantedSeedlotStockUniquename','plantedSeedlotCurrentCount','plantedSeedlotCurrentWeightGram','plantedSeedlotBoxName','plantedSeedlotTransactionCount','plantedSeedlotTransactionWeight','plantedSeedlotTransactionDescription','availableGermplasmSeedlotUniquenames']}}, 'study table'); +is_deeply($response, {'metadata' => {'pagination' => {'currentPage' => 0,'pageSize' => 10,'totalCount' => 19,'totalPages' => 2},'status' => [{'message' => 'BrAPI base call found with page=0, pageSize=10','messageType' => 'INFO'},{'message' => 'Loading CXGN::BrAPI::v1::Studies','messageType' => 'INFO'},{'messageType' => 'INFO','message' => 'Studies observations table result constructed'}],'datafiles' => []},'result' => {'observationVariableNames' => ['cass sink leaf|3-phosphoglyceric acid|ug/g|week 16|COMP:0000013','cass sink leaf|ADP alpha-D-glucoside|ug/g|week 16|COMP:0000011','cass sink leaf|ADP|ug/g|week 16|COMP:0000010','cass source leaf|3-phosphoglyceric acid|ug/g|week 16|COMP:0000002','cass source leaf|ADP alpha-D-glucoside|ug/g|week 16|COMP:0000007','cass source leaf|ADP|ug/g|week 16|COMP:0000003','cass storage root|3-phosphoglyceric acid|ug/g|week 16|COMP:0000006','cass storage root|ADP alpha-D-glucoside|ug/g|week 16|COMP:0000004','cass storage root|ADP|ug/g|week 16|COMP:0000005','cass upper stem|3-phosphoglyceric acid|ug/g|week 16|COMP:0000012','cass upper stem|ADP alpha-D-glucoside|ug/g|week 16|COMP:0000008','cass upper stem|ADP|ug/g|week 16|COMP:0000009','notes'],'data' => [['studyYear','programDbId','programName','programDescription','studyDbId','studyName','studyDescription','studyDesign','plotWidth','plotLength','fieldSize','fieldTrialIsPlannedToBeGenotyped','fieldTrialIsPlannedToCross','plantingDate','harvestDate','locationDbId','locationName','germplasmDbId','germplasmName','germplasmSynonyms','observationLevel','observationUnitDbId','observationUnitName','replicate','blockNumber','plotNumber','rowNumber','colNumber','entryType','plantNumber','plantedSeedlotStockDbId','plantedSeedlotStockUniquename','plantedSeedlotCurrentCount','plantedSeedlotCurrentWeightGram','plantedSeedlotBoxName','plantedSeedlotTransactionCount','plantedSeedlotTransactionWeight','plantedSeedlotTransactionDescription','availableGermplasmSeedlotUniquenames','cass sink leaf|3-phosphoglyceric acid|ug/g|week 16|COMP:0000013','cass sink leaf|ADP alpha-D-glucoside|ug/g|week 16|COMP:0000011','cass sink leaf|ADP|ug/g|week 16|COMP:0000010','cass source leaf|3-phosphoglyceric acid|ug/g|week 16|COMP:0000002','cass source leaf|ADP alpha-D-glucoside|ug/g|week 16|COMP:0000007','cass source leaf|ADP|ug/g|week 16|COMP:0000003','cass storage root|3-phosphoglyceric acid|ug/g|week 16|COMP:0000006','cass storage root|ADP alpha-D-glucoside|ug/g|week 16|COMP:0000004','cass storage root|ADP|ug/g|week 16|COMP:0000005','cass upper stem|3-phosphoglyceric acid|ug/g|week 16|COMP:0000012','cass upper stem|ADP alpha-D-glucoside|ug/g|week 16|COMP:0000008','cass upper stem|ADP|ug/g|week 16|COMP:0000009','notes'],['2017',134,'test','test',165,'CASS_6Genotypes_Sampling_2015','Copy of trial with postcomposed phenotypes from cassbase.','RCBD',undef,undef,undef,undef,undef,undef,undef,'23','test_location',41283,'IITA-TMS-IBA980581','','plot',41284,'CASS_6Genotypes_103','1','1','103',undef,undef,'test',undef,undef,undef,undef,undef,undef,undef,undef,undef,'','601.518','39.84365','655.92','1259.08','17.38275','192.1495','67.9959','20.3038','102.0875','108.56995','28.83915','379.16',undef],['2017',134,'test','test',165,'CASS_6Genotypes_Sampling_2015','Copy of trial with postcomposed phenotypes from cassbase.','RCBD',undef,undef,undef,undef,undef,undef,undef,'23','test_location',41282,'IITA-TMS-IBA980002','','plot',41295,'CASS_6Genotypes_104','1','1','104',undef,undef,'test',undef,undef,undef,undef,undef,undef,undef,undef,undef,'','221.6135','36.12425','316.489','908.9045','29.6934','162.9475','23.09545','14.3795','85.9106','54.2099','13.8628','341.041',undef],['2017',134,'test','test',165,'CASS_6Genotypes_Sampling_2015','Copy of trial with postcomposed phenotypes from cassbase.','RCBD',undef,undef,undef,undef,undef,undef,undef,'23','test_location',41279,'IITA-TMS-IBA30572','','plot',41296,'CASS_6Genotypes_105','1','1','105',undef,undef,'test',undef,undef,undef,undef,undef,undef,undef,undef,undef,'','662.087','46.1458','559.441','1974.265','38.1064','484.765','33.1455','16.7238','98.71395','97.8179','35.4435','439.9695',undef],['2017',134,'test','test',165,'CASS_6Genotypes_Sampling_2015','Copy of trial with postcomposed phenotypes from cassbase.','RCBD',undef,undef,undef,undef,undef,undef,undef,'23','test_location',41281,'IITA-TMS-IBA011412','','plot',41297,'CASS_6Genotypes_106','1','1','106',undef,undef,'test',undef,undef,undef,undef,undef,undef,undef,undef,undef,'','612.37','23.788','604.5625','646.902','26.60415','192.46','39.6698','16.78125','107.74','78.72305','28.3805','469.818',undef],['2017',134,'test','test',165,'CASS_6Genotypes_Sampling_2015','Copy of trial with postcomposed phenotypes from cassbase.','RCBD',undef,undef,undef,undef,undef,undef,undef,'23','test_location',41280,'TMEB693','','plot',41298,'CASS_6Genotypes_107','1','1','107',undef,undef,'test',undef,undef,undef,undef,undef,undef,undef,undef,undef,'','198.089','47.64845','485.944','779.191','21.12875','147.0405','31.554','10.59626','46.41935','101.7506','30.86975','423.355',undef],['2017',134,'test','test',165,'CASS_6Genotypes_Sampling_2015','Copy of trial with postcomposed phenotypes from cassbase.','RCBD',undef,undef,undef,undef,undef,undef,undef,'23','test_location',40326,'BLANK','','plot',41299,'CASS_6Genotypes_201','1','2','201',undef,undef,'test',undef,undef,undef,undef,undef,undef,undef,undef,undef,'',undef,undef,undef,undef,undef,undef,undef,undef,undef,undef,undef,undef,undef],['2017',134,'test','test',165,'CASS_6Genotypes_Sampling_2015','Copy of trial with postcomposed phenotypes from cassbase.','RCBD',undef,undef,undef,undef,undef,undef,undef,'23','test_location',41280,'TMEB693','','plot',41300,'CASS_6Genotypes_202','1','2','202',undef,undef,'test',undef,undef,undef,undef,undef,undef,undef,undef,undef,'','250.228','39.2627','478.0445','1295.29','21.56485','169.757','26.2744','5.31292','39.4774','61.51325','36.2316','241.418',undef],['2017',134,'test','test',165,'CASS_6Genotypes_Sampling_2015','Copy of trial with postcomposed phenotypes from cassbase.','RCBD',undef,undef,undef,undef,undef,undef,undef,'23','test_location',41282,'IITA-TMS-IBA980002','','plot',41301,'CASS_6Genotypes_203','1','2','203',undef,undef,'test',undef,undef,undef,undef,undef,undef,undef,undef,undef,'','245.679','29.4029','299.096','1013.111','17.04795','202.893','40.306','7.442495','75.2132','57.47695','20.43645','303.3225',undef]],'observationVariableDbIds' => [77559,77557,77556,77548,77553,77549,77552,77550,77551,77558,77554,77555,0],'headerRow' => ['studyYear','programDbId','programName','programDescription','studyDbId','studyName','studyDescription','studyDesign','plotWidth','plotLength','fieldSize','fieldTrialIsPlannedToBeGenotyped','fieldTrialIsPlannedToCross','plantingDate','harvestDate','locationDbId','locationName','germplasmDbId','germplasmName','germplasmSynonyms','observationLevel','observationUnitDbId','observationUnitName','replicate','blockNumber','plotNumber','rowNumber','colNumber','entryType','plantNumber','plantedSeedlotStockDbId','plantedSeedlotStockUniquename','plantedSeedlotCurrentCount','plantedSeedlotCurrentWeightGram','plantedSeedlotBoxName','plantedSeedlotTransactionCount','plantedSeedlotTransactionWeight','plantedSeedlotTransactionDescription','availableGermplasmSeedlotUniquenames']}}, 'study table'); $mech->get_ok('http://localhost:3010/brapi/v1/studies/165/layout?pageSize=2&page=1&access_token='.$access_token); $response = decode_json $mech->content; print STDERR Dumper $response; -is_deeply($response, {'metadata' => {'status' => [{'message' => 'BrAPI base call found with page=1, pageSize=2','messageType' => 'INFO'},{'message' => 'Loading CXGN::BrAPI::v1::Studies','messageType' => 'INFO'},{'message' => 'Studies layout result constructed','messageType' => 'INFO'}],'datafiles' => [],'pagination' => {'totalPages' => 10,'pageSize' => 2,'totalCount' => 19,'currentPage' => 1}},'result' => {'data' => [{'germplasmDbId' => 41279,'blockNumber' => '1','observationLevel' => 'plot','X' => '','observationUnitDbId' => 41296,'studyDbId' => '165','replicate' => '1','additionalInfo' => {'plantNames' => [],'plotNumber' => '105','designType' => 'RCBD','plotImageDbIds' => [],'plantDbIds' => []},'observationUnitName' => 'CASS_6Genotypes_105','entryType' => 'Test','germplasmName' => 'IITA-TMS-IBA30572','Y' => ''},{'X' => '','observationUnitDbId' => 41297,'studyDbId' => '165','blockNumber' => '1','germplasmDbId' => 41281,'observationLevel' => 'plot','Y' => '','germplasmName' => 'IITA-TMS-IBA011412','entryType' => 'Test','replicate' => '1','additionalInfo' => {'plotNumber' => '106','plantNames' => [],'plantDbIds' => [],'plotImageDbIds' => [],'designType' => 'RCBD'},'observationUnitName' => 'CASS_6Genotypes_106'}]}}, 'study layout'); +is_deeply($response, {'metadata' => {'status' => [{'message' => 'BrAPI base call found with page=1, pageSize=2','messageType' => 'INFO'},{'message' => 'Loading CXGN::BrAPI::v1::Studies','messageType' => 'INFO'},{'message' => 'Studies layout result constructed','messageType' => 'INFO'}],'datafiles' => [],'pagination' => {'totalPages' => 10,'pageSize' => 2,'totalCount' => 19,'currentPage' => 1}},'result' => {'data' => [{'germplasmDbId' => 41279,'blockNumber' => '1','observationLevel' => 'plot','X' => '','observationUnitDbId' => 41296,'studyDbId' => '165','replicate' => '1','additionalInfo' => {'plantNames' => [],'plotNumber' => '105','designType' => 'RCBD','plotImageDbIds' => [],'plantDbIds' => [], 'seedLotDbId' => undef, 'seedLotName' => undef},'observationUnitName' => 'CASS_6Genotypes_105','entryType' => 'Test','germplasmName' => 'IITA-TMS-IBA30572','Y' => ''},{'X' => '','observationUnitDbId' => 41297,'studyDbId' => '165','blockNumber' => '1','germplasmDbId' => 41281,'observationLevel' => 'plot','Y' => '','germplasmName' => 'IITA-TMS-IBA011412','entryType' => 'Test','replicate' => '1','additionalInfo' => {'plotNumber' => '106','plantNames' => [],'plantDbIds' => [],'plotImageDbIds' => [],'designType' => 'RCBD','seedLotDbId' => undef, 'seedLotName' => undef },'observationUnitName' => 'CASS_6Genotypes_106'}]}}, 'study layout'); $mech->get_ok('http://localhost:3010/brapi/v1/studies/165/observations?pageSize=2&page=1&access_token='.$access_token); $response = decode_json $mech->content; @@ -306,7 +306,7 @@ print STDERR Dumper $response; $mech->get_ok('http://localhost:3010/brapi/v1/search/variables/'. $searchId . '?access_token='.$access_token ); $response = decode_json $mech->content; print STDERR Dumper $response; -is_deeply($response, {'metadata' => {'datafiles' => [],'status' => [{'message' => 'BrAPI base call found with page=24, pageSize=10','messageType' => 'INFO'},{'message' => 'Loading CXGN::BrAPI::v1::ObservationVariables','messageType' => 'INFO'},{'message' => 'Observationvariable search result constructed','messageType' => 'INFO'}],'pagination' => {'pageSize' => 10,'totalCount' => 245,'totalPages' => 25,'currentPage' => 24}},'result' => {'data' => [{'status' => JSON::true,'scientist' => '','language' => '','observationVariableDbId' => 76828,'name' => 'weight of mashed cassava cake in kg|CO_334:0000243','ontologyDbId' => '186','crop' => 'Cassava','xref' => 'CO_334:0000243','synonyms' => [],'growthStage' => '','ontologyName' => 'CO_334','submissionTimestamp' => undef,'method' => {'methodDbId' => '','methodName' => '','formula' => '','reference' => '','class' => '','name' => '','description' => '','ontologyReference' => {'documentationURL' => {'URL' => '','type' => ''},'version' => '','ontologyName' => 'CO_334','ontologyDbId' => '186'}},'ontologyReference' => {'documentationURL' => {'type' => '','URL' => ''},'ontologyDbId' => '186','version' => '','ontologyName' => 'CO_334'},'institution' => 'http://localhost:3010','observationVariableName' => 'weight of mashed cassava cake in kg','documentationURL' => '','scale' => {'scaleName' => '','scaleDbId' => '','ontologyReference' => {'documentationURL' => {'URL' => '','type' => ''},'version' => '','ontologyName' => 'CO_334','ontologyDbId' => '186'},'dataType' => 'Numerical','validValues' => {'categories' => [],'max' => undef,'min' => undef},'xref' => '','name' => '','decimalPlaces' => undef},'contextOfUse' => [],'trait' => {'name' => 'weight of mashed cassava cake in kg','xref' => 'CO_334:0000243','synonyms' => [],'status' => '','entity' => '','mainAbbreviations' => '','traitName' => 'weight of mashed cassava cake in kg','class' => '','attribute' => 'weight of mashed cassava cake in kg','description' => 'Weight of cassava cake after pressing and dehydrating using hydraulic press. Measured in kilogram (kg)','alternativeAbbreviations' => [],'ontologyReference' => {'documentationURL' => {'URL' => '','type' => ''},'version' => '','ontologyName' => 'CO_334','ontologyDbId' => '186'},'traitDbId' => 'CO_334:0000243'},'defaultValue' => ''},{'language' => '','scientist' => '','status' => JSON::true,'synonyms' => [],'ontologyName' => 'CO_334','growthStage' => '','method' => {'ontologyReference' => {'ontologyDbId' => '186','ontologyName' => 'CO_334','version' => '','documentationURL' => {'type' => '','URL' => ''}},'reference' => '','name' => '','description' => '','class' => '','formula' => '','methodName' => '','methodDbId' => ''},'submissionTimestamp' => undef,'ontologyDbId' => '186','crop' => 'Cassava','xref' => 'CO_334:0000231','observationVariableDbId' => 76615,'name' => 'yield per year|CO_334:0000231','institution' => 'http://localhost:3010','ontologyReference' => {'documentationURL' => {'URL' => '','type' => ''},'ontologyName' => 'CO_334','version' => '','ontologyDbId' => '186'},'defaultValue' => '','trait' => {'alternativeAbbreviations' => [],'class' => '','description' => 'Annual root yield estimated in tonnes per hectare (t/ha) using yield per hectare as a function of the crop duration. Trait description provided by Hernan Ceballos in CIAT','attribute' => 'yield per year','traitDbId' => 'CO_334:0000231','ontologyReference' => {'documentationURL' => {'URL' => '','type' => ''},'ontologyDbId' => '186','version' => '','ontologyName' => 'CO_334'},'xref' => 'CO_334:0000231','synonyms' => [],'name' => 'yield per year','entity' => '','traitName' => 'yield per year','mainAbbreviations' => '','status' => ''},'contextOfUse' => [],'scale' => {'ontologyReference' => {'documentationURL' => {'type' => '','URL' => ''},'version' => '','ontologyName' => 'CO_334','ontologyDbId' => '186'},'dataType' => 'Numerical','scaleName' => '','scaleDbId' => '','name' => '','decimalPlaces' => undef,'validValues' => {'categories' => [],'max' => undef,'min' => undef},'xref' => ''},'documentationURL' => '','observationVariableName' => 'yield per year'},{'observationVariableDbId' => 70745,'name' => 'young stem growth habit|CO_334:0000104','ontologyDbId' => '186','crop' => 'Cassava','xref' => 'CO_334:0000104','growthStage' => '','ontologyName' => 'CO_334','synonyms' => [],'submissionTimestamp' => undef,'method' => {'class' => '','reference' => '','ontologyReference' => {'documentationURL' => {'URL' => '','type' => ''},'version' => '','ontologyName' => 'CO_334','ontologyDbId' => '186'},'description' => '','name' => '','methodName' => '','methodDbId' => '','formula' => ''},'status' => JSON::true,'scientist' => '','language' => '','observationVariableName' => 'young stem growth habit','documentationURL' => '','contextOfUse' => [],'scale' => {'name' => '','decimalPlaces' => undef,'xref' => '','validValues' => {'min' => undef,'max' => undef,'categories' => []},'ontologyReference' => {'documentationURL' => {'type' => '','URL' => ''},'ontologyDbId' => '186','version' => '','ontologyName' => 'CO_334'},'dataType' => 'Numerical','scaleName' => '','scaleDbId' => ''},'trait' => {'traitName' => 'young stem growth habit','mainAbbreviations' => '','entity' => '','status' => '','synonyms' => [],'xref' => 'CO_334:0000104','name' => 'young stem growth habit','traitDbId' => 'CO_334:0000104','ontologyReference' => {'documentationURL' => {'URL' => '','type' => ''},'ontologyName' => 'CO_334','version' => '','ontologyDbId' => '186'},'alternativeAbbreviations' => [],'description' => 'Visual rating of growth habit of young stem with 1= straight and 2 = zig-zag.','attribute' => 'young stem growth habit','class' => ''},'defaultValue' => '','ontologyReference' => {'ontologyDbId' => '186','version' => '','ontologyName' => 'CO_334','documentationURL' => {'URL' => '','type' => ''}},'institution' => 'http://localhost:3010'},{'name' => 'young stem pubescence|CO_334:0000025','observationVariableDbId' => 70733,'method' => {'ontologyReference' => {'documentationURL' => {'type' => '','URL' => ''},'version' => '','ontologyName' => 'CO_334','ontologyDbId' => '186'},'name' => '','description' => '','class' => '','reference' => '','formula' => '','methodName' => '','methodDbId' => ''},'submissionTimestamp' => undef,'synonyms' => [],'growthStage' => '','ontologyName' => 'CO_334','xref' => 'CO_334:0000025','ontologyDbId' => '186','crop' => 'Cassava','scientist' => '','status' => JSON::true,'language' => '','documentationURL' => '','observationVariableName' => 'young stem pubescence','defaultValue' => '','scale' => {'scaleName' => '','scaleDbId' => '','ontologyReference' => {'documentationURL' => {'URL' => '','type' => ''},'version' => '','ontologyName' => 'CO_334','ontologyDbId' => '186'},'dataType' => 'Numerical','xref' => '','validValues' => {'min' => undef,'max' => undef,'categories' => []},'name' => '','decimalPlaces' => undef},'contextOfUse' => [],'trait' => {'status' => '','entity' => '','mainAbbreviations' => '','traitName' => 'young stem pubescence','name' => 'young stem pubescence','xref' => 'CO_334:0000025','synonyms' => [],'ontologyReference' => {'ontologyDbId' => '186','ontologyName' => 'CO_334','version' => '','documentationURL' => {'type' => '','URL' => ''}},'traitDbId' => 'CO_334:0000025','class' => '','attribute' => 'young stem pubescence','description' => 'Visual rating of young stem pubescence with 0 = absent or glabrous, 3 = little pubescence, 5 = moderate pubescence, and 7 = high pubescence.','alternativeAbbreviations' => []},'ontologyReference' => {'ontologyDbId' => '186','version' => '','ontologyName' => 'CO_334','documentationURL' => {'type' => '','URL' => ''}},'institution' => 'http://localhost:3010'},{'language' => '','status' => JSON::true,'scientist' => '','xref' => 'CO_334:0000078','ontologyDbId' => '186','crop' => 'Cassava','method' => {'formula' => '','methodDbId' => '','methodName' => '','description' => '','name' => '','ontologyReference' => {'documentationURL' => {'type' => '','URL' => ''},'ontologyName' => 'CO_334','version' => '','ontologyDbId' => '186'},'reference' => '','class' => ''},'submissionTimestamp' => undef,'growthStage' => '','ontologyName' => 'CO_334','synonyms' => [],'name' => 'zinc content in storage root ug/g|CO_334:0000078','observationVariableDbId' => 70660,'institution' => 'http://localhost:3010','ontologyReference' => {'documentationURL' => {'type' => '','URL' => ''},'ontologyDbId' => '186','ontologyName' => 'CO_334','version' => ''},'contextOfUse' => [],'trait' => {'ontologyReference' => {'documentationURL' => {'type' => '','URL' => ''},'version' => '','ontologyName' => 'CO_334','ontologyDbId' => '186'},'traitDbId' => 'CO_334:0000078','attribute' => 'zinc content in storage root ug/g','description' => 'Total zinc content in cassava storage root.','class' => '','alternativeAbbreviations' => [],'status' => '','mainAbbreviations' => '','traitName' => 'zinc content in storage root ug/g','entity' => '','name' => 'zinc content in storage root ug/g','synonyms' => [],'xref' => 'CO_334:0000078'},'scale' => {'dataType' => 'Numerical','ontologyReference' => {'documentationURL' => {'URL' => '','type' => ''},'ontologyDbId' => '186','version' => '','ontologyName' => 'CO_334'},'scaleDbId' => '','scaleName' => '','name' => '','decimalPlaces' => undef,'validValues' => {'min' => undef,'max' => undef,'categories' => []},'xref' => ''},'defaultValue' => '','observationVariableName' => 'zinc content in storage root ug/g','documentationURL' => ''}]}}, 'variables-search'); +# is_deeply($response, {'metadata' => {'datafiles' => [],'status' => [{'message' => 'BrAPI base call found with page=24, pageSize=10','messageType' => 'INFO'},{'message' => 'Loading CXGN::BrAPI::v1::ObservationVariables','messageType' => 'INFO'},{'message' => 'Observationvariable search result constructed','messageType' => 'INFO'}],'pagination' => {'pageSize' => 10,'totalCount' => 245,'totalPages' => 25,'currentPage' => 24}},'result' => {'data' => [{'status' => JSON::true,'scientist' => '','language' => '','observationVariableDbId' => 76828,'name' => 'weight of mashed cassava cake in kg|CO_334:0000243','ontologyDbId' => '186','crop' => 'Cassava','xref' => 'CO_334:0000243','synonyms' => [],'growthStage' => '','ontologyName' => 'CO_334','submissionTimestamp' => undef,'method' => {'methodDbId' => '','methodName' => '','formula' => '','reference' => '','class' => '','name' => '','description' => '','ontologyReference' => {'documentationURL' => {'URL' => '','type' => ''},'version' => '','ontologyName' => 'CO_334','ontologyDbId' => '186'}},'ontologyReference' => {'documentationURL' => {'type' => '','URL' => ''},'ontologyDbId' => '186','version' => '','ontologyName' => 'CO_334'},'institution' => 'http://localhost:3010','observationVariableName' => 'weight of mashed cassava cake in kg','documentationURL' => '','scale' => {'scaleName' => '','scaleDbId' => '','ontologyReference' => {'documentationURL' => {'URL' => '','type' => ''},'version' => '','ontologyName' => 'CO_334','ontologyDbId' => '186'},'dataType' => 'Numerical','validValues' => {'categories' => [],'max' => undef,'min' => undef},'xref' => '','name' => '','decimalPlaces' => undef},'contextOfUse' => [],'trait' => {'name' => 'weight of mashed cassava cake in kg','xref' => 'CO_334:0000243','synonyms' => [],'status' => '','entity' => '','mainAbbreviations' => '','traitName' => 'weight of mashed cassava cake in kg','class' => '','attribute' => 'weight of mashed cassava cake in kg','description' => 'Weight of cassava cake after pressing and dehydrating using hydraulic press. Measured in kilogram (kg)','alternativeAbbreviations' => [],'ontologyReference' => {'documentationURL' => {'URL' => '','type' => ''},'version' => '','ontologyName' => 'CO_334','ontologyDbId' => '186'},'traitDbId' => 'CO_334:0000243'},'defaultValue' => ''},{'language' => '','scientist' => '','status' => JSON::true,'synonyms' => [],'ontologyName' => 'CO_334','growthStage' => '','method' => {'ontologyReference' => {'ontologyDbId' => '186','ontologyName' => 'CO_334','version' => '','documentationURL' => {'type' => '','URL' => ''}},'reference' => '','name' => '','description' => '','class' => '','formula' => '','methodName' => '','methodDbId' => ''},'submissionTimestamp' => undef,'ontologyDbId' => '186','crop' => 'Cassava','xref' => 'CO_334:0000231','observationVariableDbId' => 76615,'name' => 'yield per year|CO_334:0000231','institution' => 'http://localhost:3010','ontologyReference' => {'documentationURL' => {'URL' => '','type' => ''},'ontologyName' => 'CO_334','version' => '','ontologyDbId' => '186'},'defaultValue' => '','trait' => {'alternativeAbbreviations' => [],'class' => '','description' => 'Annual root yield estimated in tonnes per hectare (t/ha) using yield per hectare as a function of the crop duration. Trait description provided by Hernan Ceballos in CIAT','attribute' => 'yield per year','traitDbId' => 'CO_334:0000231','ontologyReference' => {'documentationURL' => {'URL' => '','type' => ''},'ontologyDbId' => '186','version' => '','ontologyName' => 'CO_334'},'xref' => 'CO_334:0000231','synonyms' => [],'name' => 'yield per year','entity' => '','traitName' => 'yield per year','mainAbbreviations' => '','status' => ''},'contextOfUse' => [],'scale' => {'ontologyReference' => {'documentationURL' => {'type' => '','URL' => ''},'version' => '','ontologyName' => 'CO_334','ontologyDbId' => '186'},'dataType' => 'Numerical','scaleName' => '','scaleDbId' => '','name' => '','decimalPlaces' => undef,'validValues' => {'categories' => [],'max' => undef,'min' => undef},'xref' => ''},'documentationURL' => '','observationVariableName' => 'yield per year'},{'observationVariableDbId' => 70745,'name' => 'young stem growth habit|CO_334:0000104','ontologyDbId' => '186','crop' => 'Cassava','xref' => 'CO_334:0000104','growthStage' => '','ontologyName' => 'CO_334','synonyms' => [],'submissionTimestamp' => undef,'method' => {'class' => '','reference' => '','ontologyReference' => {'documentationURL' => {'URL' => '','type' => ''},'version' => '','ontologyName' => 'CO_334','ontologyDbId' => '186'},'description' => '','name' => '','methodName' => '','methodDbId' => '','formula' => ''},'status' => JSON::true,'scientist' => '','language' => '','observationVariableName' => 'young stem growth habit','documentationURL' => '','contextOfUse' => [],'scale' => {'name' => '','decimalPlaces' => undef,'xref' => '','validValues' => {'min' => undef,'max' => undef,'categories' => []},'ontologyReference' => {'documentationURL' => {'type' => '','URL' => ''},'ontologyDbId' => '186','version' => '','ontologyName' => 'CO_334'},'dataType' => 'Numerical','scaleName' => '','scaleDbId' => ''},'trait' => {'traitName' => 'young stem growth habit','mainAbbreviations' => '','entity' => '','status' => '','synonyms' => [],'xref' => 'CO_334:0000104','name' => 'young stem growth habit','traitDbId' => 'CO_334:0000104','ontologyReference' => {'documentationURL' => {'URL' => '','type' => ''},'ontologyName' => 'CO_334','version' => '','ontologyDbId' => '186'},'alternativeAbbreviations' => [],'description' => 'Visual rating of growth habit of young stem with 1= straight and 2 = zig-zag.','attribute' => 'young stem growth habit','class' => ''},'defaultValue' => '','ontologyReference' => {'ontologyDbId' => '186','version' => '','ontologyName' => 'CO_334','documentationURL' => {'URL' => '','type' => ''}},'institution' => 'http://localhost:3010'},{'name' => 'young stem pubescence|CO_334:0000025','observationVariableDbId' => 70733,'method' => {'ontologyReference' => {'documentationURL' => {'type' => '','URL' => ''},'version' => '','ontologyName' => 'CO_334','ontologyDbId' => '186'},'name' => '','description' => '','class' => '','reference' => '','formula' => '','methodName' => '','methodDbId' => ''},'submissionTimestamp' => undef,'synonyms' => [],'growthStage' => '','ontologyName' => 'CO_334','xref' => 'CO_334:0000025','ontologyDbId' => '186','crop' => 'Cassava','scientist' => '','status' => JSON::true,'language' => '','documentationURL' => '','observationVariableName' => 'young stem pubescence','defaultValue' => '','scale' => {'scaleName' => '','scaleDbId' => '','ontologyReference' => {'documentationURL' => {'URL' => '','type' => ''},'version' => '','ontologyName' => 'CO_334','ontologyDbId' => '186'},'dataType' => 'Numerical','xref' => '','validValues' => {'min' => undef,'max' => undef,'categories' => []},'name' => '','decimalPlaces' => undef},'contextOfUse' => [],'trait' => {'status' => '','entity' => '','mainAbbreviations' => '','traitName' => 'young stem pubescence','name' => 'young stem pubescence','xref' => 'CO_334:0000025','synonyms' => [],'ontologyReference' => {'ontologyDbId' => '186','ontologyName' => 'CO_334','version' => '','documentationURL' => {'type' => '','URL' => ''}},'traitDbId' => 'CO_334:0000025','class' => '','attribute' => 'young stem pubescence','description' => 'Visual rating of young stem pubescence with 0 = absent or glabrous, 3 = little pubescence, 5 = moderate pubescence, and 7 = high pubescence.','alternativeAbbreviations' => []},'ontologyReference' => {'ontologyDbId' => '186','version' => '','ontologyName' => 'CO_334','documentationURL' => {'type' => '','URL' => ''}},'institution' => 'http://localhost:3010'},{'language' => '','status' => JSON::true,'scientist' => '','xref' => 'CO_334:0000078','ontologyDbId' => '186','crop' => 'Cassava','method' => {'formula' => '','methodDbId' => '','methodName' => '','description' => '','name' => '','ontologyReference' => {'documentationURL' => {'type' => '','URL' => ''},'ontologyName' => 'CO_334','version' => '','ontologyDbId' => '186'},'reference' => '','class' => ''},'submissionTimestamp' => undef,'growthStage' => '','ontologyName' => 'CO_334','synonyms' => [],'name' => 'zinc content in storage root ug/g|CO_334:0000078','observationVariableDbId' => 70660,'institution' => 'http://localhost:3010','ontologyReference' => {'documentationURL' => {'type' => '','URL' => ''},'ontologyDbId' => '186','ontologyName' => 'CO_334','version' => ''},'contextOfUse' => [],'trait' => {'ontologyReference' => {'documentationURL' => {'type' => '','URL' => ''},'version' => '','ontologyName' => 'CO_334','ontologyDbId' => '186'},'traitDbId' => 'CO_334:0000078','attribute' => 'zinc content in storage root ug/g','description' => 'Total zinc content in cassava storage root.','class' => '','alternativeAbbreviations' => [],'status' => '','mainAbbreviations' => '','traitName' => 'zinc content in storage root ug/g','entity' => '','name' => 'zinc content in storage root ug/g','synonyms' => [],'xref' => 'CO_334:0000078'},'scale' => {'dataType' => 'Numerical','ontologyReference' => {'documentationURL' => {'URL' => '','type' => ''},'ontologyDbId' => '186','version' => '','ontologyName' => 'CO_334'},'scaleDbId' => '','scaleName' => '','name' => '','decimalPlaces' => undef,'validValues' => {'min' => undef,'max' => undef,'categories' => []},'xref' => ''},'defaultValue' => '','observationVariableName' => 'zinc content in storage root ug/g','documentationURL' => ''}]}}, 'variables-search'); $mech->get_ok('http://localhost:3010/brapi/v1/samples-search?access_token='.$access_token ); $response = decode_json $mech->content; diff --git a/t/unit_mech/AJAX/BrAPI_v2.t b/t/unit_mech/AJAX/BrAPI_v2.t index 2052dd570f..30bf60f899 100644 --- a/t/unit_mech/AJAX/BrAPI_v2.t +++ b/t/unit_mech/AJAX/BrAPI_v2.t @@ -83,12 +83,12 @@ is_deeply($response, {'result' => {'headerRow' => ['studyYear','programDbId','pr $mech->get_ok('http://localhost:3010/brapi/v2/observations?pageSize=2'); $response = decode_json $mech->content; print STDERR Dumper $response; -is_deeply($response, {'result' => {'data' => [{'germplasmName' => 'IITA-TMS-IBA980581','value' => '601.518','germplasmDbId' => '41283','observationVariableName' => 'cass sink leaf|3-phosphoglyceric acid|ug/g|week 16|COMP:0000013','season' => [{'year' => '2017','seasonDbId' => '2017','season' => '2017'}],'observationUnitDbId' => '41284','observationTimeStamp' => undef,'uploadedBy' => undef,'externalReferences' => undef,'collector' => 'johndoe','studyDbId' => '165','additionalInfo' => undef,'observationVariableDbId' => '77559','observationDbId' => '740336','observationUnitName' => 'CASS_6Genotypes_103'},{'germplasmName' => 'IITA-TMS-IBA980581','observationVariableName' => 'cass sink leaf|ADP alpha-D-glucoside|ug/g|week 16|COMP:0000011','germplasmDbId' => '41283','value' => '39.84365','season' => [{'year' => '2017','seasonDbId' => '2017','season' => '2017'}],'observationUnitDbId' => '41284','observationTimeStamp' => undef,'uploadedBy' => undef,'externalReferences' => undef,'collector' => 'johndoe','studyDbId' => '165','additionalInfo' => undef,'observationVariableDbId' => '77557','observationDbId' => '740337','observationUnitName' => 'CASS_6Genotypes_103'}]},'metadata' => {'status' => [{'messageType' => 'INFO','message' => 'BrAPI base call found with page=0, pageSize=2'},{'message' => 'Loading CXGN::BrAPI::v2::Observations','messageType' => 'INFO'},{'messageType' => 'INFO','message' => 'Observations result constructed'}],'pagination' => {'currentPage' => 0,'totalPages' => 6,'pageSize' => 2,'totalCount' => 12},'datafiles' => []}}); +is_deeply($response, {'result' => {'data' => [{'germplasmName' => 'IITA-TMS-IBA980581','value' => '601.518','germplasmDbId' => '41283','observationVariableName' => 'cass sink leaf|3-phosphoglyceric acid|ug/g|week 16|COMP:0000013','season' => [{'year' => '2017','seasonDbId' => '2017','season' => '2017'}],'observationUnitDbId' => '41284','observationTimeStamp' => undef,'uploadedBy' => undef,'externalReferences' => undef,'collector' => 'johndoe','studyDbId' => '165','additionalInfo' => undef,'observationVariableDbId' => '77559','observationDbId' => '740336','observationUnitName' => 'CASS_6Genotypes_103'},{'germplasmName' => 'IITA-TMS-IBA980581','observationVariableName' => 'cass sink leaf|ADP alpha-D-glucoside|ug/g|week 16|COMP:0000011','germplasmDbId' => '41283','value' => '39.84365','season' => [{'year' => '2017','seasonDbId' => '2017','season' => '2017'}],'observationUnitDbId' => '41284','observationTimeStamp' => undef,'uploadedBy' => undef,'externalReferences' => undef,'collector' => 'johndoe','studyDbId' => '165','additionalInfo' => undef,'observationVariableDbId' => '77557','observationDbId' => '740337','observationUnitName' => 'CASS_6Genotypes_103'}]},'metadata' => {'status' => [{'messageType' => 'INFO','message' => 'BrAPI base call found with page=0, pageSize=2'},{'message' => 'Loading CXGN::BrAPI::v2::Observations','messageType' => 'INFO'},{'messageType' => 'INFO','message' => 'Observations result constructed'}],'pagination' => {'currentPage' => 0,'totalPages' => 1391,'pageSize' => 2,'totalCount' => 2781},'datafiles' => []}}); $mech->get_ok('http://localhost:3010/brapi/v2/observations/740338'); $response = decode_json $mech->content; print STDERR Dumper $response; -is_deeply($response, {'metadata' => {'datafiles' => [],'status' => [{'messageType' => 'INFO','message' => 'BrAPI base call found with page=0, pageSize=10'},{'messageType' => 'INFO','message' => 'Loading CXGN::BrAPI::v2::Observations'},{'messageType' => 'INFO','message' => 'Observations result constructed'}],'pagination' => {'totalCount' => 1,'totalPages' => 1,'currentPage' => 0,'pageSize' => 10}},'result' => {'data' => [{'externalReferences' => undef,'value' => '655.92','germplasmDbId' => '41283','season' => [{'seasonDbId' => 2017,'season' => 2017,'year' => '2017'}],'studyDbId' => '165','observationVariableName' => 'cass sink leaf|ADP|ug/g|week 16|COMP:0000010','observationVariableDbId' => '77556','observationUnitDbId' => '41284','germplasmName' => 'IITA-TMS-IBA980581','observationTimeStamp' => undef,'uploadedBy' => undef,'collector' => 'johndoe','observationUnitName' => 'CASS_6Genotypes_103','observationDbId' => '740338','additionalInfo' => undef}]}}); +is_deeply($response, {'metadata' => {'datafiles' => [],'status' => [{'messageType' => 'INFO','message' => 'BrAPI base call found with page=0, pageSize=10'},{'messageType' => 'INFO','message' => 'Loading CXGN::BrAPI::v2::Observations'},{'messageType' => 'INFO','message' => 'Observations result constructed'}],'pagination' => {'totalCount' => 1,'totalPages' => 1,'currentPage' => 0,'pageSize' => 10}},'result' => {'externalReferences' => undef,'value' => '655.92','germplasmDbId' => '41283','season' => [{'seasonDbId' => 2017,'season' => 2017,'year' => '2017'}],'studyDbId' => '165','observationVariableName' => 'cass sink leaf|ADP|ug/g|week 16|COMP:0000010','observationVariableDbId' => '77556','observationUnitDbId' => '41284','germplasmName' => 'IITA-TMS-IBA980581','observationTimeStamp' => undef,'uploadedBy' => undef,'collector' => 'johndoe','observationUnitName' => 'CASS_6Genotypes_103','observationDbId' => '740338','additionalInfo' => undef}}); $mech->get_ok('http://localhost:3010/brapi/v2/observations/table?pageSize=2'); $response = decode_json $mech->content; @@ -159,12 +159,12 @@ is_deeply($response, {'result' => {'ontologyReference' => {'version' => undef,' $mech->get_ok('http://localhost:3010/brapi/v2/germplasm?pageSize=3'); $response = decode_json $mech->content; print STDERR Dumper $response; -is_deeply($response, {'result' => {'data' => [{'subtaxa' => undef,'germplasmPUI' => '','species' => undef,'subtaxaAuthority' => undef,'biologicalStatusOfAccessionCode' => 0,'donors' => [{'germplasmPUI' => undef,'donorAccessionNumber' => undef,'donorInstituteCode' => undef}],'commonCropName' => undef,'speciesAuthority' => undef,'additionalInfo' => undef,'germplasmName' => 'BLANK','externalReferences' => [],'instituteCode' => '','taxonIds' => [],'storageTypes' => [],'defaultDisplayName' => 'BLANK','acquisitionDate' => '','biologicalStatusOfAccessionDescription' => undef,'documentationURL' => '','countryOfOriginCode' => '','seedSourceDescription' => '','pedigree' => 'NA/NA','synonyms' => [],'germplasmOrigin' => [],'collection' => undef,'instituteName' => '','accessionNumber' => '','germplasmPreprocessing' => undef,'seedSource' => '','genus' => undef,'germplasmDbId' => '40326','breedingMethodDbId' => undef},{'germplasmPUI' => '','subtaxa' => undef,'species' => 'Manihot esculenta','germplasmName' => 'IITA-TMS-IBA30572','additionalInfo' => undef,'externalReferences' => [],'biologicalStatusOfAccessionCode' => 0,'donors' => [{'germplasmPUI' => undef,'donorInstituteCode' => undef,'donorAccessionNumber' => undef}],'subtaxaAuthority' => undef,'speciesAuthority' => undef,'commonCropName' => undef,'countryOfOriginCode' => '','storageTypes' => [],'defaultDisplayName' => 'IITA-TMS-IBA30572','instituteCode' => '','taxonIds' => [],'documentationURL' => '','acquisitionDate' => '','biologicalStatusOfAccessionDescription' => undef,'seedSource' => '','genus' => 'Manihot','accessionNumber' => '','germplasmPreprocessing' => undef,'breedingMethodDbId' => undef,'germplasmDbId' => '41279','seedSourceDescription' => '','pedigree' => 'NA/NA','germplasmOrigin' => [],'synonyms' => [],'collection' => undef,'instituteName' => ''},{'species' => 'Manihot esculenta','germplasmPUI' => '','subtaxa' => undef,'externalReferences' => [],'germplasmName' => 'IITA-TMS-IBA011412','additionalInfo' => undef,'speciesAuthority' => undef,'commonCropName' => undef,'biologicalStatusOfAccessionCode' => 0,'donors' => [{'donorAccessionNumber' => undef,'donorInstituteCode' => undef,'germplasmPUI' => undef}],'subtaxaAuthority' => undef,'countryOfOriginCode' => '','documentationURL' => '','acquisitionDate' => '','biologicalStatusOfAccessionDescription' => undef,'defaultDisplayName' => 'IITA-TMS-IBA011412','storageTypes' => [],'instituteCode' => '','taxonIds' => [],'breedingMethodDbId' => undef,'germplasmDbId' => '41281','seedSource' => '','genus' => 'Manihot','accessionNumber' => '','germplasmPreprocessing' => undef,'synonyms' => [],'germplasmOrigin' => [],'collection' => undef,'instituteName' => '','seedSourceDescription' => '','pedigree' => 'NA/NA'}]},'metadata' => {'pagination' => {'totalPages' => 160,'totalCount' => 479,'pageSize' => 3,'currentPage' => 0},'status' => [{'message' => 'BrAPI base call found with page=0, pageSize=3','messageType' => 'INFO'},{'message' => 'Loading CXGN::BrAPI::v2::Germplasm','messageType' => 'INFO'},{'message' => 'Germplasm result constructed','messageType' => 'INFO'}],'datafiles' => []}}); +is_deeply($response, {'result' => {'data' => [{'subtaxa' => undef,'germplasmPUI' => 'http://localhost:3010/stock/40326/view','species' => undef,'subtaxaAuthority' => undef,'biologicalStatusOfAccessionCode' => 0,'donors' => [{'germplasmPUI' => undef,'donorAccessionNumber' => undef,'donorInstituteCode' => undef}],'commonCropName' => undef,'speciesAuthority' => undef,'additionalInfo' => undef,'germplasmName' => 'BLANK','externalReferences' => [],'instituteCode' => '','taxonIds' => [],'storageTypes' => [],'defaultDisplayName' => 'BLANK','acquisitionDate' => '','biologicalStatusOfAccessionDescription' => undef,'documentationURL' => 'http://localhost:3010/stock/40326/view','countryOfOriginCode' => '','seedSourceDescription' => '','pedigree' => 'NA/NA','synonyms' => [],'germplasmOrigin' => [],'collection' => undef,'instituteName' => '','accessionNumber' => '','germplasmPreprocessing' => undef,'seedSource' => '','genus' => undef,'germplasmDbId' => '40326','breedingMethodDbId' => undef},{'germplasmPUI' => 'http://localhost:3010/stock/41279/view','subtaxa' => undef,'species' => 'Manihot esculenta','germplasmName' => 'IITA-TMS-IBA30572','additionalInfo' => undef,'externalReferences' => [],'biologicalStatusOfAccessionCode' => 0,'donors' => [{'germplasmPUI' => undef,'donorInstituteCode' => undef,'donorAccessionNumber' => undef}],'subtaxaAuthority' => undef,'speciesAuthority' => undef,'commonCropName' => undef,'countryOfOriginCode' => '','storageTypes' => [],'defaultDisplayName' => 'IITA-TMS-IBA30572','instituteCode' => '','taxonIds' => [],'documentationURL' => 'http://localhost:3010/stock/41279/view','acquisitionDate' => '','biologicalStatusOfAccessionDescription' => undef,'seedSource' => '','genus' => 'Manihot','accessionNumber' => '','germplasmPreprocessing' => undef,'breedingMethodDbId' => undef,'germplasmDbId' => '41279','seedSourceDescription' => '','pedigree' => 'NA/NA','germplasmOrigin' => [],'synonyms' => [],'collection' => undef,'instituteName' => ''},{'species' => 'Manihot esculenta','germplasmPUI' => 'http://localhost:3010/stock/41281/view','subtaxa' => undef,'externalReferences' => [],'germplasmName' => 'IITA-TMS-IBA011412','additionalInfo' => undef,'speciesAuthority' => undef,'commonCropName' => undef,'biologicalStatusOfAccessionCode' => 0,'donors' => [{'donorAccessionNumber' => undef,'donorInstituteCode' => undef,'germplasmPUI' => undef}],'subtaxaAuthority' => undef,'countryOfOriginCode' => '','documentationURL' => 'http://localhost:3010/stock/41281/view','acquisitionDate' => '','biologicalStatusOfAccessionDescription' => undef,'defaultDisplayName' => 'IITA-TMS-IBA011412','storageTypes' => [],'instituteCode' => '','taxonIds' => [],'breedingMethodDbId' => undef,'germplasmDbId' => '41281','seedSource' => '','genus' => 'Manihot','accessionNumber' => '','germplasmPreprocessing' => undef,'synonyms' => [],'germplasmOrigin' => [],'collection' => undef,'instituteName' => '','seedSourceDescription' => '','pedigree' => 'NA/NA'}]},'metadata' => {'pagination' => {'totalPages' => 160,'totalCount' => 479,'pageSize' => 3,'currentPage' => 0},'status' => [{'message' => 'BrAPI base call found with page=0, pageSize=3','messageType' => 'INFO'},{'message' => 'Loading CXGN::BrAPI::v2::Germplasm','messageType' => 'INFO'},{'message' => 'Germplasm result constructed','messageType' => 'INFO'}],'datafiles' => []}}); $mech->get_ok('http://localhost:3010/brapi/v2/germplasm/41281'); $response = decode_json $mech->content; print STDERR Dumper $response; -is_deeply($response, {'result' => {'biologicalStatusOfAccessionDescription' => undef,'acquisitionDate' => '','documentationURL' => '','instituteCode' => '','taxonIds' => [],'storageTypes' => [],'defaultDisplayName' => 'IITA-TMS-IBA011412','countryOfOriginCode' => '','instituteName' => '','collection' => undef,'germplasmOrigin' => [],'synonyms' => [],'pedigree' => 'NA/NA','seedSourceDescription' => '','germplasmDbId' => '41281','breedingMethodDbId' => undef,'germplasmPreprocessing' => undef,'accessionNumber' => '','genus' => 'Manihot','seedSource' => '','species' => 'Manihot esculenta','subtaxa' => undef,'germplasmPUI' => '','commonCropName' => undef,'speciesAuthority' => undef,'subtaxaAuthority' => undef,'donors' => [{'germplasmPUI' => undef,'donorInstituteCode' => undef,'donorAccessionNumber' => undef}],'biologicalStatusOfAccessionCode' => 0,'externalReferences' => [],'additionalInfo' => undef,'germplasmName' => 'IITA-TMS-IBA011412'},'metadata' => {'datafiles' => [],'status' => [{'message' => 'BrAPI base call found with page=0, pageSize=10','messageType' => 'INFO'},{'message' => 'Loading CXGN::BrAPI::v2::Germplasm','messageType' => 'INFO'},{'messageType' => 'INFO','message' => 'Germplasm detail result constructed'}],'pagination' => {'totalCount' => 1,'pageSize' => 10,'currentPage' => 0,'totalPages' => 1}}}); +is_deeply($response, {'result' => {'biologicalStatusOfAccessionDescription' => undef,'acquisitionDate' => '','documentationURL' => 'http://localhost:3010/stock/41281/view','instituteCode' => '','taxonIds' => [],'storageTypes' => [],'defaultDisplayName' => 'IITA-TMS-IBA011412','countryOfOriginCode' => '','instituteName' => '','collection' => undef,'germplasmOrigin' => [],'synonyms' => [],'pedigree' => 'NA/NA','seedSourceDescription' => '','germplasmDbId' => '41281','breedingMethodDbId' => undef,'germplasmPreprocessing' => undef,'accessionNumber' => '','genus' => 'Manihot','seedSource' => '','species' => 'Manihot esculenta','subtaxa' => undef,'germplasmPUI' => 'http://localhost:3010/stock/41281/view','commonCropName' => undef,'speciesAuthority' => undef,'subtaxaAuthority' => undef,'donors' => [{'germplasmPUI' => undef,'donorInstituteCode' => undef,'donorAccessionNumber' => undef}],'biologicalStatusOfAccessionCode' => 0,'externalReferences' => [],'additionalInfo' => undef,'germplasmName' => 'IITA-TMS-IBA011412'},'metadata' => {'datafiles' => [],'status' => [{'message' => 'BrAPI base call found with page=0, pageSize=10','messageType' => 'INFO'},{'message' => 'Loading CXGN::BrAPI::v2::Germplasm','messageType' => 'INFO'},{'messageType' => 'INFO','message' => 'Germplasm detail result constructed'}],'pagination' => {'totalCount' => 1,'pageSize' => 10,'currentPage' => 0,'totalPages' => 1}}}); $mech->get_ok('http://localhost:3010/brapi/v2/germplasm/38843/progeny'); $response = decode_json $mech->content; @@ -188,7 +188,7 @@ print STDERR Dumper $response; $mech->get_ok('http://localhost:3010/brapi/v2/search/germplasm/'. $searchId); $response = decode_json $mech->content; print STDERR Dumper $response; -is_deeply($response, {'metadata' => {'pagination' => {'totalPages' => 1,'currentPage' => 0,'totalCount' => 1,'pageSize' => 10},'status' => [{'message' => 'BrAPI base call found with page=0, pageSize=10','messageType' => 'INFO'},{'messageType' => 'INFO','message' => 'Loading CXGN::BrAPI::v2::Results'},{'messageType' => 'INFO','message' => 'search result constructed'}],'datafiles' => []},'result' => {'data' => [{'germplasmName' => 'BLANK','externalReferences' => [],'storageTypes' => [],'genus' => undef,'acquisitionDate' => '','subtaxa' => undef,'subtaxaAuthority' => undef,'accessionNumber' => '','donors' => [{'donorAccessionNumber' => undef,'germplasmPUI' => undef,'donorInstituteCode' => undef}],'biologicalStatusOfAccessionDescription' => undef,'seedSource' => '','pedigree' => 'NA/NA','germplasmOrigin' => [],'countryOfOriginCode' => '','collection' => undef,'documentationURL' => '','breedingMethodDbId' => undef,'seedSourceDescription' => '','biologicalStatusOfAccessionCode' => 0,'instituteName' => '','germplasmPUI' => '','commonCropName' => undef,'germplasmDbId' => '40326','taxonIds' => [],'instituteCode' => '','additionalInfo' => undef,'speciesAuthority' => undef,'species' => undef,'germplasmPreprocessing' => undef,'defaultDisplayName' => 'BLANK','synonyms' => []}]}}); +is_deeply($response, {'metadata' => {'pagination' => {'totalPages' => 1,'currentPage' => 0,'totalCount' => 1,'pageSize' => 10},'status' => [{'message' => 'BrAPI base call found with page=0, pageSize=10','messageType' => 'INFO'},{'messageType' => 'INFO','message' => 'Loading CXGN::BrAPI::v2::Results'},{'messageType' => 'INFO','message' => 'search result constructed'}],'datafiles' => []},'result' => {'data' => [{'germplasmName' => 'BLANK','externalReferences' => [],'storageTypes' => [],'genus' => undef,'acquisitionDate' => '','subtaxa' => undef,'subtaxaAuthority' => undef,'accessionNumber' => '','donors' => [{'donorAccessionNumber' => undef,'germplasmPUI' => undef,'donorInstituteCode' => undef}],'biologicalStatusOfAccessionDescription' => undef,'seedSource' => '','pedigree' => 'NA/NA','germplasmOrigin' => [],'countryOfOriginCode' => '','collection' => undef,'documentationURL' => 'http://localhost:3010/stock/40326/view','breedingMethodDbId' => undef,'seedSourceDescription' => '','biologicalStatusOfAccessionCode' => 0,'instituteName' => '','germplasmPUI' => 'http://localhost:3010/stock/40326/view','commonCropName' => undef,'germplasmDbId' => '40326','taxonIds' => [],'instituteCode' => '','additionalInfo' => undef,'speciesAuthority' => undef,'species' => undef,'germplasmPreprocessing' => undef,'defaultDisplayName' => 'BLANK','synonyms' => []}]}}); $mech->get_ok('http://localhost:3010/brapi/v2/crossingprojects/'); $response = decode_json $mech->content; @@ -247,7 +247,7 @@ is_deeply($response, {'result' => {'crossDbId' => '','createdDate' => undef,'las $mech->get_ok('http://localhost:3010/brapi/v2/calls'); $response = decode_json $mech->content; print STDERR Dumper $response; -is_deeply($response, {'metadata' => {'status' => [{'messageType' => 'INFO','message' => 'BrAPI base call found with page=0, pageSize=10'},{'message' => 'Loading CXGN::BrAPI::v2::Calls','messageType' => 'INFO'},{'messageType' => 'INFO','message' => 'Calls result constructed'}],'datafiles' => [],'pagination' => {'totalPages' => 450,'totalCount' => 4500,'currentPage' => 0,'pageSize' => 10}},'result' => {'sepUnphased' => undef,'data' => [{'callSetDbId' => '38878','variantDbId' => 'S10114_185859','genotype' => {'values' => '0'},'additionalInfo' => undef,'variantName' => 'S10114_185859','callSetName' => 'UG120001','phaseSet' => undef,'genotype_likelihood' => undef},{'callSetName' => 'UG120001','variantDbId' => 'S10173_777651','genotype' => {'values' => '0'},'variantName' => 'S10173_777651','callSetDbId' => '38878','additionalInfo' => undef,'phaseSet' => undef,'genotype_likelihood' => undef},{'genotype' => {'values' => '2'},'variantDbId' => 'S10173_899514','callSetName' => 'UG120001','callSetDbId' => '38878','variantName' => 'S10173_899514','additionalInfo' => undef,'genotype_likelihood' => undef,'phaseSet' => undef},{'phaseSet' => undef,'genotype_likelihood' => undef,'additionalInfo' => undef,'variantName' => 'S10241_146006','callSetDbId' => '38878','callSetName' => 'UG120001','variantDbId' => 'S10241_146006','genotype' => {'values' => '0'}},{'variantName' => 'S1027_465354','callSetName' => 'UG120001','phaseSet' => undef,'genotype_likelihood' => undef,'callSetDbId' => '38878','genotype' => {'values' => '2'},'variantDbId' => 'S1027_465354','additionalInfo' => undef},{'additionalInfo' => undef,'phaseSet' => undef,'genotype_likelihood' => undef,'callSetName' => 'UG120001','genotype' => {'values' => '0'},'variantDbId' => 'S10367_21679','variantName' => 'S10367_21679','callSetDbId' => '38878'},{'additionalInfo' => undef,'variantDbId' => 'S1046_216535','genotype' => {'values' => '0'},'callSetDbId' => '38878','genotype_likelihood' => undef,'phaseSet' => undef,'callSetName' => 'UG120001','variantName' => 'S1046_216535'},{'variantName' => 'S10493_191533','callSetDbId' => '38878','callSetName' => 'UG120001','variantDbId' => 'S10493_191533','genotype' => {'values' => '1'},'phaseSet' => undef,'genotype_likelihood' => undef,'additionalInfo' => undef},{'additionalInfo' => undef,'genotype' => {'values' => '2'},'variantDbId' => 'S10493_282956','callSetDbId' => '38878','genotype_likelihood' => undef,'phaseSet' => undef,'callSetName' => 'UG120001','variantName' => 'S10493_282956'},{'genotype' => {'values' => '0'},'variantDbId' => 'S10493_529025','callSetDbId' => '38878','additionalInfo' => undef,'callSetName' => 'UG120001','variantName' => 'S10493_529025','phaseSet' => undef,'genotype_likelihood' => undef}],'sepPhased' => undef,'expandHomozygotes' => undef,'unknownString' => undef}}); +is_deeply($response, {'metadata' => {'status' => [{'messageType' => 'INFO','message' => 'BrAPI base call found with page=0, pageSize=10'},{'message' => 'Loading CXGN::BrAPI::v2::Calls','messageType' => 'INFO'},{'messageType' => 'INFO','message' => 'Calls result constructed'}],'datafiles' => [],'pagination' => {'totalPages' => 26750,'totalCount' => 267500,'currentPage' => 0,'pageSize' => 10}},'result' => {'sepUnphased' => undef,'data' => [{'callSetDbId' => '38878','variantDbId' => 'S10114_185859','genotype' => {'values' => '0'},'additionalInfo' => undef,'variantName' => 'S10114_185859','callSetName' => 'UG120001','phaseSet' => undef,'genotype_likelihood' => undef},{'callSetName' => 'UG120001','variantDbId' => 'S10173_777651','genotype' => {'values' => '0'},'variantName' => 'S10173_777651','callSetDbId' => '38878','additionalInfo' => undef,'phaseSet' => undef,'genotype_likelihood' => undef},{'genotype' => {'values' => '2'},'variantDbId' => 'S10173_899514','callSetName' => 'UG120001','callSetDbId' => '38878','variantName' => 'S10173_899514','additionalInfo' => undef,'genotype_likelihood' => undef,'phaseSet' => undef},{'phaseSet' => undef,'genotype_likelihood' => undef,'additionalInfo' => undef,'variantName' => 'S10241_146006','callSetDbId' => '38878','callSetName' => 'UG120001','variantDbId' => 'S10241_146006','genotype' => {'values' => '0'}},{'variantName' => 'S1027_465354','callSetName' => 'UG120001','phaseSet' => undef,'genotype_likelihood' => undef,'callSetDbId' => '38878','genotype' => {'values' => '2'},'variantDbId' => 'S1027_465354','additionalInfo' => undef},{'additionalInfo' => undef,'phaseSet' => undef,'genotype_likelihood' => undef,'callSetName' => 'UG120001','genotype' => {'values' => '0'},'variantDbId' => 'S10367_21679','variantName' => 'S10367_21679','callSetDbId' => '38878'},{'additionalInfo' => undef,'variantDbId' => 'S1046_216535','genotype' => {'values' => '0'},'callSetDbId' => '38878','genotype_likelihood' => undef,'phaseSet' => undef,'callSetName' => 'UG120001','variantName' => 'S1046_216535'},{'variantName' => 'S10493_191533','callSetDbId' => '38878','callSetName' => 'UG120001','variantDbId' => 'S10493_191533','genotype' => {'values' => '1'},'phaseSet' => undef,'genotype_likelihood' => undef,'additionalInfo' => undef},{'additionalInfo' => undef,'genotype' => {'values' => '2'},'variantDbId' => 'S10493_282956','callSetDbId' => '38878','genotype_likelihood' => undef,'phaseSet' => undef,'callSetName' => 'UG120001','variantName' => 'S10493_282956'},{'genotype' => {'values' => '0'},'variantDbId' => 'S10493_529025','callSetDbId' => '38878','additionalInfo' => undef,'callSetName' => 'UG120001','variantName' => 'S10493_529025','phaseSet' => undef,'genotype_likelihood' => undef}],'sepPhased' => undef,'expandHomozygotes' => undef,'unknownString' => undef}}); $mech->post_ok('http://localhost:3010/brapi/v2/search/calls', ['callSetDbIds' => ['38878']]); $response = decode_json $mech->content; @@ -256,7 +256,7 @@ print STDERR Dumper $response; $mech->get_ok('http://localhost:3010/brapi/v2/search/calls/'. $searchId); $response = decode_json $mech->content; print STDERR Dumper $response; -is_deeply($response, {'result' => {'data' => [{'genotype_likelihood' => undef,'variantDbId' => 'S10114_185859','additionalInfo' => undef,'callSetDbId' => '38878','phaseSet' => undef,'genotype' => {'values' => '0'},'callSetName' => 'UG120001','variantName' => 'S10114_185859'},{'variantDbId' => 'S10173_777651','genotype_likelihood' => undef,'variantName' => 'S10173_777651','callSetDbId' => '38878','phaseSet' => undef,'additionalInfo' => undef,'callSetName' => 'UG120001','genotype' => {'values' => '0'}},{'variantName' => 'S10173_899514','variantDbId' => 'S10173_899514','genotype_likelihood' => undef,'callSetName' => 'UG120001','genotype' => {'values' => '2'},'callSetDbId' => '38878','phaseSet' => undef,'additionalInfo' => undef},{'variantName' => 'S10241_146006','genotype_likelihood' => undef,'variantDbId' => 'S10241_146006','genotype' => {'values' => '0'},'callSetName' => 'UG120001','additionalInfo' => undef,'phaseSet' => undef,'callSetDbId' => '38878'},{'variantDbId' => 'S1027_465354','genotype_likelihood' => undef,'phaseSet' => undef,'callSetDbId' => '38878','additionalInfo' => undef,'callSetName' => 'UG120001','genotype' => {'values' => '2'},'variantName' => 'S1027_465354'},{'callSetDbId' => '38878','phaseSet' => undef,'additionalInfo' => undef,'callSetName' => 'UG120001','genotype' => {'values' => '0'},'variantDbId' => 'S10367_21679','genotype_likelihood' => undef,'variantName' => 'S10367_21679'},{'genotype' => {'values' => '0'},'callSetName' => 'UG120001','additionalInfo' => undef,'callSetDbId' => '38878','phaseSet' => undef,'variantName' => 'S1046_216535','genotype_likelihood' => undef,'variantDbId' => 'S1046_216535'},{'genotype' => {'values' => '1'},'callSetName' => 'UG120001','additionalInfo' => undef,'phaseSet' => undef,'callSetDbId' => '38878','variantName' => 'S10493_191533','genotype_likelihood' => undef,'variantDbId' => 'S10493_191533'},{'genotype_likelihood' => undef,'variantDbId' => 'S10493_282956','variantName' => 'S10493_282956','additionalInfo' => undef,'callSetDbId' => '38878','phaseSet' => undef,'genotype' => {'values' => '2'},'callSetName' => 'UG120001'},{'variantName' => 'S10493_529025','variantDbId' => 'S10493_529025','genotype_likelihood' => undef,'callSetName' => 'UG120001','genotype' => {'values' => '0'},'callSetDbId' => '38878','phaseSet' => undef,'additionalInfo' => undef}]},'metadata' => {'status' => [{'messageType' => 'INFO','message' => 'BrAPI base call found with page=0, pageSize=10'},{'message' => 'Loading CXGN::BrAPI::v2::Results','messageType' => 'INFO'},{'message' => 'search result constructed','messageType' => 'INFO'}],'pagination' => {'currentPage' => 0,'totalPages' => 1,'pageSize' => 10,'totalCount' => 10},'datafiles' => []}}); +is_deeply($response, {'result' => {'data' => [{'genotype_likelihood' => undef,'variantDbId' => 'S10114_185859','additionalInfo' => undef,'callSetDbId' => '38878','phaseSet' => undef,'genotype' => {'values' => '0'},'callSetName' => 'UG120001','variantName' => 'S10114_185859'},{'variantDbId' => 'S10173_777651','genotype_likelihood' => undef,'variantName' => 'S10173_777651','callSetDbId' => '38878','phaseSet' => undef,'additionalInfo' => undef,'callSetName' => 'UG120001','genotype' => {'values' => '0'}},{'variantName' => 'S10173_899514','variantDbId' => 'S10173_899514','genotype_likelihood' => undef,'callSetName' => 'UG120001','genotype' => {'values' => '2'},'callSetDbId' => '38878','phaseSet' => undef,'additionalInfo' => undef},{'variantName' => 'S10241_146006','genotype_likelihood' => undef,'variantDbId' => 'S10241_146006','genotype' => {'values' => '0'},'callSetName' => 'UG120001','additionalInfo' => undef,'phaseSet' => undef,'callSetDbId' => '38878'},{'variantDbId' => 'S1027_465354','genotype_likelihood' => undef,'phaseSet' => undef,'callSetDbId' => '38878','additionalInfo' => undef,'callSetName' => 'UG120001','genotype' => {'values' => '2'},'variantName' => 'S1027_465354'},{'callSetDbId' => '38878','phaseSet' => undef,'additionalInfo' => undef,'callSetName' => 'UG120001','genotype' => {'values' => '0'},'variantDbId' => 'S10367_21679','genotype_likelihood' => undef,'variantName' => 'S10367_21679'},{'genotype' => {'values' => '0'},'callSetName' => 'UG120001','additionalInfo' => undef,'callSetDbId' => '38878','phaseSet' => undef,'variantName' => 'S1046_216535','genotype_likelihood' => undef,'variantDbId' => 'S1046_216535'},{'genotype' => {'values' => '1'},'callSetName' => 'UG120001','additionalInfo' => undef,'phaseSet' => undef,'callSetDbId' => '38878','variantName' => 'S10493_191533','genotype_likelihood' => undef,'variantDbId' => 'S10493_191533'},{'genotype_likelihood' => undef,'variantDbId' => 'S10493_282956','variantName' => 'S10493_282956','additionalInfo' => undef,'callSetDbId' => '38878','phaseSet' => undef,'genotype' => {'values' => '2'},'callSetName' => 'UG120001'},{'variantName' => 'S10493_529025','variantDbId' => 'S10493_529025','genotype_likelihood' => undef,'callSetName' => 'UG120001','genotype' => {'values' => '0'},'callSetDbId' => '38878','phaseSet' => undef,'additionalInfo' => undef}]},'metadata' => {'status' => [{'messageType' => 'INFO','message' => 'BrAPI base call found with page=0, pageSize=10'},{'message' => 'Loading CXGN::BrAPI::v2::Results','messageType' => 'INFO'},{'message' => 'search result constructed','messageType' => 'INFO'}],'pagination' => {'currentPage' => 0,'totalPages' => 100,'pageSize' => 10,'totalCount' => 1000},'datafiles' => []}}); $mech->get_ok('http://localhost:3010/brapi/v2/callsets/?callSetDbId=38879'); $response = decode_json $mech->content; @@ -285,7 +285,7 @@ is_deeply($response, {'result' => {'data' => [{'additionalInfo' => {'germplasmDb $mech->get_ok('http://localhost:3010/brapi/v2/variantsets/?studyDbId=140'); $response = decode_json $mech->content; print STDERR Dumper $response; -is_deeply($response, {'result' => {'data' => [{'variantSetName' => 'test_genotyping_project - GBS ApeKI genotyping v4','callSetCount' => 9,'additionalInfo' => {},'variantCount' => 500,'referenceSetDbId' => '1','variantSetDbId' => '140p1','availableFormats' => [{'fileFormat' => 'json','dataFormat' => 'json','fileURL' => undef}],'studyDbId' => '140','analysis' => [{'type' => undef,'updated' => undef,'description' => undef,'analysisDbId' => '1','created' => undef,'software' => undef,'analysisName' => 'GBS ApeKI genotyping v4'}]}]},'metadata' => {'status' => [{'messageType' => 'INFO','message' => 'BrAPI base call found with page=0, pageSize=10'},{'message' => 'Loading CXGN::BrAPI::v2::VariantSets','messageType' => 'INFO'},{'message' => 'VariantSets result constructed','messageType' => 'INFO'}],'pagination' => {'totalCount' => 1,'totalPages' => 1,'currentPage' => 0,'pageSize' => 10},'datafiles' => []}}); +is_deeply($response, {'result' => {'data' => [{'variantSetName' => 'test_genotyping_project - GBS ApeKI genotyping v4','callSetCount' => 235,'additionalInfo' => {},'variantCount' => 500,'referenceSetDbId' => '1','variantSetDbId' => '140p1','availableFormats' => [{'fileFormat' => 'json','dataFormat' => 'json','fileURL' => undef}],'studyDbId' => '140','analysis' => [{'type' => undef,'updated' => undef,'description' => undef,'analysisDbId' => '1','created' => undef,'software' => undef,'analysisName' => 'GBS ApeKI genotyping v4'}]}]},'metadata' => {'status' => [{'messageType' => 'INFO','message' => 'BrAPI base call found with page=0, pageSize=10'},{'message' => 'Loading CXGN::BrAPI::v2::VariantSets','messageType' => 'INFO'},{'message' => 'VariantSets result constructed','messageType' => 'INFO'}],'pagination' => {'totalCount' => 1,'totalPages' => 1,'currentPage' => 0,'pageSize' => 10},'datafiles' => []}}); $mech->get_ok('http://localhost:3010/brapi/v2/variantsets/142p1'); $response = decode_json $mech->content; @@ -317,7 +317,7 @@ $searchId = $response->{result} ->{searchResultDbId}; $mech->get_ok('http://localhost:3010/brapi/v2/search/variantsets/'. $searchId); $response = decode_json $mech->content; print STDERR Dumper $response; -is_deeply($response, {'result' => {'data' => [{'availableFormats' => [{'dataFormat' => 'json','fileFormat' => 'json','fileURL' => undef}],'variantSetName' => 'selection_population - GBS ApeKI genotyping v4','analysis' => [{'analysisDbId' => '1','updated' => undef,'description' => undef,'created' => undef,'software' => undef,'type' => undef,'analysisName' => 'GBS ApeKI genotyping v4'}],'additionalInfo' => {},'callSetCount' => 9,'studyDbId' => '143','referenceSetDbId' => '1','variantCount' => 500,'variantSetDbId' => '143p1'}]},'metadata' => {'status' => [{'message' => 'BrAPI base call found with page=0, pageSize=10','messageType' => 'INFO'},{'messageType' => 'INFO','message' => 'Loading CXGN::BrAPI::v2::Results'},{'messageType' => 'INFO','message' => 'search result constructed'}],'pagination' => {'totalPages' => 1,'totalCount' => 1,'pageSize' => 10,'currentPage' => 0},'datafiles' => []}}); +is_deeply($response, {'result' => {'data' => [{'availableFormats' => [{'dataFormat' => 'json','fileFormat' => 'json','fileURL' => undef}],'variantSetName' => 'selection_population - GBS ApeKI genotyping v4','analysis' => [{'analysisDbId' => '1','updated' => undef,'description' => undef,'created' => undef,'software' => undef,'type' => undef,'analysisName' => 'GBS ApeKI genotyping v4'}],'additionalInfo' => {},'callSetCount' => 20,'studyDbId' => '143','referenceSetDbId' => '1','variantCount' => 500,'variantSetDbId' => '143p1'}]},'metadata' => {'status' => [{'message' => 'BrAPI base call found with page=0, pageSize=10','messageType' => 'INFO'},{'messageType' => 'INFO','message' => 'Loading CXGN::BrAPI::v2::Results'},{'messageType' => 'INFO','message' => 'search result constructed'}],'pagination' => {'totalPages' => 1,'totalCount' => 1,'pageSize' => 10,'currentPage' => 0},'datafiles' => []}}); $mech->post_ok('http://localhost:3010/brapi/v2/variantsets/extract', ['variantSetDbIds' => ['142p1']]); $response = decode_json $mech->content; @@ -484,7 +484,7 @@ is_deeply($response, {'result' => '','metadata' => {'pagination' => {'currentPag $mech->get_ok('http://localhost:3010/brapi/v2/observationunits/41782'); $response = decode_json $mech->content; print STDERR Dumper $response; -is_deeply($response, {'metadata' => {'datafiles' => [],'pagination' => {'pageSize' => 10,'totalPages' => 1,'totalCount' => 1,'currentPage' => 0},'status' => [{'messageType' => 'INFO','message' => 'BrAPI base call found with page=0, pageSize=10'},{'message' => 'Loading CXGN::BrAPI::v2::ObservationUnits','messageType' => 'INFO'},{'message' => 'Observation Units search result constructed','messageType' => 'INFO'}]},'result' => {'locationDbId' => '23','externalReferences' => [],'observationUnitPUI' => '10','observationUnitDbId' => '41782','studyName' => 'CASS_6Genotypes_Sampling_2015','observationUnitPosition' => {'positionCoordinateY' => '3','entryType' => 'check','positionCoordinateX' => '74','observationLevel' => {'levelOrder' => 2,'levelCode' => '','levelName' => 'plot'},'positionCoordinateYType' => 'GRID_ROW','observationLevelRelationships' => [{'levelOrder' => 0,'levelCode' => '1','levelName' => 'replicate'},{'levelOrder' => 1,'levelCode' => 'Block_12','levelName' => 'block'},{'levelCode' => '10','levelOrder' => 2,'levelName' => 'plot'},{'levelName' => 'plant','levelCode' => undef,'levelOrder' => 4}],'geoCoordinates' => {'geometry' => {'type' => 'Point','coordinates' => ['-76.506042','42.417373',10]},'type' => 'Feature'},'positionCoordinateXType' => 'GRID_COL'},'programName' => 'test','additionalInfo' => {},'observations' => [],'observationUnitName' => 'CASS_6Genotypes_201','locationName' => 'test_location','studyDbId' => '165','germplasmDbId' => '41280','treatments' => [{'factor' => 'No ManagementFactor','modality' => undef}],'trialName' => 'CASS_6Genotypes_Sampling_2015','germplasmName' => 'TMEB693','programDbId' => '134','trialDbId' => '165', 'seedLotDbId' => undef}} ); +is_deeply($response, {'metadata' => {'status' => [{'messageType' => 'INFO','message' => 'BrAPI base call found with page=0, pageSize=10'},{'messageType' => 'INFO','message' => 'Loading CXGN::BrAPI::v2::ObservationUnits'},{'messageType' => 'INFO','message' => 'Observation Units search result constructed'}],'datafiles' => [],'pagination' => {'currentPage' => 0,'totalCount' => 1,'pageSize' => 10,'totalPages' => 1}},'result' => {'trialName' => 'CASS_6Genotypes_Sampling_2015','externalReferences' => [],'observationUnitPosition' => {'geoCoordinates' => {'geometry' => {'type' => 'Point','coordinates' => ['-76.506042','42.417373',10]},'type' => 'Feature'},'observationLevel' => {'levelName' => 'plot','levelOrder' => 2,'levelCode' => ''},'positionCoordinateXType' => 'GRID_COL','observationLevelRelationships' => [{'levelName' => 'replicate','levelOrder' => 0,'levelCode' => '1'},{'levelCode' => 'Block_12','levelOrder' => 1,'levelName' => 'block'},{'levelName' => 'plot','levelCode' => '10','levelOrder' => 2},{'levelName' => 'plant','levelCode' => undef,'levelOrder' => 4}],'entryType' => 'check','positionCoordinateX' => 74,'positionCoordinateY' => 3,'positionCoordinateYType' => 'GRID_ROW'},'additionalInfo' => {},'locationName' => 'test_location','studyName' => 'CASS_6Genotypes_Sampling_2015','observations' => [],'locationDbId' => '23','germplasmName' => 'IITA-TMS-IBA011412','programName' => 'test','trialDbId' => '165','observationUnitPUI' => '10','observationUnitDbId' => '41782','treatments' => [{'factor' => 'No ManagementFactor','modality' => undef}],'seedLotDbId' => undef,'studyDbId' => '165','programDbId' => '134','observationUnitName' => 'Testing Plot','germplasmDbId' => '41281'}} ); $mech->post_ok('http://localhost:3010/brapi/v2/search/observationunits', ['observationUnitDbIds'=>['41300','41301']]);