o
    RŀgQ'                     @   sZ   d Z ddlmZ ddlmZ ddlmZ G dd deZedkr+ddlmZ e  d	S d	S )
zFCommand line wrapper for the multiple alignment program Clustal Omega.    )_Option)_Switch)AbstractCommandlinec                   @   s   e Zd ZdZdddZdS )ClustalOmegaCommandlineu  Command line wrapper for clustal omega.

    http://www.clustal.org/omega

    Notes
    -----
    Last checked against version: 1.2.0

    References
    ----------
    Sievers F, Wilm A, Dineen DG, Gibson TJ, Karplus K, Li W, Lopez R,
    McWilliam H, Remmert M, Söding J, Thompson JD, Higgins DG (2011).
    Fast, scalable generation of high-quality protein multiple
    sequence alignments using Clustal Omega.
    Molecular Systems Biology 7:539 https://doi.org/10.1038/msb.2011.75

    Examples
    --------
    >>> from Bio.Align.Applications import ClustalOmegaCommandline
    >>> in_file = "unaligned.fasta"
    >>> out_file = "aligned.fasta"
    >>> clustalomega_cline = ClustalOmegaCommandline(infile=in_file, outfile=out_file, verbose=True, auto=True)
    >>> print(clustalomega_cline)
    clustalo -i unaligned.fasta -o aligned.fasta --auto -v

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

    clustaloc                 K   s  g t g dddddt g dddddtdd	gd
t g dddddt g dddddt g ddddd dtddgdt ddgdddd dt ddgddddt ddgddddt d d!gd"dddt d#d$gd%dddtd&d'gd(td)d*gd+t d,d-gd.d/d d0t d1d2gd3dd4td5d6gd7td8d9gd:t g d;d<dddt d=d>gd?dd@d dtg dAdBt dCdDgdEdFd d0t dGdHgdIdJd d0t g dKdLddMd dt dNdOgdPddQd dt dRdSgdTddUd dt dVdWgdXddYd dt dZd[gd\dd]d dtd^d_gd`t dadbgdcdddd dt g dedfdddtg dgdhtg didjtdkdlgdmtdndogdptdqdrgds| _tj| |fi | dtS )uzInitialize the class.)z-iz--inz--infileinfilezMultiple sequence input fileTF)filenameequate)z--hmm-inz	HMM input	hmm_inputzHMM input filesz	--dealigndealignzDealign input sequences)z
--profile1z--p1profile1zFPre-aligned multiple sequence file (aligned columns will be kept fix).)z
--profile2z--p2profile2)z-tz	--seqtypeseqtypez:{Protein, RNA, DNA} Force a sequence type (default: auto).c                 S      | dv S )N)proteinrnadnaProteinRNADNAPROTEIN xr   r   X/var/www/html/myenv/lib/python3.10/site-packages/Bio/Align/Applications/_ClustalOmega.py<lambda>P       z2ClustalOmegaCommandline.__init__.<locals>.<lambda>)r	   checker_functionz--is-profile	isprofilez4disable check if profile, force profile (default no)z--infmtinfmtzForced sequence input file format (default: auto)

                    Allowed values: a2m, fa[sta], clu[stal], msf, phy[lip], selex, st[ockholm], vie[nna]
                    c                 S   r   N)a2mfafastacluclustalmsfphyphylipselexst	stockholmvieviennar   r   r   r   r   r   ^   r   z--distmat-in
distmat_inzAPairwise distance matrix input file (skips distance computation).z--distmat-outdistmat_outz%Pairwise distance matrix output file.z--guidetree-inguidetree_inzRGuide tree input file (skips distance computation and guide-tree clustering step).z--guidetree-outguidetree_outzGuide tree output file.z--fulldistmat_fullzKUse full distance matrix for guide-tree calculation (slow; mBed is default)z--full-iterdistmat_full_iterzVUse full distance matrix for guide-tree calculation during iteration (mBed is default)z--cluster-sizeclustersizez)soft maximum of sequences in sub-clustersc                 S   
   t | tS N
isinstanceintr   r   r   r   r         
 )r   z--clustering-outclusteringoutzClustering output file)r   z--use-kimura	usekimurazAuse Kimura distance correction for aligned sequences (default no)z--percent-id	percentidz6convert distances into percent identities (default no))z-oz--outz	--outfileoutfilez:Multiple sequence alignment output file (default: stdout).z--outfmtoutfmtzgMSA output file format: a2m=fa[sta],clu[stal],msf,phy[lip],selex,st[ockholm],vie[nna] (default: fasta).c                 S   r   r    r   r   r   r   r   r      r   )z--residuenumberz--resnoresiduenumberz4in Clustal format print residue numbers (default no)z--wrapwrapz-number of residues before line-wrap in outputc                 S   r5   r6   r7   r   r   r   r   r      r:   z--output-orderoutputorderz)MSA output order like in input/guide-treec                 S   r   )N)zinput-orderz
tree-orderr   r   r   r   r   r      s    )z--iterationsz--iter
iterationsz.Number of (combined guide-tree/HMM) iterationsc                 S   r5   r6   r7   r   r   r   r   r      r:   z--max-guidetree-iterationsmax_guidetree_iterationsz&Maximum number of guidetree iterationsc                 S   r5   r6   r7   r   r   r   r   r      r:   z--max-hmm-iterationsmax_hmm_iterationsz Maximum number of HMM iterationsc                 S   r5   r6   r7   r   r   r   r   r      r:   z--maxnumseq	maxnumseqz#Maximum allowed number of sequencesc                 S   r5   r6   r7   r   r   r   r   r      r:   z--maxseqlen	maxseqlenzMaximum allowed sequence lengthc                 S   r5   r6   r7   r   r   r   r   r      r:   z--autoautoz@Set options automatically (might overwrite some of your options)z	--threadsthreadszNumber of processors to usec                 S   r5   r6   r7   r   r   r   r   r      r:   )z-lz--loglogz*Log all non-essential output to this file.)z-hz--helphelpzPrint help and exit.)z-vz	--verboseverbosezVerbose outputz	--versionversionz"Print version information and exitz--long-versionlong_versionz'Print long version information and exitz--forceforcezForce file overwriting.N)r   r   
parametersr   __init__)selfcmdkwargsr   r   r   rQ   .   s  "&?EKQW[_dimrx         %  +  2  8  ?  C  I  O  P  Q  R  V  Xz ClustalOmegaCommandline.__init__N)r   )__name__
__module____qualname____doc__rQ   r   r   r   r   r      s    r   __main__)run_doctestN)	rX   Bio.Applicationr   r   r   r   rU   
Bio._utilsrZ   r   r   r   r   <module>   s    }
