Skip to content

un-quotes the region list so chr1 chr2 will not be passed as an inval… #7086

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions tool_collections/samtools/samtools_view/samtools_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
#if str($mode.filter_config.cond_region.select_region) == 'bed':
#set std_filters = $std_filters + " -L '%s'" % str($mode.filter_config.cond_region.bedfile)
#elif str($mode.filter_config.cond_region.select_region) == 'text':
#set $reg_filters = "'%s'" % str($mode.filter_config.cond_region.regions).strip()
#set $reg_filters = "'%s'" % "' '".join(str($mode.filter_config.cond_region.regions).strip().split())
#end if

#if $mode.filter_config.cond_rg.select_rg == 'text':
Expand Down Expand Up @@ -282,7 +282,9 @@
</param>
<when value="no"/>
<when value="text">
<param name="regions" type="text" optional="false" label="Filter by regions" help="One or more space-separated region specifications to restrict output to only those alignments which overlap the specified region(s)."/>
<param name="regions" type="text" optional="false" label="Filter by regions" help="One or more space-separated region specifications to restrict output to only those alignments which overlap the specified region(s).">
<validator type="regex" message="Invalid characters in regions. Only letters, numbers, periods, underscores, hyphens, colons, asterixes, and spaces are allowed.">^[A-Za-z0-9._\-:\*\s]+$</validator>
</param>
</when>
<when value="bed">
<param name="bedfile" format="bed" argument="-L" optional="false" type="data" label="Filter by intervals in a bed file" help="Only output alignments overlapping the intervals in the input bed file." />
Expand Down Expand Up @@ -640,15 +642,15 @@
</conditional>
<output name="outputsam" file="test_17.bam" ftype="bam" lines_diff="4" />
</test>
<!-- 18) -->
<!-- 18) region filtering with multiple regions -> cram -->
<test expect_num_outputs="1">
<param name="input" value="in_test_14.bam" ftype="bam" />
<conditional name="mode">
<param name="outtype" value="selected_reads" />
<section name="filter_config">
<conditional name="cond_region">
<param name="select_region" value="text"/>
<param name="regions" value="CHROMOSOME_I" />
<param name="regions" value="CHROMOSOME_I:1-1 CHROMOSOME_I:2" />
</conditional>
</section>
<conditional name="output_options">
Expand Down