view g_cepstrum.xml @ 5:0026cd452d0e draft default tip

planemo upload commit 72cee9103c0ae4acb5794afaed179bea2c729f2c-dirty
author stevecassidy
date Sat, 11 Mar 2017 21:37:57 -0500
parents f188eb0b526d
children
line wrap: on
line source

<tool id="g_cepstrum" name="Compute Cepstrum" version="0.01">
    <description>using wrassp</description>

    <requirements>
        <requirement type="package" version="0.1.4">r-wrassp</requirement>
    </requirements>

    <command interpreter="bash">
        r_wrapper.sh $__tool_directory__/g_cepstrum.R --args ${wavfile} ${output}
        ${beginTime} ${endTime} ${windowShift} ${window} ${resolution}
        ${fftLength}
     </command>

    <stdio>
      <regex match="Linux: unexpected operator"
             source="stderr"
             level="warning"
             description="conda r-base bash bug" />
    </stdio>

    <inputs>
        <param name="wavfile" type="data" format="wav" label="Audio File" help="Audio file in WAV format"/>
        <param name="beginTime" type="integer" value="0" label="Start time for analysis (s)"/>
        <param name="endTime" type="integer" value="0" label="End Time for analysis (s) 0 means end of signal"/>
        <param name="windowShift" type="integer" value="5" label="Window Shift (ms)" help="set analysis window shift to dur ms"/>
        <param name="resolution" type="integer" value="40" label="set FFT length to the smallest value which results in a frequency resolution of freq Hz or better"/>

        <param name="fftLength" type="integer" value="0" label="set FFT length to num points (overrules 'resolution' option)"/>
        <param name="window" type="select">
            <option value="BLACKMAN" selected="true">Blackman</option>
            <option value="RECTANGLE">rectangle</option>
            <option value="PARABOLA">parabola/Riesz/Welch</option>
            <option value="COS"      >cosine</option>
            <option value="HANN"     >Hann/hanning/cosine^2</option>
            <option value="COS_4"    >cosine^4</option>
            <option value="HAMMING"  >Hamming</option>
            <option value="BLACK_X"  >exact Blackman</option>
            <option value="BLACK_M3" >min. 3-term Blackman-Nuttal</option>
            <option value="BLACK_M4" >min. 4-term Blackman-Nuttal</option>
            <option value="NUTTAL_3" >3-term Nuttal (-18 dB/oct)</option>
            <option value="NUTTAL_4" >4-term Nuttal (-18 dB/oct)</option>
            <option value="KAISER2_0">Kaiser-Bessel (alpha = 2.0)</option>
            <option value="KAISER3_0">Kaiser-Bessel (alpha = 3.0)</option>
            <option value="KAISER4_0">Kaiser-Bessel (alpha = 4.0)</option>
        </param>
    </inputs>

    <outputs>
        <data name="output" format="tabular" label="#echo $wavfile.element_identifier.replace('wav', 'cep') #" />
    </outputs>


    <tests>
        <test>
            <param name="wavfile" value="1_1119_2_22_001-ch6-speaker16.wav"/>
            <output name="output" file="1_1119_2_22_001-cepstrum.dat"/>
        </test>
    </tests>

    <help>Short-term cepstral analysis of the signal using the Fast Fourier Transform. The number of coefficients per output record will also equal the FFT length / 2 + 1 (i.e. be non-mirrored).</help>

    <citations>
        <citation type='bibtex'>
            @Manual{,
              title = {wrassp: an R wrapper to the ASSP Library},
              author = {Lasse Bombien and Raphael Winkelmann and Michel
                Scheffers},
              year = {2016},
              note = {R package version 0.1.4},
            }
        </citation>
    </citations>
</tool>