Package Bio :: Package Emboss :: Module Applications
[hide private]
[frames] | no frames]

Source Code for Module Bio.Emboss.Applications

   1  # Copyright 2001-2009 Brad Chapman. 
   2  # Revisions copyright 2009-2010 by Peter Cock. 
   3  # Revisions copyright 2009 by David Winter. 
   4  # Revisions copyright 2009-2010 by Leighton Pritchard. 
   5  # All rights reserved. 
   6  # This code is part of the Biopython distribution and governed by its 
   7  # license.  Please see the LICENSE file that should have been included 
   8  # as part of this package. 
   9  """Code to interact with and run various EMBOSS programs. 
  10   
  11  These classes follow the AbstractCommandline interfaces for running 
  12  programs. 
  13  """ 
  14   
  15  from __future__ import print_function 
  16   
  17  from Bio.Application import _Option, _Switch, AbstractCommandline 
  18   
  19  __docformat__ = "restructuredtext en" 
  20   
  21   
22 -class _EmbossMinimalCommandLine(AbstractCommandline):
23 """Base Commandline object for EMBOSS wrappers (PRIVATE). 24 25 This is provided for subclassing, it deals with shared options 26 common to all the EMBOSS tools: 27 28 - auto Turn off prompts 29 - stdout Write standard output 30 - filter Read standard input, write standard output 31 - options Prompt for standard and additional values 32 - debug Write debug output to program.dbg 33 - verbose Report some/full command line options 34 - help Report command line options. More 35 information on associated and general 36 qualifiers can be found with -help -verbose 37 - warning Report warnings 38 - error Report errors 39 - fatal Report fatal errors 40 - die Report dying program messages 41 """
42 - def __init__(self, cmd=None, **kwargs):
43 assert cmd is not None 44 extra_parameters = [ 45 _Switch(["-auto", "auto"], 46 """Turn off prompts. 47 48 Automatic mode disables prompting, so we recommend you set 49 this argument all the time when calling an EMBOSS tool from 50 Biopython. 51 """), 52 _Switch(["-stdout", "stdout"], 53 "Write standard output."), 54 _Switch(["-filter", "filter"], 55 "Read standard input, write standard output."), 56 _Switch(["-options", "options"], 57 """Prompt for standard and additional values. 58 59 If you are calling an EMBOSS tool from within Biopython, 60 we DO NOT recommend using this option. 61 """), 62 _Switch(["-debug", "debug"], 63 "Write debug output to program.dbg."), 64 _Switch(["-verbose", "verbose"], 65 "Report some/full command line options"), 66 _Switch(["-help", "help"], 67 """Report command line options. 68 69 More information on associated and general qualifiers can 70 be found with -help -verbose 71 """), 72 _Switch(["-warning", "warning"], 73 "Report warnings."), 74 _Switch(["-error", "error"], 75 "Report errors."), 76 _Switch(["-die", "die"], 77 "Report dying program messages."), 78 ] 79 try: 80 # Insert extra parameters - at the start just in case there 81 # are any arguments which must come last: 82 self.parameters = extra_parameters + self.parameters 83 except AttributeError: 84 # Should we raise an error? The subclass should have set this up! 85 self.parameters = extra_parameters 86 AbstractCommandline.__init__(self, cmd, **kwargs)
87 88
89 -class _EmbossCommandLine(_EmbossMinimalCommandLine):
90 """Base Commandline object for EMBOSS wrappers (PRIVATE). 91 92 This is provided for subclassing, it deals with shared options 93 common to all the EMBOSS tools plus: 94 95 - outfile Output filename 96 97 """
98 - def __init__(self, cmd=None, **kwargs):
99 assert cmd is not None 100 extra_parameters = [ 101 _Option(["-outfile", "outfile"], 102 "Output filename", 103 filename=True), 104 ] 105 try: 106 # Insert extra parameters - at the start just in case there 107 # are any arguments which must come last: 108 self.parameters = extra_parameters + self.parameters 109 except AttributeError: 110 # Should we raise an error? The subclass should have set this up! 111 self.parameters = extra_parameters 112 _EmbossMinimalCommandLine.__init__(self, cmd, **kwargs)
113
114 - def _validate(self):
115 # Check the outfile, filter, or stdout option has been set. 116 # We can't simply do this via the required flag for the outfile 117 # output - this seems the simplest solution. 118 if not (self.outfile or self.filter or self.stdout): 119 raise ValueError("You must either set outfile (output filename), " 120 "or enable filter or stdout (output to stdout).") 121 return _EmbossMinimalCommandLine._validate(self)
122 123
124 -class Primer3Commandline(_EmbossCommandLine):
125 """Commandline object for the Primer3 interface from EMBOSS. 126 127 The precise set of supported arguments depends on your version of EMBOSS. 128 This version accepts arguments current at EMBOSS 6.1.0, but in order to 129 remain backwards compatible also support the old argument names as well. 130 131 e.g. Using EMBOSS 6.1.0 or later, 132 133 >>> cline = Primer3Commandline(sequence="mysequence.fas", auto=True, hybridprobe=True) 134 >>> cline.explainflag = True 135 >>> cline.osizeopt=20 136 >>> cline.psizeopt=200 137 >>> cline.outfile = "myresults.out" 138 >>> cline.bogusparameter = 1967 # Invalid parameter 139 Traceback (most recent call last): 140 ... 141 ValueError: Option name bogusparameter was not found. 142 >>> print(cline) 143 eprimer3 -auto -outfile=myresults.out -sequence=mysequence.fas -hybridprobe=True -psizeopt=200 -osizeopt=20 -explainflag=True 144 145 The equivalent for anyone still using an older version of EMBOSS would be: 146 147 >>> cline = Primer3Commandline(sequence="mysequence.fas", auto=True, hybridprobe=True) 148 >>> cline.explainflag = True 149 >>> cline.oligosize=20 # Old EMBOSS, instead of osizeopt 150 >>> cline.productosize=200 # Old EMBOSS, instead of psizeopt 151 >>> cline.outfile = "myresults.out" 152 >>> print(cline) 153 eprimer3 -auto -outfile=myresults.out -sequence=mysequence.fas -hybridprobe=True -productosize=200 -oligosize=20 -explainflag=True 154 155 """
156 - def __init__(self, cmd="eprimer3", **kwargs):
157 self.parameters = [ 158 _Option(["-sequence", "sequence"], 159 "Sequence to choose primers from.", 160 is_required=True), 161 _Option(["-task", "task"], 162 "Tell eprimer3 what task to perform."), 163 _Option(["-hybridprobe", "hybridprobe"], 164 "Find an internal oligo to use as a hyb probe."), 165 _Option(["-numreturn", "numreturn"], 166 "Maximum number of primer pairs to return."), 167 _Option(["-includedregion", "includedregion"], 168 "Subregion of the sequence in which to pick primers."), 169 _Option(["-target", "target"], 170 "Sequence to target for flanking primers."), 171 _Option(["-excludedregion", "excludedregion"], 172 "Regions to exclude from primer picking."), 173 _Option(["-forwardinput", "forwardinput"], 174 "Sequence of a forward primer to check."), 175 _Option(["-reverseinput", "reverseinput"], 176 "Sequence of a reverse primer to check."), 177 _Option(["-gcclamp", "gcclamp"], 178 "The required number of Gs and Cs at the 3' of each primer."), 179 _Option(["-osize", "osize"], 180 "Optimum length of a primer oligo."), 181 _Option(["-minsize", "minsize"], 182 "Minimum length of a primer oligo."), 183 _Option(["-maxsize", "maxsize"], 184 "Maximum length of a primer oligo."), 185 _Option(["-otm", "otm"], 186 """Melting temperature for primer oligo (OBSOLETE). 187 188 Option replaced in EMBOSS 6.6.0 by -opttm 189 """), 190 _Option(["-opttm", "opttm"], 191 """Optimum melting temperature for a primer oligo. 192 193 Option added in EMBOSS 6.6.0, replacing -otm 194 """), 195 _Option(["-mintm", "mintm"], 196 "Minimum melting temperature for a primer oligo."), 197 _Option(["-maxtm", "maxtm"], 198 "Maximum melting temperature for a primer oligo."), 199 _Option(["-maxdifftm", "maxdifftm"], 200 "Maximum difference in melting temperatures between " 201 "forward and reverse primers."), 202 _Option(["-ogcpercent", "ogcpercent"], 203 "Optimum GC% for a primer."), 204 _Option(["-mingc", "mingc"], 205 "Minimum GC% for a primer."), 206 _Option(["-maxgc", "maxgc"], 207 "Maximum GC% for a primer."), 208 _Option(["-saltconc", "saltconc"], 209 "Millimolar salt concentration in the PCR."), 210 _Option(["-dnaconc", "dnaconc"], 211 "Nanomolar concentration of annealing oligos in the PCR."), 212 _Option(["-maxpolyx", "maxpolyx"], 213 "Maximum allowable mononucleotide repeat length in a primer."), 214 # Primer length: 215 _Option(["-productosize", "productosize"], 216 """Optimum size for the PCR product (OBSOLETE). 217 218 Option replaced in EMBOSS 6.1.0 by -psizeopt 219 """), 220 _Option(["-psizeopt", "psizeopt"], 221 """Optimum size for the PCR product. 222 223 Option added in EMBOSS 6.1.0, replacing -productosize 224 """), 225 _Option(["-productsizerange", "productsizerange"], 226 """Acceptable range of length for the PCR product (OBSOLETE). 227 228 Option replaced in EMBOSS 6.1.0 by -prange 229 """), 230 _Option(["-prange", "prange"], 231 """Acceptable range of length for the PCR product. 232 233 Option added in EMBOSS 6.1.0, replacing -productsizerange 234 """), 235 # Primer temperature: 236 _Option(["-productotm", "productotm"], 237 """Optimum melting temperature for the PCR product (OBSOLETE). 238 239 Option replaced in EMBOSS 6.1.0 by -ptmopt 240 """), 241 _Option(["-ptmopt", "ptmopt"], 242 """Optimum melting temperature for the PCR product. 243 244 Option added in EMBOSS 6.1.0, replacing -productotm 245 """), 246 _Option(["-productmintm", "productmintm"], 247 """Minimum allowed melting temperature for the amplicon (OBSOLETE) 248 249 Option replaced in EMBOSS 6.1.0 by -ptmmin 250 """), 251 _Option(["-ptmmin", "ptmmin"], 252 """Minimum allowed melting temperature for the amplicon."), 253 254 Option added in EMBOSS 6.1.0, replacing -productmintm 255 """), 256 _Option(["-productmaxtm", "productmaxtm"], 257 """Maximum allowed melting temperature for the amplicon (OBSOLETE). 258 259 Option replaced in EMBOSS 6.1.0 by -ptmmax 260 """), 261 _Option(["-ptmmax", "ptmmax"], 262 """Maximum allowed melting temperature for the amplicon."), 263 264 Option added in EMBOSS 6.1.0, replacing -productmaxtm 265 """), 266 # Note to self, should be -oexcludedregion not -oexcluderegion 267 _Option(["-oexcludedregion", "oexcludedregion"], 268 """Do not pick internal oligos in this region."), 269 270 Option added in EMBOSS 6.1.0, replacing -oligoexcludedregion. 271 """), 272 _Option(["-oligoexcludedregion", "oligoexcludedregion"], 273 """Do not pick internal oligos in this region (OBSOLETE)."), 274 275 Option replaced in EMBOSS 6.1.0 by -oexcluderegion. 276 """), 277 _Option(["-oligoinput", "oligoinput"], 278 "Sequence of the internal oligo."), 279 # Oligo length: 280 _Option(["-oligosize", "oligosize"], 281 """Optimum length of internal oligo (OBSOLETE). 282 283 Option replaced in EMBOSS 6.1.0 by -osizeopt. 284 """), 285 _Option(["-osizeopt", "osizeopt"], 286 """Optimum length of internal oligo. 287 288 Option added in EMBOSS 6.1.0, replaces -oligosize 289 """), 290 _Option(["-oligominsize", "oligominsize"], 291 """Minimum length of internal oligo (OBSOLETE)."), 292 293 Option replaced in EMBOSS 6.1.0 by -ominsize. 294 """), 295 _Option(["-ominsize", "ominsize"], 296 """Minimum length of internal oligo." 297 298 Option added in EMBOSS 6.1.0, replaces -oligominsize 299 """), 300 _Option(["-oligomaxsize", "oligomaxsize"], 301 """Maximum length of internal oligo (OBSOLETE). 302 303 Option replaced in EMBOSS 6.1.0 by -omaxsize. 304 """), 305 _Option(["-omaxsize", "omaxsize"], 306 """Maximum length of internal oligo. 307 308 Option added in EMBOSS 6.1.0, replaces -oligomaxsize 309 """), 310 # Oligo GC temperature: 311 _Option(["-oligotm", "oligotm"], 312 """Optimum melting temperature of internal oligo (OBSOLETE). 313 314 Option replaced in EMBOSS 6.1.0 by -otmopt. 315 """), 316 _Option(["-otmopt", "otmopt"], 317 """Optimum melting temperature of internal oligo. 318 319 Option added in EMBOSS 6.1.0. 320 """), 321 _Option(["-oligomintm", "oligomintm"], 322 """Minimum melting temperature of internal oligo (OBSOLETE). 323 324 Option replaced in EMBOSS 6.1.0 by -otmmin. 325 """), 326 _Option(["-otmmin", "otmmin"], 327 """Minimum melting temperature of internal oligo. 328 329 Option added in EMBOSS 6.1.0, replacing -oligomintm 330 """), 331 _Option(["-oligomaxtm", "oligomaxtm"], 332 """Maximum melting temperature of internal oligo (OBSOLETE). 333 334 Option replaced in EMBOSS 6.1.0 by -otmmax. 335 """), 336 _Option(["-otmmax", "otmmax"], 337 """Maximum melting temperature of internal oligo. 338 339 Option added in EMBOSS 6.1.0, replacing -oligomaxtm 340 """), 341 # Oligo GC percent: 342 _Option(["-oligoogcpercent", "oligoogcpercent"], 343 """Optimum GC% for internal oligo (OBSOLETE). 344 345 Option replaced in EMBOSS 6.1.0 by -ogcopt. 346 """), 347 _Option(["-ogcopt", "ogcopt"], 348 """Optimum GC% for internal oligo." 349 350 Option added in EMBOSS 6.1.0, replacing -oligoogcpercent 351 """), 352 _Option(["-oligomingc", "oligomingc"], 353 """Minimum GC% for internal oligo (OBSOLETE). 354 355 Option replaced in EMBOSS 6.1.0 by -ogcmin. 356 """), 357 _Option(["-ogcmin", "ogcmin"], 358 """Minimum GC% for internal oligo. 359 360 Option added in EMBOSS 6.1.0, replacing -oligomingc 361 """), 362 _Option(["-oligomaxgc", "oligomaxgc"], 363 """Maximum GC% for internal oligo. 364 365 Option replaced in EMBOSS 6.1.0 by -ogcmax 366 """), 367 _Option(["-ogcmax", "ogcmax"], 368 """Maximum GC% for internal oligo."), 369 370 Option added in EMBOSS 6.1.0, replacing -oligomaxgc 371 """), 372 # Oligo salt concentration: 373 _Option(["-oligosaltconc", "oligosaltconc"], 374 """Millimolar concentration of salt in the hybridisation."), 375 376 Option replaced in EMBOSS 6.1.0 by -osaltconc 377 """), 378 _Option(["-osaltconc", "osaltconc"], 379 """Millimolar concentration of salt in the hybridisation."), 380 381 Option added in EMBOSS 6.1.0, replacing -oligosaltconc 382 """), 383 _Option(["-oligodnaconc", "oligodnaconc"], 384 """Nanomolar concentration of internal oligo in the hybridisation. 385 386 Option replaced in EMBOSS 6.1.0 by -odnaconc 387 """), 388 _Option(["-odnaconc", "odnaconc"], 389 """Nanomolar concentration of internal oligo in the hybridisation. 390 391 Option added in EMBOSS 6.1.0, replacing -oligodnaconc 392 """), 393 # Oligo self complementarity 394 _Option(["-oligoselfany", "oligoselfany"], 395 """Maximum allowable alignment score for self-complementarity (OBSOLETE). 396 397 Option replaced in EMBOSS 6.1.0 by -oanyself 398 """), 399 _Option(["-oanyself", "oanyself"], 400 """Maximum allowable alignment score for self-complementarity."), 401 402 Option added in EMBOSS 6.1.0, replacing -oligoselfany 403 """), 404 _Option(["-oligoselfend", "oligoselfend"], 405 """Maximum allowable 3`-anchored global alignment score " 406 for self-complementarity (OBSOLETE). 407 408 Option replaced in EMBOSS 6.1.0 by -oendself 409 """), 410 _Option(["-oendself", "oendself"], 411 """Max 3`-anchored self-complementarity global alignment score. 412 413 Option added in EMBOSS 6.1.0, replacing -oligoselfend 414 """), 415 _Option(["-oligomaxpolyx", "oligomaxpolyx"], 416 """Maximum length of mononucleotide repeat in internal oligo (OBSOLETE). 417 418 Option replaced in EMBOSS 6.1.0 by -opolyxmax 419 """), 420 _Option(["-opolyxmax", "opolyxmax"], 421 """Maximum length of mononucleotide repeat in internal oligo."), 422 423 Option added in EMBOSS 6.1.0, replacing -oligomaxpolyx 424 """), 425 _Option(["-mispriminglibraryfile", "mispriminglibraryfile"], 426 "File containing library of sequences to avoid amplifying"), 427 _Option(["-maxmispriming", "maxmispriming"], 428 "Maximum allowed similarity of primers to sequences in " 429 "library specified by -mispriminglibrary"), 430 _Option(["-oligomaxmishyb", "oligomaxmishyb"], 431 """Maximum alignment score for hybridisation of internal oligo to 432 library specified by -oligomishyblibraryfile (OBSOLETE). 433 434 Option replaced in EMBOSS 6.1.0 by -omishybmax 435 """), 436 _Option(["-omishybmax", "omishybmax"], 437 """Maximum alignment score for hybridisation of internal oligo to 438 library specified by -mishyblibraryfile. 439 440 Option added in EMBOSS 6.1.0, replacing -oligomaxmishyb 441 """), 442 _Option(["-oligomishyblibraryfile", "oligomishyblibraryfile"], 443 444 """Library file of seqs to avoid internal oligo hybridisation (OBSOLETE). 445 446 Option replaced in EMBOSS 6.1.0 by -mishyblibraryfile 447 """), 448 _Option(["-mishyblibraryfile", "mishyblibraryfile"], 449 """Library file of seqs to avoid internal oligo hybridisation. 450 451 Option added in EMBOSS 6.1.0, replacing -oligomishyblibraryfile 452 """), 453 _Option(["-explainflag", "explainflag"], 454 "Produce output tags with eprimer3 statistics"), 455 ] 456 _EmbossCommandLine.__init__(self, cmd, **kwargs)
457 458
459 -class PrimerSearchCommandline(_EmbossCommandLine):
460 """Commandline object for the primersearch program from EMBOSS. 461 """
462 - def __init__(self, cmd="primersearch", **kwargs):
463 self.parameters = [ 464 _Option(["-seqall", "-sequences", "sequences", "seqall"], 465 "Sequence to look for the primer pairs in.", 466 is_required=True), 467 # When this wrapper was written primersearch used -sequences 468 # as the argument name. Since at least EMBOSS 5.0 (and 469 # perhaps earlier) this has been -seqall instead. 470 _Option(["-infile", "-primers", "primers", "infile"], 471 "File containing the primer pairs to search for.", 472 filename=True, 473 is_required=True), 474 # When this wrapper was written primersearch used -primers 475 # as the argument name. Since at least EMBOSS 5.0 (and 476 # perhaps earlier) this has been -infile instead. 477 _Option(["-mismatchpercent", "mismatchpercent"], 478 "Allowed percentage mismatch (any integer value, default 0).", 479 is_required=True), 480 _Option(["-snucleotide", "snucleotide"], 481 "Sequences are nucleotide (boolean)"), 482 _Option(["-sprotein", "sprotein"], 483 "Sequences are protein (boolean)"), 484 ] 485 _EmbossCommandLine.__init__(self, cmd, **kwargs)
486 487
488 -class FDNADistCommandline(_EmbossCommandLine):
489 """Commandline object for the fdnadist program from EMBOSS. 490 491 fdnadist is an EMBOSS wrapper for the PHYLIP program dnadist for 492 calulating distance matrices from DNA sequence files. 493 """
494 - def __init__(self, cmd="fdnadist", **kwargs):
495 self.parameters = [ 496 _Option(["-sequence", "sequence"], 497 "seq file to use (phylip)", 498 filename=True, 499 is_required=True), 500 _Option(["-method", "method"], 501 "sub. model [f,k,j,l,s]", 502 is_required=True), 503 _Option(["-gamma", "gamma"], 504 "gamma [g, i,n]"), 505 _Option(["-ncategories", "ncategories"], 506 "number of rate catergories (1-9)"), 507 _Option(["-rate", "rate"], 508 "rate for each category"), 509 _Option(["-categories", "categories"], 510 "File of substitution rate categories"), 511 _Option(["-weights", "weights"], 512 "weights file"), 513 _Option(["-gammacoefficient", "gammacoefficient"], 514 "value for gamma (> 0.001)"), 515 _Option(["-invarfrac", "invarfrac"], 516 "proportoin of invariant sites"), 517 _Option(["-ttratio", "ttratio"], 518 "ts/tv ratio"), 519 _Option(["-freqsfrom", "freqsfrom"], 520 "use emprical base freqs"), 521 _Option(["-basefreq", "basefreq"], 522 "specify basefreqs"), 523 _Option(["-lower", "lower"], 524 "lower triangle matrix (y/N)")] 525 _EmbossCommandLine.__init__(self, cmd, **kwargs)
526 527
528 -class FTreeDistCommandline(_EmbossCommandLine):
529 """Commandline object for the ftreedist program from EMBOSS. 530 531 ftreedist is an EMBOSS wrapper for the PHYLIP program treedist used for 532 calulating distance measures between phylogentic trees. 533 """
534 - def __init__(self, cmd="ftreedist", **kwargs):
535 self.parameters = [ 536 _Option(["-intreefile", "intreefile"], 537 "tree file to score (phylip)", 538 filename=True, 539 is_required=True), 540 _Option(["-dtype", "dtype"], 541 "distance type ([S]ymetric, [b]ranch score)"), 542 _Option(["-pairing", "pairing"], 543 "tree pairing method ([A]djacent pairs, all [p]ossible pairs)"), 544 _Option(["-style", "style"], 545 "output style - [V]erbose, [f]ill, [s]parse"), 546 _Option(["-noroot", "noroot"], 547 "treat trees as rooted [N/y]"), 548 _Option(["-outgrno", "outgrno"], 549 "which taxon to root the trees with (starts from 0)")] 550 _EmbossCommandLine.__init__(self, cmd, **kwargs)
551 552
553 -class FNeighborCommandline(_EmbossCommandLine):
554 """Commandline object for the fneighbor program from EMBOSS. 555 556 fneighbor is an EMBOSS wrapper for the PHYLIP program neighbor used for 557 calulating neighbor-joining or UPGMA trees from distance matrices. 558 """
559 - def __init__(self, cmd="fneighbor", **kwargs):
560 self.parameters = [ 561 _Option(["-datafile", "datafile"], 562 "dist file to use (phylip)", 563 filename=True, 564 is_required=True), 565 _Option(["-matrixtype", "matrixtype"], 566 "is martrix [S]quare pr [u]pper or [l]ower"), 567 _Option(["-treetype", "treetype"], 568 "nj or UPGMA tree (n/u)"), 569 _Option(["-outgrno", "outgrno"], 570 "taxon to use as OG"), 571 _Option(["-jumble", "jumble"], 572 "randommise input order (Y/n)"), 573 _Option(["-seed", "seed"], 574 "provide a random seed"), 575 _Option(["-trout", "trout"], 576 "write tree (Y/n)"), 577 _Option(["-outtreefile", "outtreefile"], 578 "filename for output tree"), 579 _Option(["-progress", "progress"], 580 "print progress (Y/n)"), 581 _Option(["-treeprint", "treeprint"], 582 "print tree (Y/n)")] 583 _EmbossCommandLine.__init__(self, cmd, **kwargs)
584 585
586 -class FSeqBootCommandline(_EmbossCommandLine):
587 """Commandline object for the fseqboot program from EMBOSS. 588 589 fseqboot is an EMBOSS wrapper for the PHYLIP program seqboot used to 590 pseudo-sample alignment files. 591 """
592 - def __init__(self, cmd="fseqboot", **kwargs):
593 self.parameters = [ 594 _Option(["-sequence", "sequence"], 595 "seq file to sample (phylip)", 596 filename=True, 597 is_required=True), 598 _Option(["-categories", "catergories"], 599 "file of input categories"), 600 _Option(["-weights", "weights"], 601 " weights file"), 602 _Option(["-test", "test"], 603 "specify operation, default is bootstrap"), 604 _Option(["-regular", "regular"], 605 "absolute number to resample"), 606 _Option(["-fracsample", "fracsample"], 607 "fraction to resample"), 608 _Option(["-rewriteformat", "rewriteformat"], 609 "output format ([P]hyilp, [n]exus, [x]ml"), 610 _Option(["-seqtype", "seqtype"], 611 "output format ([D]na, [p]rotein, [r]na"), 612 _Option(["-blocksize", "blocksize"], 613 "print progress (Y/n)"), 614 _Option(["-reps", "reps"], 615 "how many replicates, defaults to 100)"), 616 _Option(["-justweights", "jusweights"], 617 "what to write out [D]atasets of just [w]eights"), 618 _Option(["-seed", "seed"], 619 "specify random seed"), 620 _Option(["-dotdiff", "dotdiff"], 621 "Use dot-differencing? [Y/n]"), ] 622 _EmbossCommandLine.__init__(self, cmd, **kwargs)
623 624
625 -class FDNAParsCommandline(_EmbossCommandLine):
626 """Commandline object for the fdnapars program from EMBOSS. 627 628 fdnapars is an EMBOSS version of the PHYLIP program dnapars, for 629 estimating trees from DNA sequences using parsiomny. Calling this command 630 without providing a value for the option "-intreefile" will invoke 631 "interactive mode" (and as a result fail if called with subprocess) if 632 "-auto" is not set to true. 633 """
634 - def __init__(self, cmd="fdnapars", **kwargs):
635 self.parameters = [ 636 _Option(["-sequence", "sequence"], 637 "seq file to use (phylip)", 638 filename=True, 639 is_required=True), 640 _Option(["-intreefile", "intreefile"], 641 "Phylip tree file"), 642 _Option(["-weights", "weights"], 643 "weights file"), 644 _Option(["-maxtrees", "maxtrees"], 645 "max trees to save during run"), 646 _Option(["-thorough", "thorough"], 647 "more thorough search (Y/n)"), 648 _Option(["-rearrange", "rearrange"], 649 "Rearrange on jsut 1 best tree (Y/n)"), 650 _Option(["-transversion", "transversion"], 651 "Use tranversion parsimony (y/N)"), 652 _Option(["-njumble", "njumble"], 653 "number of times to randomise input order (default is 0)"), 654 _Option(["-seed", "seed"], 655 "provide random seed"), 656 _Option(["-outgrno", "outgrno"], 657 "Specify outgroup"), 658 _Option(["-thresh", "thresh"], 659 "Use threshold parsimony (y/N)"), 660 _Option(["-threshold", "threshold"], 661 "Threshold value"), 662 _Option(["-trout", "trout"], 663 "Write trees to file (Y/n)"), 664 _Option(["-outtreefile", "outtreefile"], 665 "filename for output tree"), 666 _Option(["-dotdiff", "dotdiff"], 667 "Use dot-differencing? [Y/n]")] 668 _EmbossCommandLine.__init__(self, cmd, **kwargs)
669 670
671 -class FProtParsCommandline(_EmbossCommandLine):
672 """Commandline object for the fdnapars program from EMBOSS. 673 674 fprotpars is an EMBOSS version of the PHYLIP program protpars, for 675 estimating trees from protein sequences using parsiomny. Calling this 676 command without providing a value for the option "-intreefile" will invoke 677 "interactive mode" (and as a result fail if called with subprocess) if 678 "-auto" is not set to true. 679 """
680 - def __init__(self, cmd="fprotpars", **kwargs):
681 self.parameters = [ 682 _Option(["-sequence", "sequence"], 683 "seq file to use (phylip)", 684 filename=True, 685 is_required=True), 686 _Option(["-intreefile", "intreefile"], 687 "Phylip tree file to score"), 688 _Option(["-outtreefile", "outtreefile"], 689 "phylip tree output file", 690 filename=True, 691 is_required=True), 692 _Option(["-weights", "weights"], 693 "weights file"), 694 _Option(["-whichcode", "whichcode"], 695 "which genetic code, [U,M,V,F,Y]]"), 696 _Option(["-njumble", "njumble"], 697 "number of times to randomise input order (default is 0)"), 698 _Option(["-seed", "seed"], 699 "provide random seed"), 700 _Option(["-outgrno", "outgrno"], 701 "Specify outgroup"), 702 _Option(["-thresh", "thresh"], 703 "Use threshold parsimony (y/N)"), 704 _Option(["-threshold", "threshold"], 705 "Threshold value"), 706 _Option(["-trout", "trout"], 707 "Write trees to file (Y/n)"), 708 _Option(["-dotdiff", "dotdiff"], 709 "Use dot-differencing? [Y/n]")] 710 _EmbossCommandLine.__init__(self, cmd, **kwargs)
711 712
713 -class FProtDistCommandline(_EmbossCommandLine):
714 """Commandline object for the fprotdist program from EMBOSS. 715 716 fprotdist is an EMBOSS wrapper for the PHYLIP program protdist used to 717 estimate trees from protein sequences using parsimony 718 """
719 - def __init__(self, cmd="fprotdist", **kwargs):
720 self.parameters = [ 721 _Option(["-sequence", "sequence"], 722 "seq file to use (phylip)", 723 filename=True, 724 is_required=True), 725 _Option(["-ncategories", "ncategories"], 726 "number of rate catergories (1-9)"), 727 _Option(["-rate", "rate"], 728 "rate for each category"), 729 _Option(["-catergories", "catergories"], 730 "file of rates"), 731 _Option(["-weights", "weights"], 732 "weights file"), 733 _Option(["-method", "method"], 734 "sub. model [j,h,d,k,s,c]"), 735 _Option(["-gamma", "gamma"], 736 "gamma [g, i,c]"), 737 _Option(["-gammacoefficient", "gammacoefficient"], 738 "value for gamma (> 0.001)"), 739 _Option(["-invarcoefficient", "invarcoefficient"], 740 "float for variation of substitution rate among sites"), 741 _Option(["-aacateg", "aacateg"], 742 "Choose the category to use [G,C,H]"), 743 _Option(["-whichcode", "whichcode"], 744 "genetic code [c,m,v,f,y]"), 745 _Option(["-ease", "ease"], 746 "Pob change catergory (float between -0 and 1)"), 747 _Option(["-ttratio", "ttratio"], 748 "Transition/transversion ratio (0-1)"), 749 _Option(["-basefreq", "basefreq"], 750 "DNA base frequencies (space separated list)")] 751 _EmbossCommandLine.__init__(self, cmd, **kwargs)
752 753
754 -class FConsenseCommandline(_EmbossCommandLine):
755 """Commandline object for the fconsense program from EMBOSS. 756 757 fconsense is an EMBOSS wrapper for the PHYLIP program consense used to 758 calculate consensus trees. 759 """
760 - def __init__(self, cmd="fconsense", **kwargs):
761 self.parameters = [ 762 _Option(["-intreefile", "intreefile"], 763 "file with phylip trees to make consensus from", 764 filename=True, 765 is_required=True), 766 _Option(["-method", "method"], 767 "consensus method [s, mr, MRE, ml]"), 768 _Option(["-mlfrac", "mlfrac"], 769 "cut-off freq for a branch to appear in consensus (0.5-1.0)"), 770 _Option(["-root", "root"], 771 "treat trees as rooted (YES, no)"), 772 _Option(["-outgrno", "outgrno"], 773 "OTU to use as outgroup (starts from 0)"), 774 _Option(["-trout", "trout"], 775 "treat trees as rooted (YES, no)"), 776 _Option(["-outtreefile", "outtreefile"], 777 "Phylip tree output file (optional)")] 778 _EmbossCommandLine.__init__(self, cmd, **kwargs)
779 780
781 -class WaterCommandline(_EmbossCommandLine):
782 """Commandline object for the water program from EMBOSS. 783 """
784 - def __init__(self, cmd="water", **kwargs):
785 self.parameters = [ 786 _Option(["-asequence", "asequence"], 787 "First sequence to align", 788 filename=True, 789 is_required=True), 790 _Option(["-bsequence", "bsequence"], 791 "Second sequence to align", 792 filename=True, 793 is_required=True), 794 _Option(["-gapopen", "gapopen"], 795 "Gap open penalty", 796 is_required=True), 797 _Option(["-gapextend", "gapextend"], 798 "Gap extension penalty", 799 is_required=True), 800 _Option(["-datafile", "datafile"], 801 "Matrix file", 802 filename=True), 803 _Switch(["-nobrief", "nobrief"], 804 "Display extended identity and similarity"), 805 _Switch(["-brief", "brief"], 806 "Display brief identity and similarity"), 807 _Option(["-similarity", "similarity"], 808 "Display percent identity and similarity"), 809 _Option(["-snucleotide", "snucleotide"], 810 "Sequences are nucleotide (boolean)"), 811 _Option(["-sprotein", "sprotein"], 812 "Sequences are protein (boolean)"), 813 _Option(["-aformat", "aformat"], 814 "Display output in a different specified output format")] 815 _EmbossCommandLine.__init__(self, cmd, **kwargs)
816 817
818 -class NeedleCommandline(_EmbossCommandLine):
819 """Commandline object for the needle program from EMBOSS. 820 """
821 - def __init__(self, cmd="needle", **kwargs):
822 self.parameters = [ 823 _Option(["-asequence", "asequence"], 824 "First sequence to align", 825 filename=True, 826 is_required=True), 827 _Option(["-bsequence", "bsequence"], 828 "Second sequence to align", 829 filename=True, 830 is_required=True), 831 _Option(["-gapopen", "gapopen"], 832 "Gap open penalty", 833 is_required=True), 834 _Option(["-gapextend", "gapextend"], 835 "Gap extension penalty", 836 is_required=True), 837 _Option(["-datafile", "datafile"], 838 "Matrix file", 839 filename=True), 840 _Option(["-endweight", "endweight"], 841 "Apply And gap penalties"), 842 _Option(["-endopen", "endopen"], 843 "The score taken away when an end gap is created."), 844 _Option(["-endextend", "endextend"], 845 "The score added to the end gap penality for each base or " 846 "residue in the end gap."), 847 _Switch(["-nobrief", "nobrief"], 848 "Display extended identity and similarity"), 849 _Switch(["-brief", "brief"], 850 "Display brief identity and similarity"), 851 _Option(["-similarity", "similarity"], 852 "Display percent identity and similarity"), 853 _Option(["-snucleotide", "snucleotide"], 854 "Sequences are nucleotide (boolean)"), 855 _Option(["-sprotein", "sprotein"], 856 "Sequences are protein (boolean)"), 857 _Option(["-aformat", "aformat"], 858 "Display output in a different specified output format")] 859 _EmbossCommandLine.__init__(self, cmd, **kwargs)
860 861
862 -class NeedleallCommandline(_EmbossCommandLine):
863 """Commandline object for the needleall program from EMBOSS. 864 """
865 - def __init__(self, cmd="needleall", **kwargs):
866 self.parameters = [ 867 _Option(["-asequence", "asequence"], 868 "First sequence to align", 869 filename=True, 870 is_required=True), 871 _Option(["-bsequence", "bsequence"], 872 "Second sequence to align", 873 filename=True, 874 is_required=True), 875 _Option(["-gapopen", "gapopen"], 876 "Gap open penalty", 877 is_required=True), 878 _Option(["-gapextend", "gapextend"], 879 "Gap extension penalty", 880 is_required=True), 881 _Option(["-datafile", "datafile"], 882 "Matrix file", 883 filename=True), 884 _Option(["-minscore", "minscore"], 885 "Exclude alignments with scores below this threshold score."), 886 _Option(["-errorfile", "errorfile"], 887 "Error file to be written to."), 888 _Option(["-endweight", "endweight"], 889 "Apply And gap penalties"), 890 _Option(["-endopen", "endopen"], 891 "The score taken away when an end gap is created."), 892 _Option(["-endextend", "endextend"], 893 "The score added to the end gap penality for each base or " 894 "residue in the end gap."), 895 _Switch(["-nobrief", "nobrief"], 896 "Display extended identity and similarity"), 897 _Switch(["-brief", "brief"], 898 "Display brief identity and similarity"), 899 _Option(["-similarity", "similarity"], 900 "Display percent identity and similarity"), 901 _Option(["-snucleotide", "snucleotide"], 902 "Sequences are nucleotide (boolean)"), 903 _Option(["-sprotein", "sprotein"], 904 "Sequences are protein (boolean)"), 905 _Option(["-aformat", "aformat"], 906 "Display output in a different specified output format")] 907 _EmbossCommandLine.__init__(self, cmd, **kwargs)
908 909
910 -class StretcherCommandline(_EmbossCommandLine):
911 """Commandline object for the stretcher program from EMBOSS. 912 """
913 - def __init__(self, cmd="stretcher", **kwargs):
914 self.parameters = [ 915 _Option(["-asequence", "asequence"], 916 "First sequence to align", 917 filename=True, 918 is_required=True), 919 _Option(["-bsequence", "bsequence"], 920 "Second sequence to align", 921 filename=True, 922 is_required=True), 923 _Option(["-gapopen", "gapopen"], 924 "Gap open penalty", 925 is_required=True, 926 checker_function=lambda value: isinstance(value, int)), 927 _Option(["-gapextend", "gapextend"], 928 "Gap extension penalty", 929 is_required=True, 930 checker_function=lambda value: isinstance(value, int)), 931 _Option(["-datafile", "datafile"], 932 "Matrix file", 933 filename=True), 934 _Option(["-snucleotide", "snucleotide"], 935 "Sequences are nucleotide (boolean)"), 936 _Option(["-sprotein", "sprotein"], 937 "Sequences are protein (boolean)"), 938 _Option(["-aformat", "aformat"], 939 "Display output in a different specified output format")] 940 _EmbossCommandLine.__init__(self, cmd, **kwargs)
941 942
943 -class FuzznucCommandline(_EmbossCommandLine):
944 """Commandline object for the fuzznuc program from EMBOSS. 945 """
946 - def __init__(self, cmd="fuzznuc", **kwargs):
947 self.parameters = [ 948 _Option(["-sequence", "sequence"], 949 "Sequence database USA", 950 is_required=True), 951 _Option(["-pattern", "pattern"], 952 "Search pattern, using standard IUPAC one-letter codes", 953 is_required=True), 954 _Option(["-mismatch", "mismatch"], 955 "Number of mismatches", 956 is_required=True), 957 _Option(["-complement", "complement"], 958 "Search complementary strand"), 959 _Option(["-rformat", "rformat"], 960 "Specify the report format to output in.")] 961 _EmbossCommandLine.__init__(self, cmd, **kwargs)
962 963
964 -class Est2GenomeCommandline(_EmbossCommandLine):
965 """Commandline object for the est2genome program from EMBOSS. 966 """
967 - def __init__(self, cmd="est2genome", **kwargs):
968 self.parameters = [ 969 _Option(["-est", "est"], 970 "EST sequence(s)", 971 is_required=True), 972 _Option(["-genome", "genome"], 973 "Genomic sequence", 974 is_required=True), 975 _Option(["-match", "match"], 976 "Score for matching two bases"), 977 _Option(["-mismatch", "mismatch"], 978 "Cost for mismatching two bases"), 979 _Option(["-gappenalty", "gappenalty"], 980 "Cost for deleting a single base in either sequence, " 981 "excluding introns"), 982 _Option(["-intronpenalty", "intronpenalty"], 983 "Cost for an intron, independent of length."), 984 _Option(["-splicepenalty", "splicepenalty"], 985 "Cost for an intron, independent of length " 986 "and starting/ending on donor-acceptor sites"), 987 _Option(["-minscore", "minscore"], 988 "Exclude alignments with scores below this threshold score."), 989 _Option(["-reverse", "reverse"], 990 "Reverse the orientation of the EST sequence"), 991 _Option(["-splice", "splice"], 992 "Use donor and acceptor splice sites."), 993 _Option(["-mode", "mode"], 994 "This determines the comparion mode. 'both', 'forward' " 995 "'reverse'"), 996 _Option(["-best", "best"], 997 "You can print out all comparisons instead of just the best"), 998 _Option(["-space", "space"], 999 "for linear-space recursion."), 1000 _Option(["-shuffle", "shuffle"], 1001 "Shuffle"), 1002 _Option(["-seed", "seed"], 1003 "Random number seed"), 1004 _Option(["-align", "align"], 1005 "Show the alignment."), 1006 _Option(["-width", "width"], 1007 "Alignment width") 1008 ] 1009 _EmbossCommandLine.__init__(self, cmd, **kwargs)
1010 1011
1012 -class ETandemCommandline(_EmbossCommandLine):
1013 """Commandline object for the etandem program from EMBOSS. 1014 """
1015 - def __init__(self, cmd="etandem", **kwargs):
1016 self.parameters = [ 1017 _Option(["-sequence", "sequence"], 1018 "Sequence", 1019 filename=True, 1020 is_required=True), 1021 _Option(["-minrepeat", "minrepeat"], 1022 "Minimum repeat size", 1023 is_required=True), 1024 _Option(["-maxrepeat", "maxrepeat"], 1025 "Maximum repeat size", 1026 is_required=True), 1027 _Option(["-threshold", "threshold"], 1028 "Threshold score"), 1029 _Option(["-mismatch", "mismatch"], 1030 "Allow N as a mismatch"), 1031 _Option(["-uniform", "uniform"], 1032 "Allow uniform consensus"), 1033 _Option(["-rformat", "rformat"], 1034 "Output report format")] 1035 _EmbossCommandLine.__init__(self, cmd, **kwargs)
1036 1037
1038 -class EInvertedCommandline(_EmbossCommandLine):
1039 """Commandline object for the einverted program from EMBOSS. 1040 """
1041 - def __init__(self, cmd="einverted", **kwargs):
1042 self.parameters = [ 1043 _Option(["-sequence", "sequence"], 1044 "Sequence", 1045 filename=True, 1046 is_required=True), 1047 _Option(["-gap", "gap"], 1048 "Gap penalty", 1049 filename=True, 1050 is_required=True), 1051 _Option(["-threshold", "threshold"], 1052 "Minimum score threshold", 1053 is_required=True), 1054 _Option(["-match", "match"], 1055 "Match score", 1056 is_required=True), 1057 _Option(["-mismatch", "mismatch"], 1058 "Mismatch score", 1059 is_required=True), 1060 _Option(["-maxrepeat", "maxrepeat"], 1061 "Maximum separation between the start and end of repeat"), 1062 ] 1063 _EmbossCommandLine.__init__(self, cmd, **kwargs)
1064 1065
1066 -class PalindromeCommandline(_EmbossCommandLine):
1067 """Commandline object for the palindrome program from EMBOSS. 1068 """
1069 - def __init__(self, cmd="palindrome", **kwargs):
1070 self.parameters = [ 1071 _Option(["-sequence", "sequence"], 1072 "Sequence", 1073 filename=True, 1074 is_required=True), 1075 _Option(["-minpallen", "minpallen"], 1076 "Minimum palindrome length", 1077 is_required=True), 1078 _Option(["-maxpallen", "maxpallen"], 1079 "Maximum palindrome length", 1080 is_required=True), 1081 _Option(["-gaplimit", "gaplimit"], 1082 "Maximum gap between repeats", 1083 is_required=True), 1084 _Option(["-nummismatches", "nummismatches"], 1085 "Number of mismatches allowed", 1086 is_required=True), 1087 _Option(["-overlap", "overlap"], 1088 "Report overlapping matches", 1089 is_required=True), 1090 ] 1091 _EmbossCommandLine.__init__(self, cmd, **kwargs)
1092 1093
1094 -class TranalignCommandline(_EmbossCommandLine):
1095 """Commandline object for the tranalign program from EMBOSS. 1096 """
1097 - def __init__(self, cmd="tranalign", **kwargs):
1098 self.parameters = [ 1099 _Option(["-asequence", "asequence"], 1100 "Nucleotide sequences to be aligned.", 1101 filename=True, 1102 is_required=True), 1103 _Option(["-bsequence", "bsequence"], 1104 "Protein sequence alignment", 1105 filename=True, 1106 is_required=True), 1107 _Option(["-outseq", "outseq"], 1108 "Output sequence file.", 1109 filename=True, 1110 is_required=True), 1111 _Option(["-table", "table"], 1112 "Code to use")] 1113 _EmbossCommandLine.__init__(self, cmd, **kwargs)
1114 1115
1116 -class DiffseqCommandline(_EmbossCommandLine):
1117 """Commandline object for the diffseq program from EMBOSS. 1118 """
1119 - def __init__(self, cmd="diffseq", **kwargs):
1120 self.parameters = [ 1121 _Option(["-asequence", "asequence"], 1122 "First sequence to compare", 1123 filename=True, 1124 is_required=True), 1125 _Option(["-bsequence", "bsequence"], 1126 "Second sequence to compare", 1127 filename=True, 1128 is_required=True), 1129 _Option(["-wordsize", "wordsize"], 1130 "Word size to use for comparisons (10 default)", 1131 is_required=True), 1132 _Option(["-aoutfeat", "aoutfeat"], 1133 "File for output of first sequence's features", 1134 filename=True, 1135 is_required=True), 1136 _Option(["-boutfeat", "boutfeat"], 1137 "File for output of second sequence's features", 1138 filename=True, 1139 is_required=True), 1140 _Option(["-rformat", "rformat"], 1141 "Output report file format") 1142 ] 1143 _EmbossCommandLine.__init__(self, cmd, **kwargs)
1144 1145
1146 -class IepCommandline(_EmbossCommandLine):
1147 """Commandline for EMBOSS iep: calculated isoelectric point and charge. 1148 1149 Example: 1150 1151 >>> from Bio.Emboss.Applications import IepCommandline 1152 >>> iep_cline = IepCommandline(sequence="proteins.faa", 1153 ... outfile="proteins.txt") 1154 >>> print(iep_cline) 1155 iep -outfile=proteins.txt -sequence=proteins.faa 1156 1157 You would typically run the command line with iep_cline() or via the 1158 Python subprocess module, as described in the Biopython tutorial. 1159 """
1160 - def __init__(self, cmd="iep", **kwargs):
1161 self.parameters = [ 1162 _Option(["-sequence", "sequence"], 1163 "Protein sequence(s) filename", 1164 filename=True, 1165 is_required=True), 1166 _Option(["-amino", "amino"], 1167 """Number of N-termini 1168 1169 Integer 0 (default) or more. 1170 """), 1171 _Option(["-carboxyl", "carboxyl"], 1172 """Number of C-termini 1173 1174 Integer 0 (default) or more. 1175 """), 1176 _Option(["-lysinemodified", "lysinemodified"], 1177 """Number of modified lysines 1178 1179 Integer 0 (default) or more. 1180 """), 1181 _Option(["-disulphides", "disulphides"], 1182 """Number of disulphide bridges 1183 1184 Integer 0 (default) or more. 1185 """), 1186 # Should we implement the -termini switch as well? 1187 _Option(["-notermini", "notermini"], 1188 "Exclude (True) or include (False) charge at N and C terminus."), 1189 ] 1190 _EmbossCommandLine.__init__(self, cmd, **kwargs)
1191 1192 1193 # seqret uses -outseq, not -outfile, so use the base class:
1194 -class SeqretCommandline(_EmbossMinimalCommandLine):
1195 """Commandline object for the seqret program from EMBOSS. 1196 1197 This tool allows you to interconvert between different sequence file 1198 formats (e.g. GenBank to FASTA). Combining Biopython's Bio.SeqIO module 1199 with seqret using a suitable intermediate file format can allow you to 1200 read/write to an even wider range of file formats. 1201 1202 This wrapper currently only supports the core functionality, things like 1203 feature tables (in EMBOSS 6.1.0 onwards) are not yet included. 1204 """
1205 - def __init__(self, cmd="seqret", **kwargs):
1206 self.parameters = [ 1207 _Option(["-sequence", "sequence"], 1208 "Input sequence(s) filename", 1209 filename=True), 1210 _Option(["-outseq", "outseq"], 1211 "Output sequence file.", 1212 filename=True), 1213 _Option(["-sformat", "sformat"], 1214 "Input sequence(s) format (e.g. fasta, genbank)"), 1215 _Option(["-osformat", "osformat"], 1216 "Output sequence(s) format (e.g. fasta, genbank)"), 1217 ] 1218 _EmbossMinimalCommandLine.__init__(self, cmd, **kwargs)
1219
1220 - def _validate(self):
1221 # Check the outfile, filter, or stdout option has been set. 1222 # We can't simply do this via the required flag for the outfile 1223 # output - this seems the simplest solution. 1224 if not (self.outseq or self.filter or self.stdout): 1225 raise ValueError("You must either set outfile (output filename), " 1226 "or enable filter or stdout (output to stdout).") 1227 if not (self.sequence or self.filter or self.stdint): 1228 raise ValueError("You must either set sequence (input filename), " 1229 "or enable filter or stdin (input from stdin).") 1230 return _EmbossMinimalCommandLine._validate(self)
1231 1232
1233 -class SeqmatchallCommandline(_EmbossCommandLine):
1234 """ Commandline object for the seqmatchall program from EMBOSS 1235 1236 e.g. 1237 >>> cline = SeqmatchallCommandline(sequence="opuntia.fasta", outfile="opuntia.txt") 1238 >>> cline.auto = True 1239 >>> cline.wordsize = 18 1240 >>> cline.aformat = "pair" 1241 >>> print(cline) 1242 seqmatchall -auto -outfile=opuntia.txt -sequence=opuntia.fasta -wordsize=18 -aformat=pair 1243 1244 """
1245 - def __init__(self, cmd="seqmatchall", **kwargs):
1246 self.parameters = [ 1247 _Option(["-sequence", "sequence"], 1248 "Readable set of sequences", 1249 filename=True, 1250 is_required=True), 1251 _Option(["-wordsize", "wordsize"], 1252 "Word size (Integer 2 or more, default 4)"), 1253 _Option(["-aformat", "aformat"], 1254 "Display output in a different specified output format"), 1255 ] 1256 _EmbossCommandLine.__init__(self, cmd, **kwargs)
1257 1258
1259 -def _test():
1260 """Run the Bio.Emboss.Applications module doctests.""" 1261 import doctest 1262 doctest.testmod()
1263 1264 if __name__ == "__main__": 1265 # Run the doctests 1266 _test() 1267