| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package Genome; | 
| 2 |  |  |  |  |  |  |  | 
| 3 | 2 |  |  | 2 |  | 38043 | use warnings; | 
|  | 2 |  |  |  |  | 17 |  | 
|  | 2 |  |  |  |  | 150 |  | 
| 4 | 2 |  |  | 2 |  | 22 | use strict; | 
|  | 2 |  |  |  |  | 10 |  | 
|  | 2 |  |  |  |  | 248 |  | 
| 5 |  |  |  |  |  |  |  | 
| 6 |  |  |  |  |  |  | our $VERSION = '0.06'; # Genome $VERSION | 
| 7 |  |  |  |  |  |  |  | 
| 8 |  |  |  |  |  |  | # software infrastructure | 
| 9 | 2 |  |  | 2 |  | 3229 | use UR; | 
|  | 2 |  |  |  |  | 2716699 |  | 
|  | 2 |  |  |  |  | 18 |  | 
| 10 |  |  |  |  |  |  |  | 
| 11 |  |  |  |  |  |  | # local configuration | 
| 12 | 2 |  |  | 2 |  | 1541 | use Genome::Site; | 
|  | 2 |  |  |  |  | 5 |  | 
|  | 2 |  |  |  |  | 22 |  | 
| 13 |  |  |  |  |  |  |  | 
| 14 |  |  |  |  |  |  | # environmental configuration | 
| 15 |  |  |  |  |  |  | $ENV{GENOME_DB} ||= '/var/lib/genome/db'; | 
| 16 |  |  |  |  |  |  | $ENV{GENOME_SW} ||= '/var/lib/genome/sw'; | 
| 17 |  |  |  |  |  |  |  | 
| 18 |  |  |  |  |  |  | # if the search engine is installed, configure its hooks | 
| 19 |  |  |  |  |  |  | eval { | 
| 20 |  |  |  |  |  |  | local $SIG{__WARN__}; | 
| 21 |  |  |  |  |  |  | local $SIG{__DIE__}; | 
| 22 |  |  |  |  |  |  | require Genome::Search; | 
| 23 |  |  |  |  |  |  | }; | 
| 24 |  |  |  |  |  |  |  | 
| 25 |  |  |  |  |  |  | # modules | 
| 26 | 2 |  |  | 2 |  | 2533 | use File::Temp; | 
|  | 2 |  |  |  |  | 27583 |  | 
|  | 2 |  |  |  |  | 169 |  | 
| 27 | 2 |  |  | 2 |  | 1785 | use IO::String; | 
|  | 2 |  |  |  |  | 6138 |  | 
|  | 2 |  |  |  |  | 36 |  | 
| 28 |  |  |  |  |  |  |  | 
| 29 |  |  |  |  |  |  | # account for a perl bug in pre-5.10 by applying a runtime patch to Carp::Heavy | 
| 30 | 2 |  |  | 2 |  | 76 | use Carp; | 
|  | 2 |  |  |  |  | 6 |  | 
|  | 2 |  |  |  |  | 160 |  | 
| 31 | 2 |  |  | 2 |  | 12 | use Carp::Heavy; | 
|  | 2 |  |  |  |  | 5 |  | 
|  | 2 |  |  |  |  | 23 |  | 
| 32 |  |  |  |  |  |  |  | 
| 33 |  |  |  |  |  |  | if ($] < 5.01) { | 
| 34 | 2 |  |  | 2 |  | 74 | no warnings; | 
|  | 2 |  |  |  |  | 4 |  | 
|  | 2 |  |  |  |  | 589 |  | 
| 35 |  |  |  |  |  |  | *Carp::caller_info = sub { | 
| 36 |  |  |  |  |  |  | package | 
| 37 |  |  |  |  |  |  | Carp; | 
| 38 |  |  |  |  |  |  | our $MaxArgNums; | 
| 39 |  |  |  |  |  |  | my $i = shift(@_) + 1; | 
| 40 |  |  |  |  |  |  | package DB; | 
| 41 |  |  |  |  |  |  | my %call_info; | 
| 42 |  |  |  |  |  |  | @call_info{ | 
| 43 |  |  |  |  |  |  | qw(pack file line sub has_args wantarray evaltext is_require) | 
| 44 |  |  |  |  |  |  | } = caller($i); | 
| 45 |  |  |  |  |  |  |  | 
| 46 |  |  |  |  |  |  | unless (defined $call_info{pack}) { | 
| 47 |  |  |  |  |  |  | return (); | 
| 48 |  |  |  |  |  |  | } | 
| 49 |  |  |  |  |  |  |  | 
| 50 |  |  |  |  |  |  | my $sub_name = Carp::get_subname(\%call_info); | 
| 51 |  |  |  |  |  |  | if ($call_info{has_args}) { | 
| 52 |  |  |  |  |  |  | # SEE IF WE CAN GET AROUND THE BIZARRE ARRAY COPY ERROR... | 
| 53 |  |  |  |  |  |  | my @args = (); | 
| 54 |  |  |  |  |  |  | if ($MaxArgNums and @args > $MaxArgNums) { # More than we want to show? | 
| 55 |  |  |  |  |  |  | $#args = $MaxArgNums; | 
| 56 |  |  |  |  |  |  | push @args, '...'; | 
| 57 |  |  |  |  |  |  | } | 
| 58 |  |  |  |  |  |  | # Push the args onto the subroutine | 
| 59 |  |  |  |  |  |  | $sub_name .= '(' . join (', ', @args) . ')'; | 
| 60 |  |  |  |  |  |  | } | 
| 61 |  |  |  |  |  |  | $call_info{sub_name} = $sub_name; | 
| 62 |  |  |  |  |  |  | return wantarray() ? %call_info : \%call_info; | 
| 63 |  |  |  |  |  |  | }; | 
| 64 | 2 |  |  | 2 |  | 12 | use warnings; | 
|  | 2 |  |  |  |  | 6 |  | 
|  | 2 |  |  |  |  | 863 |  | 
| 65 |  |  |  |  |  |  | } | 
| 66 |  |  |  |  |  |  |  | 
| 67 |  |  |  |  |  |  |  | 
| 68 |  |  |  |  |  |  | # this ensures that the search system is updated when certain classes are updated | 
| 69 |  |  |  |  |  |  | # the search system is optional so it skips this if usage above fails | 
| 70 |  |  |  |  |  |  | if ($INC{"Genome/Search.pm"}) { | 
| 71 |  |  |  |  |  |  | Genome::Search->register_callbacks('UR::Object'); | 
| 72 |  |  |  |  |  |  | } | 
| 73 |  |  |  |  |  |  |  | 
| 74 |  |  |  |  |  |  | # DB::single is set to this value in many places, creating a source-embedded break-point | 
| 75 |  |  |  |  |  |  | # set it to zero in the debugger to turn off the constant stopping... | 
| 76 |  |  |  |  |  |  | $DB::stopper = 1; | 
| 77 |  |  |  |  |  |  |  | 
| 78 |  |  |  |  |  |  | # the standard namespace declaration for a UR namespace | 
| 79 |  |  |  |  |  |  | UR::Object::Type->define( | 
| 80 |  |  |  |  |  |  | class_name => 'Genome', | 
| 81 |  |  |  |  |  |  | is => ['UR::Namespace'], | 
| 82 |  |  |  |  |  |  | english_name => 'genome', | 
| 83 |  |  |  |  |  |  | ); | 
| 84 |  |  |  |  |  |  |  | 
| 85 |  |  |  |  |  |  | # Genome supports several environment variables, found under Genome/Env | 
| 86 |  |  |  |  |  |  | # Any GENOME_* variable which is set but does NOT corresponde to a module found will cause an exit | 
| 87 |  |  |  |  |  |  | # (a hedge against typos such as GENOME_NNNNNO_REQUIRE_USER_VERIFY=1 leading to unexpected behavior) | 
| 88 |  |  |  |  |  |  | for my $e (keys %ENV) { | 
| 89 |  |  |  |  |  |  | next unless ($e =~ /^GENOME_/); | 
| 90 | 2 |  |  | 2 |  | 1364 | eval "use Genome::Env::$e"; | 
|  | 2 |  |  | 2 |  | 8 |  | 
|  | 2 |  |  |  |  | 116 |  | 
|  | 2 |  |  |  |  | 1054 |  | 
|  | 2 |  |  |  |  | 7 |  | 
|  | 2 |  |  |  |  | 14 |  | 
| 91 |  |  |  |  |  |  | if ($@) { | 
| 92 |  |  |  |  |  |  | my $path = __FILE__; | 
| 93 |  |  |  |  |  |  | $path =~ s/.pm$//; | 
| 94 |  |  |  |  |  |  | my @files = glob($path . '/Env/*'); | 
| 95 |  |  |  |  |  |  | my @vars = map { /Genome\/Env\/(.*).pm/; $1 } @files; | 
| 96 |  |  |  |  |  |  | print STDERR "Environment variable $e set to $ENV{$e} but there were errors using Genome::Env::$e:\n" | 
| 97 |  |  |  |  |  |  | . "Available variables:\n\t" | 
| 98 |  |  |  |  |  |  | . join("\n\t",@vars) | 
| 99 |  |  |  |  |  |  | . "\n"; | 
| 100 |  |  |  |  |  |  | exit 1; | 
| 101 |  |  |  |  |  |  | } | 
| 102 |  |  |  |  |  |  | } | 
| 103 |  |  |  |  |  |  |  | 
| 104 |  |  |  |  |  |  | 1; | 
| 105 |  |  |  |  |  |  |  | 
| 106 |  |  |  |  |  |  | =pod | 
| 107 |  |  |  |  |  |  |  | 
| 108 |  |  |  |  |  |  | =head1 NAME | 
| 109 |  |  |  |  |  |  |  | 
| 110 |  |  |  |  |  |  | Genome - pipelines, tools, and data managment for genomics | 
| 111 |  |  |  |  |  |  |  | 
| 112 |  |  |  |  |  |  | =head1 SYNOPSIS | 
| 113 |  |  |  |  |  |  |  | 
| 114 |  |  |  |  |  |  | use Genome; | 
| 115 |  |  |  |  |  |  |  | 
| 116 |  |  |  |  |  |  | # modules in the Genome namespace will now dynamically load | 
| 117 |  |  |  |  |  |  |  | 
| 118 |  |  |  |  |  |  | @i = Genome::InstrumentData::Illumina->get(...); | 
| 119 |  |  |  |  |  |  | $m = Genome::Model::SomaticVariation->create(...); | 
| 120 |  |  |  |  |  |  |  | 
| 121 |  |  |  |  |  |  | =head1 DESCRIPTION | 
| 122 |  |  |  |  |  |  |  | 
| 123 |  |  |  |  |  |  | This is the base namespace module for the Genome software tree. | 
| 124 |  |  |  |  |  |  |  | 
| 125 |  |  |  |  |  |  | That tree has several primary components: | 
| 126 |  |  |  |  |  |  |  | 
| 127 |  |  |  |  |  |  | Genome::Model:         a data modeling pipeline management system for genomics | 
| 128 |  |  |  |  |  |  |  | 
| 129 |  |  |  |  |  |  | Genome::Model::Tools   a tree of >1000 tools and tool wrappers for genomics | 
| 130 |  |  |  |  |  |  |  | 
| 131 |  |  |  |  |  |  | Genome::*              a variety of sample tracking classes with an RDBMS back-end | 
| 132 |  |  |  |  |  |  |  | 
| 133 |  |  |  |  |  |  | Only the tools system is currently released. | 
| 134 |  |  |  |  |  |  |  | 
| 135 |  |  |  |  |  |  | See B for a complete inventory of all tool packages, and for command-line access to | 
| 136 |  |  |  |  |  |  | those tools. | 
| 137 |  |  |  |  |  |  |  | 
| 138 |  |  |  |  |  |  | =head1 AUTHORS | 
| 139 |  |  |  |  |  |  |  | 
| 140 |  |  |  |  |  |  | This software is developed by the analysis and engineering teams at | 
| 141 |  |  |  |  |  |  | The Genome Center at Washington Univiersity in St. Louis, with funding from | 
| 142 |  |  |  |  |  |  | the National Human Genome Research Institute.  Richard K. Wilson, P.I. | 
| 143 |  |  |  |  |  |  |  | 
| 144 |  |  |  |  |  |  | Scott Abbott | 
| 145 |  |  |  |  |  |  | Travis Abbott | 
| 146 |  |  |  |  |  |  | Edward Belter | 
| 147 |  |  |  |  |  |  | Paul Bender | 
| 148 |  |  |  |  |  |  | Anthony Brummett | 
| 149 |  |  |  |  |  |  | Todd C. Carter | 
| 150 |  |  |  |  |  |  | Matthew Callaway | 
| 151 |  |  |  |  |  |  | C.J. Carey | 
| 152 |  |  |  |  |  |  | Lynn Carmichael | 
| 153 |  |  |  |  |  |  | Ken Chen | 
| 154 |  |  |  |  |  |  | Lei Chen | 
| 155 |  |  |  |  |  |  | Eric Clark | 
| 156 |  |  |  |  |  |  | Kevin Crouse | 
| 157 |  |  |  |  |  |  | Indraniel Das | 
| 158 |  |  |  |  |  |  | Nathan Dees | 
| 159 |  |  |  |  |  |  | Eric deMello | 
| 160 |  |  |  |  |  |  | Brian Derickson | 
| 161 |  |  |  |  |  |  | Alice Diec | 
| 162 |  |  |  |  |  |  | David Dooling | 
| 163 |  |  |  |  |  |  | Feiyu Du | 
| 164 |  |  |  |  |  |  | Adam Dukes | 
| 165 |  |  |  |  |  |  | James Eldred | 
| 166 |  |  |  |  |  |  | Xian Fan | 
| 167 |  |  |  |  |  |  | Ian Ferguson | 
| 168 |  |  |  |  |  |  | Chris Harris | 
| 169 |  |  |  |  |  |  | Amy Hawkins | 
| 170 |  |  |  |  |  |  | Todd Hepler | 
| 171 |  |  |  |  |  |  | Xin Hong | 
| 172 |  |  |  |  |  |  | Shunfang Hou | 
| 173 |  |  |  |  |  |  | Jasreet Hundal | 
| 174 |  |  |  |  |  |  | Erik Hvatum | 
| 175 |  |  |  |  |  |  | Mark Johnson | 
| 176 |  |  |  |  |  |  | Krisha-Latha Kanchi | 
| 177 |  |  |  |  |  |  | Cyriac Kandoth | 
| 178 |  |  |  |  |  |  | Phil Kimmey | 
| 179 |  |  |  |  |  |  | Michael Kiwala | 
| 180 |  |  |  |  |  |  | Daniel Koboldt | 
| 181 |  |  |  |  |  |  | Karthik Kota | 
| 182 |  |  |  |  |  |  | Kim Kyung | 
| 183 |  |  |  |  |  |  | David Larson | 
| 184 |  |  |  |  |  |  | Sai Lek | 
| 185 |  |  |  |  |  |  | Shawn Leonard | 
| 186 |  |  |  |  |  |  | Shin Leong | 
| 187 |  |  |  |  |  |  | Ling Lin | 
| 188 |  |  |  |  |  |  | Justin Lolofie | 
| 189 |  |  |  |  |  |  | Robert Long | 
| 190 |  |  |  |  |  |  | Charles Lu | 
| 191 |  |  |  |  |  |  | John Martin | 
| 192 |  |  |  |  |  |  | Josh McMichael | 
| 193 |  |  |  |  |  |  | Rick Meyer | 
| 194 |  |  |  |  |  |  | Thomas Mooney | 
| 195 |  |  |  |  |  |  | William Nash | 
| 196 |  |  |  |  |  |  | Nathan Nutter | 
| 197 |  |  |  |  |  |  | Ben Oberkfell | 
| 198 |  |  |  |  |  |  | John Osborne | 
| 199 |  |  |  |  |  |  | Josh Peck | 
| 200 |  |  |  |  |  |  | Jerome Peirick | 
| 201 |  |  |  |  |  |  | Craig Pohl | 
| 202 |  |  |  |  |  |  | Ryan Richt | 
| 203 |  |  |  |  |  |  | Noorus Sahar Abubucker | 
| 204 |  |  |  |  |  |  | Gabriel Sanderson | 
| 205 |  |  |  |  |  |  | William Schierding | 
| 206 |  |  |  |  |  |  | Jon Schindler | 
| 207 |  |  |  |  |  |  | William Schroeder | 
| 208 |  |  |  |  |  |  | Christopher Schuster | 
| 209 |  |  |  |  |  |  | Xiaoqi Shi | 
| 210 |  |  |  |  |  |  | Scott Smith | 
| 211 |  |  |  |  |  |  | Sasi Suruliraj | 
| 212 |  |  |  |  |  |  | Kenneth Swanson | 
| 213 |  |  |  |  |  |  | Jason Walker | 
| 214 |  |  |  |  |  |  | John Wallis | 
| 215 |  |  |  |  |  |  | Jim Weible | 
| 216 |  |  |  |  |  |  | Mike Wendl | 
| 217 |  |  |  |  |  |  | Todd Wylie | 
| 218 |  |  |  |  |  |  |  | 
| 219 |  |  |  |  |  |  | =head1 LICENSE | 
| 220 |  |  |  |  |  |  |  | 
| 221 |  |  |  |  |  |  | Copyright (C) 2007-2011 Washington University in St. Louis. | 
| 222 |  |  |  |  |  |  |  | 
| 223 |  |  |  |  |  |  | It is released under the Lesser GNU Public License (LGPL) version 3.  See the | 
| 224 |  |  |  |  |  |  | associated LICENSE file in this distribution. | 
| 225 |  |  |  |  |  |  |  | 
| 226 |  |  |  |  |  |  | =head1 BUGS | 
| 227 |  |  |  |  |  |  |  | 
| 228 |  |  |  |  |  |  | For defects with any software in the genome namespace, | 
| 229 |  |  |  |  |  |  | contact genome-dev ~at~ genome.wustl.edu. | 
| 230 |  |  |  |  |  |  |  | 
| 231 |  |  |  |  |  |  | =cut | 
| 232 |  |  |  |  |  |  |  |