view survival/survival.xml @ 14:35ab97d72ea7 draft

Uploaded
author testtool
date Mon, 02 Oct 2017 08:23:07 -0400
parents bc54ac99e130
children 53dff79c833b
line wrap: on
line source

<tool id="survival" name="survival" version="1.0.0">
    <description>core survival analysis</description>
    <requirements>
        <requirement type="package" version="2.40_1">r-survival</requirement>
    </requirements>
    <command detect_errors="aggressive">
        Rscript '$__tool_directory__/survival.R' '$input' '$type' '$error' '$conf_type' '$conf_lower' '$fit' '$png'
    </command>
<inputs>
        <param format="csv" type="data" name="input"  value="" label="survival data" help="
   e.g. survival table
   X obsT status X1    X2
   17 1815  FALSE  2 HOXA1
   18  145   TRUE  1 HOXA1
   19 2506  FALSE  1 HOXA1
   20 1382   TRUE  1 HOXA1 ''"/>
          
          <conditional name="type">
      <param name="type" type="select" label="Type of survival curve:">
        <option value="kaplan-meier">kaplan-meier</option>
        <option value="fleming-harrington">fleming-harrington</option>
        <option value="fh2">fh2</option>
      </param>
    </conditional>
    
    <conditional name="error">
      <param name="error" type="select" label="Type of error:">
        <option value="greenwood">greenwood</option>
        <option value="tsiatis">tsiatis</option>
      </param>
    </conditional>
       
          <conditional name="conf_type">
      <param name="conf_type" type="select" label="Type of conf_type:">
        <option value="log">log</option>
        <option value="log-log">log-log</option>
        <option value="plain">plain</option>
        <option value="none">none</option>
      </param>
    </conditional>
    
        <conditional name="conf_lower">
      <param name="conf_lower" type="select" label="Type of conf_lower:">
        <option value="usual">usual</option>
        <option value="peto">peto</option>
        <option value="modified">modified</option>
      </param>
    </conditional>
    
    </inputs>
    <outputs>
        <data format="csv" name="fit" label="survfit.csv" />
        <data format="png" name="png" label="survfit.png" />
    </outputs>
 <tests>
    <test>
      <param name="test">
      <element name="test-data">
          <collection type="data">
                <element format="csv" name="input" label="test-data/input.csv"/>
          </collection>
        </element>
        </param>
        <output format="csv"  name="fit" label="test-data/survfit.csv"/>
        <output fformat="png" name="png" label="test-data/survfit.png"/>
        </test>
    </tests>
  <help>
**Computes an estimate of a survival curve for censored data using either the Kaplan-Meier or the Fleming-Harrington method or computes the predicted survivor function for a Cox proportional hazards model.**
</help>
<citations>
 <citation>https://CRAN.R-project.org/package=survival</citation>
</citations>
</tool>