item:ProbCons
itemmeta: P
seqtype:*
itemmethod:(GOTO_LOCAL_DIR; \
            arb_sed 's/#/>HASH_/' <TmpInputFile | \
            arb_sed 's/%/>PERCENT_/' | \
            arb_sed 's/"/>QUOTE_/'| \
            arb_sed 's/@/>AT_/' | \
            arb_sed '/^[^>]/ y/./-/' > probcons_in; \
            RUN_IN_WINDOW(($ARBHOME/bin/probcons -pre $PRE_TRAINING_REPS -ir $PASSES -c $REPS probcons_in > probcons_out;)); \
            arb_sed 's/>HASH_/#/' <probcons_out | \
            arb_sed 's/>PERCENT_/%/' | \
            arb_sed 's/>QUOTE_/"/' | \
            arb_sed 's/>AT_/@/' > TmpOutputFile; RM_LOCAL_FILES(probcons_in* probcons_out* TmpInputFile) )

arg:REPS
argtype:choice_menu
arglabel:Passes of consistency transformation
argtype:slider
argmin:0
argmax:5
argvalue:2


arg:PASSES
arglabel:Passes of iterative refinement
argtype:slider
argmin:0
argmax:1000
argvalue:100

arg:PRE_TRAINING_REPS
arglabel:Rounds of pre-training before aligning the sequences
argtype:slider
argmin:0
argmax:20
argvalue:0

in:TmpInputFile
informat:flat
intyped:detailed
insave:

out:TmpOutputFile
outformat:flat

//----------------------------------------------------

item:Muscle
itemmeta: M
seqtype:*
itemmethod:(GOTO_LOCAL_DIR; \
            arb_sed 's/#/>HASH_/' <TmpInputFile | \
            arb_sed 's/%/>PERCENT_/' | \
            arb_sed 's/"/>QUOTE_/'| \
            arb_sed 's/@/>AT_/' | \
            arb_sed '/^[^>]/ y/./-/' > muscle_in; \
            RUN_IN_WINDOW(($ARBHOME/bin/muscle $SCORE $DIAGS $ANCHORS $DIMER $BRENNER -in muscle_in -out muscle_out -maxiters $MAXITERS;)); \
            arb_sed 's/>HASH_/#/' <muscle_out | \
            arb_sed 's/>PERCENT_/%/' | \
            arb_sed 's/>QUOTE_/"/' | \
            arb_sed 's/>AT_/@/' > TmpOutputFile; RM_LOCAL_FILES(muscle_in* muscle_out* TmpInputFile))

arg:MAXITERS
argtype:text
arglabel:Maximum number of iterations to run(Use 2 for large datasets)
argtext:16

//arg:ANCHORS
//argtype:choice_menu
//arglabel:Use anchor optimization in tree dependent refinement iterations
//argchoice:Yes(default):-anchors
//argchoice:No:-noanchors

//arg:BRENNER
//argtype:choice_menu
//arglabel:Use Steven Brenner's method for computing the root alignment
//argchoice:No(default):
//argchoice:Yes:-brenner

//arg:DIMER
//argtype:choice_menu
//arglabel:Use dimer approximation for the SP score\n(faster, slightly less accurate)
//argchoice:No(default):
//argchoice:Yes:-dimer

//arg:DIAGS
//argtype:choice_menu
//arglabel:Use diagonal optimizations\n(faster, especially for closely related sequences,\nbut may be less accurate)
//argchoice:No(default):
//argchoice:Yes:-diags

//arg:SCORE
//argtype:choice_menu
//arglabel:Scoring
//argchoice:Log-expectation profile score (VTML240)(default):-le
//argchoice:Sum-of-pairs protein profile score (PAM200):-sp
//argchoice:Sum-of-pairs profile score (VTML240):-sv


in:TmpInputFile
informat:flat
intyped:detailed
insave:

out:TmpOutputFile
outformat:flat

//-------------------------------------------------------------------

item:Mafft
itemmeta: f
seqtype:*
itemmethod:(GOTO_LOCAL_DIR; \
            arb_sed 's/#/>HASH_/' <TmpInputFile | \
            arb_sed 's/%/>PERCENT_/' | \
            arb_sed 's/"/>QUOTE_/'| \
            arb_sed 's/@/>AT_/' | \
            arb_sed '/^[^>]/ y/./-/' > mafft_in; \
            RUN_IN_WINDOW(($ARBHOME/bin/$COMMAND $METHOD --preservecase --ep $OFFSET $SCORING_MATRIX mafft_in > mafft_out;)); \
            arb_sed 's/>HASH_/#/' <mafft_out | \
            arb_sed 's/>PERCENT_/%/' | \
            arb_sed 's/>QUOTE_/"/' | \
            arb_sed 's/>AT_/@/' > TmpOutputFile; RM_LOCAL_FILES(mafft_in* TmpInputFile mafft_out*))

itemhelp:mafft.help


arg:COMMAND
argtype:choice_menu
arglabel:Method
argchoice:Auto:mafft --auto 
argchoice:L-INS-i:mafft-linsi
argchoice:G-INS-i:mafft-ginsi
argchoice:E-INS-i:mafft-einsi
argchoice:Q-INS-i:mafft-qinsi
argchoice:X-INS-i:mafft-xinsi
argchoice:FFT-NS-i:mafft-fftnsi
argchoice:FFT-NS-2:mafft-fftns
argchoice:NW-NS-i:mafft-nwnsi
argchoice:NW-NS-2:mafft-nwns

arg:SCORING_MATRIX
argtype:choice_menu
arglabel:Scoring matrix
argchoice:BLOSUM62:--bl 62
argchoice:BLOSUM30:--bl 30
argchoice:BLOSUM45:--bl 45
argchoice:BLOSUM80:--bl 80
argchoice:JTT100:--jtt 100
argchoice:JTT200:--jtt 200
argchoice:JTT200:--jtt 200
argchoice:1PAM / K=2:--kimura 1
argchoice:20PAM / K=2:--kimura 20
argchoice:200PAM / K=2:--kimura 200


arg:OFFSET
argtype:text
arglabel:Offset value [0..1]\n(Use Values >0.1 for closely related sequences)
argtext:0.5


in:TmpInputFile
informat:flat
intyped:detailed
insave:

out:TmpOutputFile
outformat:flat

//--------------------------------------------------------

item:ClustalW automatic
itemmeta: W
seqtype:*
itemmethod:(GOTO_LOCAL_DIR; \
            tr '"%//' '>' <TmpInputFile >clus_in; \
            RUN_IN_WINDOW((clustalw -output=PIR -infile=clus_in -align ; \
                           cat clus_in.pir | sed "s/^>DL;/#/g" | sed "s/^>P1;/%/g" | sed "s/^\*$//g" >TmpOutputFile; )); \
            RM_LOCAL_FILES(clus_in* TmpInputFile))

itemhelp:clustalw.help


in:TmpInputFile
informat:flat
insave:

out:TmpOutputFile
outformat:flat

// --------------------------------------------------------------------------------

item:Create ClustalW Profile 2
itemmeta: C
seqtype:*
itemmethod:(GOTO_LOCAL_DIR ; tr '"%//' '>' <TmpInputFile >../clus_prf ; RM_LOCAL_FILES(TmpInputFile))

itemhelp:clustalw.help

in:TmpInputFile
informat:flat
insave:

// --------------------------------------------------------------------------------

item:ClustalW Profile Alignment
itemmeta: A
seqtype:*
itemmethod:(GOTO_LOCAL_DIR; \
            tr '"%//' '>' <TmpInputFile >clus_in; \
            RUN_IN_WINDOW((clustalw -output=PIR -profile1=clus_in -profile2=../clus_prf -align ; \
                           cat clus_in.pir | arb_sed "s/^>DL;/#/g" | sed "s/^>P1;/%/g" | arb_sed "s/^\*$//g" >TmpOutputFile; )); \
            RM_LOCAL_FILES(clus_in* TmpInputFile))

itemhelp:clustalw.help


in:TmpInputFile
informat:flat
insave:

out:TmpOutputFile
outformat:flat

// --------------------------------------------------------------------------------

item:ClustalW DNA Alignment (fast)
seqtype: N
itemmeta: N
itemmethod:(GOTO_LOCAL_DIR; \
            tr '"%//' '>' <TmpInputFile >clus_in ; \
            RUN_IN_WINDOW((clustalw -output=PIR -infile=clus_in -align \
                                    -quicktree $INTERACTIVE \
                                    -ktuple=$KTUPLE -topdiags=$TOPDIAGS \
                                    -window=$WINDOW -pairgap=$PAIRGAP \
                                    -score=$SCORE \
                                    -type=DNA -transweight=$TRANSWEIGHT \
                                    -gapopen=$GOP -gapext=$GEP -maxdiv=$MAXDIV \
                                    -dnamatrix=$DNAMATRIX; \
                           cat clus_in.pir | arb_sed "s/^>DL;/#/g" | arb_sed "s/^>P1;/%/g" | arb_sed "s/^\*$//g" >TmpOutputFile; )) ; \
           RM_LOCAL_FILES(clus_in* TmpInputFile))

itemhelp:clustalw.help

// parameters for fast pairwise alignment:

arg:PAIRGAP
arglabel:Gap penalty (pairwise ali)
argtype:slider
argmin:1
argmax:500
argvalue:5

arg:KTUPLE
arglabel:K-tuple size
argtype:slider
argmin:1
argmax:4
argvalue:2

arg:TOPDIAGS
arglabel:No. of top diagonals
argtype:slider
argmin:1
argmax:50
argvalue:4

arg:WINDOW
arglabel:Window size
argtype:slider
argmin:1
argmax:50
argvalue:4

// parameters for multiple alignment:

arg:DNAMATRIX
argtype:choice_menu
arglabel:Weighting matrix (multiple ali)
argchoice:IUB:IUB
argchoice:CLUSTALW:CLUSTALW

arg:GOP
argtype:slider
arglabel:Gap Open Penalty
argmin:0
argmax:100
argvalue:15

arg:GEP
arglabel:Gap Extend Penalty
argtype:slider
argmin:0
argmax:10
argvalue:6.66

arg:MAXDIV
arglabel:% identity for delay
argtype:slider
argmin:0
argmax:100
argvalue:30

arg:TRANSWEIGHT
arglabel:Transition weight
argtype:slider
argmin:0.0
argmax:1.0
argvalue:0.5

arg:INTERACTIVE
arglabel:Interactive
argtype:choice_menu
argchoice:No:
argchoice:Yes:-interactive

in:TmpInputFile
informat:flat
insave:

out:TmpOutputFile
outformat:flat

// --------------------------------------------------------------------------------

item:ClustalW DNA Alignment (slow & accurate)
seqtype: N
itemmeta: s
itemmethod:(GOTO_LOCAL_DIR; \
            tr '"%//' '>' <TmpInputFile >clus_in ; \
            RUN_IN_WINDOW((clustalw -output=PIR -infile=clus_in -align \
                                     $INTERACTIVE \
                                    -pwdnamatrix=$PWDNAMATRIX \
                                    -pwgapopen=$PWGOP -pwgapext=$PWGEP \
                                    -type=DNA -transweight=$TRANSWEIGHT \
                                    -gapopen=$GOP -gapext=$GEP -maxdiv=$MAXDIV \
                                    -dnamatrix=$DNAMATRIX; \
                           cat clus_in.pir | arb_sed "s/^>DL;/#/g" | sed "s/^>P1;/%/g" | arb_sed "s/^\*$//g" >TmpOutputFile; )) ; \
            RM_LOCAL_FILES(clus_in* TmpInputFile))

itemhelp:clustalw.help

// parameters for pairwise alignment:

arg:PWDNAMATRIX
argtype:choice_menu
arglabel:Weighting matrix (pairwise ali)
argchoice:IUB:IUB
argchoice:CLUSTALW:CLUSTALW

arg:PWGOP
argtype:slider
arglabel:Gap Open Penalty
argmin:0
argmax:100
argvalue:15

arg:PWGEP
arglabel:Gap Extend Penalty
argtype:slider
argmin:0
argmax:10
argvalue:6.66

// parameters for multiple alignment:

arg:DNAMATRIX
argtype:choice_menu
arglabel:Weighting matrix (multiple ali)
argchoice:IUB:IUB
argchoice:CLUSTALW:CLUSTALW

arg:GOP
argtype:slider
arglabel:Gap Open Penalty
argmin:0
argmax:100
argvalue:15

arg:GEP
arglabel:Gap Extend Penalty
argtype:slider
argmin:0
argmax:10
argvalue:6.66

arg:MAXDIV
arglabel:% identity for delay
argtype:slider
argmin:0
argmax:100
argvalue:30

arg:TRANSWEIGHT
arglabel:Transition weight
argtype:slider
argmin:0.0
argmax:1.0
argvalue:0.5

arg:INTERACTIVE
arglabel:Interactive
argtype:choice_menu
argchoice:No:
argchoice:Yes:-interactive

in:TmpInputFile
informat:flat
insave:

out:TmpOutputFile
outformat:flat

// --------------------------------------------------------------------------------

item:ClustalW Protein Alignment (fast)
seqtype: A
itemmeta: o
itemmethod:(GOTO_LOCAL_DIR; \
            tr '"%//' '>' <TmpInputFile >clus_in ; \
            RUN_IN_WINDOW((clustalw -output=PIR -infile=clus_in -align \
                                    -quicktree  $INTERACTIVE \
                                    -ktuple=$KTUPLE -topdiags=$TOPDIAGS \
                                    -window=$WINDOW -pairgap=$PAIRGAP \
                                    -score=$SCORE \
                                    -type=PROTEIN -transweight=$TRANSWEIGHT \
                                    -gapopen=$GOP -gapext=$GEP -maxdiv=$MAXDIV \
                                    -matrix=$MATRIX $NEGMATRIX; \
                           cat clus_in.pir | arb_sed "s/^>DL;/#/g" | sed "s/^>P1;/%/g" | arb_sed "s/^\*$//g" >TmpOutputFile; )) ; \
            RM_LOCAL_FILES(clus_in* TmpInputFile))

itemhelp:clustalw.help

// parameters for fast pairwise alignment:

arg:PAIRGAP
arglabel:Gap penalty (pairwise ali)
argtype:slider
argmin:1
argmax:500
argvalue:3

arg:KTUPLE
arglabel:K-tuple size
argtype:slider
argmin:1
argmax:2
argvalue:1

arg:TOPDIAGS
arglabel:No. of top diagonals
argtype:slider
argmin:1
argmax:50
argvalue:5

arg:WINDOW
arglabel:Window size
argtype:slider
argmin:1
argmax:50
argvalue:5

// parameters for multiple alignment:

arg:MATRIX
argtype:choice_menu
arglabel:Weighting matrix (multiple ali)
argchoice:Gonnet series:GONNET
argchoice:Blosum series:BLOSUM
argchoice:PAM series:PAM
argchoice:ID matrix:ID

arg:GOP
argtype:slider
arglabel:Gap Open Penalty
argmin:0
argmax:100
argvalue:10

arg:GEP
arglabel:Gap Extend Penalty
argtype:slider
argmin:0
argmax:10
argvalue:0.2

arg:MAXDIV
arglabel:% identity for delay
argtype:slider
argmin:0
argmax:100
argvalue:30

arg:TRANSWEIGHT
arglabel:Transition weight
argtype:slider
argmin:0.0
argmax:1.0
argvalue:0.5

arg:NEGMATRIX
arglabel:Use negative matrix
argtype:choice_menu
argchoice:No:
argchoice:Yes:-negative

arg:INTERACTIVE
arglabel:Interactive
argtype:choice_menu
argchoice:No:
argchoice:Yes:-interactive

in:TmpInputFile
informat:flat
insave:

out:TmpOutputFile
outformat:flat

// --------------------------------------------------------------------------------

item:ClustalW Protein Alignment (slow & accurate)
seqtype: A
itemmeta: l
itemmethod:(GOTO_LOCAL_DIR; \
            tr '"%//' '>' <TmpInputFile >clus_in ; \
            RUN_IN_WINDOW((clustalw -output=PIR -infile=clus_in -align \
                                     $INTERACTIVE \
                                    -pwmatrix=$PWMATRIX \
                                    -pwgapopen=$PWGOP -pwgapext=$PWGEP \
                                    -type=PROTEIN -transweight=$TRANSWEIGHT \
                                    -gapopen=$GOP -gapext=$GEP -maxdiv=$MAXDIV \
                                    -matrix=$MATRIX $NEGMATRIX; \
                           cat clus_in.pir | arb_sed "s/^>DL;/#/g" | sed "s/^>P1;/%/g" | arb_sed "s/^\*$//g" >TmpOutputFile; )) ; \
            RM_LOCAL_FILES(clus_in* TmpInputFile))

itemhelp:clustalw.help

// parameters for pairwise alignment:

arg:PWMATRIX
argtype:choice_menu
arglabel:Weighting matrix (pairwise ali)
argchoice:Gonnet series:GONNET
argchoice:Blosum series:BLOSUM
argchoice:PAM series:PAM
argchoice:ID matrix:ID

arg:PWGOP
argtype:slider
arglabel:Gap Open Penalty
argmin:0
argmax:100
argvalue:10

arg:PWGEP
arglabel:Gap Extend Penalty
argtype:slider
argmin:0
argmax:10
argvalue:0.1

// parameters for multiple alignment:

arg:MATRIX
argtype:choice_menu
arglabel:Weighting matrix (multiple ali)
argchoice:Gonnet series:GONNET
argchoice:Blosum series:BLOSUM
argchoice:PAM series:PAM
argchoice:ID matrix:ID

arg:GOP
argtype:slider
arglabel:Gap Open Penalty
argmin:0
argmax:100
argvalue:10

arg:GEP
arglabel:Gap Extend Penalty
argtype:slider
argmin:0
argmax:10
argvalue:0.2

arg:MAXDIV
arglabel:% identity for delay
argtype:slider
argmin:0
argmax:100
argvalue:30

arg:TRANSWEIGHT
arglabel:Transition weight
argtype:slider
argmin:0.0
argmax:1.0
argvalue:0.5

arg:NEGMATRIX
arglabel:Use negative matrix
argtype:choice_menu
argchoice:No:
argchoice:Yes:-negative

arg:INTERACTIVE
arglabel:Interactive
argtype:choice_menu
argchoice:No:
argchoice:Yes:-interactive

in:TmpInputFile
informat:flat
insave:

out:TmpOutputFile
outformat:flat

// --------------------------------------------------------------------------------

item:Assemble Contigs
itemmeta: g
seqtype:*
itemmethod: ( GOTO_LOCAL_DIR; \
              tr '"%//' '>' <TmpInputFile > tr.out; \
              CAP2 tr.out $OVERLAP $PMATCH >  TmpOutputFile; \
              RM_LOCAL_FILES(TmpInputFile tr.out) )
itemhelp:CAP2.help

arg:OVERLAP
argtype:slider
arglabel:Minimum overlap?
argmin:5
argmax:100
argvalue:20

arg:PMATCH
argtype:slider
arglabel:Percent match required within overlap
argmin:25
argmax:100
argvalue:90

in:TmpInputFile
informat:flat
insave:

out:TmpOutputFile
outformat:gde

