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