Skip to content

Commit

Permalink
cutadapt: fix --max-expected-errors and add --max-average-error-rate
Browse files Browse the repository at this point in the history
should be float
  • Loading branch information
bernt-matthias committed Nov 6, 2023
1 parent 9e71cad commit 0551660
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion tools/cutadapt/cutadapt.xml
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,8 @@ $read_mod_options.zero_cap
<option value="first">First: will make a decision about the read pair by inspecting whether the filtering criterion applies to the first read, ignoring the second read.</option>

</param>
<param argument="--max-expected-errors" type="integer" min="0" optional="true" value="" label="Max expected errors" help="Discard reads whose expected number of errors (computed from quality values) exceeds this value." />
<param argument="--max-expected-errors" type="float" min="0" optional="true" value="" label="Max expected errors" help="Discard reads whose expected number of errors (computed from quality values) exceeds this value." />
<param argument="--max-average-error-rate" type="float" min="0" max="1" optional="true" value="" label="Max average expected errors" help="As --max-expected-errors (see above), but divided by length to account for reads of varying length" />
<param argument="--discard-cassava" type="boolean" truevalue="--discard-cassava" falsevalue="" checked="false" label="Discard CASAVA filtering" help="Discard reads that did not pass CASAVA filtering (header has :Y:)." />
</section>

Expand Down Expand Up @@ -1244,6 +1245,29 @@ $read_mod_options.zero_cap
<has_text text="--quality-base=64"/>
</assert_command>
</test>

<!-- https://github.com/marcelm/cutadapt/blame/3407ac0004d04b11ae7157934a6665ecaf82c328/tests/test_commandline.py#L1028 -->
<test expect_num_outputs="3">
<param name="type" value="single" />
<param name="input_1" ftype="fastqillumina" value="cutadapt/data/maxee.fastq" />
<param name="max_expected_errors" value="0.9"/>
<param name="output_selector" value="report,info_file"/>
<output name="out1" file="cutadapt/cut/maxee.fastq" ftype="fastqillumina"/>
<output name="report">
<assert_contents>
<has_text text="Reads with too many exp. errors: 2"/>
</assert_contents>
</output>
<output name="info_file">
<assert_contents>
<has_n_lines n="4"/>
<has_text text="ee_0.8&#09;-1&#09;ACGTTGCA&#09;++++++++"/>
</assert_contents>
</output>
<assert_command>
<has_text text="--max-expected-errors=0.9"/>
</assert_command>
</test>
</tests>

<help><![CDATA[
Expand Down

0 comments on commit 0551660

Please sign in to comment.