Skip to content

Commit

Permalink
Merge pull request #1497 from mblue9/fix-hisat2-output
Browse files Browse the repository at this point in the history
fix hisat2 extra outputs
  • Loading branch information
nsoranzo authored Sep 30, 2017
2 parents 1f08410 + 8046fcc commit 1281873
Showing 1 changed file with 22 additions and 15 deletions.
37 changes: 22 additions & 15 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 @@ -568,22 +566,25 @@ hisat2
<!-- Define tests -->

<tests>
<test><!-- Ensure bam output works -->
<!-- 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 +595,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 +610,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 +634,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 +649,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 +664,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 +674,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

0 comments on commit 1281873

Please sign in to comment.