Skip to content

Commit

Permalink
Merge pull request #6798 from bernt-matthias/umi-fixes
Browse files Browse the repository at this point in the history
umi-tools fixes
  • Loading branch information
bgruening authored Feb 28, 2025
2 parents 06d653e + be8c3fe commit 11a7415
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 37 deletions.
7 changes: 5 additions & 2 deletions tools/umi_tools/macros.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
<xml name="requirements">
<requirements>
<requirement type="package" version="@TOOL_VERSION@">umi_tools</requirement>
<yield />
<requirement type="package" version="1.21">samtools</requirement>
<requirement type="package" version="4.7">sed</requirement>
</requirements>
</xml>
<xml name="citations">
Expand Down Expand Up @@ -551,7 +552,9 @@ count for the gene.
<token name="@GROUPDEDUP_OPTIONS@"><![CDATA[
$gd.buffer_whole_contig
$gd.whole_contig
$gd.multimapping_detection_method
#if $gd.multimapping_detection_method
--multimapping-detection-method $gd.multimapping_detection_method
#end if
]]></token>

<xml name="log_input_macro">
Expand Down
Binary file modified tools/umi_tools/test-data/dedup_out1.bam
Binary file not shown.
Binary file modified tools/umi_tools/test-data/dedup_out2.bam
Binary file not shown.
Binary file modified tools/umi_tools/test-data/dedup_out3.bam
Binary file not shown.
Binary file modified tools/umi_tools/test-data/dedup_out4.bam
Binary file not shown.
Binary file modified tools/umi_tools/test-data/dedup_out5.bam
Binary file not shown.
Binary file modified tools/umi_tools/test-data/dedup_out6.bam
Binary file not shown.
6 changes: 1 addition & 5 deletions tools/umi_tools/umi-tools_counts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
<import>macros.xml</import>
</macros>
<expand macro="bio_tools"/>
<expand macro="requirements">
<!-- TODO see comment in LINK_SAM_BAM_INPUT -->
<requirement type="package" version="1.12">samtools</requirement>
<requirement type="package" version="4.7">sed</requirement>
</expand>
<expand macro="requirements"/>
<command detect_errors="exit_code"><![CDATA[
#import re
@LINK_SAM_BAM_INPUT@
Expand Down
16 changes: 7 additions & 9 deletions tools/umi_tools/umi-tools_dedup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
<import>macros.xml</import>
</macros>
<expand macro="bio_tools"/>
<expand macro="requirements">
<requirement type="package" version="1.21">samtools</requirement>
</expand>
<expand macro="requirements"/>
<command detect_errors="exit_code"><![CDATA[
@LINK_SAM_BAM_INPUT@
Expand Down Expand Up @@ -111,12 +109,12 @@
<output name="output" file="dedup_out4.bam" ftype="bam" lines_diff="2"/>
</test>
<test expect_num_outputs="1">
<param name="input" value="group_in5.bam" ftype="bam" />
<param name="input" value="group_in4.bam" ftype="bam" />
<section name="advanced">
<param name="random_seed" value="0" />
</section>
<conditional name="bc">
<param name="extract_umi_method" value="read_id" />
<param name="extract_umi_method" value="tag" />
<param name="umi_tag" value="BX" />
</conditional>
<section name="umi">
Expand All @@ -125,12 +123,12 @@
<output name="output" file="dedup_out5.bam" ftype="bam" lines_diff="2"/>
</test>
<test expect_num_outputs="1">
<param name="input" value="group_in6.bam" ftype="bam" />
<param name="input" value="group_in4.bam" ftype="bam" />
<section name="advanced">
<param name="random_seed" value="0" />
</section>
<conditional name="bc">
<param name="extract_umi_method" value="read_id" />
<param name="extract_umi_method" value="tag" />
<param name="umi_tag" value="BX" />
</conditional>
<section name="umi">
Expand All @@ -139,12 +137,12 @@
<output name="output" file="dedup_out6.bam" ftype="bam" lines_diff="2"/>
</test>
<test expect_num_outputs="5">
<param name="input" value="group_in6.bam" ftype="bam" />
<param name="input" value="group_in4.bam" ftype="bam" />
<section name="advanced">
<param name="random_seed" value="0" />
</section>
<conditional name="bc">
<param name="extract_umi_method" value="read_id" />
<param name="extract_umi_method" value="tag" />
<param name="umi_tag" value="BX" />
</conditional>
<section name="umi">
Expand Down
13 changes: 6 additions & 7 deletions tools/umi_tools/umi-tools_extract.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
]]></command>
<inputs>
<expand macro="input_types">
<param argument="--reconcile-pairs" type="boolean" truevalue="--reconcile-pairs" falsevalue="" checked="false" label="Allow unpaired reads" help="Allow the presences of reads in read2 input that are not present in read1 input. This allows cell barcode filtering of read1s without considering read2s" />
<param argument="--reconcile-pairs" type="boolean" truevalue="--reconcile-pairs" falsevalue="" checked="false" label="Allow unpaired reads" help="Allow the presences of reads in read2 input that are not present in read1 input. This allows cell barcode filtering of read1s without considering read2s" />
</expand>
<expand macro="fastq_barcode_extraction_options_macro"/>

Expand Down Expand Up @@ -134,8 +134,8 @@
<conditional name="extract_method_cond">
<param name="prime3" value="true" />
</conditional>
<param name="quality_selector" value="true" />
<param name="quality_filter_threshold" value="10" />
<param name="quality|quality_selector" value="true" />
<param name="quality|quality_filter_threshold" value="10" />
<param name="log" value="true"/>
<output name="out" file="out_SE.fastq" ftype="fastqsanger" />
<output name="out_log" >
Expand Down Expand Up @@ -166,7 +166,6 @@
<test expect_num_outputs="4">
<conditional name="input_type_cond">
<param name="input_type" value="paired_collection" /> <!-- same as before, but uncompressed -->
<param name="paired_type" value="no" />
<param name="input_readpair">
<collection type="paired" >
<element name="forward" ftype="fastqsanger" value="t_R1.fastq" />
Expand Down Expand Up @@ -194,7 +193,7 @@
<param name="input_read2" value="scrb_seq_fastq.2.gz" ftype="fastqsanger.gz" />
<param name="bc_pattern" value="CCCCCCNNNNNNNNNN" />
</conditional>
<param name="extract_method" value="string" />
<param name="extract_method_cond|extract_method" value="string" />
<param name="whitelist" value="scrb_seq_barcodes" />
<param name="log" value="true"/>
<output name="out2" file="scrb_extract.fastq.gz" decompress="true" ftype="fastqsanger.gz" />
Expand All @@ -206,7 +205,7 @@
<param name="input_read2" value="scrb_seq_fastq.2.gz" ftype="fastqsanger.gz" />
<param name="bc_pattern" value="^(?P&lt;cell_1&gt;.{6})(?P&lt;umi_1&gt;.{10})" />
</conditional>
<param name="extract_method" value="regex" />
<param name="extract_method_cond|extract_method" value="regex" />
<param name="whitelist" value="scrb_seq_barcodes" />
<param name="log" value="true"/>
<output name="out2" file="scrb_extract.fastq.gz" decompress="true" ftype="fastqsanger.gz" />
Expand All @@ -218,7 +217,7 @@
<param name="input_read2" value="read_R2.200.gz" ftype="fastqsanger.gz" />
<param name="bc_pattern" value="NNNNNNCCCCCC" />
</conditional>
<param name="extract_method" value="string" />
<param name="extract_method_cond|extract_method" value="string" />
<output name="out" file="read_R1.200_extracted.fastq.gz" ftype="fastqsanger.gz" decompress="true" lines_diff="1" />
<output name="out2" file="read_R2.200_extracted.fastq.gz" ftype="fastqsanger.gz" decompress="true" lines_diff="1" />
</test>
Expand Down
4 changes: 1 addition & 3 deletions tools/umi_tools/umi-tools_group.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
<import>macros.xml</import>
</macros>
<expand macro="bio_tools"/>
<expand macro="requirements">
<requirement type="package" version="1.21">samtools</requirement>
</expand>
<expand macro="requirements"/>
<command detect_errors="exit_code"><![CDATA[
@LINK_SAM_BAM_INPUT@
Expand Down
21 changes: 10 additions & 11 deletions tools/umi_tools/umi-tools_whitelist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@
<conditional name="extract_method_cond">
<param name="prime3" value="false" />
</conditional>
<param name="use_cell_opts" value="advanced" />
<param name="celloptions|use_cell_opts" value="advanced" />
<param name="celloptions|expect_cells" value="5" />
<param name="celloptions|error_correct_threshold" value="3" />
<param name="knee_method" value="density"/>
<param name="expect_cells" value="5" />
<param name="error_correct_threshold" value="3" />
<param name="log" value="true" />
<output name="out_whitelist" file="out_wl_paired.txt" />
<output name="out_log" file="out_wl_paired.log" lines_diff="50" />
Expand All @@ -167,12 +167,11 @@
<conditional name="extract_method_cond">
<param name="prime3" value="false" />
</conditional>
<param name="use_cell_opts" value="advanced" />
<param name="knee_method" value="density"/>
<param name="expect_cells" value="5" />
<param name="error_correct_threshold" value="3" />
<param name="celloptions|use_cell_opts" value="advanced" />
<param name="celloptions|expect_cells" value="5" />
<param name="celloptions|error_correct_threshold" value="3" />
<param name="log" value="true" />
<param name="filtered_out_bool" value="true"/>
<output name="out_whitelist" file="out_wl_paired.txt" />
<output name="out_log" file="out_wl_paired.log" lines_diff="50" />
<output name="out_html_report" file="out_wl_paired.html" />
Expand All @@ -183,13 +182,13 @@
<conditional name="input_type_cond" >
<param name="input_type" value="single" />
<param name="input_read1" value="testYYY.40k.fastq.gz" ftype="fastqsanger.gz" />
<param name="bc_pattern" value="(?P&#60;cell_1&#62;.{8,10})(?P&#60;discard_1&#62;ACTGGCCTGCGA){s&#60;=3}(?P&#60;cell_2&#62;.{9})(?P&#60;discard_2&#62;GGTAGCGGTGACA){s&#60;=3}(?P&#60;cell_3&#62;.{9})(?P&#60;umi_1&#62;.{8})T{3}.*" />
</conditional>
<param name="bc_pattern" value="(?P&#60;cell_1&#62;.{8,10})(?P&#60;discard_1&#62;ACTGGCCTGCGA){s&#60;=3}(?P&#60;cell_2&#62;.{9})(?P&#60;discard_2&#62;GGTAGCGGTGACA){s&#60;=3}(?P&#60;cell_3&#62;.{9})(?P&#60;umi_1&#62;.{8})T{3}.*" />
<param name="extract_method" value="regex" />
<param name="extract_method_cond|extract_method" value="regex" />
<param name="extract_method_cond|filtered_out_bool" value="true"/>
<param name="method" value="umis" />
<param name="knee_method" value="density"/>
<param name="prime3" value="true" />
<param name="filtered_out_bool" value="true"/>

<output name="out_whitelist" file="out_wl_user.single.txt" />
<output name="out_thresh" file="out_wl_user.single.tresh.tab" />
<output name="out_html_report" file="out_wl_user.single.html" />
Expand Down

0 comments on commit 11a7415

Please sign in to comment.