
    Xf                     R   d Z ddlmZ ddlmZ ddlmZ  G d de          Z G d de          Z G d	 d
e          Z G d de          Z G d de          Z	 G d de          Z
 G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d d e          Z G d! d"e          Z G d# d$e          Z G d% d&e          Z G d' d(e          Z G d) d*e          Z G d+ d,e          Z G d- d.e          Z G d/ d0e          Z G d1 d2e          Z G d3 d4e          Z G d5 d6e          Z G d7 d8e          Z G d9 d:e          Ze d;k    rdd<l!m"Z"  e"             d=S d=S )>a#  Code to interact with and run various EMBOSS programs (OBSOLETE).

These classes follow the AbstractCommandline interfaces for running
programs.

We have decided to remove this module in future, and instead recommend
building your command and invoking it via the subprocess module directly.
    )_Option)_Switch)AbstractCommandlinec                       e Zd ZdZddZdS )_EmbossMinimalCommandLinea  Base Commandline object for EMBOSS wrappers (PRIVATE).

    This is provided for subclassing, it deals with shared options
    common to all the EMBOSS tools:

    Attributes:
     - auto               Turn off prompts
     - stdout             Write standard output
     - filter             Read standard input, write standard output
     - options            Prompt for standard and additional values
     - debug              Write debug output to program.dbg
     - verbose            Report some/full command line options
     - help               Report command line options. More
                          information on associated and general
                          qualifiers can be found with -help -verbose
     - warning            Report warnings
     - error              Report errors
     - fatal              Report fatal errors
     - die                Report dying program messages

    Nc                    |J t          ddgd          t          ddgd          t          ddgd	          t          d
dgd          t          ddgd          t          ddgd          t          ddgd          t          ddgd          t          ddgd          t          ddgd          g
}	 || j        z   | _        n# t          $ r
 || _        Y nw xY wt          j        | |fi | d S )Nz-autoautozTurn off prompts.

Automatic mode disables prompting, so we recommend you set this argument all the time when calling an EMBOSS tool from Biopython.z-stdoutstdoutzWrite standard output.z-filterfilterz+Read standard input, write standard output.z-optionsoptionszPrompt for standard and additional values.

If you are calling an EMBOSS tool from within Biopython, we DO NOT recommend using this option.z-debugdebugz"Write debug output to program.dbg.z-verboseverbosez%Report some/full command line optionsz-helphelpztReport command line options.

More information on associated and general qualifiers can be found with -help -verbosez-warningwarningzReport warnings.z-errorerrorzReport errors.z-diediezReport dying program messages.)r   
parametersAttributeErrorr   __init__selfcmdkwargsextra_parameterss       7lib/python3.11/site-packages/Bio/Emboss/Applications.pyr   z"_EmbossMinimalCommandLine.__init__/   sS   &!T  Y)+CDDH%'T  Y'9  Xw')MNNZ+-TUU&!3  Z+-?@@Xw')9::VUO%EFF7
:	/ /@DOO 	/ 	/ 	/.DOOO	/ 	$T399&99999s   2C CCN__name__
__module____qualname____doc__r        r   r   r      s2         ,&: &: &: &: &: &:r#   r   c                        e Zd ZdZddZd ZdS )_EmbossCommandLinezBase Commandline object for EMBOSS wrappers (PRIVATE).

    This is provided for subclassing, it deals with shared options
    common to all the EMBOSS tools plus:

     - outfile            Output filename

    Nc                     |J t          ddgdd          g}	 || j        z   | _        n# t          $ r
 || _        Y nw xY wt          j        | |fi | d S )Nz-outfileoutfilezOutput filenameTfilename)r   r   r   r   r   r   s       r   r   z_EmbossCommandLine.__init__b   s    Z+->NNN
	/ /@DOO 	/ 	/ 	/.DOOO	/ 	"*4???????s   + ??c                 ~    | j         s| j        s| j        st          d          t                              |           S )N]You must either set outfile (output filename), or enable filter or stdout (output to stdout).)r'   r   r
   
ValueErrorr   	_validater   s    r   r-   z_EmbossCommandLine._validatep   sN      	 	t{ 	A   )224888r#   r   r   r   r    r!   r   r-   r"   r#   r   r%   r%   X   sE         @ @ @ @	9 	9 	9 	9 	9r#   r%   c                       e Zd ZdZddZdS )Primer3Commandlinea  Commandline object for the Primer3 interface from EMBOSS.

    The precise set of supported arguments depends on your version of EMBOSS.
    This version accepts arguments current at EMBOSS 6.1.0:

    >>> cline = Primer3Commandline(sequence="mysequence.fas", auto=True, hybridprobe=True)
    >>> cline.explainflag = True
    >>> cline.osizeopt=20
    >>> cline.psizeopt=200
    >>> cline.outfile = "myresults.out"
    >>> cline.bogusparameter = 1967  # Invalid parameter
    Traceback (most recent call last):
        ...
    ValueError: Option name bogusparameter was not found.
    >>> print(cline)
    eprimer3 -auto -outfile=myresults.out -sequence=mysequence.fas -hybridprobe=True -psizeopt=200 -osizeopt=20 -explainflag=True

    eprimer3c                 F   g t          ddgdd          t          ddgd          t          d	d
gd          t          ddgd          t          ddgd          t          ddgd          t          ddgd          t          ddgd          t          ddgd          t          ddgd           t          d!d"gd#          t          d$d%gd&          t          d'd(gd)          t          d*d+gd,          t          d-d.gd/          t          d0d1gd2          t          d3d4gd5          t          d6d7gd8          t          d9d:gd;          t          d<d=gd>          t          d?d@gdA          t          dBdCgdD          t          dEdFgdG          t          dHdIgdJ          t          dKdLgdM          t          dNdOgdP          t          dQdRgdS          t          dTdUgdV          t          dWdXgdY          t          dZd[gd\          t          d]d^gd_          t          d`dagdb          t          dcddgde          t          dfdggdh          t          didjgdk          t          dldmgdn          t          dodpgdq          t          drdsgdt          t          dudvgdw          t          dxdygdz          t          d{d|gd}          t          d~dgd          t          ddgd          t          ddgd          t          ddgd          t          ddgd          t          ddgd          t          ddgd          t          ddgd          t          ddgd          | _        t          j        | |fi | dS )Initialize the class.	-sequencesequencez Sequence to choose primers from.Tis_requiredz-tasktaskz#Tell eprimer3 what task to perform.z-hybridprobehybridprobez-Find an internal oligo to use as a hyb probe.z
-numreturn	numreturnz)Maximum number of primer pairs to return.z-includedregionincludedregionz3Subregion of the sequence in which to pick primers.z-targettargetz(Sequence to target for flanking primers.z-excludedregionexcludedregionz'Regions to exclude from primer picking.z-forwardinputforwardinputz&Sequence of a forward primer to check.z-reverseinputreverseinputz&Sequence of a reverse primer to check.z-gcclampgcclampz:The required number of Gs and Cs at the 3' of each primer.z-osizeosizez!Optimum length of a primer oligo.z-minsizeminsizez!Minimum length of a primer oligo.z-maxsizemaxsizez!Maximum length of a primer oligo.z-otmotmz[Melting temperature for primer oligo (OBSOLETE).

Option replaced in EMBOSS 6.6.0 by -opttmz-opttmopttmz]Optimum melting temperature for a primer oligo.

Option added in EMBOSS 6.6.0, replacing -otmz-mintmmintmz/Minimum melting temperature for a primer oligo.z-maxtmmaxtmz/Maximum melting temperature for a primer oligo.z
-maxdifftm	maxdifftmzOMaximum difference in melting temperatures between forward and reverse primers.z-ogcpercent
ogcpercentzOptimum GC% for a primer.z-mingcmingczMinimum GC% for a primer.z-maxgcmaxgczMaximum GC% for a primer.z	-saltconcsaltconcz)Millimolar salt concentration in the PCR.z-dnaconcdnaconcz7Nanomolar concentration of annealing oligos in the PCR.z	-maxpolyxmaxpolyxz;Maximum allowable mononucleotide repeat length in a primer.z	-psizeoptpsizeoptz!Optimum size for the PCR product.z-prangeprangez/Acceptable range of length for the PCR product.z-ptmoptptmoptz0Optimum melting temperature for the PCR product.z-ptmminptmminz5Minimum allowed melting temperature for the amplicon.z-ptmmaxptmmaxz5Maximum allowed melting temperature for the amplicon.z-oexcludedregionoexcludedregionz+Do not pick internal oligos in this region.z-oligoinput
oligoinputzSequence of the internal oligo.z	-osizeoptosizeoptz!Optimum length of internal oligo.z	-ominsizeominsizez!Minimum length of internal oligo.z	-omaxsizeomaxsizez!Maximum length of internal oligo.z-otmoptotmoptz.Optimum melting temperature of internal oligo.z-otmminotmminz.Minimum melting temperature of internal oligo.z-otmmaxotmmaxz.Maximum melting temperature of internal oligo.z-ogcoptogcoptzOptimum GC% for internal oligo.z-ogcminogcminzMinimum GC% for internal oligo.z-ogcmaxogcmaxzMaximum GC% for internal oligo.z
-osaltconc	osaltconcz6Millimolar concentration of salt in the hybridisation.z	-odnaconcodnaconcz?Nanomolar concentration of internal oligo in the hybridisation.z	-oanyselfoanyselfz;Maximum allowable alignment score for self-complementarity.z	-oendselfoendselfz<Max 3'-anchored self-complementarity global alignment score.z
-opolyxmax	opolyxmaxz:Maximum length of mononucleotide repeat in internal oligo.z-mispriminglibraryfilemispriminglibraryfilez8File containing library of sequences to avoid amplifyingz-maxmisprimingmaxmisprimingz]Maximum allowed similarity of primers to sequences in library specified by -mispriminglibraryz-omishybmax
omishybmaxzgMaximum alignment score for hybridisation of internal oligo to library specified by -mishyblibraryfile.z-mishyblibraryfilemishyblibraryfilez;Library file of seqs to avoid internal oligo hybridisation.z-explainflagexplainflagz,Produce output tags with eprimer3 statisticsNr   r   r%   r   r   r   r   s      r   r   zPrimer3Commandline.__init__   s   _
j)2   _
 Wf%'LMM_
 /? _
 {+-X _
 "$45E _
$ Y)+UVV%_
& "$459 '_
.  .18 /_
6  .18 7_
> Y'L ?_
F Xw')LMMG_
H Z+-PQQI_
J Z+-PQQK_
L < M_
V 7#? W_
` 7#%V a_
f 7#%V g_
l {+/ m_
v ]L13NOOw_
x Xw')DEEy_
z Xw')DEE{_
| j)+V }_
B Y'I C_
J j)M K_
T [*-/RSSU_
V H%'X W_
^ H%B __
f H%G g_
n H%G o_
x #%67= y_
@ ]L13TUUA_
D [*-/RSSE_
F [*-/RSSG_
H [*-/RSSI_
L H%'W M_
R H%'W S_
X H%'W Y_
` Y)+LMMa_
b Y)+LMMc_
d Y)+LMMe_
h {+H i_
p j)Q q_
z j)M {_
B j)N C_
J {+L K_
R )+BCJ S_
Z !?3: [_
d -; e_
n %':;M o_
v /> w_
@ 	#D#8888888r#   N)r2   r   r"   r#   r   r1   r1   |   s8         &b9 b9 b9 b9 b9 b9r#   r1   c                       e Zd ZdZddZdS )PrimerSearchCommandlinez<Commandline object for the primersearch program from EMBOSS.primersearchc                     t          g ddd          t          g dddd          t          dd	gd
d          t          ddgd          t          ddgd          g| _        t          j        | |fi | dS )r4   )z-seqallz
-sequences	sequencesseqallz)Sequence to look for the primer pairs in.Tr7   )z-infilez-primersprimersinfilez/File containing the primer pairs to search for.r)   r8   z-mismatchpercentmismatchpercentz;Allowed percentage mismatch (any integer value, default 0).-snucleotidesnucleotide"Sequences are nucleotide (boolean)	-sproteinsproteinSequences are protein (boolean)Nrj   rk   s      r   r   z PrimerSearchCommandline.__init__8  s     @@@;    <<<A 	   #%67M   
 /1U  [*-/PQQ5
8 	#D#8888888r#   N)rn   r   r"   r#   r   rm   rm   5  s.        FF9 9 9 9 9 9r#   rm   c                       e Zd ZdZddZdS )FDNADistCommandlinezCommandline object for the fdnadist program from EMBOSS.

    fdnadist is an EMBOSS wrapper for the PHYLIP program dnadist for
    calculating distance matrices from DNA sequence files.
    fdnadistc                    t          ddgddd          t          ddgdd	          t          d
dgd          t          ddgd          t          ddgd          t          ddgd          t          ddgd          t          ddgd          t          ddgd          t          dd gd!          t          d"d#gd$          t          d%d&gd'          t          d(d)gd*          g| _        t          j        | |fi | d+S ),r4   r5   r6   seq file to use (phylip)Trt   -methodmethodzsub. model [f,k,j,l,s]r7   -gammagammazgamma [g, i,n]-ncategoriesncategoriesnumber of rate categories (1-9)-rateraterate for each category-categories
categoriesz$File of substitution rate categories-weightsweightsweights file-gammacoefficientgammacoefficientvalue for gamma (> 0.001)z
-invarfrac	invarfraczproportoin of invariant sites-ttratiottratiozts/tv ratioz
-freqsfrom	freqsfromzuse empirical base freqs	-basefreqbasefreqzspecify basefreqsz-lowerlowerzlower triangle matrix (y/N)Nrj   rk   s      r   r   zFDNADistCommandline.__init__`  sL    j)* 	   Y)+CQUVVVXw')9::^]35VWWWf%'?@@-/U  Z+^<<$&89;V  \;/1PQQZ+];;\;/1KLL[*-/BCCXw')FGG-
0 	#D#8888888r#   N)r~   r   r"   r#   r   r}   r}   Y  s2         9 9 9 9 9 9r#   r}   c                       e Zd ZdZddZdS )FTreeDistCommandlinezCommandline object for the ftreedist program from EMBOSS.

    ftreedist is an EMBOSS wrapper for the PHYLIP program treedist used for
    calculating distance measures between phylogentic trees.
    	ftreedistc           	         t          ddgddd          t          ddgd          t          d	d
gd          t          ddgd          t          ddgd          t          ddgd          g| _        t          j        | |fi | dS )r4   -intreefile
intreefileztree file to score (phylip)Trt   z-dtypedtypez*distance type ([S]ymetric, [b]ranch score)z-pairingpairingz<tree pairing method ([A]djacent pairs, all [p]ossible pairs)z-stylestylez*output style - [V]erbose, [f]ill, [s]parsez-norootnorootztreat trees as rooted [N/y]-outgrnooutgrnoz2which taxon to root the trees with (starts from 0)Nrj   rk   s      r   r   zFTreeDistCommandline.__init__  s     -- 	   Xw')UVVY'N  Xw')UVVY)+HIIY'D 
& 	#D#8888888r#   N)r   r   r"   r#   r   r   r   }  2         9 9 9 9 9 9r#   r   c                       e Zd ZdZddZdS )FNeighborCommandlinezCommandline object for the fneighbor program from EMBOSS.

    fneighbor is an EMBOSS wrapper for the PHYLIP program neighbor used for
    calculating neighbor-joining or UPGMA trees from distance matrices.
    	fneighborc                    t          ddgddd          t          ddgd          t          d	d
gd          t          ddgd          t          ddgd          t          ddgd          t          ddgd          t          ddgd          t          ddgd          t          ddgd           g
| _        t          j        | |fi | d!S )"r4   	-datafiledatafilezdist file to use (phylip)Trt   z-matrixtype
matrixtypez,is matrix square (S), upper (U) or lower (L)z	-treetypetreetypeznj or UPGMA tree (n/u)r   r   ztaxon to use as OGz-jumblejumblezrandommise input order (Y/n)-seedseedzprovide a random seed-trouttroutzwrite tree (Y/n)-outtreefileouttreefilefilename for output treez	-progressprogressprint progress (Y/n)z
-treeprint	treeprintzprint tree (Y/n)Nrj   rk   s      r   r   zFNeighborCommandline.__init__  s    j)+ 	   ->  [*-/GHHZ+-ABBY)+IJJWf%'>??Xw');<<^]35OPP[*-/EFF\;/1CDD%
( 	#D#8888888r#   N)r   r   r"   r#   r   r   r     s2         9 9 9 9 9 9r#   r   c                       e Zd ZdZddZdS )FSeqBootCommandlinezCommandline object for the fseqboot program from EMBOSS.

    fseqboot is an EMBOSS wrapper for the PHYLIP program seqboot used to
    pseudo-sample alignment files.
    fseqbootc                    t          ddgddd          t          ddgd          t          d	d
gd          t          ddgd          t          ddgd          t          ddgd          t          ddgd          t          ddgd          t          ddgd          t          ddgd           t          d!d"gd#          t          d$d%gd&          t          d'd(gd)          g| _        t          j        | |fi | d*S )+r4   r5   r6   zseq file to sample (phylip)Trt   r   catergorieszfile of input categoriesr   r   z weights filez-testtestz'specify operation, default is bootstrapz-regularregularzabsolute number to resamplez-fracsample
fracsamplezfraction to resamplez-rewriteformatrewriteformatz'output format ([P]hyilp, [n]exus, [x]mlz-seqtypeseqtypez&output format ([D]na, [p]rotein, [r]naz
-blocksize	blocksizer   z-repsrepsz%how many replicates, defaults to 100)z-justweights
jusweightsz.what to write out [D]atasets of just [w]eightsr   r   zspecify random seed-dotdiffdotdiffUse dot-differencing? [Y/n]Nrj   rk   s      r   r   zFSeqBootCommandline.__init__  sF    j)- 	   ]M24NOOZ+_==Wf%'PQQZ+-JKK]L13IJJ!?39  Z+-UVV\;/1GHHWf%'NOO.@  Wf%'<==Z+-JKK1
4 	#D#8888888r#   N)r   r   r"   r#   r   r   r     s2         9 9 9 9 9 9r#   r   c                       e Zd ZdZddZdS )FDNAParsCommandlinea  Commandline object for the fdnapars program from EMBOSS.

    fdnapars is an EMBOSS version of the PHYLIP program dnapars, for
    estimating trees from DNA sequences using parsiomny. Calling this command
    without providing a value for the option "-intreefile" will invoke
    "interactive mode" (and as a result fail if called with subprocess) if
    "-auto" is not set to true.
    fdnaparsc                 >   t          ddgddd          t          ddgd          t          d	d
gd          t          ddgd          t          ddgd          t          ddgd          t          ddgd          t          ddgd          t          ddgd          t          ddgd           t          d!d"gd#          t          d$d%gd&          t          d'd(gd)          t          d*d+gd,          t          d-d.gd/          g| _        t          j        | |fi | d0S )1r4   r5   r6   r   Trt   r   r   zPhylip tree filer   r   r   z	-maxtreesmaxtreeszmax trees to save during runz	-thoroughthoroughzmore thorough search (Y/n)z
-rearrange	rearrangez#Rearrange on just 1 best tree (Y/n)z-transversiontransversionzUse tranversion parsimony (y/N)-njumblenjumble7number of times to randomise input order (default is 0)r   r   provide random seedr   r   Specify outgroup-threshthreshUse threshold parsimony (y/N)
-threshold	thresholdThreshold valuer   r   Write trees to file (Y/n)r   r   r   r   r   r   Nrj   rk   s      r   r   zFDNAParsCommandline.__init__  sl    j)* 	   ]L13EFFZ+^<<[*-/MNN[*-/KLL\;/1VWW .13T  Y'I  Wf%'<==Z+-?@@Y)+JKK\;/1BCCXw')DEE^]35OPPZ+-JKK3
6 	#D#8888888r#   N)r   r   r"   r#   r   r   r     2         9 9 9 9 9 9r#   r   c                       e Zd ZdZddZdS )FProtParsCommandlinea  Commandline object for the fdnapars program from EMBOSS.

    fprotpars is an EMBOSS version of the PHYLIP program protpars, for
    estimating trees from protein  sequences using parsiomny. Calling this
    command without providing a value for the option "-intreefile" will invoke
    "interactive mode" (and as a result fail if called with subprocess) if
    "-auto" is not set to true.
    	fprotparsc                    t          ddgddd          t          ddgd          t          d	d
gddd          t          ddgd          t          ddgd          t          ddgd          t          ddgd          t          ddgd          t          ddgd          t          ddgd           t          d!d"gd#          t          d$d%gd&          g| _        t          j        | |fi | d'S )(r4   r5   r6   r   Trt   r   r   zPhylip tree file to scorer   r   zphylip tree output filer   r   r   
-whichcode	whichcodez which genetic code, [U,M,V,F,Y]]r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   Nrj   rk   s      r   r   zFProtParsCommandline.__init__  s>    j)* 	   ]L13NOO/) 	   Z+^<<\;/1STTY'I  Wf%'<==Z+-?@@Y)+JKK\;/1BCCXw')DEEZ+-JKK3
6 	#D#8888888r#   N)r   r   r"   r#   r   r   r     r   r#   r   c                       e Zd ZdZddZdS )FProtDistCommandlinezCommandline object for the fprotdist program from EMBOSS.

    fprotdist is an EMBOSS wrapper for the PHYLIP program protdist used to
    estimate trees from protein sequences using parsimony
    	fprotdistc                    t          ddgddd          t          ddgd          t          d	d
gd          t          ddgd          t          ddgd          t          ddgd          t          ddgd          t          ddgd          t          ddgd          t          ddgd           t          d!d"gd#          t          d$d%gd&          t          d'd(gd)          t          d*d+gd,          g| _        t          j        | |fi | d-S ).r4   r5   r6   r   Trt   r   r   r   r   r   r   z-catergoriesr   zfile of ratesr   r   r   r   r   zsub. model [j,h,d,k,s,c]r   r   zgamma [g, i,c]r   r   r   z-invarcoefficientinvarcoefficientz4float for variation of substitution rate among sitesz-aacategaacategz"Choose the category to use [G,C,H]r   r   zgenetic code [c,m,v,f,y]z-easeeasez,Pob change category (float between -0 and 1)r   r   z#Transition/transversion ratio (0-1)r   r   z+DNA base frequencies (space separated list)Nrj   rk   s      r   r   zFProtDistCommandline.__init__=  s_    j)* 	   ^]35VWWWf%'?@@^]3_EEZ+^<<Y)+EFFXw')9::$&89;V  $&89F  Z+-QRR\;/1KLLWf%'UVVZ+-RSSj)+X 1
8 	#D#8888888r#   N)r   r   r"   r#   r   r   r   6  s2         9 9 9 9 9 9r#   r   c                       e Zd ZdZddZdS )FConsenseCommandlinezCommandline object for the fconsense program from EMBOSS.

    fconsense is an EMBOSS wrapper for the PHYLIP program consense used to
    calculate consensus trees.
    	fconsensec           
      .   t          ddgddd          t          ddgd          t          d	d
gd          t          ddgd          t          ddgd          t          ddgd          t          ddgd          g| _        t          j        | |fi | dS )r4   r   r   z-file with phylip trees to make consensus fromTrt   r   r   z!consensus method [s, mr, MRE, ml]z-mlfracmlfracz8cut-off freq for branch to appear in consensus (0.5-1.0)z-rootrootztreat trees as rooted (YES, no)r   r   z&OTU to use as outgroup (starts from 0)r   r   r   r   z"Phylip tree output file (optional)Nrj   rk   s      r   r   zFConsenseCommandline.__init__e  s     -? 	   Y)+NOOH%J  Wf%'HIIZ+-UVVXw')JKK/1U 
& 	#D#8888888r#   N)r   r   r"   r#   r   r   r   ^  r   r#   r   c                       e Zd ZdZddZdS )WaterCommandlinez5Commandline object for the water program from EMBOSS.waterc                    t          ddgddd          t          ddgddd          t          d	d
gdd          t          ddgdd          t          ddgdd          t          ddgd          t          ddgd          t          ddgd          t          ddgd          t          d d!gd"          t          d#d$gd%          g| _        t          j        | |fi | d&S )'r4   
-asequence	asequenceFirst sequence to alignTrt   
-bsequence	bsequenceSecond sequence to align-gapopengapopenGap open penaltyr7   
-gapextend	gapextendGap extension penaltyr   r   Matrix filer(   -nobriefnobrief(Display extended identity and similarity-briefbrief%Display brief identity and similarity-similarity
similarity'Display percent identity and similarityrv   rw   rx   ry   rz   r{   -aformataformat5Display output in a different specified output formatNr   r   r   r%   r   rk   s      r   r   zWaterCommandline.__init__  sX    {+) 	   {+* 	   Z+-?TRRR{+-DRV   [*-}tLLLY')S  Xw')PQQ-/X  /1U  [*-/PQQY'G ;!
D 	#D#8888888r#   N)r   r   r"   r#   r   r   r   }  s.        ??$9 $9 $9 $9 $9 $9r#   r   c                       e Zd ZdZddZdS )NeedleCommandlinez6Commandline object for the needle program from EMBOSS.needlec                 .   t          ddgddd          t          ddgddd          t          d	d
gdd          t          ddgdd          t          ddgdd          t          ddgd          t          ddgd          t          ddgd          t          ddgd          t          d d!gd"          t          d#d$gd%          t          d&d'gd(          t          d)d*gd+          t          d,d-gd.          g| _        t          j        | |fi | d/S )0r4   r   r   r   Trt   r   r   r   r   r   r   r7   r   r   r  r   r   r  r(   
-endweight	endweightApply And gap penalties-endopenendopen0The score taken away when an end gap is created.
-endextend	endextendOThe score added to the end gap penalty for each base or residue in the end gap.r  r  r  r  r  r  r	  r
  r  rv   rw   rx   ry   rz   r{   r  r  r  Nr  rk   s      r   r   zNeedleCommandline.__init__  s    {+) 	   {+* 	   Z+-?TRRR{+-DRV   [*-}tLLL\;/1JKKY'B  {+* 
 Y')S  Xw')PQQ-/X  /1U  [*-/PQQY'G O+
X 	#D#8888888r#   N)r  r   r"   r#   r   r  r    s.        @@.9 .9 .9 .9 .9 .9r#   r  c                       e Zd ZdZddZdS )NeedleallCommandlinez9Commandline object for the needleall program from EMBOSS.	needleallc                 r   t          ddgddd          t          ddgddd          t          d	d
gdd          t          ddgdd          t          ddgdd          t          ddgd          t          ddgd          t          ddgd          t          ddgd          t          d d!gd"          t          d#d$gd%          t          d&d'gd(          t          d)d*gd+          t          d,d-gd.          t          d/d0gd1          t          d2d3gd4          g| _        t          j        | |fi | d5S )6r4   r   r   r   Trt   r   r   r   r   r   r   r7   r   r   r  r   r   r  r(   	-minscoreminscore:Exclude alignments with scores below this threshold score.z
-errorfile	errorfilezError file to be written to.r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r	  r
  r  rv   rw   rx   ry   rz   r{   r  r  r  Nr  rk   s      r   r   zNeedleallCommandline.__init__  s    {+) 	   {+* 	   Z+-?TRRR{+-DRV   [*-}tLLLj)L  \;/1OPP\;/1JKKY'B  {+* 
 Y')S  Xw')PQQ-/X  /1U  [*-/PQQY'G Y0
b 	#D#8888888r#   N)r  r   r"   r#   r   r  r    s.        CC39 39 39 39 39 39r#   r  c                       e Zd ZdZddZdS )StretcherCommandlinez9Commandline object for the stretcher program from EMBOSS.	stretcherc                 j   t          ddgddd          t          ddgddd          t          d	d
gddd           t          ddgddd           t          ddgdd          t          ddgd          t          ddgd          t          ddgd          g| _        t          j        | |fi | dS ) r4   r   r   r   Trt   r   r   r   r   r   r   c                 ,    t          | t                    S r   
isinstanceintvalues    r   <lambda>z/StretcherCommandline.__init__.<locals>.<lambda>*      z%/E/E r#   )r8   checker_functionr   r   r  c                 ,    t          | t                    S r   r*  r-  s    r   r/  z/StretcherCommandline.__init__.<locals>.<lambda>0  r0  r#   r   r   r  r(   rv   rw   rx   ry   rz   r{   r  r  r  Nrj   rk   s      r   r   zStretcherCommandline.__init__  s'    {+) 	   {+* 	   Y'" !E!E	   {+' !E!E	   [*-}tLLL/1U  [*-/PQQY'G ="
F 	#D#8888888r#   N)r'  r   r"   r#   r   r&  r&    s.        CC%9 %9 %9 %9 %9 %9r#   r&  c                       e Zd ZdZddZdS )FuzznucCommandlinez7Commandline object for the fuzznuc program from EMBOSS.fuzznucc                     t          ddgdd          t          ddgdd          t          d	d
gd          t          ddgd          t          ddgd          g| _        t          j        | |fi | dS )r4   r5   r6   Sequence database USATr7   -patternpattern5Search pattern, using standard IUPAC one-letter codes
-pmismatch	pmismatchNumber of mismatchesz-complement
complementzSearch complementary strand-rformatrformat'Specify the report format to output in.Nrj   rk   s      r   r   zFuzznucCommandline.__init__B  s     j)+BPT   Y'G   
 \;/1GHH]L13PQQZ+-VWW
 	#D#8888888r#   N)r5  r   r"   r#   r   r4  r4  ?  s.        AA9 9 9 9 9 9r#   r4  c                       e Zd ZdZddZdS )FuzzproCommandlinez7Commandline object for the fuzzpro program from EMBOSS.fuzzproc                     t          ddgdd          t          ddgdd          t          d	d
gd          t          ddgd          g| _        t          j        | |fi | dS )r4   r5   r6   r7  Tr7   r8  r9  r:  r;  r<  r=  r?  r@  rA  Nrj   rk   s      r   r   zFuzzproCommandline.__init__W  s     j)+BPT   Y'G   
 \;/1GHHZ+-VWW
 	#D#8888888r#   N)rD  r   r"   r#   r   rC  rC  T  s.        AA9 9 9 9 9 9r#   rC  c                       e Zd ZdZddZdS )Est2GenomeCommandlinez:Commandline object for the est2genome program from EMBOSS.
est2genomec                    t          ddgdd          t          ddgdd          t          d	d
gd          t          ddgd          t          ddgd          t          ddgd          t          ddgd          t          ddgd          t          ddgd          t          ddgd           t          d!d"gd#          t          d$d%gd&          t          d'd(gd)          t          d*d+gd,          t          d-d.gd/          t          d0d1gd2          t          d3d4gd5          g| _        t          j        | |fi | d6S )7r4   z-estestzEST sequence(s)Tr7   z-genomegenomezGenomic sequence-matchmatchzScore for matching two bases	-mismatchmismatchzCost for mismatching two basesz-gappenalty
gappenaltyzECost for deleting a single base in either sequence, excluding intronsz-intronpenaltyintronpenaltyz*Cost for an intron, independent of length.z-splicepenaltysplicepenaltyzUCost for an intron, independent of length and starting/ending on donor-acceptor sitesr!  r"  r#  z-reversereversez+Reverse the orientation of the EST sequencez-splicesplicez$Use donor and acceptor splice sites.z-modemodezDThis determines the comparison mode. 'both', 'forward', or 'reverse'z-bestbestz:You can print out all comparisons instead of just the bestz-spacespacezfor linear-space recursion.z-shuffleshuffleShuffler   r   zRandom number seedz-alignalignzShow the alignment.z-widthwidthzAlignment widthNrj   rk   s      r   r   zEst2GenomeCommandline.__init__k  s    VUO%6DIIIY)+=4PPPXw')GHH[*-/OPP-$ 
 !?3<  !?3> 
 j)L  Y')V  Y)+QRR&!V  &!L  Xw')FGGZ+Y77Wf%';<<Xw')>??Xw'):;;O(
R 	#D#8888888r#   N)rH  r   r"   r#   r   rG  rG  h  s.        DD+9 +9 +9 +9 +9 +9r#   rG  c                       e Zd ZdZddZdS )ETandemCommandlinez7Commandline object for the etandem program from EMBOSS.etandemc           
      6   t          ddgddd          t          ddgdd	          t          d
dgdd	          t          ddgd          t          ddgd          t          ddgd          t          ddgd          g| _        t          j        | |fi | dS )r4   r5   r6   SequenceTrt   z
-minrepeat	minrepeatzMinimum repeat sizer7   
-maxrepeat	maxrepeatzMaximum repeat sizer   r   zThreshold scorerN  rO  zAllow N as a mismatchz-uniformuniformzAllow uniform consensusr?  r@  zOutput report formatNrj   rk   s      r   r   zETandemCommandline.__init__  s     j):RV   {+-BPT   {+-BPT   \;/1BCC[*-/FGGZ+-FGGZ+-CDD
 	#D#8888888r#   N)r^  r   r"   r#   r   r]  r]    s.        AA9 9 9 9 9 9r#   r]  c                       e Zd ZdZddZdS )EInvertedCommandlinez9Commandline object for the einverted program from EMBOSS.	einvertedc           	         t          ddgddd          t          ddgddd          t          d	d
gdd          t          ddgdd          t          ddgdd          t          ddgd          g| _        t          j        | |fi | dS )r4   r5   r6   r`  Trt   z-gapgapzGap penaltyr   r   zMinimum score thresholdr7   rL  rM  zMatch scorerN  rO  zMismatch scorerb  rc  z6Maximum separation between the start and end of repeatNrj   rk   s      r   r   zEInvertedCommandline.__init__  s     j):RV   VUO]TtTTT{+-FTX   Xw'DIII[*-/?TRRR{+H 
 	#D#8888888r#   N)rg  r   r"   r#   r   rf  rf    s.        CC9 9 9 9 9 9r#   rf  c                       e Zd ZdZddZdS )PalindromeCommandlinez:Commandline object for the palindrome program from EMBOSS.
palindromec           
          t          ddgddd          t          ddgdd	          t          d
dgdd	          t          ddgdd	          t          ddgdd	          t          ddgdd	          g| _        t          j        | |fi | dS )r4   r5   r6   r`  Trt   z
-minpallen	minpallenzMinimum palindrome lengthr7   z
-maxpallen	maxpallenzMaximum palindrome lengthz	-gaplimitgaplimitzMaximum gap between repeatsz-nummismatchesnummismatcheszNumber of mismatches allowedz-overlapoverlapzReport overlapping matchesNrj   rk   s      r   r   zPalindromeCommandline.__init__  s     j):RV   {++   
 {++   
 j)-   
 !?3.   
 Y')ESW  1
8 	#D#8888888r#   N)rl  r   r"   r#   r   rk  rk    s.        DD9 9 9 9 9 9r#   rk  c                       e Zd ZdZddZdS )TranalignCommandlinez9Commandline object for the tranalign program from EMBOSS.	tranalignc                     t          ddgddd          t          ddgddd          t          d	d
gddd          t          ddgd          g| _        t          j        | |fi | dS )r4   r   r   z#Nucleotide sequences to be aligned.Trt   r   r   zProtein sequence alignment-outseqoutseqOutput sequence file.z-tabletablezCode to useNrj   rk   s      r   r   zTranalignCommandline.__init__  s     {+5 	   {+, 	   H%' 	   Xw'77'
* 	#D#8888888r#   N)ru  r   r"   r#   r   rt  rt    s.        CC9 9 9 9 9 9r#   rt  c                       e Zd ZdZddZdS )DiffseqCommandlinez7Commandline object for the diffseq program from EMBOSS.diffseqc           
      "   t          ddgddd          t          ddgddd          t          d	d
gdd          t          ddgddd          t          ddgddd          t          ddgd          g| _        t          j        | |fi | dS )r4   r   r   zFirst sequence to compareTrt   r   r   zSecond sequence to compare	-wordsizewordsizez-Word size to use for comparisons (10 default)r7   z	-aoutfeataoutfeatz,File for output of first sequence's featuresz	-boutfeatboutfeatz-File for output of second sequence's featuresr?  r@  zOutput report file formatNrj   rk   s      r   r   zDiffseqCommandline.__init__  s     {++ 	   {+, 	   j)?   
 j)> 	   j)? 	   Z+-HII=
@ 	#D#8888888r#   N)r}  r   r"   r#   r   r|  r|    s.        AA"9 "9 "9 "9 "9 "9r#   r|  c                       e Zd ZdZddZdS )IepCommandlinea  Commandline for EMBOSS iep: calculated isoelectric point and charge.

    Examples
    --------
    >>> from Bio.Emboss.Applications import IepCommandline
    >>> iep_cline = IepCommandline(sequence="proteins.faa",
    ...                            outfile="proteins.txt")
    >>> print(iep_cline)
    iep -outfile=proteins.txt -sequence=proteins.faa

    You would typically run the command line with iep_cline() or via the
    Python subprocess module, as described in the Biopython tutorial.

    iepc           	         t          ddgddd          t          ddgd          t          d	d
gd          t          ddgd          t          ddgd          t          ddgd          g| _        t          j        | |fi | dS )r4   r5   r6   zProtein sequence(s) filenameTrt   z-aminoaminozZNumber of N-termini

                    Integer 0 (default) or more.
                    z	-carboxylcarboxylzZNumber of C-termini

                    Integer 0 (default) or more.
                    z-lysinemodifiedlysinemodifiedzaNumber of modified lysines

                    Integer 0 (default) or more.
                    z-disulphidesdisulphideszcNumber of disulphide bridges

                    Integer 0 (default) or more.
                    z
-notermini	noterminiz=Exclude (True) or include (False) charge at N and C terminus.Nrj   rk   s      r   r   zIepCommandline.__init__@  s     j). 	   7#  j)  "$45  /  {+O I(
R 	#D#8888888r#   N)r  r   r"   r#   r   r  r  0  s2         +9 +9 +9 +9 +9 +9r#   r  c                        e Zd ZdZddZd ZdS )SeqretCommandlinea  Commandline object for the seqret program from EMBOSS.

    This tool allows you to interconvert between different sequence file
    formats (e.g. GenBank to FASTA). Combining Biopython's Bio.SeqIO module
    with seqret using a suitable intermediate file format can allow you to
    read/write to an even wider range of file formats.

    This wrapper currently only supports the core functionality, things like
    feature tables (in EMBOSS 6.1.0 onwards) are not yet included.
    seqretc                     t          ddgdd          t          ddgdd          t          d	d
gd          t          ddgd          g| _        t          j        | |fi | dS )r4   r5   r6   zInput sequence(s) filenameTr(   rw  rx  ry  z-sformatsformatz.Input sequence(s) format (e.g. fasta, genbank)z	-osformatosformatz/Output sequence(s) format (e.g. fasta, genbank)N)r   r   r   r   rk   s      r   r   zSeqretCommandline.__init__{  s     j)+GRV   Y)+BTRRRY'@  j)A 
 	"*4???????r#   c                     | j         s| j        s| j        st          d          | j        s| j        s| j        st          d          t                              |           S )Nr+   z\You must either set sequence (input filename), or enable filter or stdin (input from stdin).)rx  r   r
   r,   r6   stdintr   r-   r.   s    r   r-   zSeqretCommandline._validate  s      	t{ 	dk 	A    	 	 	@   )224888r#   N)r  r/   r"   r#   r   r  r  o  sE        	 	@ @ @ @$9 9 9 9 9r#   r  c                       e Zd ZdZddZdS )SeqmatchallCommandlineak  Commandline object for the seqmatchall program from EMBOSS.

    e.g.
    >>> cline = SeqmatchallCommandline(sequence="opuntia.fasta", outfile="opuntia.txt")
    >>> cline.auto = True
    >>> cline.wordsize = 18
    >>> cline.aformat = "pair"
    >>> print(cline)
    seqmatchall -auto -outfile=opuntia.txt -sequence=opuntia.fasta -wordsize=18 -aformat=pair

    seqmatchallc                     t          ddgddd          t          ddgd          t          d	d
gd          g| _        t          j        | |fi | dS )r4   r5   r6   zReadable set of sequencesTrt   r  r  z(Word size (Integer 2 or more, default 4)r  r  r  Nrj   rk   s      r   r   zSeqmatchallCommandline.__init__  s     j)+ 	   j)+U  Y'G 
 	#D#8888888r#   N)r  r   r"   r#   r   r  r    s2        
 
9 9 9 9 9 9r#   r  __main__)run_doctestN)#r!   Bio.Applicationr   r   r   r   r%   r1   rm   r}   r   r   r   r   r   r   r   r   r  r  r&  r4  rC  rG  r]  rf  rk  rt  r|  r  r  r  r   
Bio._utilsr  r"   r#   r   <module>r     s"    $ # # # # # # # # # # # / / / / / /=: =: =: =: =: 3 =: =: =:@!9 !9 !9 !9 !92 !9 !9 !9Hv9 v9 v9 v9 v9+ v9 v9 v9r!9 !9 !9 !9 !90 !9 !9 !9H!9 !9 !9 !9 !9, !9 !9 !9H9 9 9 9 9- 9 9 9>9 9 9 9 9- 9 9 9@#9 #9 #9 #9 #9, #9 #9 #9L'9 '9 '9 '9 '9, '9 '9 '9T'9 '9 '9 '9 '9- '9 '9 '9T%9 %9 %9 %9 %9- %9 %9 %9P9 9 9 9 9- 9 9 9>'9 '9 '9 '9 '9) '9 '9 '9T19 19 19 19 19* 19 19 19h69 69 69 69 69- 69 69 69r(9 (9 (9 (9 (9- (9 (9 (9V9 9 9 9 9+ 9 9 9*9 9 9 9 9+ 9 9 9(.9 .9 .9 .9 .9. .9 .9 .9b9 9 9 9 9+ 9 9 9.9 9 9 9 9- 9 9 9.!9 !9 !9 !9 !9. !9 !9 !9H9 9 9 9 9- 9 9 9:%9 %9 %9 %9 %9+ %9 %9 %9P;9 ;9 ;9 ;9 ;9' ;9 ;9 ;9~,9 ,9 ,9 ,9 ,91 ,9 ,9 ,9^9 9 9 9 9/ 9 9 9B z&&&&&&KMMMMM r#   