Skip to content
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

fix hisat2 extra outputs #1497

Merged
merged 2 commits into from
Sep 30, 2017
Merged
Changes from 1 commit
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
38 changes: 22 additions & 16 deletions tools/hisat2/hisat2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -290,12 +290,10 @@ hisat2
--summary-file summary.txt
#end if


## Convert SAM output to sorted BAM

| samtools sort - -@ \${GALAXY_SLOTS:-1} -l 6 -o '${output_alignments}'


## Rename any output fastq files

#if $output_unaligned_reads_l and $output_unaligned_reads_r:
Expand Down Expand Up @@ -540,12 +538,12 @@ hisat2

<!-- Unaligned fastq (L) -->
<data name="output_unaligned_reads_l" format="fastqsanger" label="${tool.name} on ${on_string}: unaligned reads (L)">
<filter>adv['output_options']['output_options_selector'] == "advanced" and adv['output_options']['unaligned_file'] is True)</filter>
<filter>adv['output_options']['output_options_selector'] == "advanced" and adv['output_options']['unaligned_file'] is True</filter>
</data>

<!-- Aligned fastq (L) -->
<data name="output_aligned_reads_l" format="fastqsanger" label="${tool.name} on ${on_string}: aligned reads (L)">
<filter>adv['output_options']['output_options_selector'] == "advanced" and adv['output_options']['aligned_file'] is True)</filter>
<filter>adv['output_options']['output_options_selector'] == "advanced" and adv['output_options']['aligned_file'] is True</filter>
</data>

<!-- Unaligned fastq (R) -->
Expand All @@ -567,23 +565,25 @@ hisat2

<!-- Define tests -->

<tests>
<test><!-- Ensure bam output works -->
<tests><!-- Ensure bam output works -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

    <tests>
        <!-- Ensure bam output works -->

<test expect_num_outputs="1" >
<param name="type" value="paired" />
<param name="source" value="history" />
<param name="history_item" ftype="fasta" value="phiX.fa" />
<param name="input_1" ftype="fastqsanger" value="hisat_input_1_forward.fastq" />
<param name="input_2" ftype="fastqsanger" value="hisat_input_1_reverse.fastq" />
<output name="output_alignments" file="hisat_output_1.bam" ftype="bam" lines_diff="2" />
</test>
<test><!-- Ensure built-in reference works -->
<!-- Ensure built-in reference works -->
<test expect_num_outputs="1">
<param name="type" value="paired" />
<param name="source" value="indexed" />
<param name="input_1" ftype="fastqsanger" dbkey="phiX" value="hisat_input_1_forward.fastq" />
<param name="input_2" ftype="fastqsanger" dbkey="phiX" value="hisat_input_1_reverse.fastq" />
<output name="output_alignments" file="hisat_output_1.bam" ftype="bam" lines_diff="2" />
</test>
<test><!-- Ensure trimming works -->
<!-- Ensure trimming works -->
<test expect_num_outputs="1">
<param name="type" value="paired" />
<param name="source" value="history" />
<param name="history_item" ftype="fasta" value="phiX.fa" />
Expand All @@ -594,7 +594,8 @@ hisat2
<param name="input_2" ftype="fastqsanger" value="hisat_input_2_reverse.fastq" />
<output name="output_alignments" file="hisat_output_2.bam" ftype="bam" lines_diff="2" />
</test>
<test><!-- Ensure paired options works -->
<!-- Ensure paired options works -->
<test expect_num_outputs="1">
<param name="type" value="paired" />
<param name="source" value="history" />
<param name="history_item" ftype="fasta" value="phiX.fa" />
Expand All @@ -608,18 +609,19 @@ hisat2
<param name="no_discordant" value="True" />
<output name="output_alignments" file="hisat_output_3.bam" ftype="bam" lines_diff="2" />
</test>
<test><!-- Ensure unaligned output works -->
<!-- Ensure single unaligned output works -->
<test expect_num_outputs="2">
<param name="type" value="single" />
<param name="source" value="history" />
<param name="history_item" ftype="fasta" value="phiX.fa" />
<param name="output_options_selector" value="advanced" />
<param name="unaligned_file" value="true" />
<param name="aligned_file" value="true" />
<param name="history_item" ftype="fasta" value="phiX.fa" />
<param name="input_1" ftype="fasta" value="test_unaligned_reads.fasta" />
<output name="output_unaligned_reads_l" file="test_unaligned_reads.fasta" />
</test>
<test><!-- Ensure paired unaligned output works -->
<!-- Ensure paired unaligned/aligned output works -->
<test expect_num_outputs="5">
<param name="type" value="paired" />
<param name="source" value="history" />
<param name="output_options_selector" value="advanced" />
Expand All @@ -631,7 +633,8 @@ hisat2
<output name="output_unaligned_reads_l" file="test_unaligned_reads.fasta" />
<output name="output_unaligned_reads_r" file="test_unaligned_reads.fasta" />
</test>
<test><!-- Ensure fastqsanger.gz works -->
<!-- Ensure fastqsanger.gz works -->
<test expect_num_outputs="1">
<param name="type" value="paired" />
<param name="source" value="history" />
<param name="history_item" ftype="fasta" value="phiX.fa" />
Expand All @@ -645,7 +648,8 @@ hisat2
<param name="no_discordant" value="True" />
<output name="output_alignments" file="hisat_output_3.bam" ftype="bam" lines_diff="2" />
</test>
<test><!-- Ensure fastqsanger.bz2 works -->
<!-- Ensure fastqsanger.bz2 works -->
<test expect_num_outputs="1">
<param name="type" value="paired" />
<param name="source" value="history" />
<param name="history_item" ftype="fasta" value="phiX.fa" />
Expand All @@ -659,7 +663,8 @@ hisat2
<param name="no_discordant" value="True" />
<output name="output_alignments" file="hisat_output_3.bam" ftype="bam" lines_diff="2" />
</test>
<test><!-- Ensure paired strandness works -->
<!-- Ensure paired strandness works -->
<test expect_num_outputs="1">
<param name="type" value="paired" />
<param name="source" value="history" />
<param name="history_item" ftype="fasta" value="phiX.fa" />
Expand All @@ -668,7 +673,8 @@ hisat2
<param name="rna_strandness" value="FR" />
<output name="output_alignments" file="hisat_output_4.bam" ftype="bam" lines_diff="2" />
</test>
<test><!-- Ensure summary file output works -->
<!-- Ensure summary file output works -->
<test expect_num_outputs="2">
<param name="type" value="single" />
<param name="source" value="history" />
<param name="history_item" ftype="fasta" value="phiX.fa" />
Expand Down