Skip to content

Commit

Permalink
Renamed variables so it is more clear what kind of IDs they represent
Browse files Browse the repository at this point in the history
  • Loading branch information
timparsons committed Oct 10, 2023
1 parent d454569 commit a19e6fa
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/CXGN/BrAPI/v2/Observations.pm
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ sub search {
my $observation_level = $params->{observationLevel}->[0] || 'all'; # need to be changed in v2
my $season_arrayref = $params->{seasonDbId} || ($params->{seasonDbIds} || ());
my $location_ids_arrayref = $params->{locationDbId} || ($params->{locationDbIds} || ());
my $study_ids_arrayref = $params->{studyDbId} || ($params->{studyDbIds} || ());
my $trial_ids_arrayref = $params->{trialDbId} || ($params->{trialDbIds} || ());
my $brapi_study_ids_arrayref = $params->{studyDbId} || ($params->{studyDbIds} || ());
my $brapi_trial_ids_arrayref = $params->{trialDbId} || ($params->{trialDbIds} || ());
my $accession_ids_arrayref = $params->{germplasmDbId} || ($params->{germplasmDbIds} || ());
my $program_ids_arrayref = $params->{programDbId} || ($params->{programDbIds} || ());
my $start_time = $params->{observationTimeStampRangeStart}->[0] || undef;
Expand All @@ -42,11 +42,11 @@ sub search {
# observationUnitLevelOrder
# observationUnitLevelCode
my @trial_ids;
if ($study_ids_arrayref){
push @trial_ids, @$study_ids_arrayref;
if ($brapi_study_ids_arrayref){
push @trial_ids, @$brapi_study_ids_arrayref;
}
if ($trial_ids_arrayref){
push @trial_ids, @$trial_ids_arrayref;
if ($brapi_trial_ids_arrayref){
push @trial_ids, @$brapi_trial_ids_arrayref;
}
my $trial_ids = \@trial_ids;

Expand All @@ -62,8 +62,8 @@ sub search {
{
bcs_schema=>$self->bcs_schema,
data_level=>$observation_level,
trial_list=>$study_ids_arrayref,
folder_list=>$trial_ids_arrayref,
trial_list=>$brapi_study_ids_arrayref,
folder_list=>$brapi_trial_ids_arrayref,
include_timestamp=>1,
year_list=>$season_arrayref,
location_list=>$location_ids_arrayref,
Expand Down

0 comments on commit a19e6fa

Please sign in to comment.