~ubuntu-branches/ubuntu/wily/bioperl-run/wily-proposed

« back to all changes in this revision

Viewing changes to Bio/Tools/Run/PiseApplication/protdist.pm

  • Committer: Bazaar Package Importer
  • Author(s): Charles Plessy
  • Date: 2009-09-03 11:00:03 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090903110003-11of27rxner5vnl9
Tags: 1.6.1-1
* New upstream release.
* debian/patches/10-wrong-path-for-interpreter.patch: removed
  (fixed upstream).
* debian/watch updated (bioperl -> BioPerl).
* debian/rules refreshed with dh-make-perl 0.53.
  - Disabled installation of examples (removed upstream).
  - Removed the correction of file permission of Pise documentation
    (removed upstream).
  - Removed patching facilities (no patches anymore).
  - Disabled tests as I experience failures with t/Eponine.t despite
    this program is not installed.
* debian/copyright:
  - Removed vanity lines about debianization and debian copyright.
  - Incremented years to 2009.
  - Updated to latest experimentation of the machine-readable license summary.
* debian/control:
  - Incremented Standards-Version to reflect conformance on new Policy
    (dropped versionned build-dependancy on Perl).
  - Removed build-dependancy on quilt (no patches anymore).
  - Depend and Build-Depend on bioperl versions superior or equal to 1.6.0.
  - Build-depends on, and Recommdnes libalgorithm-diff-perl, libipc-run-perl,
    libio-string-perl and libxml-twig-perl, that are listed in DEPENDANCIES.
  - Build-depends on libarray-compare-perl and libtree-dagnode-perl
    (otherwise tests fail). 
  - Depend on amap-align instead of amap (Closes: #541274).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# $Id: protdist.pm,v 1.6 2006/07/04 22:23:35 mauricio Exp $
2
 
# BioPerl module for Bio::Tools::Run::PiseApplication::protdist
3
 
#
4
 
# Cared for by Catherine Letondal <letondal@pasteur.fr>
5
 
#
6
 
# For copyright and disclaimer see below.
7
 
#
8
 
# POD documentation - main docs before the code
9
 
 
10
 
=head1 NAME
11
 
 
12
 
Bio::Tools::Run::PiseApplication::protdist
13
 
 
14
 
=head1 SYNOPSIS
15
 
 
16
 
  #
17
 
 
18
 
=head1 DESCRIPTION
19
 
 
20
 
Bio::Tools::Run::PiseApplication::protdist
21
 
 
22
 
      Bioperl class for:
23
 
 
24
 
        Phylip  protdist - Program to compute distance matrix from protein sequences (Felsenstein)
25
 
 
26
 
        References:
27
 
 
28
 
                Felsenstein, J.  1993.  PHYLIP (Phylogeny Inference Package) version 3.5c. Distributed by the author.  Department of Genetics, University of Washington, Seattle.
29
 
 
30
 
                Felsenstein, J.  1989.  PHYLIP -- Phylogeny Inference Package (Version 3.2). Cladistics  5: 164-166.
31
 
 
32
 
 
33
 
 
34
 
      Parameters: 
35
 
 
36
 
        (see also:
37
 
          http://bioweb.pasteur.fr/seqanal/interfaces/protdist.html 
38
 
         for available values):
39
 
 
40
 
 
41
 
                protdist (String)
42
 
 
43
 
                infile (Sequence)
44
 
                        Alignement File
45
 
                        pipe: readseq_ok_alig
46
 
 
47
 
                method (Excl)
48
 
                        Distance model (P)
49
 
 
50
 
                gamma_dist (Excl)
51
 
                        Gamma distribution of rates among positions (G)
52
 
 
53
 
                seqboot (Switch)
54
 
                        Perform a bootstrap before analysis
55
 
 
56
 
                resamp_method (Excl)
57
 
                        Resampling methods
58
 
 
59
 
                seqboot_seed (Integer)
60
 
                        Random number seed (must be odd)
61
 
 
62
 
                replicates (Integer)
63
 
                        How many replicates
64
 
 
65
 
                weights (Switch)
66
 
                        Use weights for sites (W)
67
 
 
68
 
                weights_file (InFile)
69
 
                        Weights file
70
 
 
71
 
                multiple_dataset (String)
72
 
 
73
 
                bootconfirm (String)
74
 
 
75
 
                bootterminal_type (String)
76
 
 
77
 
                printdata (Switch)
78
 
                        Print out the data at start of run (1)
79
 
 
80
 
                code (Excl)
81
 
                        Genetic code (U)
82
 
 
83
 
                categorization (Excl)
84
 
                        Categorization of amino acids (A)
85
 
 
86
 
                change_prob (Integer)
87
 
                        Prob change category (1.0=easy) (E)
88
 
 
89
 
                ratio (Integer)
90
 
                        Transition/transversion ratio (T)
91
 
 
92
 
                base_frequencies (Integer)
93
 
                        Base frequencies for A, C, G, T/U (separated by commas)
94
 
 
95
 
                confirm (String)
96
 
 
97
 
                terminal_type (String)
98
 
 
99
 
=head1 FEEDBACK
100
 
 
101
 
=head2 Mailing Lists
102
 
 
103
 
User feedback is an integral part of the evolution of this and other
104
 
Bioperl modules. Send your comments and suggestions preferably to
105
 
the Bioperl mailing list.  Your participation is much appreciated.
106
 
 
107
 
  bioperl-l@bioperl.org                  - General discussion
108
 
  http://bioperl.org/wiki/Mailing_lists  - About the mailing lists
109
 
 
110
 
=head2 Reporting Bugs
111
 
 
112
 
Report bugs to the Bioperl bug tracking system to help us keep track
113
 
of the bugs and their resolution. Bug reports can be submitted via the
114
 
web:
115
 
 
116
 
  http://bugzilla.open-bio.org/
117
 
 
118
 
=head1 AUTHOR
119
 
 
120
 
Catherine Letondal (letondal@pasteur.fr)
121
 
 
122
 
=head1 COPYRIGHT
123
 
 
124
 
Copyright (C) 2003 Institut Pasteur & Catherine Letondal.
125
 
All Rights Reserved.
126
 
 
127
 
This module is free software; you can redistribute it and/or modify
128
 
it under the same terms as Perl itself.
129
 
 
130
 
=head1 DISCLAIMER
131
 
 
132
 
This software is provided "as is" without warranty of any kind.
133
 
 
134
 
=head1 SEE ALSO
135
 
 
136
 
=over
137
 
 
138
 
=item *
139
 
 
140
 
http://bioweb.pasteur.fr/seqanal/interfaces/protdist.html
141
 
 
142
 
=item *
143
 
 
144
 
Bio::Tools::Run::PiseApplication
145
 
 
146
 
=item *
147
 
 
148
 
Bio::Tools::Run::AnalysisFactory::Pise
149
 
 
150
 
=item *
151
 
 
152
 
Bio::Tools::Run::PiseJob
153
 
 
154
 
=back
155
 
 
156
 
=cut
157
 
 
158
 
#'
159
 
package Bio::Tools::Run::PiseApplication::protdist;
160
 
 
161
 
use vars qw(@ISA);
162
 
use strict;
163
 
use Bio::Tools::Run::PiseApplication;
164
 
 
165
 
@ISA = qw(Bio::Tools::Run::PiseApplication);
166
 
 
167
 
=head2 new
168
 
 
169
 
 Title   : new()
170
 
 Usage   : my $protdist = Bio::Tools::Run::PiseApplication::protdist->new($location, $email, @params);
171
 
 Function: Creates a Bio::Tools::Run::PiseApplication::protdist object.
172
 
           This method should not be used directly, but rather by 
173
 
           a Bio::Tools::Run::AnalysisFactory::Pise instance.
174
 
           my $factory = Bio::Tools::Run::AnalysisFactory::Pise->new();
175
 
           my $protdist = $factory->program('protdist');
176
 
 Example : -
177
 
 Returns : An instance of Bio::Tools::Run::PiseApplication::protdist.
178
 
 
179
 
=cut
180
 
 
181
 
sub new {
182
 
    my ($class, $location, $email, @params) = @_;
183
 
    my $self = $class->SUPER::new($location, $email);
184
 
 
185
 
# -- begin of definitions extracted from /local/gensoft/lib/Pise/5.a/PerlDef/protdist.pm
186
 
 
187
 
    $self->{COMMAND}   = "protdist";
188
 
    $self->{VERSION}   = "5.a";
189
 
    $self->{TITLE}   = "Phylip";
190
 
 
191
 
    $self->{DESCRIPTION}   = "protdist - Program to compute distance matrix from protein sequences";
192
 
 
193
 
    $self->{OPT_EMAIL}   = 0;
194
 
 
195
 
    $self->{AUTHORS}   = "Felsenstein";
196
 
 
197
 
    $self->{DOCLINK}   = "http://bioweb.pasteur.fr/docs/gensoft-evol.html#PHYLIP";
198
 
 
199
 
    $self->{REFERENCE}   = [
200
 
 
201
 
         "Felsenstein, J.  1993.  PHYLIP (Phylogeny Inference Package) version 3.5c. Distributed by the author.  Department of Genetics, University of Washington, Seattle.",
202
 
 
203
 
         "Felsenstein, J.  1989.  PHYLIP -- Phylogeny Inference Package (Version 3.2). Cladistics  5: 164-166.",
204
 
 ];
205
 
 
206
 
    $self->{_INTERFACE_STANDOUT} = undef;
207
 
    $self->{_STANDOUT_FILE} = undef;
208
 
 
209
 
    $self->{TOP_PARAMETERS}  = [ 
210
 
        "protdist",
211
 
        "infile",
212
 
        "method",
213
 
        "gamma_dist",
214
 
        "bootstrap",
215
 
        "weight_opt",
216
 
        "multiple_dataset",
217
 
        "bootconfirm",
218
 
        "bootterminal_type",
219
 
        "output",
220
 
        "categ_opt",
221
 
        "outfile",
222
 
        "params",
223
 
        "confirm",
224
 
        "terminal_type",
225
 
        "tmp_params",
226
 
 
227
 
    ];
228
 
 
229
 
    $self->{PARAMETERS_ORDER}  = [
230
 
        "protdist",
231
 
        "infile",       # Alignement File
232
 
        "method",       # Distance model (P)
233
 
        "gamma_dist",   # Gamma distribution of rates among positions (G)
234
 
        "bootstrap",    # Bootstrap options
235
 
        "seqboot",      # Perform a bootstrap before analysis
236
 
        "resamp_method",        # Resampling methods
237
 
        "seqboot_seed",         # Random number seed (must be odd)
238
 
        "replicates",   # How many replicates
239
 
        "weight_opt",   # Weight options
240
 
        "weights",      # Use weights for sites (W)
241
 
        "weights_file",         # Weights file
242
 
        "multiple_dataset",
243
 
        "bootconfirm",
244
 
        "bootterminal_type",
245
 
        "output",       # Output options
246
 
        "printdata",    # Print out the data at start of run (1)
247
 
        "categ_opt",    # Categories model options
248
 
        "code",         # Genetic code (U)
249
 
        "categorization",       # Categorization of amino acids (A)
250
 
        "change_prob",  # Prob change category (1.0=easy) (E)
251
 
        "ratio",        # Transition/transversion ratio (T)
252
 
        "base_frequencies",     # Base frequencies for A, C, G, T/U (separated by commas)
253
 
        "outfile",
254
 
        "params",
255
 
        "confirm",
256
 
        "terminal_type",
257
 
        "tmp_params",
258
 
 
259
 
    ];
260
 
 
261
 
    $self->{TYPE}  = {
262
 
        "protdist" => 'String',
263
 
        "infile" => 'Sequence',
264
 
        "method" => 'Excl',
265
 
        "gamma_dist" => 'Excl',
266
 
        "bootstrap" => 'Paragraph',
267
 
        "seqboot" => 'Switch',
268
 
        "resamp_method" => 'Excl',
269
 
        "seqboot_seed" => 'Integer',
270
 
        "replicates" => 'Integer',
271
 
        "weight_opt" => 'Paragraph',
272
 
        "weights" => 'Switch',
273
 
        "weights_file" => 'InFile',
274
 
        "multiple_dataset" => 'String',
275
 
        "bootconfirm" => 'String',
276
 
        "bootterminal_type" => 'String',
277
 
        "output" => 'Paragraph',
278
 
        "printdata" => 'Switch',
279
 
        "categ_opt" => 'Paragraph',
280
 
        "code" => 'Excl',
281
 
        "categorization" => 'Excl',
282
 
        "change_prob" => 'Integer',
283
 
        "ratio" => 'Integer',
284
 
        "base_frequencies" => 'Integer',
285
 
        "outfile" => 'Results',
286
 
        "params" => 'Results',
287
 
        "confirm" => 'String',
288
 
        "terminal_type" => 'String',
289
 
        "tmp_params" => 'Results',
290
 
 
291
 
    };
292
 
 
293
 
    $self->{FORMAT}  = {
294
 
        "protdist" => {
295
 
                "perl" => '"protdist < params"',
296
 
        },
297
 
        "infile" => {
298
 
                "perl" => '"ln -sf $infile infile; "',
299
 
        },
300
 
        "method" => {
301
 
        },
302
 
        "gamma_dist" => {
303
 
        },
304
 
        "bootstrap" => {
305
 
        },
306
 
        "seqboot" => {
307
 
                "perl" => '($value) ? "seqboot < seqboot.params && mv outfile infile && " : ""',
308
 
        },
309
 
        "resamp_method" => {
310
 
        },
311
 
        "seqboot_seed" => {
312
 
                "perl" => '"$value\\n"',
313
 
        },
314
 
        "replicates" => {
315
 
                "perl" => '($value && $value != $vdef)? "R\\n$value\\n" : ""',
316
 
        },
317
 
        "weight_opt" => {
318
 
        },
319
 
        "weights" => {
320
 
                "perl" => '($value)? "W\\n" : ""',
321
 
        },
322
 
        "weights_file" => {
323
 
                "perl" => '($value)? "ln -s $weights_file weights; " : ""',
324
 
        },
325
 
        "multiple_dataset" => {
326
 
                "perl" => '"M\\nD\\n$replicates\\n"',
327
 
        },
328
 
        "bootconfirm" => {
329
 
                "perl" => '"Y\\n"',
330
 
        },
331
 
        "bootterminal_type" => {
332
 
                "perl" => '"0\\n"',
333
 
        },
334
 
        "output" => {
335
 
        },
336
 
        "printdata" => {
337
 
                "perl" => '($value) ? "1\\n" : ""',
338
 
        },
339
 
        "categ_opt" => {
340
 
        },
341
 
        "code" => {
342
 
                "perl" => '($value and $value ne $vdef)? "U\\n$code\\n" : "" ',
343
 
        },
344
 
        "categorization" => {
345
 
                "perl" => '($value and $value ne $vdef) ? "A\\n$categorization\\n" : ""',
346
 
        },
347
 
        "change_prob" => {
348
 
                "perl" => '($value and $value != $vdef) ? "E\\n$value\\n" : ""',
349
 
        },
350
 
        "ratio" => {
351
 
                "perl" => '($value && $value != $vdef)? "T\\n$value\\n" : ""',
352
 
        },
353
 
        "base_frequencies" => {
354
 
                "perl" => '($value) ? "F\\n$base_frequencies\\n" : "" ',
355
 
        },
356
 
        "outfile" => {
357
 
        },
358
 
        "params" => {
359
 
        },
360
 
        "confirm" => {
361
 
                "perl" => '"Y\\n"',
362
 
        },
363
 
        "terminal_type" => {
364
 
                "perl" => '"0\\n"',
365
 
        },
366
 
        "tmp_params" => {
367
 
        },
368
 
 
369
 
    };
370
 
 
371
 
    $self->{FILENAMES}  = {
372
 
        "outfile" => 'outfile',
373
 
        "params" => 'params',
374
 
        "tmp_params" => '*.params',
375
 
 
376
 
    };
377
 
 
378
 
    $self->{SEQFMT}  = {
379
 
        "infile" => [12],
380
 
 
381
 
    };
382
 
 
383
 
    $self->{GROUP}  = {
384
 
        "protdist" => 0,
385
 
        "infile" => -10,
386
 
        "method" => 2,
387
 
        "gamma_dist" => 2,
388
 
        "seqboot" => -5,
389
 
        "resamp_method" => 1,
390
 
        "seqboot_seed" => 10000,
391
 
        "replicates" => 1,
392
 
        "weights" => 1,
393
 
        "weights_file" => -1,
394
 
        "multiple_dataset" => 1,
395
 
        "bootconfirm" => 1000,
396
 
        "bootterminal_type" => -1,
397
 
        "printdata" => 1,
398
 
        "categ_opt" => 3,
399
 
        "code" => 3,
400
 
        "categorization" => 10,
401
 
        "change_prob" => 3,
402
 
        "ratio" => 3,
403
 
        "base_frequencies" => 3,
404
 
        "confirm" => 1000,
405
 
        "terminal_type" => -1,
406
 
 
407
 
    };
408
 
 
409
 
    $self->{BY_GROUP_PARAMETERS}  = [
410
 
        "infile",
411
 
        "seqboot",
412
 
        "bootterminal_type",
413
 
        "weights_file",
414
 
        "terminal_type",
415
 
        "protdist",
416
 
        "params",
417
 
        "outfile",
418
 
        "bootstrap",
419
 
        "weight_opt",
420
 
        "output",
421
 
        "tmp_params",
422
 
        "weights",
423
 
        "multiple_dataset",
424
 
        "printdata",
425
 
        "resamp_method",
426
 
        "replicates",
427
 
        "method",
428
 
        "gamma_dist",
429
 
        "categ_opt",
430
 
        "code",
431
 
        "change_prob",
432
 
        "base_frequencies",
433
 
        "ratio",
434
 
        "categorization",
435
 
        "confirm",
436
 
        "bootconfirm",
437
 
        "seqboot_seed",
438
 
 
439
 
    ];
440
 
 
441
 
    $self->{SIZE}  = {
442
 
 
443
 
    };
444
 
 
445
 
    $self->{ISHIDDEN}  = {
446
 
        "protdist" => 1,
447
 
        "infile" => 0,
448
 
        "method" => 0,
449
 
        "gamma_dist" => 0,
450
 
        "bootstrap" => 0,
451
 
        "seqboot" => 0,
452
 
        "resamp_method" => 0,
453
 
        "seqboot_seed" => 0,
454
 
        "replicates" => 0,
455
 
        "weight_opt" => 0,
456
 
        "weights" => 0,
457
 
        "weights_file" => 0,
458
 
        "multiple_dataset" => 1,
459
 
        "bootconfirm" => 1,
460
 
        "bootterminal_type" => 1,
461
 
        "output" => 0,
462
 
        "printdata" => 0,
463
 
        "categ_opt" => 0,
464
 
        "code" => 0,
465
 
        "categorization" => 0,
466
 
        "change_prob" => 0,
467
 
        "ratio" => 0,
468
 
        "base_frequencies" => 0,
469
 
        "outfile" => 0,
470
 
        "params" => 0,
471
 
        "confirm" => 1,
472
 
        "terminal_type" => 1,
473
 
        "tmp_params" => 0,
474
 
 
475
 
    };
476
 
 
477
 
    $self->{ISCOMMAND}  = {
478
 
        "protdist" => 1,
479
 
        "infile" => 0,
480
 
        "method" => 0,
481
 
        "gamma_dist" => 0,
482
 
        "bootstrap" => 0,
483
 
        "seqboot" => 0,
484
 
        "resamp_method" => 0,
485
 
        "seqboot_seed" => 0,
486
 
        "replicates" => 0,
487
 
        "weight_opt" => 0,
488
 
        "weights" => 0,
489
 
        "weights_file" => 0,
490
 
        "multiple_dataset" => 0,
491
 
        "bootconfirm" => 0,
492
 
        "bootterminal_type" => 0,
493
 
        "output" => 0,
494
 
        "printdata" => 0,
495
 
        "categ_opt" => 0,
496
 
        "code" => 0,
497
 
        "categorization" => 0,
498
 
        "change_prob" => 0,
499
 
        "ratio" => 0,
500
 
        "base_frequencies" => 0,
501
 
        "outfile" => 0,
502
 
        "params" => 0,
503
 
        "confirm" => 0,
504
 
        "terminal_type" => 0,
505
 
        "tmp_params" => 0,
506
 
 
507
 
    };
508
 
 
509
 
    $self->{ISMANDATORY}  = {
510
 
        "protdist" => 0,
511
 
        "infile" => 1,
512
 
        "method" => 0,
513
 
        "gamma_dist" => 0,
514
 
        "bootstrap" => 0,
515
 
        "seqboot" => 0,
516
 
        "resamp_method" => 1,
517
 
        "seqboot_seed" => 1,
518
 
        "replicates" => 0,
519
 
        "weight_opt" => 0,
520
 
        "weights" => 0,
521
 
        "weights_file" => 0,
522
 
        "multiple_dataset" => 0,
523
 
        "bootconfirm" => 0,
524
 
        "bootterminal_type" => 0,
525
 
        "output" => 0,
526
 
        "printdata" => 0,
527
 
        "categ_opt" => 0,
528
 
        "code" => 0,
529
 
        "categorization" => 0,
530
 
        "change_prob" => 0,
531
 
        "ratio" => 0,
532
 
        "base_frequencies" => 0,
533
 
        "outfile" => 0,
534
 
        "params" => 0,
535
 
        "confirm" => 0,
536
 
        "terminal_type" => 0,
537
 
        "tmp_params" => 0,
538
 
 
539
 
    };
540
 
 
541
 
    $self->{PROMPT}  = {
542
 
        "protdist" => "",
543
 
        "infile" => "Alignement File",
544
 
        "method" => "Distance model (P)",
545
 
        "gamma_dist" => "Gamma distribution of rates among positions (G)",
546
 
        "bootstrap" => "Bootstrap options",
547
 
        "seqboot" => "Perform a bootstrap before analysis",
548
 
        "resamp_method" => "Resampling methods",
549
 
        "seqboot_seed" => "Random number seed (must be odd)",
550
 
        "replicates" => "How many replicates",
551
 
        "weight_opt" => "Weight options",
552
 
        "weights" => "Use weights for sites (W)",
553
 
        "weights_file" => "Weights file",
554
 
        "multiple_dataset" => "",
555
 
        "bootconfirm" => "",
556
 
        "bootterminal_type" => "",
557
 
        "output" => "Output options",
558
 
        "printdata" => "Print out the data at start of run (1)",
559
 
        "categ_opt" => "Categories model options",
560
 
        "code" => "Genetic code (U)",
561
 
        "categorization" => "Categorization of amino acids (A)",
562
 
        "change_prob" => "Prob change category (1.0=easy) (E)",
563
 
        "ratio" => "Transition/transversion ratio (T)",
564
 
        "base_frequencies" => "Base frequencies for A, C, G, T/U (separated by commas)",
565
 
        "outfile" => "",
566
 
        "params" => "",
567
 
        "confirm" => "",
568
 
        "terminal_type" => "",
569
 
        "tmp_params" => "",
570
 
 
571
 
    };
572
 
 
573
 
    $self->{ISSTANDOUT}  = {
574
 
        "protdist" => 0,
575
 
        "infile" => 0,
576
 
        "method" => 0,
577
 
        "gamma_dist" => 0,
578
 
        "bootstrap" => 0,
579
 
        "seqboot" => 0,
580
 
        "resamp_method" => 0,
581
 
        "seqboot_seed" => 0,
582
 
        "replicates" => 0,
583
 
        "weight_opt" => 0,
584
 
        "weights" => 0,
585
 
        "weights_file" => 0,
586
 
        "multiple_dataset" => 0,
587
 
        "bootconfirm" => 0,
588
 
        "bootterminal_type" => 0,
589
 
        "output" => 0,
590
 
        "printdata" => 0,
591
 
        "categ_opt" => 0,
592
 
        "code" => 0,
593
 
        "categorization" => 0,
594
 
        "change_prob" => 0,
595
 
        "ratio" => 0,
596
 
        "base_frequencies" => 0,
597
 
        "outfile" => 0,
598
 
        "params" => 0,
599
 
        "confirm" => 0,
600
 
        "terminal_type" => 0,
601
 
        "tmp_params" => 0,
602
 
 
603
 
    };
604
 
 
605
 
    $self->{VLIST}  = {
606
 
 
607
 
        "method" => ['J','Jones-Taylor-Thornton matrix','D','Dayhoff PAM matrix','K','Kimura formula','S','Similarity table','C','Categories model',],
608
 
        "gamma_dist" => ['N','No','Y','Yes','G','Gamma+Invariant',],
609
 
        "bootstrap" => ['seqboot','resamp_method','seqboot_seed','replicates',],
610
 
        "resamp_method" => ['bootstrap','Bootstrap','jackknife','Delete-half jackknife','permute','Permute species for each character',],
611
 
        "weight_opt" => ['weights','weights_file',],
612
 
        "output" => ['printdata',],
613
 
        "categ_opt" => ['code','categorization','change_prob','ratio','base_frequencies',],
614
 
        "code" => ['U','U: Universal','M','M: Mitochondrial','V','V: Vertebrate mitochondrial','F','F: Fly mitochondrial','Y','Y: Yeast mitochondrial',],
615
 
        "categorization" => ['G','G: George/Hunt/Barker','C','C: Chemical','H','H: Hall',],
616
 
    };
617
 
 
618
 
    $self->{FLIST}  = {
619
 
 
620
 
        "method" => {
621
 
                'J' => '""',
622
 
                'C' => '"P\\nP\\nP\\nP\\n"',
623
 
                'S' => '"P\\nP\\nP\\n"',
624
 
                'K' => '"P\\nP\\n"',
625
 
                'D' => '"P\\n"',
626
 
 
627
 
        },
628
 
        "gamma_dist" => {
629
 
                'N' => '""',
630
 
                'G' => '"G\\nG\\n"',
631
 
                'Y' => '"G\\n"',
632
 
 
633
 
        },
634
 
        "resamp_method" => {
635
 
                'bootstrap' => '""',
636
 
                'permute' => '"J\\nJ\\n"',
637
 
                'jackknife' => '"J\\n"',
638
 
 
639
 
        },
640
 
    };
641
 
 
642
 
    $self->{SEPARATOR}  = {
643
 
 
644
 
    };
645
 
 
646
 
    $self->{VDEF}  = {
647
 
        "method" => 'J',
648
 
        "seqboot" => '0',
649
 
        "resamp_method" => 'bootstrap',
650
 
        "replicates" => '100',
651
 
        "printdata" => '0',
652
 
        "code" => 'U',
653
 
        "categorization" => 'G',
654
 
        "change_prob" => '0.4570',
655
 
        "ratio" => '2.000',
656
 
 
657
 
    };
658
 
 
659
 
    $self->{PRECOND}  = {
660
 
        "protdist" => { "perl" => '1' },
661
 
        "infile" => { "perl" => '1' },
662
 
        "method" => { "perl" => '1' },
663
 
        "gamma_dist" => {
664
 
                "perl" => '$method eq "J" or $method eq "D" or $method eq "C"',
665
 
        },
666
 
        "bootstrap" => { "perl" => '1' },
667
 
        "seqboot" => { "perl" => '1' },
668
 
        "resamp_method" => {
669
 
                "perl" => '$seqboot',
670
 
        },
671
 
        "seqboot_seed" => {
672
 
                "perl" => '$seqboot',
673
 
        },
674
 
        "replicates" => {
675
 
                "perl" => '$seqboot',
676
 
        },
677
 
        "weight_opt" => { "perl" => '1' },
678
 
        "weights" => { "perl" => '1' },
679
 
        "weights_file" => {
680
 
                "perl" => '$weights',
681
 
        },
682
 
        "multiple_dataset" => {
683
 
                "perl" => '$seqboot',
684
 
        },
685
 
        "bootconfirm" => {
686
 
                "perl" => '$seqboot',
687
 
        },
688
 
        "bootterminal_type" => {
689
 
                "perl" => '$seqboot',
690
 
        },
691
 
        "output" => { "perl" => '1' },
692
 
        "printdata" => { "perl" => '1' },
693
 
        "categ_opt" => {
694
 
                "perl" => '$method eq "C"',
695
 
        },
696
 
        "code" => {
697
 
                "perl" => '$method eq "C"',
698
 
        },
699
 
        "categorization" => {
700
 
                "perl" => '$method eq "C"',
701
 
        },
702
 
        "change_prob" => {
703
 
                "perl" => '$method eq "C"',
704
 
        },
705
 
        "ratio" => {
706
 
                "perl" => '$method eq "C"',
707
 
        },
708
 
        "base_frequencies" => {
709
 
                "perl" => '$method eq "C"',
710
 
        },
711
 
        "outfile" => { "perl" => '1' },
712
 
        "params" => { "perl" => '1' },
713
 
        "confirm" => { "perl" => '1' },
714
 
        "terminal_type" => { "perl" => '1' },
715
 
        "tmp_params" => { "perl" => '1' },
716
 
 
717
 
    };
718
 
 
719
 
    $self->{CTRL}  = {
720
 
        "seqboot_seed" => {
721
 
                "perl" => {
722
 
                        '$value <= 0 || (($value % 2) == 0)' => "Random number seed must be odd",
723
 
                },
724
 
        },
725
 
        "replicates" => {
726
 
                "perl" => {
727
 
                        '$replicates > 1000' => "this server allows no more than 1000 replicates",
728
 
                },
729
 
        },
730
 
        "change_prob" => {
731
 
                "perl" => {
732
 
                        '$change_prob < 0.0 || $change_prob > 1.0' => "Enter a value between 0.0 and 1.0",
733
 
                },
734
 
        },
735
 
        "base_frequencies" => {
736
 
                "perl" => {
737
 
                        '($base_frequencies =~ s/,/ /g) && 0' => "",
738
 
                },
739
 
        },
740
 
 
741
 
    };
742
 
 
743
 
    $self->{PIPEOUT}  = {
744
 
        "outfile" => {
745
 
                 '$method ne "S"' => "phylip_dist",
746
 
        },
747
 
 
748
 
    };
749
 
 
750
 
    $self->{WITHPIPEOUT}  = {
751
 
 
752
 
    };
753
 
 
754
 
    $self->{PIPEIN}  = {
755
 
        "infile" => {
756
 
                 "readseq_ok_alig" => '1',
757
 
        },
758
 
 
759
 
    };
760
 
 
761
 
    $self->{WITHPIPEIN}  = {
762
 
 
763
 
    };
764
 
 
765
 
    $self->{ISCLEAN}  = {
766
 
        "protdist" => 0,
767
 
        "infile" => 0,
768
 
        "method" => 0,
769
 
        "gamma_dist" => 0,
770
 
        "bootstrap" => 0,
771
 
        "seqboot" => 0,
772
 
        "resamp_method" => 0,
773
 
        "seqboot_seed" => 0,
774
 
        "replicates" => 0,
775
 
        "weight_opt" => 0,
776
 
        "weights" => 0,
777
 
        "weights_file" => 0,
778
 
        "multiple_dataset" => 0,
779
 
        "bootconfirm" => 0,
780
 
        "bootterminal_type" => 0,
781
 
        "output" => 0,
782
 
        "printdata" => 0,
783
 
        "categ_opt" => 0,
784
 
        "code" => 0,
785
 
        "categorization" => 0,
786
 
        "change_prob" => 0,
787
 
        "ratio" => 0,
788
 
        "base_frequencies" => 0,
789
 
        "outfile" => 0,
790
 
        "params" => 0,
791
 
        "confirm" => 0,
792
 
        "terminal_type" => 0,
793
 
        "tmp_params" => 0,
794
 
 
795
 
    };
796
 
 
797
 
    $self->{ISSIMPLE}  = {
798
 
        "protdist" => 0,
799
 
        "infile" => 1,
800
 
        "method" => 0,
801
 
        "gamma_dist" => 0,
802
 
        "bootstrap" => 0,
803
 
        "seqboot" => 0,
804
 
        "resamp_method" => 0,
805
 
        "seqboot_seed" => 0,
806
 
        "replicates" => 0,
807
 
        "weight_opt" => 0,
808
 
        "weights" => 0,
809
 
        "weights_file" => 0,
810
 
        "multiple_dataset" => 0,
811
 
        "bootconfirm" => 0,
812
 
        "bootterminal_type" => 0,
813
 
        "output" => 0,
814
 
        "printdata" => 0,
815
 
        "categ_opt" => 0,
816
 
        "code" => 0,
817
 
        "categorization" => 0,
818
 
        "change_prob" => 0,
819
 
        "ratio" => 0,
820
 
        "base_frequencies" => 0,
821
 
        "outfile" => 0,
822
 
        "params" => 0,
823
 
        "confirm" => 0,
824
 
        "terminal_type" => 0,
825
 
        "tmp_params" => 0,
826
 
 
827
 
    };
828
 
 
829
 
    $self->{PARAMFILE}  = {
830
 
        "method" => "params",
831
 
        "gamma_dist" => "params",
832
 
        "resamp_method" => "seqboot.params",
833
 
        "seqboot_seed" => "seqboot.params",
834
 
        "replicates" => "seqboot.params",
835
 
        "weights" => "params",
836
 
        "multiple_dataset" => "params",
837
 
        "bootconfirm" => "seqboot.params",
838
 
        "bootterminal_type" => "seqboot.params",
839
 
        "printdata" => "params",
840
 
        "code" => "params",
841
 
        "categorization" => "params",
842
 
        "change_prob" => "params",
843
 
        "ratio" => "params",
844
 
        "base_frequencies" => "params",
845
 
        "confirm" => "params",
846
 
        "terminal_type" => "params",
847
 
 
848
 
    };
849
 
 
850
 
    $self->{COMMENT}  = {
851
 
        "seqboot" => [
852
 
                "By selecting this option, the bootstrap will be performed on your sequence file. So you don\'t need to perform a separated seqboot before.",
853
 
                "Don\'t give an already bootstrapped file to the program, this won\'t work!",
854
 
        ],
855
 
        "resamp_method" => [
856
 
                "1. The bootstrap. Bootstrapping was invented by Bradley Efron in 1979, and its use in phylogeny estimation was introduced by me (Felsenstein, 1985b). It involves creating a new data set by sampling N characters randomly with replacement, so that the resulting data set has the same size as the original, but some characters have been left out and others are duplicated. The random variation of the results from analyzing these bootstrapped data sets can be shown statistically to be typical of the variation that you would get from collecting new data sets. The method assumes that the characters evolve independently, an assumption that may not be realistic for many kinds of data.",
857
 
                "2. Delete-half-jackknifing. This alternative to the bootstrap involves sampling a random half of the characters, and including them in the data but dropping the others. The resulting data sets are half the size of the original, and no characters are duplicated. The random variation from doing this should be very similar to that obtained from the bootstrap. The method is advocated by Wu (1986).",
858
 
                "3. Permuting species within characters. This method of resampling (well, OK, it may not be best to call it resampling) was introduced by Archie (1989) and Faith (1990; see also Faith and Cranston, 1991). It involves permuting the columns of the data matrix separately. This produces data matrices that have the same number and kinds of characters but no taxonomic structure. It is used for different purposes than the bootstrap, as it tests not the variation around an estimated tree but the hypothesis that there is no taxonomic structure in the data: if a statistic such as number of steps is significantly smaller in the actual data than it is in replicates that are permuted, then we can argue that there is some taxonomic structure in the data (though perhaps it might be just a pair of sibling species).",
859
 
        ],
860
 
        "categorization" => [
861
 
                "All have groups: (Glu Gln Asp Asn), (Lys Arg His), (Phe Tyr Trp) plus:",
862
 
                "George/Hunt/Barker: (Cys), (Met Val Leu Ileu), (Gly Ala Ser Thr Pro)",
863
 
                "Chemical: (Cys Met), (Val Leu Ileu Gly Ala Ser Thr), (Pro)",
864
 
                "Hall: (Cys), (Met Val Leu Ileu), (Gly Ala Ser Thr), (Pro)",
865
 
        ],
866
 
 
867
 
    };
868
 
 
869
 
    $self->{SCALEMIN}  = {
870
 
 
871
 
    };
872
 
 
873
 
    $self->{SCALEMAX}  = {
874
 
 
875
 
    };
876
 
 
877
 
    $self->{SCALEINC}  = {
878
 
 
879
 
    };
880
 
 
881
 
    $self->{INFO}  = {
882
 
 
883
 
    };
884
 
 
885
 
# -- end of definitions extracted from /local/gensoft/lib/Pise/5.a/PerlDef/protdist.pm
886
 
 
887
 
 
888
 
 
889
 
    $self->_init_params(@params);
890
 
 
891
 
    return $self;
892
 
}
893
 
 
894
 
 
895
 
 
896
 
1; # Needed to keep compiler happy
897