From 8c0f9aa3d0b46afb20e19e1fd43b7d4cb33c3a23 Mon Sep 17 00:00:00 2001 From: Lukas Mueller Date: Fri, 17 May 2019 18:04:53 -0400 Subject: [PATCH] add POD and fix bug that caused synonyms to be loaded as single letters. --- bin/loading_scripts/load_stock_data.pl | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/bin/loading_scripts/load_stock_data.pl b/bin/loading_scripts/load_stock_data.pl index 2bcbe3237..3168f68f0 100644 --- a/bin/loading_scripts/load_stock_data.pl +++ b/bin/loading_scripts/load_stock_data.pl @@ -1,11 +1,12 @@ +#!/usr/bin/perl =head1 -load_stock_data.pl +load_stock_data.pl - a script to load stock data =head1 SYNOPSIS - $load_stock_data.pl -H [dbhost] -D [dbname] [-t] [-s species name ] [-p stock population name] +load_stock_data.pl -H [dbhost] -D [dbname] [-t] [-s species name ] [-p stock population name] =head1 COMMAND-LINE OPTIONS @@ -17,20 +18,24 @@ load_stock_data.pl -p population name - will create a new stock of type 'population' if doesn't exist. -t Test run . Rolling back at the end. - -=head2 DESCRIPTION +=head1 DESCRIPTION Updated script for loading and adding stock names and synonyms. The owners of the stock accession are not stored in stockprop, but in phenome.stock_owner. +File format for infile (tab delimited): + +accession genus species population_name synonyms + +=head1 AUTHOR + Naama Menda (nm249@cornell.edu) - April 2013 +April 2013 =cut -#!/usr/bin/perl use strict; use Getopt::Std; use CXGN::Tools::File::Spreadsheet; @@ -149,7 +154,7 @@ my $coderef= sub { my $population_name = $spreadsheet->value_at($accession, "population_name"); my $synonym_string = $spreadsheet->value_at($accession, "synonyms"); - my @synonyms = split "|" , $synonym_string; + my @synonyms = split /\|/ , $synonym_string; # see if a stock exists with any of the synonyms #my @stocks = $stock_rs->search( { # -or => [ -- 2.11.4.GIT