name        "FastQC - generate quality control reports on sequencing reads"
icon    "$BIRCH/dat/Babraham_icon.png"
tip    "FastQC - generate quality control reports on sequencing reads files"
       
var "in1"
    type        tempfile
    direction   in
    format      tsv
    save        true

var "out1"
    type        tempfile
    direction   out
    format      tsv
    save        false
    overwrite   true
    content     canvas

var "threads"
    type        number
    label       "Number of threads to use"
    min         1
    max         $BL_CORES_MAX
    default     $BL_CORES_DEFAULT

var "email"
    type        chooser
    label       "Notify of completion by email"
    default     1
    choices
        "Yes" "bl_email.py --recipient %ADDRESS% --subject 'FastQC completed' --message fastqc.log;"
        "No" ""

var "address"
    type        text
    label       "    email address"
    default     "$BL_EMAIL"

panel
    var "Run"
        type        button
        label       "Run"
        shell       "bltsv2name.py %in1% %in1%.nam; FILES=`cat %in1%.nam` ; echo 'Start: '`date` > fastqc.log; fastqc --threads %THREADS% $FILES >> fastqc.log; echo 'Finish: '`date` >> fastqc.log; rm %in1%.nam; %EMAIL% bldirtab.py %out1%"
        close       true
    var "Help"
        type        button
        label       "Help"
        shell       "chooseviewer.py $BIRCH/doc/fastqc.help"
        close       false
