Skip to content
Closed
Show file tree
Hide file tree
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
180 changes: 148 additions & 32 deletions tools/falco/falco.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
<tool id="falco" name="Falco" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.05">
<description>An alternative, more performant implementation of FastQC for high throughput sequence quality control</description>
<macros>
<token name="@TOOL_VERSION@">1.2.4</token>
<token name="@TOOL_VERSION@">1.2.5</token>
<token name="@VERSION_SUFFIX@">0</token>
<token name="@LN_S@">
<![CDATA[
#if 'bam' in $input_file.ext:
#set format = 'bam'
#elif 'sam' in $input_file.ext:
#set format = 'sam'
#elif 'gz' in $input_file.ext:
#set format = 'fastq.gz'
#else
#set format = 'fastq'
#end if
ln -s '${input_file}' '${input_file_sl}' &&
]]></token>
</macros>
<xrefs>
<xref type="bio.tools">falco</xref>
Expand All @@ -12,19 +25,22 @@
</requirements>
<command detect_errors="aggressive"><![CDATA[
#import re
#set input_name_sl = re.sub('[^\w\-\s]', '_', str($input_file.element_identifier))

#if 'bam' in $input_file.ext:
#set format = 'bam'
#elif 'sam' in $input_file.ext:
#set format = 'sam'
#elif 'gz' in $input_file.ext:
#set format = 'fastq.gz'
#set $input_files=[]
#if str($input_type_select.input_type) == 'individually'
#set input_file = $input_type_select.input_file
#set input_file_sl = re.sub('[^\w\-\s]', '_', str($input_file.element_identifier))
@LN_S@
#set $input_files += [$input_file_sl]
#else
#set format = 'fastq'
#set input_file = $input_type_select.input_col['forward']
#set input_file_sl = re.sub('[^\w\-\s]', '_', str($input_type_select.input_col.element_identifier)) + '_forward'
@LN_S@
#set $input_files += [$input_file_sl]
#set input_file = $input_type_select.input_col['reverse']
#set input_file_sl = re.sub('[^\w\-\s]', '_', str($input_type_select.input_col.element_identifier)) + '_reverse'
@LN_S@
#set $input_files += [$input_file_sl]
#end if

ln -s '${input_file}' '${input_name_sl}' &&
falco
#if $contaminants:
--contaminants '${contaminants}'
Expand All @@ -45,16 +61,31 @@
$nogroup
## --kmers $kmers
-f '${format}'
'${input_name_sl}'
#if $subsample > 1:
-subsample $subsample
-subsample $subsample
#end if
$bisulfite
$reverse_complement
$generate_summary
#for $input_file_sl in $input_files
'${input_file_sl}'
#end for
]]></command>
<inputs>
<param format="fastq,fastq.gz,bam,sam" name="input_file" type="data" label="Raw read data from your current history"/>
<conditional name="input_type_select">
<param name="input_type" type="select" label="How is your input data organized?">
<option value="individually">As separate datasets (single-end fastq or sam/bam)</option>
<option value="paired">As a paired collection of forward and reverse reads</option>
</param>
<when value="individually">
<param format="fastq,fastq.gz,bam,sam" name="input_file" type="data"
label="Raw read data from your current history" />
</when>
<when value="paired">
<param format="fastq,fastq.gz" name="input_col" type="data_collection"
collection_type="paired" label="Raw read data from your current history in paired collections"/>
</when>
</conditional>
<param name="contaminants" type="data" format="tabular" optional="true" label="Contaminant list" help="tab delimited file with 2 columns: name and sequence. For example: Illumina Small RNA RT Primer&#x9;CAAGCAGAAGACGGCATACGA"/>
<param argument="--adapters" type="data" format="tabular" optional="true" label="Adapter list" help="List of adapters adapter sequences which will be explicity searched against the library. It should be a tab-delimited file with 2 columns: name and sequence."/>
<param name="limits" type="data" format="txt" optional="true" label="Submodule and Limit specifing file" help="a file that specifies which submodules are to be executed (default=all) and also specifies the thresholds for the each submodules warning parameter."/>
Expand All @@ -67,16 +98,40 @@
<param name="generate_summary" type="boolean" truevalue="" falsevalue="-skip-summary" checked="False" label="Generate summary output of QC test results"/>
</inputs>
<outputs>
<data format="html" name="html_file" from_work_dir="fastqc_report.html" label="${tool.name} on ${on_string}: Webpage"/>
<data format="txt" name="text_file" from_work_dir="fastqc_data.txt" label="${tool.name} on ${on_string}: RawData"/>
<data format="html" name="html_file" from_work_dir="fastqc_report.html" label="${tool.name} on ${on_string}: Webpage" >
<filter>input_type_select['input_type'] == 'individually'</filter>
</data>
<data format="txt" name="text_file" from_work_dir="fastqc_data.txt" label="${tool.name} on ${on_string}: RawData" >
<filter>input_type_select['input_type'] == 'individually'</filter>
</data>
<data format="txt" name="summary_file" from_work_dir="summary.txt" label="${tool.name} on ${on_string}: SummaryData">
<filter>generate_summary</filter>
<filter>input_type_select['input_type'] == 'individually' and generate_summary</filter>
</data>
<data format="html" name="html_file_forward" from_work_dir="*forward_fastqc_report.html" label="${tool.name} on ${on_string}: Webpage forward" >
<filter>input_type_select['input_type'] == 'paired'</filter>
</data>
<data format="txt" name="text_file_forward" from_work_dir="*forward_fastqc_data.txt" label="${tool.name} on ${on_string}: RawData forward" >
<filter>input_type_select['input_type'] == 'paired'</filter>
</data>
<data format="txt" name="summary_file_forward" from_work_dir="*forward_summary.txt" label="${tool.name} on ${on_string}: SummaryData forward">
<filter>input_type_select['input_type'] == 'paired' and generate_summary</filter>
</data>
<data format="html" name="html_file_reverse" from_work_dir="*reverse_fastqc_report.html" label="${tool.name} on ${on_string}: Webpage reverse" >
<filter>input_type_select['input_type'] == 'paired'</filter>
</data>
<data format="txt" name="text_file_reverse" from_work_dir="*reverse_fastqc_data.txt" label="${tool.name} on ${on_string}: RawData reverse" >
<filter>input_type_select['input_type'] == 'paired'</filter>
</data>
<data format="txt" name="summary_file_reverse" from_work_dir="*reverse_summary.txt" label="${tool.name} on ${on_string}: SummaryData reverse">
<filter>input_type_select['input_type'] == 'paired' and generate_summary</filter>
</data>
</outputs>
<tests>
<!-- Test with fastq input -->
<test expect_num_outputs="2">
<param name="input_file" value="1000trimmed.fastq"/>
<conditional name="input_type_select">
<param name="input_file" value="1000trimmed.fastq"/>
</conditional>
<output name="html_file" ftype="html">
<assert_contents>
<has_line_matching expression="&lt;html&gt;&lt;head&gt;.+&lt;title&gt; 1000trimmed_fastq - report.+"/>
Expand All @@ -87,7 +142,9 @@
</test>
<!-- Test with fastq.gz input -->
<test expect_num_outputs="2">
<param name="input_file" value="1000trimmed.fastq.gz"/>
<conditional name="input_type_select">
<param name="input_file" value="1000trimmed.fastq.gz"/>
</conditional>
<output name="html_file" ftype="html">
<assert_contents>
<has_line_matching expression="&lt;html&gt;&lt;head&gt;.+&lt;title&gt; 1000trimmed_fastq_gz - report.+"/>
Expand All @@ -98,7 +155,9 @@
</test>
<!-- Test with BAM input -->
<test expect_num_outputs="2">
<param name="input_file" value="hisat_output_1.bam"/>
<conditional name="input_type_select">
<param name="input_file" value="hisat_output_1.bam"/>
</conditional>
<output name="html_file" ftype="html">
<assert_contents>
<has_line_matching expression="&lt;html&gt;&lt;head&gt;.+&lt;title&gt; hisat_output_1_bam - report.+"/>
Expand All @@ -109,7 +168,9 @@
</test>
<!-- Test summary file option -->
<test expect_num_outputs="3">
<param name="input_file" value="1000trimmed.fastq"/>
<conditional name="input_type_select">
<param name="input_file" value="1000trimmed.fastq"/>
</conditional>
<param name="generate_summary" value="true"/>
<output name="html_file" ftype="html">
<assert_contents>
Expand All @@ -120,7 +181,9 @@
<output name="summary_file" file="fastqc_data_summary.txt" ftype="txt"/>
</test>
<test expect_num_outputs="2">
<param name="input_file" value="1000trimmed.fastq"/>
<conditional name="input_type_select">
<param name="input_file" value="1000trimmed.fastq"/>
</conditional>
<param name="contaminants" value="contaminant_list.txt" ftype="tabular"/>
<output name="html_file" ftype="html">
<assert_contents>
Expand All @@ -130,7 +193,9 @@
<output name="text_file" file="fastqc_data_contaminants.txt" ftype="txt" lines_diff="2"/>
</test>
<test expect_num_outputs="2">
<param name="input_file" value="1000trimmed.fastq"/>
<conditional name="input_type_select">
<param name="input_file" value="1000trimmed.fastq"/>
</conditional>
<param name="adapters" value="adapter_list.txt" ftype="tabular"/>
<output name="html_file" ftype="html">
<assert_contents>
Expand All @@ -140,7 +205,9 @@
<output name="text_file" file="fastqc_data_adapters.txt" ftype="txt" lines_diff="2"/>
</test>
<test expect_num_outputs="3">
<param name="input_file" value="1000trimmed.fastq"/>
<conditional name="input_type_select">
<param name="input_file" value="1000trimmed.fastq"/>
</conditional>
<param name="limits" value="limits.txt" ftype="txt"/>
<param name="generate_summary" value="true"/>
<output name="html_file" ftype="html">
Expand Down Expand Up @@ -170,8 +237,10 @@
<output name="text_file" file="fastqc_data_min_length.txt" ftype="txt"/>
</test> -->
<test expect_num_outputs="2">
<param name="input_file" value="1000trimmed.fastq" ftype="fastq"/>
<param name="nogroup" value="--nogroup"/>
<conditional name="input_type_select">
<param name="input_file" value="1000trimmed.fastq" ftype="fastq"/>
</conditional>
<param name="nogroup" value="true"/>
<output name="html_file" ftype="html">
<assert_contents>
<has_line_matching expression="&lt;html&gt;&lt;head&gt;.+&lt;title&gt; 1000trimmed_fastq - report.+"/>
Expand All @@ -180,7 +249,9 @@
<output name="text_file" file="fastqc_data_nogroup.txt" ftype="txt" lines_diff="2"/>
</test>
<test expect_num_outputs="3">
<param name="input_file" value="1000trimmed.fastq"/>
<conditional name="input_type_select">
<param name="input_file" value="1000trimmed.fastq"/>
</conditional>
<param name="subsample" value="10"/>
<param name="generate_summary" value="true"/>
<output name="html_file" ftype="html">
Expand All @@ -192,8 +263,10 @@
<output name="summary_file" file="fastqc_report_subsample_summary.txt" ftype="txt"/>
</test>
<test expect_num_outputs="3">
<param name="input_file" value="1000trimmed.fastq"/>
<param name="bisulfite" value="-bisulfite"/>
<conditional name="input_type_select">
<param name="input_file" value="1000trimmed.fastq"/>
</conditional>
<param name="bisulfite" value="true"/>
<param name="generate_summary" value="true"/>
<output name="html_file" ftype="html">
<assert_contents>
Expand All @@ -204,15 +277,58 @@
<output name="summary_file" file="fastqc_report_bisulfite_summary.txt" ftype="txt"/>
</test>
<test expect_num_outputs="2">
<param name="input_file" value="1000trimmed.fastq"/>
<param name="reverse_complement" value="-reverse-complement"/>
<conditional name="input_type_select">
<param name="input_file" value="1000trimmed.fastq"/>
</conditional>
<param name="reverse_complement" value="true"/>
<output name="html_file" ftype="html">
<assert_contents>
<has_line_matching expression="&lt;html&gt;&lt;head&gt;.+&lt;title&gt; 1000trimmed_fastq - report.+"/>
</assert_contents>
</output>
<output name="text_file" file="fastqc_report_reverse_complement.txt" ftype="txt" lines_diff="2"/>
</test>
<!-- Test summary file option paired input -->
<test expect_num_outputs="6">
<conditional name="input_type_select">
<param name="input_type" value="paired"/>
<param name="input_col">
<collection type="paired" name="1000trimmed">
<element name="forward" value="1000trimmed.fastq" />
<element name="reverse" value="1000trimmed.fastq" />
</collection>
</param>
</conditional>
<param name="generate_summary" value="true"/>
<output name="html_file_forward">
<assert_contents>
<has_line_matching expression="&lt;html&gt;&lt;head&gt;.+&lt;title&gt; 1000trimmed_forward - report.+"/>
</assert_contents>
</output>
<output name="html_file_reverse">
<assert_contents>
<has_line_matching expression="&lt;html&gt;&lt;head&gt;.+&lt;title&gt; 1000trimmed_reverse - report.+"/>
</assert_contents>
</output>
<output name="text_file_forward" value="forward_fastqc_data.txt" />
<output name="text_file_reverse">
<assert_contents>
<has_text text="1000trimmed_reverse" />
</assert_contents>
</output>
<output name="summary_file_forward">
<assert_contents>
<has_text text="1000trimmed_forward" />
<has_n_lines n="11" />
</assert_contents>
</output>
<output name="summary_file_reverse">
<assert_contents>
<has_text text="1000trimmed_reverse" />
<has_n_lines n="11" />
</assert_contents>
</output>
</test>
</tests>
<help><![CDATA[
**What it does**
Expand Down
Loading
Loading