name        "Ribosome (translate)"
icon    "$BIRCH/public_html/images/birch_black_ico.png"
tip    "translate DNA/RNA to protein"
var "in1"
    type        tempfile
    direction   in
    format      fasta
    save        true

var "gcfile"
    type        combobox
    label       "Genetic Code"
    default     0
    choices
        "Standard"  "$BIRCH/dat/xylem/gc/1.standard.gc"
        "Vertebrate Mitochondrial" "$BIRCH/dat/xylem/gc/2.vert_mito.gc"
        "Yeast Mitochondrial" "$BIRCH/dat/xylem/gc/3.yeast_mito.gc"
        "Mold, Protozoan, and Coelenterate Mitochondrial" "$BIRCH/dat/xylem/gc/4.MPC.mito.gc"
        "Invertebrate Mitochondrial" "$BIRCH/dat/xylem/gc/5.inv_mito.gc"
        "Ciliate, Dasycladacean and Hexamita" "$BIRCH/dat/xylem/gc/6.CDH.gc"
        "Echinoderm and Flatworm" "$BIRCH/dat/xylem/gc/9.EF_mito.gc"
        "Euplotid"  "$BIRCH/dat/xylem/gc/10.Euplotid.gc"
        "Bacterial and Plant Plastid" "$BIRCH/dat/xylem/gc/11.Bact_Plastid.gc"
        "Alternative Yeast Nuclear" "$BIRCH/dat/xylem/gc/12.alt_yeast.gc"
        "Ascidian Mitochondrial" "$BIRCH/dat/xylem/gc/13.Ascidian_mito.gc"
        "Alternative Flatworm Mitochondrial" "$BIRCH/dat/xylem/gc/14.alt_flatworm_mito.gc"
        "Blepharisma" "$BIRCH/dat/xylem/gc/15.Blepharisma.gc"
        "Chlorophycean Mitochondrial" "$BIRCH/dat/xylem/gc/16.Chlorophycean_mito.gc"
        "Trematode Mitochondrial" "$BIRCH/dat/xylem/gc/21.Trematode_mito.gc"
        "Scenedesmus obliquus mitochondrial" "$BIRCH/dat/xylem/gc/22.Scenedesmus_mito.gc"
        "Thraustochytrium Mitochondrial" "$BIRCH/dat/xylem/gc/23.Thraustochytrium_mito.gc"
var "preserve"
    type        chooser
    label       "Preserve reading frame in translation?"
    default     1
    choices
        "Yes"       "-p"
        "No"        ""
var "frames"
    type        combobox
    label       "Reading frames"
    default     0
    choices
        "1"         "-f1"
        "2"         "-f2"
        "3"         "-f3"
        "123"       "-f123"
var "names"
    type        chooser
    label       "Append number of reading frame to name(s)?"
    default     1
    choices
        "Yes"       "-n"
        "No"        ""
panel
    var "Run"
        type        button
        label       "Run"
        shell       "if [ ""%PRESERVE%"" = ""-p"" ]; then cat %in1% | tr '>' '#' > %in1%.ribosome;  fi; cat %in1% | ribosome -g %GCFILE% %PRESERVE% %FRAMES% %NAMES% |egrep -v -e \; | tr '>' '%' >> %in1%.ribosome; (blprotein %in1%.ribosome; $RM_CMD -f %in1%*)&"
        close       true
    var "Help"
        type        button
        label       "Help"
        shell       "$BIRCH/script/chooseviewer.py $BIRCH/doc/xylem/ribosome.txt"
        close       false
