view normalisation_macros.xml @ 2:76ff9af5c0a3 draft default tip

planemo upload for repository https://github.com/geraldinepascal/FROGS-wrappers/ commit 0e987ae3594883fb3b12d2999c6ad7fccd0b1b64
author frogs
date Fri, 06 Feb 2026 22:05:51 +0000
parents 31abf44b6599
children
line wrap: on
line source

<?xml version="1.0"?>
<macros>
    <token name="@NORMALISATION_CMD_LINE@">
		normalisation.py 
			--input-biom '$input_biom'
			--input-fasta '$input_fasta'

			#if $sampling_method.sampling_by_min == "yes"
				--sampling-by-min
			#else
				--num-reads $sampling_method.num_reads

				#if $sampling_method.delete_samples == "true"
				--delete-samples
				#end if
			#end if

			--output-biom '$output_biom'
			--output-fasta '$output_fasta'
			--html '$html'
    </token>

    <xml name="normalisation_inputs">
        <!-- Files -->
        <param argument="--input-fasta" type="data" format="fasta" label="Sequence file (.fasta)" help="The sequence file to normalise." />
        <param argument="--input-biom" type="data" format="biom1" label="Abundance file (.biom)" help="The abundance file to normalise." />

        <!-- Parameters -->
        <conditional name="sampling_method">
			<param name="sampling_by_min" type="select" label="Sampling method" help="Sample the total number of sequences per sample based on the number of sequences in the smallest sample (--sampling-by-min), or by defining a number of sequences manually (--num-reads)." display="radio">
            	<option value="yes" selected="true">automatically, based on the number of sequences in the smallest sample </option>
            	<option value="no">manually, by setting the number of sequences</option>
			</param>
            <when value="yes"/>
            <when value="no">
                <param name="num_reads" type="integer" min="1" value="" label="Number of reads" help="The final number of reads per sample." />
                <param argument="--delete-samples" type="select" label="Removal samples that have an initial number of reads below the number of reads to sample." display="radio">
                    <option value="false">No, subsampling threshold need to at most equal to the smallest sample</option>
                    <option value="true">Yes, subsampling threshold may be greater than the smallest sample</option>
                </param>
            </when>
		</conditional>
    </xml>

	<!-- Test -->
    <xml name="normalisation_test_input">
        <param name="input_fasta" value="references/08-affiliation_postprocessed.fasta" />
        <param name="input_biom" value="references/08-affiliation_postprocessed.biom" />

		<conditional name="sampling_method">
			<param name="sampling_by_min" value="no" />
			<param name="num_reads" value="100" />
			<param name="delete_samples" value="true" />
		</conditional>
    </xml>
    
    <xml name="normalisation_test_output">
        <!-- Because of random sampling results may slightly vary -->
        <output name="output_fasta" file="references/09-normalisation.fasta" compare="diff" lines_diff="8" />
        <!-- Because of random sampling results may slightly vary -->
        <output name="html" file="references/09-normalisation.html" compare="sim_size" delta="0" />
        <output name="html" file="references/09-normalisation.html" compare="diff" lines_diff="8" />
    </xml>  
</macros>