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