o
    Rŀg                     @   sf   d Z ddlm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r1dd	lm	Z	 e	  d
S d
S )zACommand line wrapper for the multiple alignment program PROBCONS.    )	_Argument)_Option)_Switch)AbstractCommandlinec                   @   s   e Zd ZdZdddZdS )ProbconsCommandlinea  Command line wrapper for the multiple alignment program PROBCONS.

    http://probcons.stanford.edu/

    Notes
    -----
    Last checked against version: 1.12

    References
    ----------
    Do, C.B., Mahabhashyam, M.S.P., Brudno, M., and Batzoglou, S. 2005.
    PROBCONS: Probabilistic Consistency-based Multiple Sequence Alignment.
    Genome Research 15: 330-340.

    Examples
    --------
    To align a FASTA file (unaligned.fasta) with the output in ClustalW
    format, and otherwise default settings, use:

    >>> from Bio.Align.Applications import ProbconsCommandline
    >>> probcons_cline = ProbconsCommandline(input="unaligned.fasta",
    ...                                      clustalw=True)
    >>> print(probcons_cline)
    probcons -clustalw unaligned.fasta

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

    Note that PROBCONS will write the alignment to stdout, which you may
    want to save to a file and then parse, e.g.::

        stdout, stderr = probcons_cline()
        with open("aligned.aln", "w") as handle:
            handle.write(stdout)
        from Bio import AlignIO
        align = AlignIO.read("aligned.fasta", "clustalw")

    Alternatively, to parse the output with AlignIO directly you can
    use StringIO to turn the string into a handle::

        stdout, stderr = probcons_cline()
        from io import StringIO
        from Bio import AlignIO
        align = AlignIO.read(StringIO(stdout), "clustalw")

    probconsc                 K   s   t ddgdtg dddd dd	tg d
ddd dd	tg dddd dd	t ddgdt ddgdt ddgdtddgdddtg ddddt g dd tg d!d"ddt g d#d$td%gd&d'd'd(g| _tj| |fi | d)S )*zInitialize the class.z	-clustalwclustalwz)Use CLUSTALW output format instead of MFA)z-ccz--consistencyconsistencyzDUse 0 <= REPS <= 5 (default: 2) passes of consistency transformationc                 S      | t dv S )N   rangex r   T/var/www/html/myenv/lib/python3.10/site-packages/Bio/Align/Applications/_Probcons.py<lambda>M       z.ProbconsCommandline.__init__.<locals>.<lambda>F)checker_functionequate)z-irz--iterative-refinementziterative-refinementirzCUse 0 <= REPS <= 1000 (default: 100) passes of iterative-refinementc                 S   r   )Ni  r   r   r   r   r   r   S   r   )z-prez--pre-trainingzpre-trainingprez6Use 0 <= REPS <= 20 (default: 0) rounds of pretrainingc                 S   r   )N   r   r   r   r   r   r   Y   r   z-pairspairsz&Generate all-pairs pairwise alignmentsz-viterbiviterbizJUse Viterbi algorithm to generate all pairs (automatically enables -pairs)z-verboseverbosez-Report progress while aligning (default: off)z-annotannotz3Write annotation for multiple alignment to FILENAME)r   )z-ttz--traintrainzMCompute EM transition probabilities, store in FILENAME (default: no training))z-eez--emissions	emissionsz5Also reestimate emission probabilities (default: off))z-ppz--paramfile	paramfilezRead parameters from FILENAME)z-az--alignment-orderzalignment-orderazIPrint sequences in alignment order rather than input order (default: off)inputz>Input file name. Must be multiple FASTA alignment (MFA) formatT)filenameis_requiredN)r   r   r   
parametersr   __init__)selfcmdkwargsr   r   r   r)   ?   sx   EzProbconsCommandline.__init__N)r   )__name__
__module____qualname____doc__r)   r   r   r   r   r      s    /r   __main__)run_doctestN)
r0   Bio.Applicationr   r   r   r   r   r-   
Bio._utilsr2   r   r   r   r   <module>   s   z
