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   
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 442 """Library file of seqs to avoid internal oligo hybridisation (OBSOLETE). 443 444 Option replaced in EMBOSS 6.1.0 by -mishyblibraryfile 445 """), 446 _Option(["-mishyblibraryfile", "mishyblibraryfile"], 447 """Library file of seqs to avoid internal oligo hybridisation. 448 449 Option added in EMBOSS 6.1.0, replacing -oligomishyblibraryfile 450 """), 451 _Option(["-explainflag", "explainflag"], 452 "Produce output tags with eprimer3 statistics"), 453 ] 454 _EmbossCommandLine.__init__(self, cmd, **kwargs)
455 456
457 -class PrimerSearchCommandline(_EmbossCommandLine):
458 """Commandline object for the primersearch program from EMBOSS. 459 """
460 - def __init__(self, cmd="primersearch", **kwargs):
461 self.parameters = [ 462 _Option(["-seqall", "-sequences", "sequences", "seqall"], 463 "Sequence to look for the primer pairs in.", 464 is_required=True), 465 #When this wrapper was written primersearch used -sequences 466 #as the argument name. Since at least EMBOSS 5.0 (and 467 #perhaps earlier) this has been -seqall instead. 468 _Option(["-infile", "-primers", "primers", "infile"], 469 "File containing the primer pairs to search for.", 470 filename=True, 471 is_required=True), 472 #When this wrapper was written primersearch used -primers 473 #as the argument name. Since at least EMBOSS 5.0 (and 474 #perhaps earlier) this has been -infile instead. 475 _Option(["-mismatchpercent", "mismatchpercent"], 476 "Allowed percentage mismatch (any integer value, default 0).", 477 is_required=True), 478 _Option(["-snucleotide", "snucleotide"], 479 "Sequences are nucleotide (boolean)"), 480 _Option(["-sprotein", "sprotein"], 481 "Sequences are protein (boolean)"), 482 ] 483 _EmbossCommandLine.__init__(self, cmd, **kwargs)
484 485
486 -class FDNADistCommandline(_EmbossCommandLine):
487 """Commandline object for the fdnadist program from EMBOSS. 488 489 fdnadist is an EMBOSS wrapper for the PHYLIP program dnadist for 490 calulating distance matrices from DNA sequence files. 491 """
492 - def __init__(self, cmd = "fdnadist", **kwargs):
493 self.parameters = [ 494 _Option(["-sequence", "sequence"], 495 "seq file to use (phylip)", 496 filename=True, 497 is_required=True), 498 _Option(["-method", "method"], 499 "sub. model [f,k,j,l,s]", 500 is_required=True), 501 _Option(["-gamma", "gamma"], 502 "gamma [g, i,n]"), 503 _Option(["-ncategories", "ncategories"], 504 "number of rate catergories (1-9)"), 505 _Option(["-rate", "rate"], 506 "rate for each category"), 507 _Option(["-categories", "categories"], 508 "File of substitution rate categories"), 509 _Option(["-weights", "weights"], 510 "weights file"), 511 _Option(["-gammacoefficient", "gammacoefficient"], 512 "value for gamma (> 0.001)"), 513 _Option(["-invarfrac", "invarfrac"], 514 "proportoin of invariant sites"), 515 _Option(["-ttratio", "ttratio"], 516 "ts/tv ratio"), 517 _Option(["-freqsfrom", "freqsfrom"], 518 "use emprical base freqs"), 519 _Option(["-basefreq", "basefreq"], 520 "specify basefreqs"), 521 _Option(["-lower", "lower"], 522 "lower triangle matrix (y/N)")] 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 _EmbossCommandLine.__init__(self, cmd, **kwargs)
549 550
551 -class FNeighborCommandline(_EmbossCommandLine):
552 """Commandline object for the fneighbor program from EMBOSS. 553 554 fneighbor is an EMBOSS wrapper for the PHYLIP program neighbor used for 555 calulating neighbor-joining or UPGMA trees from distance matrices. 556 """
557 - def __init__(self, cmd = "fneighbor", **kwargs):
558 self.parameters = [ 559 _Option(["-datafile", "datafile"], 560 "dist file to use (phylip)", 561 filename=True, 562 is_required=True), 563 _Option(["-matrixtype", "matrixtype"], 564 "is martrix [S]quare pr [u]pper or [l]ower"), 565 _Option(["-treetype", "treetype"], 566 "nj or UPGMA tree (n/u)"), 567 _Option(["-outgrno", "outgrno" ], 568 "taxon to use as OG"), 569 _Option(["-jumble", "jumble"], 570 "randommise input order (Y/n)"), 571 _Option(["-seed", "seed"], 572 "provide a random seed"), 573 _Option(["-trout", "trout"], 574 "write tree (Y/n)"), 575 _Option(["-outtreefile", "outtreefile"], 576 "filename for output tree"), 577 _Option(["-progress", "progress"], 578 "print progress (Y/n)"), 579 _Option(["-treeprint", "treeprint"], 580 "print tree (Y/n)")] 581 _EmbossCommandLine.__init__(self, cmd, **kwargs)
582 583
584 -class FSeqBootCommandline(_EmbossCommandLine):
585 """Commandline object for the fseqboot program from EMBOSS. 586 587 fseqboot is an EMBOSS wrapper for the PHYLIP program seqboot used to 588 pseudo-sample alignment files. 589 """
590 - def __init__(self, cmd = "fseqboot", **kwargs):
591 self.parameters = [ 592 _Option(["-sequence", "sequence"], 593 "seq file to sample (phylip)", 594 filename=True, 595 is_required=True), 596 _Option(["-categories", "catergories"], 597 "file of input categories"), 598 _Option(["-weights", "weights"], 599 " weights file"), 600 _Option(["-test", "test"], 601 "specify operation, default is bootstrap"), 602 _Option(["-regular", "regular"], 603 "absolute number to resample"), 604 _Option(["-fracsample", "fracsample"], 605 "fraction to resample"), 606 _Option(["-rewriteformat", "rewriteformat"], 607 "output format ([P]hyilp, [n]exus, [x]ml"), 608 _Option(["-seqtype", "seqtype"], 609 "output format ([D]na, [p]rotein, [r]na"), 610 _Option(["-blocksize", "blocksize"], 611 "print progress (Y/n)"), 612 _Option(["-reps", "reps"], 613 "how many replicates, defaults to 100)"), 614 _Option(["-justweights", "jusweights"], 615 "what to write out [D]atasets of just [w]eights"), 616 _Option(["-seed", "seed"], 617 "specify random seed"), 618 _Option(["-dotdiff", "dotdiff"], 619 "Use dot-differencing? [Y/n]"),] 620 _EmbossCommandLine.__init__(self, cmd, **kwargs)
621 622
623 -class FDNAParsCommandline(_EmbossCommandLine):
624 """Commandline object for the fdnapars program from EMBOSS. 625 626 fdnapars is an EMBOSS version of the PHYLIP program dnapars, for 627 estimating trees from DNA sequences using parsiomny. Calling this command 628 without providing a value for the option "-intreefile" will invoke 629 "interactive mode" (and as a result fail if called with subprocess) if 630 "-auto" is not set to true. 631 """
632 - def __init__(self, cmd = "fdnapars", **kwargs):
633 self.parameters = [ 634 _Option(["-sequence", "sequence"], 635 "seq file to use (phylip)", 636 filename=True, 637 is_required=True), 638 _Option(["-intreefile", "intreefile"], 639 "Phylip tree file"), 640 _Option(["-weights", "weights"], 641 "weights file"), 642 _Option(["-maxtrees", "maxtrees"], 643 "max trees to save during run"), 644 _Option(["-thorough", "thorough"], 645 "more thorough search (Y/n)"), 646 _Option(["-rearrange", "rearrange"], 647 "Rearrange on jsut 1 best tree (Y/n)"), 648 _Option(["-transversion", "transversion"], 649 "Use tranversion parsimony (y/N)"), 650 _Option(["-njumble", "njumble"], 651 "number of times to randomise input order (default is 0)"), 652 _Option(["-seed", "seed"], 653 "provide random seed"), 654 _Option(["-outgrno", "outgrno"], 655 "Specify outgroup"), 656 _Option(["-thresh", "thresh"], 657 "Use threshold parsimony (y/N)"), 658 _Option(["-threshold", "threshold"], 659 "Threshold value"), 660 _Option(["-trout", "trout"], 661 "Write trees to file (Y/n)"), 662 _Option(["-outtreefile", "outtreefile"], 663 "filename for output tree"), 664 _Option(["-dotdiff", "dotdiff"], 665 "Use dot-differencing? [Y/n]")] 666 _EmbossCommandLine.__init__(self, cmd, **kwargs)
667 668
669 -class FProtParsCommandline(_EmbossCommandLine):
670 """Commandline object for the fdnapars program from EMBOSS. 671 672 fprotpars is an EMBOSS version of the PHYLIP program protpars, for 673 estimating trees from protein sequences using parsiomny. Calling this 674 command without providing a value for the option "-intreefile" will invoke 675 "interactive mode" (and as a result fail if called with subprocess) if 676 "-auto" is not set to true. 677 """
678 - def __init__(self, cmd = "fprotpars", **kwargs):
679 self.parameters = [ 680 _Option(["-sequence", "sequence"], 681 "seq file to use (phylip)", 682 filename=True, 683 is_required=True), 684 _Option(["-intreefile", "intreefile"], 685 "Phylip tree file to score"), 686 _Option(["-outtreefile", "outtreefile"], 687 "phylip tree output file", 688 filename=True, 689 is_required=True), 690 _Option(["-weights", "weights"], 691 "weights file"), 692 _Option(["-whichcode", "whichcode"], 693 "which genetic code, [U,M,V,F,Y]]"), 694 _Option(["-njumble", "njumble"], 695 "number of times to randomise input order (default is 0)"), 696 _Option(["-seed", "seed"], 697 "provide random seed"), 698 _Option(["-outgrno", "outgrno"], 699 "Specify outgroup"), 700 _Option(["-thresh", "thresh"], 701 "Use threshold parsimony (y/N)"), 702 _Option(["-threshold", "threshold"], 703 "Threshold value"), 704 _Option(["-trout", "trout"], 705 "Write trees to file (Y/n)"), 706 _Option(["-dotdiff", "dotdiff"], 707 "Use dot-differencing? [Y/n]")] 708 _EmbossCommandLine.__init__(self, cmd, **kwargs)
709 710
711 -class FProtDistCommandline(_EmbossCommandLine):
712 """Commandline object for the fprotdist program from EMBOSS. 713 714 fprotdist is an EMBOSS wrapper for the PHYLIP program protdist used to 715 estimate trees from protein sequences using parsimony 716 """
717 - def __init__(self, cmd = "fprotdist", **kwargs):
718 self.parameters = [ 719 _Option(["-sequence", "sequence"], 720 "seq file to use (phylip)", 721 filename=True, 722 is_required=True), 723 _Option(["-ncategories", "ncategories"], 724 "number of rate catergories (1-9)"), 725 _Option(["-rate", "rate"], 726 "rate for each category"), 727 _Option(["-catergories", "catergories"], 728 "file of rates"), 729 _Option(["-weights", "weights"], 730 "weights file"), 731 _Option(["-method", "method"], 732 "sub. model [j,h,d,k,s,c]"), 733 _Option(["-gamma", "gamma"], 734 "gamma [g, i,c]"), 735 _Option(["-gammacoefficient", "gammacoefficient"], 736 "value for gamma (> 0.001)"), 737 _Option(["-invarcoefficient", "invarcoefficient"], 738 "float for variation of substitution rate among sites"), 739 _Option(["-aacateg", "aacateg"], 740 "Choose the category to use [G,C,H]"), 741 _Option(["-whichcode", "whichcode"], 742 "genetic code [c,m,v,f,y]"), 743 _Option(["-ease", "ease"], 744 "Pob change catergory (float between -0 and 1)"), 745 _Option(["-ttratio", "ttratio"], 746 "Transition/transversion ratio (0-1)"), 747 _Option(["-basefreq", "basefreq"], 748 "DNA base frequencies (space separated list)")] 749 _EmbossCommandLine.__init__(self, cmd, **kwargs)
750 751
752 -class FConsenseCommandline(_EmbossCommandLine):
753 """Commandline object for the fconsense program from EMBOSS. 754 755 fconsense is an EMBOSS wrapper for the PHYLIP program consense used to 756 calculate consensus trees. 757 """
758 - def __init__(self, cmd = "fconsense", **kwargs):
759 self.parameters = [ 760 _Option(["-intreefile", "intreefile"], 761 "file with phylip trees to make consensus from", 762 filename=True, 763 is_required=True), 764 _Option(["-method", "method"], 765 "consensus method [s, mr, MRE, ml]"), 766 _Option(["-mlfrac", "mlfrac"], 767 "cut-off freq for a branch to appear in consensus (0.5-1.0)"), 768 _Option(["-root", "root"], 769 "treat trees as rooted (YES, no)"), 770 _Option(["-outgrno", "outgrno"], 771 "OTU to use as outgroup (starts from 0)"), 772 _Option(["-trout", "trout"], 773 "treat trees as rooted (YES, no)"), 774 _Option(["-outtreefile", "outtreefile"], 775 "Phylip tree output file (optional)")] 776 _EmbossCommandLine.__init__(self, cmd, **kwargs)
777 778
779 -class WaterCommandline(_EmbossCommandLine):
780 """Commandline object for the water program from EMBOSS. 781 """
782 - def __init__(self, cmd="water", **kwargs):
783 self.parameters = [ 784 _Option(["-asequence", "asequence"], 785 "First sequence to align", 786 filename=True, 787 is_required=True), 788 _Option(["-bsequence", "bsequence"], 789 "Second sequence to align", 790 filename=True, 791 is_required=True), 792 _Option(["-gapopen", "gapopen"], 793 "Gap open penalty", 794 is_required=True), 795 _Option(["-gapextend", "gapextend"], 796 "Gap extension penalty", 797 is_required=True), 798 _Option(["-datafile", "datafile"], 799 "Matrix file", 800 filename=True), 801 _Switch(["-nobrief", "nobrief"], 802 "Display extended identity and similarity"), 803 _Switch(["-brief", "brief"], 804 "Display brief identity and similarity"), 805 _Option(["-similarity", "similarity"], 806 "Display percent identity and similarity"), 807 _Option(["-snucleotide", "snucleotide"], 808 "Sequences are nucleotide (boolean)"), 809 _Option(["-sprotein", "sprotein"], 810 "Sequences are protein (boolean)"), 811 _Option(["-aformat", "aformat"], 812 "Display output in a different specified output format")] 813 _EmbossCommandLine.__init__(self, cmd, **kwargs)
814 815
816 -class NeedleCommandline(_EmbossCommandLine):
817 """Commandline object for the needle program from EMBOSS. 818 """
819 - def __init__(self, cmd="needle", **kwargs):
820 self.parameters = [ 821 _Option(["-asequence", "asequence"], 822 "First sequence to align", 823 filename=True, 824 is_required=True), 825 _Option(["-bsequence", "bsequence"], 826 "Second sequence to align", 827 filename=True, 828 is_required=True), 829 _Option(["-gapopen", "gapopen"], 830 "Gap open penalty", 831 is_required=True), 832 _Option(["-gapextend", "gapextend"], 833 "Gap extension penalty", 834 is_required=True), 835 _Option(["-datafile", "datafile"], 836 "Matrix file", 837 filename=True), 838 _Option(["-endweight", "endweight"], 839 "Apply And gap penalties"), 840 _Option(["-endopen", "endopen"], 841 "The score taken away when an end gap is created."), 842 _Option(["-endextend", "endextend"], 843 "The score added to the end gap penality for each base or " 844 "residue in the end gap."), 845 _Switch(["-nobrief", "nobrief"], 846 "Display extended identity and similarity"), 847 _Switch(["-brief", "brief"], 848 "Display brief identity and similarity"), 849 _Option(["-similarity", "similarity"], 850 "Display percent identity and similarity"), 851 _Option(["-snucleotide", "snucleotide"], 852 "Sequences are nucleotide (boolean)"), 853 _Option(["-sprotein", "sprotein"], 854 "Sequences are protein (boolean)"), 855 _Option(["-aformat", "aformat"], 856 "Display output in a different specified output format")] 857 _EmbossCommandLine.__init__(self, cmd, **kwargs)
858 859
860 -class NeedleallCommandline(_EmbossCommandLine):
861 """Commandline object for the needleall program from EMBOSS. 862 """
863 - def __init__(self, cmd="needleall", **kwargs):
864 self.parameters = [ 865 _Option(["-asequence", "asequence"], 866 "First sequence to align", 867 filename=True, 868 is_required=True), 869 _Option(["-bsequence", "bsequence"], 870 "Second sequence to align", 871 filename=True, 872 is_required=True), 873 _Option(["-gapopen", "gapopen"], 874 "Gap open penalty", 875 is_required=True), 876 _Option(["-gapextend", "gapextend"], 877 "Gap extension penalty", 878 is_required=True), 879 _Option(["-datafile", "datafile"], 880 "Matrix file", 881 filename=True), 882 _Option(["-minscore", "minscore"], 883 "Exclude alignments with scores below this threshold score."), 884 _Option(["-errorfile", "errorfile"], 885 "Error file to be written to."), 886 _Option(["-endweight", "endweight"], 887 "Apply And gap penalties"), 888 _Option(["-endopen", "endopen"], 889 "The score taken away when an end gap is created."), 890 _Option(["-endextend", "endextend"], 891 "The score added to the end gap penality for each base or " 892 "residue in the end gap."), 893 _Switch(["-nobrief", "nobrief"], 894 "Display extended identity and similarity"), 895 _Switch(["-brief", "brief"], 896 "Display brief identity and similarity"), 897 _Option(["-similarity", "similarity"], 898 "Display percent identity and similarity"), 899 _Option(["-snucleotide", "snucleotide"], 900 "Sequences are nucleotide (boolean)"), 901 _Option(["-sprotein", "sprotein"], 902 "Sequences are protein (boolean)"), 903 _Option(["-aformat", "aformat"], 904 "Display output in a different specified output format")] 905 _EmbossCommandLine.__init__(self, cmd, **kwargs)
906 907
908 -class StretcherCommandline(_EmbossCommandLine):
909 """Commandline object for the stretcher program from EMBOSS. 910 """
911 - def __init__(self, cmd="stretcher", **kwargs):
912 self.parameters = [ 913 _Option(["-asequence", "asequence"], 914 "First sequence to align", 915 filename=True, 916 is_required=True), 917 _Option(["-bsequence", "bsequence"], 918 "Second sequence to align", 919 filename=True, 920 is_required=True), 921 _Option(["-gapopen", "gapopen"], 922 "Gap open penalty", 923 is_required=True, 924 checker_function=lambda value: isinstance(value, int)), 925 _Option(["-gapextend", "gapextend"], 926 "Gap extension penalty", 927 is_required=True, 928 checker_function=lambda value: isinstance(value, int)), 929 _Option(["-datafile", "datafile"], 930 "Matrix file", 931 filename=True), 932 _Option(["-snucleotide", "snucleotide"], 933 "Sequences are nucleotide (boolean)"), 934 _Option(["-sprotein", "sprotein"], 935 "Sequences are protein (boolean)"), 936 _Option(["-aformat", "aformat"], 937 "Display output in a different specified output format")] 938 _EmbossCommandLine.__init__(self, cmd, **kwargs)
939 940
941 -class FuzznucCommandline(_EmbossCommandLine):
942 """Commandline object for the fuzznuc program from EMBOSS. 943 """
944 - def __init__(self, cmd="fuzznuc", **kwargs):
945 self.parameters = [ 946 _Option(["-sequence", "sequence"], 947 "Sequence database USA", 948 is_required=True), 949 _Option(["-pattern", "pattern"], 950 "Search pattern, using standard IUPAC one-letter codes", 951 is_required=True), 952 _Option(["-mismatch", "mismatch"], 953 "Number of mismatches", 954 is_required=True), 955 _Option(["-complement", "complement"], 956 "Search complementary strand"), 957 _Option(["-rformat", "rformat"], 958 "Specify the report format to output in.")] 959 _EmbossCommandLine.__init__(self, cmd, **kwargs)
960 961
962 -class Est2GenomeCommandline(_EmbossCommandLine):
963 """Commandline object for the est2genome program from EMBOSS. 964 """
965 - def __init__(self, cmd="est2genome", **kwargs):
966 self.parameters = [ 967 _Option(["-est", "est"], 968 "EST sequence(s)", 969 is_required=True), 970 _Option(["-genome", "genome"], 971 "Genomic sequence", 972 is_required=True), 973 _Option(["-match", "match"], 974 "Score for matching two bases"), 975 _Option(["-mismatch", "mismatch"], 976 "Cost for mismatching two bases"), 977 _Option(["-gappenalty", "gappenalty"], 978 "Cost for deleting a single base in either sequence, " 979 "excluding introns"), 980 _Option(["-intronpenalty", "intronpenalty"], 981 "Cost for an intron, independent of length."), 982 _Option(["-splicepenalty", "splicepenalty"], 983 "Cost for an intron, independent of length " 984 "and starting/ending on donor-acceptor sites"), 985 _Option(["-minscore", "minscore"], 986 "Exclude alignments with scores below this threshold score."), 987 _Option(["-reverse", "reverse"], 988 "Reverse the orientation of the EST sequence"), 989 _Option(["-splice", "splice"], 990 "Use donor and acceptor splice sites."), 991 _Option(["-mode", "mode"], 992 "This determines the comparion mode. 'both', 'forward' " 993 "'reverse'"), 994 _Option(["-best", "best"], 995 "You can print out all comparisons instead of just the best"), 996 _Option(["-space", "space"], 997 "for linear-space recursion."), 998 _Option(["-shuffle", "shuffle"], 999 "Shuffle"), 1000 _Option(["-seed", "seed"], 1001 "Random number seed"), 1002 _Option(["-align", "align"], 1003 "Show the alignment."), 1004 _Option(["-width", "width"], 1005 "Alignment width") 1006 ] 1007 _EmbossCommandLine.__init__(self, cmd, **kwargs)
1008 1009
1010 -class ETandemCommandline(_EmbossCommandLine):
1011 """Commandline object for the etandem program from EMBOSS. 1012 """
1013 - def __init__(self, cmd="etandem", **kwargs):
1014 self.parameters = [ 1015 _Option(["-sequence", "sequence"], 1016 "Sequence", 1017 filename=True, 1018 is_required=True), 1019 _Option(["-minrepeat", "minrepeat"], 1020 "Minimum repeat size", 1021 is_required=True), 1022 _Option(["-maxrepeat", "maxrepeat"], 1023 "Maximum repeat size", 1024 is_required=True), 1025 _Option(["-threshold", "threshold"], 1026 "Threshold score"), 1027 _Option(["-mismatch", "mismatch"], 1028 "Allow N as a mismatch"), 1029 _Option(["-uniform", "uniform"], 1030 "Allow uniform consensus"), 1031 _Option(["-rformat", "rformat"], 1032 "Output report format")] 1033 _EmbossCommandLine.__init__(self, cmd, **kwargs)
1034 1035
1036 -class EInvertedCommandline(_EmbossCommandLine):
1037 """Commandline object for the einverted program from EMBOSS. 1038 """
1039 - def __init__(self, cmd="einverted", **kwargs):
1040 self.parameters = [ 1041 _Option(["-sequence", "sequence"], 1042 "Sequence", 1043 filename=True, 1044 is_required=True), 1045 _Option(["-gap", "gap"], 1046 "Gap penalty", 1047 filename=True, 1048 is_required=True), 1049 _Option(["-threshold", "threshold"], 1050 "Minimum score threshold", 1051 is_required=True), 1052 _Option(["-match", "match"], 1053 "Match score", 1054 is_required=True), 1055 _Option(["-mismatch", "mismatch"], 1056 "Mismatch score", 1057 is_required=True), 1058 _Option(["-maxrepeat", "maxrepeat"], 1059 "Maximum separation between the start and end of repeat"), 1060 ] 1061 _EmbossCommandLine.__init__(self, cmd, **kwargs)
1062 1063
1064 -class PalindromeCommandline(_EmbossCommandLine):
1065 """Commandline object for the palindrome program from EMBOSS. 1066 """
1067 - def __init__(self, cmd="palindrome", **kwargs):
1068 self.parameters = [ 1069 _Option(["-sequence", "sequence"], 1070 "Sequence", 1071 filename=True, 1072 is_required=True), 1073 _Option(["-minpallen", "minpallen"], 1074 "Minimum palindrome length", 1075 is_required=True), 1076 _Option(["-maxpallen", "maxpallen"], 1077 "Maximum palindrome length", 1078 is_required=True), 1079 _Option(["-gaplimit", "gaplimit"], 1080 "Maximum gap between repeats", 1081 is_required=True), 1082 _Option(["-nummismatches", "nummismatches"], 1083 "Number of mismatches allowed", 1084 is_required=True), 1085 _Option(["-overlap", "overlap"], 1086 "Report overlapping matches", 1087 is_required=True), 1088 ] 1089 _EmbossCommandLine.__init__(self, cmd, **kwargs)
1090 1091
1092 -class TranalignCommandline(_EmbossCommandLine):
1093 """Commandline object for the tranalign program from EMBOSS. 1094 """
1095 - def __init__(self, cmd="tranalign", **kwargs):
1096 self.parameters = [ 1097 _Option(["-asequence", "asequence"], 1098 "Nucleotide sequences to be aligned.", 1099 filename=True, 1100 is_required=True), 1101 _Option(["-bsequence", "bsequence"], 1102 "Protein sequence alignment", 1103 filename=True, 1104 is_required=True), 1105 _Option(["-outseq", "outseq"], 1106 "Output sequence file.", 1107 filename=True, 1108 is_required=True), 1109 _Option(["-table", "table"], 1110 "Code to use")] 1111 _EmbossCommandLine.__init__(self, cmd, **kwargs)
1112 1113
1114 -class DiffseqCommandline(_EmbossCommandLine):
1115 """Commandline object for the diffseq program from EMBOSS. 1116 """
1117 - def __init__(self, cmd="diffseq", **kwargs):
1118 self.parameters = [ 1119 _Option(["-asequence", "asequence"], 1120 "First sequence to compare", 1121 filename=True, 1122 is_required=True), 1123 _Option(["-bsequence", "bsequence"], 1124 "Second sequence to compare", 1125 filename=True, 1126 is_required=True), 1127 _Option(["-wordsize", "wordsize"], 1128 "Word size to use for comparisons (10 default)", 1129 is_required=True), 1130 _Option(["-aoutfeat", "aoutfeat"], 1131 "File for output of first sequence's features", 1132 filename=True, 1133 is_required=True), 1134 _Option(["-boutfeat", "boutfeat"], 1135 "File for output of second sequence's features", 1136 filename=True, 1137 is_required=True), 1138 _Option(["-rformat", "rformat"], 1139 "Output report file format") 1140 ] 1141 _EmbossCommandLine.__init__(self, cmd, **kwargs)
1142 1143
1144 -class IepCommandline(_EmbossCommandLine):
1145 """Commandline for EMBOSS iep: calculated isoelectric point and charge. 1146 1147 Example: 1148 1149 >>> from Bio.Emboss.Applications import IepCommandline 1150 >>> iep_cline = IepCommandline(sequence="proteins.faa", 1151 ... outfile="proteins.txt") 1152 >>> print(iep_cline) 1153 iep -outfile=proteins.txt -sequence=proteins.faa 1154 1155 You would typically run the command line with iep_cline() or via the 1156 Python subprocess module, as described in the Biopython tutorial. 1157 """
1158 - def __init__(self, cmd="iep", **kwargs):
1159 self.parameters = [ 1160 _Option(["-sequence", "sequence"], 1161 "Protein sequence(s) filename", 1162 filename=True, 1163 is_required=True), 1164 _Option(["-amino", "amino"], 1165 """Number of N-termini 1166 1167 Integer 0 (default) or more. 1168 """), 1169 _Option(["-carboxyl", "carboxyl"], 1170 """Number of C-termini 1171 1172 Integer 0 (default) or more. 1173 """), 1174 _Option(["-lysinemodified", "lysinemodified"], 1175 """Number of modified lysines 1176 1177 Integer 0 (default) or more. 1178 """), 1179 _Option(["-disulphides", "disulphides"], 1180 """Number of disulphide bridges 1181 1182 Integer 0 (default) or more. 1183 """), 1184 #Should we implement the -termini switch as well? 1185 _Option(["-notermini", "notermini"], 1186 "Exclude (True) or include (False) charge at N and C terminus."), 1187 ] 1188 _EmbossCommandLine.__init__(self, cmd, **kwargs)
1189 1190 1191 #seqret uses -outseq, not -outfile, so use the base class:
1192 -class SeqretCommandline(_EmbossMinimalCommandLine):
1193 """Commandline object for the seqret program from EMBOSS. 1194 1195 This tool allows you to interconvert between different sequence file 1196 formats (e.g. GenBank to FASTA). Combining Biopython's Bio.SeqIO module 1197 with seqret using a suitable intermediate file format can allow you to 1198 read/write to an even wider range of file formats. 1199 1200 This wrapper currently only supports the core functionality, things like 1201 feature tables (in EMBOSS 6.1.0 onwards) are not yet included. 1202 """
1203 - def __init__(self, cmd="seqret", **kwargs):
1204 self.parameters = [ 1205 _Option(["-sequence", "sequence"], 1206 "Input sequence(s) filename", 1207 filename=True), 1208 _Option(["-outseq", "outseq"], 1209 "Output sequence file.", 1210 filename=True), 1211 _Option(["-sformat", "sformat"], 1212 "Input sequence(s) format (e.g. fasta, genbank)"), 1213 _Option(["-osformat", "osformat"], 1214 "Output sequence(s) format (e.g. fasta, genbank)"), 1215 ] 1216 _EmbossMinimalCommandLine.__init__(self, cmd, **kwargs)
1217
1218 - def _validate(self):
1219 #Check the outfile, filter, or stdout option has been set. 1220 #We can't simply do this via the required flag for the outfile 1221 #output - this seems the simplest solution. 1222 if not (self.outseq or self.filter or self.stdout): 1223 raise ValueError("You must either set outfile (output filename), " 1224 "or enable filter or stdout (output to stdout).") 1225 if not (self.sequence or self.filter or self.stdint): 1226 raise ValueError("You must either set sequence (input filename), " 1227 "or enable filter or stdin (input from stdin).") 1228 return _EmbossMinimalCommandLine._validate(self)
1229 1230
1231 -class SeqmatchallCommandline(_EmbossCommandLine):
1232 """ Commandline object for the seqmatchall program from EMBOSS 1233 1234 e.g. 1235 >>> cline = SeqmatchallCommandline(sequence="opuntia.fasta", outfile="opuntia.txt") 1236 >>> cline.auto = True 1237 >>> cline.wordsize = 18 1238 >>> cline.aformat = "pair" 1239 >>> print(cline) 1240 seqmatchall -auto -outfile=opuntia.txt -sequence=opuntia.fasta -wordsize=18 -aformat=pair 1241 1242 """
1243 - def __init__(self, cmd="seqmatchall", **kwargs):
1244 self.parameters = [ 1245 _Option(["-sequence", "sequence"], 1246 "Readable set of sequences", 1247 filename=True, 1248 is_required=True), 1249 _Option(["-wordsize", "wordsize"], 1250 "Word size (Integer 2 or more, default 4)"), 1251 _Option(["-aformat", "aformat"], 1252 "Display output in a different specified output format"), 1253 ] 1254 _EmbossCommandLine.__init__(self, cmd, **kwargs)
1255 1256
1257 -def _test():
1258 """Run the Bio.Emboss.Applications module doctests.""" 1259 import doctest 1260 doctest.testmod()
1261 1262 if __name__ == "__main__": 1263 #Run the doctests 1264 _test() 1265