Mercurial > repos > iuc > multiqc
diff samtools_plugin.xml @ 24:f7e2f1eb3a16 draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/multiqc commit dffbb5d421a5a5773bcb7f05933b12c45461bb58
author | iuc |
---|---|
date | Mon, 02 Sep 2024 14:22:54 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/samtools_plugin.xml Mon Sep 02 14:22:54 2024 +0000 @@ -0,0 +1,97 @@ +<macros> + <token name="@SAMTOOLS_COMMAND@"><![CDATA[ + #for $j, $repeat2 in enumerate( $repeat.software_cond.output ) + @CREATE_REPEAT_DIR_2@ + #if str($repeat2.type.type) == "stats" + #set $pattern = "This file was produced by samtools stats" + @LN_3_FILES@ + #elif str($repeat2.type.type) == "flagstat" + #set $pattern = "in total (QC-passed reads + QC-failed reads)" + @LN_3_FILES@ + #elif str($repeat2.type.type) == "idxstats" + #for $file in $repeat2.type.input + @ESCAPE_IDENTIFIER@ + #set file_path = os.path.join($repeat_dir, str($identifier) + '_idxstat') + ln -s '$file' '$file_path' && + #end for + #elif str($repeat2.type.type) == "rmdup" + #set $pattern = "[bam_rmdup" + @LN_3_FILES@ + #end if + #end for + ]]></token> + <xml name="samtools_form"> + <repeat name="output" title="Samtools output" min="1"> + <conditional name="type"> + <param name="type" type="select" label="Type of Samtools output?"> + <option value="stats">stats</option> + <option value="flagstat">flagstat</option> + <option value="idxstats">idxstats</option> + <option value="rmdup">rmdup</option> + </param> + <when value="stats"> + <param name="input" type="data" format="txt" multiple="true" label="Samtools stats output" help="It should contain 'This file was produced by samtools stats'"/> + </when> + <when value="flagstat"> + <param name="input" type="data" format="txt" multiple="true" label="Samtools flagstat output" help="It should contain 'in total (QC-passed reads + QC-failed reads)'"/> + </when> + <when value="idxstats"> + <param name="input" type="data" format="txt" multiple="true" label="Samtools idxstats output"/> + </when> + <when value="rmdup"> + <param name="input" type="data" format="txt" multiple="true" label="Samtools rmdup output" help="It should contain '[bam_rmdup'"/> + </when> + </conditional> + </repeat> + </xml> + <!-- add here your test files and tests, the more stringent the better --> + <xml name="samtools_test"> + <test expect_num_outputs="3"> + <repeat name="results"> + <conditional name="software_cond"> + <param name="software" value="samtools"/> + <repeat name="output"> + <conditional name="type"> + <param name="type" value="stats"/> + <param name="input" value="samtools_stats.txt"/> + </conditional> + </repeat> + <repeat name="output"> + <conditional name="type"> + <param name="type" value="flagstat"/> + <param name="input" value="samtools_flagstat.txt"/> + </conditional> + </repeat> + <repeat name="output"> + <conditional name="type"> + <param name="type" value="idxstats"/> + <param name="input" value="samtools_idxstats.txt"/> + </conditional> + </repeat> + </conditional> + </repeat> + <param name="title" value="Title of the report"/> + <param name="comment" value="Commment for the report"/> + <param name="flat" value="true"/> + <param name="export" value="true"/> + <output name="html_report"> + <assert_contents> + <has_text text="Title of the report"/> + <has_text text="Commment for the report"/> + <has_text text="samtools-flagstat-dp"/> + </assert_contents> + </output> + <output name="stats"> + <assert_contents> + <has_text text="samtools_flagstat_txt"/> + <has_text text="mapped_passed"/> + <has_text text="stats_mqc_generalstats_samtools_stats_error_rate"/> + <has_text text="samtools_stats_txt"/> + <has_n_lines n="3"/> + <has_n_columns n="11"/> + </assert_contents> + </output> + <output_collection name="plots" type="list" count="5"/> + </test> + </xml> +</macros>