o
    Rŀg!                     @   sN   d 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 )	zGCommand line wrapper for the short read aligner Novoalign by Novocraft.    )_Option)AbstractCommandlinec                   @   s   e Zd ZdZdddZdS )NovoalignCommandlinea.  Command line wrapper for novoalign by Novocraft.

    See www.novocraft.com - novoalign is a short read alignment program.

    Examples
    --------
    >>> from Bio.Sequencing.Applications import NovoalignCommandline
    >>> novoalign_cline = NovoalignCommandline(database='some_db',
    ...                                        readfile='some_seq.txt')
    >>> print(novoalign_cline)
    novoalign -d some_db -f some_seq.txt

    As with all the Biopython application wrappers, you can also add or
    change options after creating the object:

    >>> novoalign_cline.format = 'PRBnSEQ'
    >>> novoalign_cline.r_method='0.99' # limited valid values
    >>> novoalign_cline.fragment = '250 20' # must be given as a string
    >>> novoalign_cline.miRNA = 100
    >>> print(novoalign_cline)
    novoalign -d some_db -f some_seq.txt -F PRBnSEQ -r 0.99 -i 250 20 -m 100

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

    Last checked against version: 2.05.04

    	novoalignc                    s  g d g dg dt ddgdddd	t d
dgdddd	t ddgdd   fddddt ddgddd ddt ddgddd ddt ddgddd ddt d d!gd"d#d ddt d$d%gd&d'd ddt d(d)gd*d+d ddt d,d-gd.d/d ddt d0d1gd2d3d ddt d4d5gd6d7d ddt d8d9gd:d;d ddt d<d=gd>d fd?dddt d@dAgdBdCd ddt dDdEgdFdGd ddt dHdIgdJd fdKdddt dLdMgdNdOd ddt dPdQgdRdSd ddt dTdUgdVdWd ddt dXdYgdZd[d ddt d\d]gd^d_d ddt d`dagdbdcd ddt dddegdfdgd ddt dhdigdjdkd ddg| _tj| |fi | dlS )mzInitialize the class.)FASLXFQSTDFQILMFQPRBPRBnSEQ)NativePairwiseSAM)NoneRandomAll
Exhaustivez0.99z-ddatabasezdatabase filenameTF)filenameequatez-freadfilez	read filez-Fformatz'Format of read files.

Allowed values: z, c                       |  v S N x)READ_FORMATr   Z/var/www/html/myenv/lib/python3.10/site-packages/Bio/Sequencing/Applications/_Novoalign.py<lambda>:       z/NovoalignCommandline.__init__.<locals>.<lambda>)checker_functionr   z-t	thresholdzThreshold for alignment scorec                 S   
   t | tS r   
isinstanceintr   r   r   r   r   A      
 z-ggap_openz!Gap opening penalty [default: 40]c                 S   r#   r   r$   r   r   r   r   r   G   r'   z-x
gap_extendz Gap extend penalty [default: 15]c                 S   r#   r   r$   r   r   r   r   r   M   r'   z-uunconvertedzRExperimental: unconverted cytosines penalty in bisulfite mode

Default: no penaltyc                 S   r#   r   r$   r   r   r   r   r   T   r'   z-l
good_basesz?Minimum number of good quality bases [default: log(N_g, 4) + 5]c                 S   r#   r   r$   r   r   r   r   r   [   r'   z-hhomopolymerz>Homopolymer read filter [default: 20; disable: negative value]c                 S   r#   r   r$   r   r   r   r   r   a   r'   z-aadapter3z`Strips a 3' adapter sequence prior to alignment.

With paired ends two adapters can be specifiedc                 S   r#   r   r%   strr   r   r   r   r   i   r'   z-ntruncatez,Truncate to specific length before alignmentc                 S   r#   r   r$   r   r   r   r   r   o   r'   z-strimmingzWIf fail to align, trim by s bases until they map or become shorter than l.

Ddefault: 2c                 S   r#   r   r$   r   r   r   r   r   v   r'   z-5adapter5zKStrips a 5' adapter sequence.

Similar to -a (adaptor3), but on the 5' end.c                 S   r#   r   r.   r   r   r   r   r   }   r'   z-oreportz@Specifies the report format.

Allowed values: %s
Default: Nativec                    r   r   r   r   )REPORT_FORMATr   r   r      r    z-Qqualityz<Lower threshold for an alignment to be reported [default: 0]c                 S   r#   r   r$   r   r   r   r   r      r'   z-Rrepeatsz]If score difference is higher, report repeats.

Otherwise -r read method applies [default: 5]c                 S   r#   r   r$   r   r   r   r   r      r'   z-rr_methodzhMethods to report reads with multiple matches.

Allowed values: %s
'All' and 'Exhaustive' accept limits.c                    s   |   d  v S )Nr   )splitr   )REPEAT_METHODr   r   r          z-erecordedzlAlignments recorded with score equal to the best.

Default: 1000 in default read method, otherwise no limit.c                 S   r#   r   r$   r   r   r   r   r      r'   z-qqual_digitsz.Decimal digits for quality scores [default: 0]c                 S   r#   r   r$   r   r   r   r   r      r'   z-ifragmentzKFragment length (2 reads + insert) and standard deviation [default: 250 30]c                 S   s   t |  dkS )N   )lenr8   r   r   r   r   r      r:   z-v	variationz*Structural variation penalty [default: 70]c                 S   r#   r   r$   r   r   r   r   r      r'   z-mmiRNAzQSets miRNA mode and optionally sets a value for the region scanned [default: off]c                 S   r#   r   r$   r   r   r   r   r      r'   z-ccoreszGNumber of threads, disabled on free versions [default: number of cores]c                 S   r#   r   r$   r   r   r   r   r      r'   z-kread_calz4Read quality calibration from file (mismatch counts)c                 S   r#   r   r.   r   r   r   r   r      r'   z-K	write_calz,Accumulate mismatch counts and write to filec                 S   r#   r   r.   r   r   r   r   r      r'   N)r   join
parametersr   __init__)selfcmdkwargsr   )r   r9   r4   r   rG   ,   s2  


  "zNovoalignCommandline.__init__N)r   )__name__
__module____qualname____doc__rG   r   r   r   r   r      s    r   __main__)run_doctestN)rN   Bio.Applicationr   r   r   rK   
Bio._utilsrP   r   r   r   r   <module>   s    I
