Skip to content

Commit

Permalink
Adjust tests to new cli options use
Browse files Browse the repository at this point in the history
  • Loading branch information
wm75 committed Apr 16, 2024
1 parent 7763b60 commit 3e32a4a
Showing 1 changed file with 36 additions and 33 deletions.
69 changes: 36 additions & 33 deletions tools/cutadapt/cutadapt.xml
Original file line number Diff line number Diff line change
Expand Up @@ -499,10 +499,9 @@ $read_mod_options.zero_cap
<assert_command>
<not_has_text text="--discard-trimmed"/>
<not_has_text text="--discard-untrimmed"/>
<not_has_text text="--minimum-length"/>
<not_has_text text="--maximum-length"/>
<not_has_text text="-m"/>
<not_has_text text="-M"/>
<not_has_text text="--max-n"/>
<has_text text="--pair-filter=any"/>
</assert_command>
</test>
<!-- Ensure paired collection works -->
Expand Down Expand Up @@ -597,7 +596,9 @@ $read_mod_options.zero_cap
</conditional>
</repeat>
</section>
<param name="nextseq_trim" value="20" />
<section name="other_trimming_options">
<param name="nextseq_trim" value="20" />
</section>
<output name="out1" decompress="true" file="cutadapt_nextseq_out.fq.gz" ftype="fastq.gz"/>
</test>
<!-- Ensure Report and Info file output work -->
Expand Down Expand Up @@ -740,10 +741,10 @@ $read_mod_options.zero_cap
</section>
<assert_command>
<has_text text="--discard-untrimmed"/>
<has_text text="--minimum-length=1" />
<has_text text="--maximum-length=1000"/>
<has_text text="--max-n=0"/>
<has_text text="--pair-filter=both"/>
<has_text text="-m 1 " />
<has_text text="-M 1000 "/>
<has_text text="--max-n 0"/>
<has_text text="--pair-filter both"/>
</assert_command>
</test>
<!-- Test cut option -->
Expand Down Expand Up @@ -889,17 +890,17 @@ $read_mod_options.zero_cap
<param name="adapter" value="CTACAAG"/>
</conditional>
</repeat>
<param name="minimum_length2" value="10"/>
</section>
<section name="filter_options">
<param name="minimum_length" value="30"/>
<param name="minimum_length2" value="10"/>
<param name="pair_filter" value="both"/>
</section>
<output name="out1" decompress="true" file="cutadapt_out1_min_length.fq.gz" ftype="fastq.gz"/>
<output name="out2" decompress="true" file="cutadapt_out2_min_length.fq.gz" ftype="fastq.gz"/>
<assert_command>
<has_text text="--minimum-length=30:10"/>
<has_text text="--pair-filter=both"/>
<has_text text="-m 30:10"/>
<has_text text="--pair-filter both"/>
</assert_command>
</test>
<!-- Test maximum length paired-reads -->
Expand All @@ -922,17 +923,17 @@ $read_mod_options.zero_cap
<param name="adapter" value="AGATCGGAAGAGC"/>
</conditional>
</repeat>
<param name="maximum_length2" value="30"/>
</section>
<section name="filter_options">
<param name="pair_filter" value="both"/>
<param name="maximum_length" value="50"/>
<param name="maximum_length2" value="30"/>
</section>
<output name="out1" decompress="true" file="cutadapt_out1_max_length.fq.gz" ftype="fastq.gz"/>
<output name="out2" decompress="true" file="cutadapt_out2_max_length.fq.gz" ftype="fastq.gz"/>
<assert_command>
<has_text text="--maximum-length=50:30"/>
<has_text text="--pair-filter=both"/>
<has_text text="-M 50:30"/>
<has_text text="--pair-filter both"/>
</assert_command>
</test>
<!-- Test combination maximum and minimum length paired reads -->
Expand All @@ -955,19 +956,19 @@ $read_mod_options.zero_cap
<param name="adapter2" value="AGATCGGAAGAGC"/>
</conditional>
</repeat>
<param name="maximum_length2" value="30"/>
</section>
<section name="filter_options">
<param name="pair_filter" value="both"/>
<param name="minimum_length" value="10"/>
<param name="maximum_length" value="50"/>
<param name="maximum_length2" value="30"/>
</section>
<output name="out1" decompress="true" file="cutadapt_out1_max_min_01.fq.gz" ftype="fastq.gz"/>
<output name="out2" decompress="true" file="cutadapt_out2_max_min_01.fq.gz" ftype="fastq.gz"/>
<assert_command>
<has_text text="--minimum-length=10"/>
<has_text text="--maximum-length=50:30"/>
<has_text text="--pair-filter=both"/>
<has_text text="-m 10 "/>
<has_text text="-M 50:30"/>
<has_text text="--pair-filter both"/>
</assert_command>
</test>
<test expect_num_outputs="2">
Expand All @@ -989,19 +990,19 @@ $read_mod_options.zero_cap
<param name="adapter2" value="AGATCGGAAGAGC"/>
</conditional>
</repeat>
<param name="minimum_length2" value="10"/>
</section>
<section name="filter_options">
<param name="pair_filter" value="both"/>
<param name="minimum_length" value="10"/>
<param name="minimum_length2" value="10"/>
<param name="maximum_length" value="50"/>
</section>
<output name="out1" decompress="true" file="cutadapt_out1_max_min_02.fq.gz" ftype="fastq.gz"/>
<output name="out2" decompress="true" file="cutadapt_out2_max_min_02.fq.gz" ftype="fastq.gz"/>
<assert_command>
<has_text text="--minimum-length=10:10"/>
<has_text text="--maximum-length=50"/>
<has_text text="--pair-filter=both"/>
<has_text text="-m 10:10"/>
<has_text text="-M 50 "/>
<has_text text="--pair-filter both"/>
</assert_command>
</test>
<!-- Test length options -->
Expand Down Expand Up @@ -1163,7 +1164,6 @@ $read_mod_options.zero_cap
<element name="reverse" ftype="fastq.gz" value="bwa-mem-fastq2.fq.gz" />
</collection>
</param>
<param name="quality_cutoff" value="5" />
<section name="r1">
<repeat name="adapters">
<conditional name="adapter_source">
Expand All @@ -1179,15 +1179,18 @@ $read_mod_options.zero_cap
<param name="adapter" value="AGATCGGAAGAGC"/>
</conditional>
</repeat>
</section>
<section name="other_trimming_options">
<param name="quality_cutoff" value="5"/>
<param name="quality_cutoff2" value="15,20"/>
</section>
<output_collection name="out_pairs" type="paired">
<element name="forward" decompress="true" file="cutadapt_out1.fq.gz" ftype="fastq.gz" />
<element name="reverse" decompress="true" file="cutadapt_out2_cutoff.fq.gz" ftype="fastq.gz" />
</output_collection>
<assert_command>
<has_text text="--quality-cutoff=5"/>
<has_text text="-Q=15,20"/>
<has_text text="-q 5"/>
<has_text text="-Q 15,20"/>
</assert_command>
</test>

Expand Down Expand Up @@ -1228,7 +1231,7 @@ $read_mod_options.zero_cap
<output name="out1" file="cutadapt/cut/polya.legacy.1.fasta" ftype="fasta"/>
<assert_command>
<has_text text="-a 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'"/>
<has_text text="--overlap=10"/>
<has_text text="-O 10"/>
</assert_command>
</test>

Expand All @@ -1248,7 +1251,7 @@ $read_mod_options.zero_cap
<output name="out1" file="cutadapt/cut/polya.legacy.1.fasta" ftype="fasta"/>
<assert_command>
<has_text text="-a 'A{35}'"/>
<has_text text="--overlap=10"/>
<has_text text="-O 10"/>
</assert_command>
</test>

Expand Down Expand Up @@ -1289,8 +1292,8 @@ $read_mod_options.zero_cap
<output name="out1" file="cutadapt/cut/illumina64.fastq" ftype="fastqillumina"/>
<assert_command>
<has_text text="-a 'XXXXXX'"/>
<has_text text="--quality-cutoff=10"/>
<has_text text="--quality-base=64"/>
<has_text text="-q 10"/>
<has_text text="--quality-base 64"/>
</assert_command>
</test>
<!-- fatstqillumina input https://github.com/marcelm/cutadapt/blob/e04cc32e392e1cbe0c518b4e0637cdf03533d440/tests/test_commandline.py#L257 -->
Expand All @@ -1302,8 +1305,8 @@ $read_mod_options.zero_cap
</section>
<output name="out1" file="cutadapt/cut/illumina64.fastq" ftype="fastqillumina"/>
<assert_command>
<has_text text="--quality-cutoff=10"/>
<has_text text="--quality-base=64"/>
<has_text text="-q 10"/>
<has_text text="--quality-base 64"/>
</assert_command>
</test>
<!-- https://github.com/marcelm/cutadapt/blame/3407ac0004d04b11ae7157934a6665ecaf82c328/tests/test_commandline.py#L1028 -->
Expand All @@ -1325,7 +1328,7 @@ $read_mod_options.zero_cap
</assert_contents>
</output>
<assert_command>
<has_text text="--max-expected-errors=0.9"/>
<has_text text="--max-ee 0.9"/>
</assert_command>
</test>
<!-- https://github.com/marcelm/cutadapt/blob/3407ac0004d04b11ae7157934a6665ecaf82c328/tests/test_commandline.py#L335 -->
Expand Down Expand Up @@ -1368,7 +1371,7 @@ $read_mod_options.zero_cap
<output name="out1" file="cutadapt/cut/wildcardN.fa" ftype="fasta" sort="true"/>
<assert_command>
<has_text text="--match-read-wildcards"/>
<has_text text="--error-rate=0.0"/>
<has_text text="-e 0.0"/>
<has_text text="-a 'GGGGGGG'"/>
</assert_command>
</test>
Expand Down

0 comments on commit 3e32a4a

Please sign in to comment.