From 3395fdfbabbea015f8fa512521ac5269dbda1630 Mon Sep 17 00:00:00 2001 From: Robert Olson Date: Mon, 31 Mar 2025 12:06:18 -0500 Subject: [PATCH] Add --keyField parameter --- scripts/p3-get-genome-data.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/p3-get-genome-data.pl b/scripts/p3-get-genome-data.pl index 512531e..bbc6de5 100644 --- a/scripts/p3-get-genome-data.pl +++ b/scripts/p3-get-genome-data.pl @@ -44,7 +44,7 @@ =head3 Example # Get the command-line options. my $opt = P3Utils::script_opts('', P3Utils::data_options(), P3Utils::col_options(), P3Utils::ih_options(), - ['fields|f', 'Show available fields']); + ['fields|f', 'Show available fields'], ['keyField=s', 'Use the given field as a lookup key']); # Get access to BV-BRC. my $p3 = P3DataAPI->new(); @@ -70,7 +70,7 @@ =head3 Example while (! eof $ih) { my $couplets = P3Utils::get_couplets($ih, $keyCol, $opt); # Get the output rows for these input couplets. - my $resultList = P3Utils::get_data_batch($p3, genome => $filterList, $selectList, $couplets); + my $resultList = P3Utils::get_data_batch($p3, genome => $filterList, $selectList, $couplets, $opt->keyField); # Print them. for my $result (@$resultList) { P3Utils::print_cols($result, opt => $opt);