Skip to content

Commit

Permalink
modify alph_type conditionnal, remove createdb-mode parameter and TWI…
Browse files Browse the repository at this point in the history
…N parameters (automatically set by tool)
  • Loading branch information
hugolefeuvre committed Nov 25, 2024
1 parent 41cb56d commit 2e2364d
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 67 deletions.
41 changes: 13 additions & 28 deletions tools/mmseqs2/mmseqs2_easy_linclust_clustering.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,10 @@ mmseqs easy-linclust
'result'
'tmp'
#if '$alph_type.type' == "amino_acid"
--sub-mat 'blosum62.out'
--alph-size $alph_type.type.alph_size_amino_acid
#if '$alph_type.dbtype' == "1"
--comp-bias-corr-scale $alph_type.type.comp_bias_corr_scale
--gap-open 11
--gap-extend 1
--kmer-per-seq-scale $alph_type.type.kmer_per_seq_scale
#elif '$alph_type.type' == "nucleotide"
--sub-mat 'nucleotide.out'
--alph-size $alph_type.type.alph_size_nucleotide
--gap-open 5
--gap-extend 2
#elif '$alph_type.dbtype' == "2"
--zdrop $alph_type.type.zdrop
--kmer-per-seq-scale $alph_type.type.kmer_per_seq_scale
--adjust-kmer-len $alph_type.type.adjust_kmer_len
Expand Down Expand Up @@ -81,9 +73,8 @@ mmseqs easy-linclust
##Misc options
--rescore-mode $misc.rescore_mode
--dbtype $misc.dbtype
--dbtype $alph_type.dbtype
--shuffle $misc.shuffle
--createdb-mode $misc.createdb_mode
--id-offset $misc.id_offset
##Common options
Expand All @@ -104,17 +95,17 @@ mmseqs easy-linclust
<inputs>
<param name="input_fasta" type="data" format="fasta,fasta.gz" label="Input fasta file" help="" />
<conditional name="alph_type">
<param name="type" type="select" label="Alphabet type" help="" >
<option value="amino_acid" selected="true">Amino acid</option>
<option value="nucleotide">Nucleotide</option>
<param argument="--dbtype" type="select" label="Input data type" help="" >
<option value="0" selected="true">Automatic</option>
<option value="1">Amino acid</option>
<option value="2">Nucleotides</option>
</param>
<when value="amino_acid">
<param argument="--alph-size" name="alph_size_amino_acid" type="integer" min="2" max="21" value="21" label="Alphabet size" help=""/>
<when value="0"/>
<when value="1">
<param argument="--comp-bias-corr-scale" type="float" min="0" max="1" value="1" label="Scale composition bias correction" help=""/>
<param argument="--kmer-per-seq-scale" type="float" min="0" value="0.000" label="Scale k-mer per sequence based on sequence length" help=""/>
</when>
<when value="nucleotide">
<param argument="--alph-size" name="alph_size_nucleotide" type="integer" min="2" max="5" value="5" label="Alphabet size" help=""/>
<when value="2">
<param argument="--zdrop" type="integer" min="0" value="40" label="Maximal allowed difference between score values before alignment is truncated" help=""/>
<param argument="--kmer-per-seq-scale" type="float" min="0" value="0.200" label="Scale k-mer per sequence based on sequence length" help=""/>
<param argument="--adjust-kmer-len" type="boolean" checked="false" truevalue="1" falsevalue="0" label="Adjust k-mer length based on specificity" help=""/>
Expand Down Expand Up @@ -177,16 +168,7 @@ mmseqs easy-linclust
<option value="3">Global alignment</option>
<option value="4">Longest alignment fulfilling window quality criterion</option>
</param>
<param argument="--dbtype" type="select" label="Database type" help="" >
<option value="0" selected="true">Automatic</option>
<option value="1">Amino acid</option>
<option value="2">Nucleotides</option>
</param>
<param argument="--shuffle" type="boolean" checked="true" truevalue="1" falsevalue="0" label="Shuffle input database" help=""/>
<param argument="--createdb-mode" type="select" label="Createdb mode" help="" >
<option value="0">Copy data</option>
<option value="1" selected="true">Soft link data and write new index (works only with single line fasta/q)</option>
</param>
<param argument="--id-offset" type="integer" min="0" value="0" label="Numeric ids in index file are offset by this value" help=""/>
</section>
<expand macro="common_section"/>
Expand Down Expand Up @@ -215,6 +197,9 @@ mmseqs easy-linclust
<tests>
<test expect_num_outputs="3">
<param name="input_fasta" value="light_mystery_reads.fasta" ftype="fasta"/>
<conditional name="alph_type">
<param name="dbtype" value="2"/>
</conditional>
<output name="output_rep_seq" ftype="fasta">
<assert_contents>
<has_text text="TACTTCTCAGCTGTACTGTTTCTTGGTGTAGGGTCAACAACCCTTCAATGGATGTTCTCTTACTACCCAACCGATTGGGCGCACTACCGGGTCACATATGC"/>
Expand Down
61 changes: 22 additions & 39 deletions tools/mmseqs2/mmseqs2_taxonomy_assignment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ ln -s -f '${createdb.input_fasta}' 'input' &&
mmseqs createdb
'input'
'sequenceDB'
--dbtype '$createdb.dbtype'
--createdb-mode $createdb.createdb_mode
--dbtype '$createdb.alph_type.dbtype'
--shuffle $createdb.shuffle &&
cp -r '$createtaxdb.database_type.mmseqs2_db_select.fields.path'/database* . &&
Expand Down Expand Up @@ -44,20 +43,10 @@ mmseqs taxonomy
#end if
'output_taxonomy'
'tmp'
#if str($taxonomy.alph_type.type) == "amino_acid"
--sub-mat 'blosum62.out'
--alph-size $taxonomy.alph_type.alph_size_amino_acid
--comp-bias-corr-scale $taxonomy.alph_type.comp_bias_corr_scale
--seed-sub-mat 'VTML80.out'
--gap-open 11
--gap-extend 1
#elif str($taxonomy.alph_type.type) == "nucleotide"
--sub-mat 'nucleotide.out'
--alph-size $taxonomy.alph_type.alph_size_nucleotide
--seed-sub-mat 'nucleotide.out'
--gap-open 5
--gap-extend 2
--zdrop $taxonomy.alph_type.zdrop
#if str($createdb.alph_type.dbtype) == "1"
--comp-bias-corr-scale $createdb.alph_type.comp_bias_corr_scale
#elif str($createdb.alph_type.dbtype) == "2"
--zdrop $createdb.alph_type.zdrop
#end if
##Pre-filter options
--add-self-matches $taxonomy.prefilter.add_self_matches
Expand Down Expand Up @@ -218,15 +207,20 @@ mmseqs createtsv
<inputs>
<section name="createdb" title="Convert FASTA/Q file(s) to MMseqs sequence DB format" expanded="true">
<param name="input_fasta" type="data" format="fasta,fastq,fasta.gz,fastq.gz" label="Input fasta file" help="" />
<param argument="--dbtype" type="select" label="Input type" help="" >
<option value="0" selected="true">Auto</option>
<option value="1">Amino acid</option>
<option value="2">Nucleotides</option>
</param>
<param argument="--createdb-mode" type="select" label="Create DB mode" help="" >
<option value="0" selected="true">Copy data</option>
<option value="1">Soft link data and write new index (works only with single line fasta/q)</option>
</param>
<conditional name="alph_type">
<param argument="--dbtype" type="select" label="Input type" help="" >
<option value="0" selected="true">Auto</option>
<option value="1">Amino acid</option>
<option value="2">Nucleotides</option>
</param>
<when value="0"/>
<when value="1">
<param argument="--comp-bias-corr-scale" type="float" min="0" max="1" value="1" label="Scale composition bias correction" help=""/>
</when>
<when value="2">
<param argument="--zdrop" type="integer" min="0" value="40" label="Maximal allowed difference between score values before alignment is truncated" help=""/>
</when>
</conditional>
<param argument="--shuffle" type="boolean" checked="true" label="Shuffle input database" truevalue="1" falsevalue="0" optional="true" help="" />
</section>
<section name="createtaxdb" title="Add taxonomic labels to reference sequence DB" expanded="true">
Expand Down Expand Up @@ -272,20 +266,6 @@ mmseqs createtsv
<param argument="--taxon-list" type="text" optional="true" value="" label="Taxonomy ID" help="Possibly multiple values separated by ','"/>
</section>
<section name="taxonomy" title="Taxonomy assignment by computing the lowest common ancestor of homologs">
<conditional name="alph_type">
<param name="type" type="select" label="Alphabet type" help="" >
<option value="amino_acid" selected="true">Amino acid</option>
<option value="nucleotide">Nucleotide</option>
</param>
<when value="amino_acid">
<param argument="--alph-size" name="alph_size_amino_acid" type="integer" min="2" max="21" value="21" label="Alphabet size" help=""/>
<param argument="--comp-bias-corr-scale" type="float" min="0" max="1" value="1" label="Scale composition bias correction" help=""/>
</when>
<when value="nucleotide">
<param argument="--alph-size" name="alph_size_nucleotide" type="integer" min="2" max="5" value="5" label="Alphabet size" help=""/>
<param argument="--zdrop" type="integer" min="0" value="40" label="Maximal allowed difference between score values before alignment is truncated" help=""/>
</when>
</conditional>
<section name="prefilter" title="Pre-filter">
<expand macro="prefilter_common_parameters" />
<param argument="--spaced-kmer-mode" type="select" label="Spaced k-mer mode" help="">
Expand Down Expand Up @@ -499,6 +479,9 @@ mmseqs createtsv
<test expect_num_outputs="2">
<section name="createdb">
<param name="input_fasta" value="light_mystery_reads.fasta" ftype="fasta"/>
<conditional name="alph_type">
<param name="dbtype" value="2"/>
</conditional>
</section>
<section name="createtaxdb">
<conditional name="database_type">
Expand Down

0 comments on commit 2e2364d

Please sign in to comment.