<commit_before><tool id="neptune" name="Neptune: Signature Discovery" version="1.2.5.1">
  <description>Neptune identifies genomic signatures using an exact k-mer matching strategy while accommodating k-mer mismatches.</description>

  <requirements>
    <requirement type="package" version="1.2.5">neptune</requirement>
  </requirements>

  <stdio>
    <exit_code range="1:" />
  </stdio>

  <command>
    neptune

      --inclusion
      #for $i in $inclusion
        "$i"
      #end for

      --exclusion
      #for $i in $exclusion
        "$i"
      #end for

      #if $options.select == "advanced"

        #if $options.kmer:
          --kmer "$options.kmer"
        #end if

        #if $options.rate:
          --rate "$options.rate"
        #end if

        #if $options.exhits:
          --exhits "$options.exhits"
        #end if

        #if $options.size:
          --size "$options.size"
        #end if

      #end if

      --output results

      --parallelization \${GALAXY_SLOTS:-8}

      --organization 3

  </command>

  <inputs>
    <param name="inclusion" type="data_collection" collection_type="list" label="Inclusion" help="The inclusion targets in FASTA format." format="fasta"/>
    <param name="exclusion" type="data_collection" collection_type="list" label="Exclusion" help="The exclusion targets in FASTA format." format="fasta"/>

    <conditional name="options">
      <param name="select" type="select" label="Options Type">
        <option value="basic">Basic</option>
        <option value="advanced">Advanced</option>
      </param>
      <when value="basic">
      </when>
      <when value="advanced">
        <param name="kmer" type="integer" label="k" help="The size of the k-mers. This value is automatically calculated if left blank." optional="true"/>
        <param name="size" type="integer" label="Size" help="The minimum size of reported signatures. The default size is 4k." optional="true"/>
        <param name="rate" type="float" label="Rate" help="The probability of a mutation or error at an arbitrary position. The default value is 0.01." optional="true" value="0.01"/>
        <param name="exhits" type="integer" label="Minimum Exclusion" help="The minimum number of inclusion targets that must contain a k-mer observed in the reference to begin or continue building candidate signatures. This will be calculated if not specified." optional="true"  value="1"/>
      </when>
    </conditional>
  </inputs>

  <outputs>
    <data name="consolidated" from_work_dir="results/consolidated/consolidated.fasta" format="fasta" label="Neptune Signatures: $inclusion.name and $exclusion.name"></data>
    <data name="receipt" from_work_dir="results/receipt.txt" format="txt" label="Neptune Parameters: $inclusion.name and $exclusion.name"></data>
  </outputs>

  <tests>
    <test>
      <output name="receipt"/><commit_msg>Updating descriptions.<commit_after><tool id="neptune" name="Neptune: Signature Discovery" version="1.2.5.2">
  <description>identifies discriminatory sequences between two groups of sequences</description>

  <requirements>
    <requirement type="package" version="1.2.5">neptune</requirement>
  </requirements>

  <stdio>
    <exit_code range="1:" />
  </stdio>

  <command>
    neptune

      --inclusion
      #for $i in $inclusion
        "$i"
      #end for

      --exclusion
      #for $i in $exclusion
        "$i"
      #end for

      #if $options.select == "advanced"

        #if $options.kmer:
          --kmer "$options.kmer"
        #end if

        #if $options.rate:
          --rate "$options.rate"
        #end if

        #if $options.exhits:
          --exhits "$options.exhits"
        #end if

        #if $options.size:
          --size "$options.size"
        #end if

      #end if

      --output results

      --parallelization \${GALAXY_SLOTS:-8}

      --organization 3

  </command>

  <inputs>
    <param name="inclusion" type="data_collection" collection_type="list" label="Inclusion" help="The inclusion targets in FASTA format." format="fasta"/>
    <param name="exclusion" type="data_collection" collection_type="list" label="Exclusion" help="The exclusion targets in FASTA format." format="fasta"/>

    <conditional name="options">
      <param name="select" type="select" label="Options Type">
        <option value="basic">Basic</option>
        <option value="advanced">Advanced</option>
      </param>
      <when value="basic">
      </when>
      <when value="advanced">
        <param name="kmer" type="integer" label="k" help="The size of the k-mers. This value is automatically calculated if left blank." optional="true"/>
        <param name="size" type="integer" label="Size" help="  The minimum size of all reported candidate signatures. Identified candidate signatures shorter than this value will be discard. The default size is 4k." optional="true"/>
        <param name="rate" type="float" label="Rate" help="The probability of a mutation or error at an arbitrary position. The default value is 0.01." optional="true" value="0.01"/>
        <param name="exhits" type="integer" label="Maximum Exclusion" help="The maximum allowable number of exclusion targets that may contain a k-mer observed in the reference before terminating the construction of a candidate signature." optional="true"  value="1"/>
      </when>
    </conditional>
  </inputs>

  <outputs>
    <data name="consolidated" from_work_dir="results/consolidated/consolidated.fasta" format="fasta" label="Neptune Signatures: $inclusion.name and $exclusion.name"></data>
    <data name="receipt" from_work_dir="results/receipt.txt" format="txt" label="Neptune Parameters: $inclusion.name and $exclusion.name"></data>
  </outputs>

  <tests>
    <test>
      <output name="receipt"/>
{'fraction_non_alphanumeric': 0.13825363825363826, 'fraction_numerical': 0.006237006237006237, 'mean_word_length': 3.186366932559826, 'pattern_counts': {'":': 0, '<': 85, '<?xml version=': 0, '>': 85, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5687927', 'n_tokens_mistral': 1757, 'n_tokens_neox': 1652, 'n_words': 490}