# .GDEmenus for Solaris-Sparc, ADAPTED FOR DATABASE GDE

############################################################################
#                                                                          #
#                                                                          #
#         ####   #####   ######  #    #  ######  #    #  #    #   ####     #
#        #    #  #    #  #       ##  ##  #       ##   #  #    #  #         #
#        #       #    #  #####   # ## #  #####   # #  #  #    #   ####     #
#        #  ###  #    #  #       #    #  #       #  # #  #    #       #    #
#    ### #    #  #    #  #       #    #  #       #   ##  #    #  #    #    #
#    ###  ####   #####   ######  #    #  ######  #    #   ####    ####     #
#                                                                          #
#       .GDEmenus 1993 by Steven Smith                                     #
#       .GDEmenus Version   8/18/2004  by Brian Fristensky                 #
#                                                                          #
############################################################################


#
####################################################################
# This file creates menus for dgde, a pilot project aimed at 
# creating a database client program that facilitates the
# creation and manipulation of database subsets.


############################## File ##############################
menu:File

#-------------------------------- New dataset ----------------------------
item:New dataset   <meta N>
itemmethod:echo "$Type$Name" > out1
itemmeta:n
itemhelp:doc/GDE/new_sequence.help
 
arg:Name 
argtype:text 
arglabel:New Sequence name? 
argtext:New 
 
arg:Type 
argtype:choice_menu 
arglabel:Type? 
argchoice:DNA/RNA:# 
argchoice:Amino Acid:% 
argchoice:Text:\"
argchoice:Mask:@ 

out:out1
outformat:flat



#--------------------- Import Foreign Format  (11/ 5/00) -------------------
item:Import Foreign Format
itemmethod:cp $INPUTFILE OUTFILE.tmp; readseq -a -fGenBank -o=OUTPUTFILE OUTFILE.tmp; $RM_CMD -f OUTFILE.tmp
itemhelp:readseq.help

arg:INPUTFILE
argtype:text
#argtype:file_chooser
arglabel:Name of foreign file?

out:OUTPUTFILE
outformat:genbank

#------------------ Import Name List  (7/31/04) -------------------

item:Import namefile
itemmethod: python $BIRCH/script/list2flat.py $INPUTFILE out1
itemhelp:doc/fsap/funnel.asc

arg:INPUTFILE
argtype:text
arglabel:Namefile

out:out1
outformat:flat

#------------------ Export Name List  (7/31/04) -------------------

item:Export namefile
itemmethod: python $BIRCH/script/flat2list.py in1 $INPUTFILE 
itemhelp:doc/fsap/funnel.asc

arg:INPUTFILE
argtype:text
arglabel:Namefile

in:in1
informat:flat


#-------------------------------- Save selection --------------------------
item:Save Selection
itemmethod: cat $SAVE_FUNC > $Name
itemhelp:doc/GDE/save_selection.help

arg:SAVE_FUNC
argtype:chooser
arglabel:File format
argchoice:Flat:in1
argchoice:Genbank:in2
argchoice:GDE/HGL:in3

arg:Name
argtype:text
arglabel:File name?

in:in1
informat:flat

in:in2
informat:genbank

in:in3
informat:gde

#------------------------------ Print selection ----------------------------
item:Print Selection
itemmethod:(PrintStrat -in in1 -scale $SCALE > in1.tmp; $CMD -P$PRINTER in1.tmp; $RM_CMD -f in1 in1.tmp)&
itemhelp:doc/GDE/print_alignment.help
 
arg:SCALE
argtype:slider
arglabel:Reduce printout by?
argmin:1
argmax:20
argvalue:1

arg:CMD
argtype:chooser
argchoice:Lpr:lpr
#argchoice:Enscript Gaudy:enscript -G -q
#argchoice:Enscript Two column:enscript -2rG
argvalue:0 

arg:PRINTER
argtype:chooser
arglabel:Which printer?
argchoice:EPSON:$PRINTER
#argchoice:MACHRAY:machray
argchoice:copyctr:copyctr
argchoice:BLDGAGRIC.PLANT_HP3SI:bldgagric.plant_hp3si
 
in:in1
informat:gde
insave:


############################## Documentation ##############################
menu:Documentation

# ----------------------   DOCUMENTATION    ----------------------------


item:ViewDocumentation
itemmethod:($DOCUMENT)&

arg:DOCUMENT
arglabel:Documentation file
argtype:choice_menu
argchoice:GDE Manual:$GDE_PDFVIEW $DOC/GDE/GDE2.2_manual.pdf
argvalue:0


############################## Edit ##############################
menu:Edit

# -------------------------------   sort    --------------------------------
item:Sort
itemmethod:(heapsortHGL in1 $PRIM_KEY $SEC_KEY > in1.tmp ; gde in1.tmp;$RM_CMD -f in1*)&
itemhelp:heapsortHGL.help

arg:PRIM_KEY
argtype:choice_menu
argchoice:Group:group-ID
argchoice:type:type
argchoice:name:name
argchoice:Sequence ID:sequence-ID
argchoice:creator:creator
argchoice:offset:offset
arglabel:Primary sort field?

arg:SEC_KEY
argtype:choice_menu
argchoice:None:
argchoice:Group:group-ID
argchoice:type:type
argchoice:name:name
argchoice:Sequence ID:sequence-ID
argchoice:creator:creator
argchoice:offset:offset
arglabel:Secondary sort field?

in:in1
informat:gde
insave:

# ----------------------- Copy out ( 1/17/94)  ----------------------------
item:Copy out
itemmethod:sed -e "s/^LOCUS   /LOCUS/" -e "s/^ ACCESSION/ACCESSION /" -e "/^$/d"  in1 > $HOME/.GDEclipboard

in:in1
informat:genbank

# ----------------------- Paste in  1/17/94) ----------------------------
item:Paste in
itemmethod:cp $HOME/.GDEclipboard out1

out:out1
outformat:genbank

# -------------------------------- Extract --------------------------------
item:extract
itemmethod:(dgde in1;$RM_CMD -f in1)&

in:in1
informat:gde
insave:

############################## Convert ##############################
menu:Convert


#------------------- Convert to GI ( 8/11/04) --------------------------

item:Convert Name/Acc to GI
itemmethod: python $BIRCH/script/flat2list.py in1 in1.nam; leash -mn $SHMETHOD -mpf in1.nam -of in1.gi; python $BIRCH/script/list2flat.py in1.gi in1.flat;rm in1.nam in1.gi; $GDEOUTPUT
itemhelp:

in:in1
informat:flat

arg:SHMETHOD
arglabel:Convert
argtype:chooser
argchoice:Name to GI:SHoundFindNameList
argchoice:Accession to GI:SHoundFindAccList
argvalue:0

arg:GDEOUTPUT
arglabel:Output to new GDE window?
argtype:chooser
argchoice:Yes:(dgde in1.flat; $RM_CMD -f in1.*)&
argchoice:No:mv in1.flat out1.gi
argvalue:0


out:out1.gi
outformat:gde



#------------------- GI to Accession ( 8/11/04) --------------------------

item:Convert GI to Accession
itemmethod: python $BIRCH/script/flat2list.py in1 in1.nam; leash -mn SHoundAccFromGiList -mpf in1.nam -of in1.acc; python $BIRCH/script/list2flat.py in1.acc in1.flat;rm in1.nam in1.acc; $GDEOUTPUT
itemhelp:

in:in1
informat:flat

arg:GDEOUTPUT
arglabel:Output to new GDE window?
argtype:chooser
argchoice:Yes:(dgde in1.flat; $RM_CMD -f in1.*)&
argchoice:No:mv in1.flat out1.gi
argvalue:0


out:out1.gi
outformat:gde

#------------------- GI to TaxID ( 8/11/04) --------------------------

item:Convert GI to TaxID
itemmethod: python $BIRCH/script/flat2list.py in1 in1.nam; leash -mn SHoundTaxIDFromGiList -mpf in1.nam -of in1.taxid; python $BIRCH/script/list2flat.py in1.taxid in1.flat;rm in1.nam in1.taxid; $GDEOUTPUT
itemhelp:

in:in1
informat:flat

arg:GDEOUTPUT
arglabel:Output to new GDE window?
argtype:chooser
argchoice:Yes:(dgde in1.flat; $RM_CMD -f in1.*)&
argchoice:No:mv in1.flat out1.gi
argvalue:0


out:out1.gi
outformat:gde

############################## Retrieve ##############################
menu:Retrieve


#------------------- DNA - GenBank ( 8/18/04) --------------------------
# Note: This menu requires the script SHound.fixGenBank.py. 
# SHoundGetGenBankffList omits '//' characters from the end
# of GenBank entries. Since these characters are required to
# indicate the end of an entry, SHound.fixGenBank.py adds them
# to the SHound output. When SHound is fixed, this script
# can be deleted.
item:DNA (GenBank) from GI
itemmethod: python $BIRCH/script/flat2list.py in1 in1.nam; (leash -mn SHoundGetGenBankffList -mpf in1.nam -of in1.tmp; rm in1.nam; python $BIRCH/script/SHound.fixGenBank.py in1.tmp in1.gen; $WHERE) &
itemhelp:doc/dGDE/README.Leash

arg:WHERE
arglabel:WHERE TO SEND OUTPUT
argtype:chooser
# If GenBank file, read directly, otherwise, convert to GenBank.
argchoice:GDE:(gde in1.gen; rm in1.*)&
argchoice:Textedit window:($GDE_TEXTEDIT in1.gen;rm in1.*) &
argchoice:Output file:mv in1.gen $OUTFILE; echo ' SEQHOUND - GET completed'
argvalue:0

arg:OUTFILE
arglabel:Output file name
argtype:text

in:in1
informat:flat

#------------------- DNA - FASTA  ( 8/18/04) --------------------------
# Note: This menu requires that the shell script 'GBfilter' be
# in your bin directory.
item:DNA (FASTA) from GI
itemmethod: python $BIRCH/script/flat2list.py in1 in1.nam; (leash -mn SHoundGetFastaList -mpf in1.nam -of in1.tmp; rm in1.nam; $WHERE) &
itemhelp:$doc/dGDE/README.Leash


arg:WHERE
arglabel:WHERE TO SEND OUTPUT
argtype:chooser
# If GenBank file, read directly, otherwise, convert to GenBank.
argchoice:GDE:(GBfilter in1.tmp in1.gen; gde in1.gen; rm in1.*)&
argchoice:Textedit window:($GDE_TEXTEDIT in1.tmp;rm in1.*) &
argchoice:Output file:mv in1.tmp $OUTFILE; echo ' SEQHOUND - GET completed'
argvalue:0

arg:OUTFILE
arglabel:Output file name
argtype:text

in:in1
informat:flat

#------------------- Protein  ( 8/18/04) --------------------------
# Note: This menu requires that the shell script 'GBfilter' be
# in your bin directory.
item:Protein from Protein GI
itemmethod: python $BIRCH/script/flat2list.py in1 in1.nam; (leash -mn SHoundGetFastaList -mpf in1.nam -of in1.tmp; rm in1.nam; $WHERE) &
itemhelp:$doc/dGDE/README.Leash

arg:WHERE
arglabel:WHERE TO SEND OUTPUT
argtype:chooser
# If GenBank file, read directly, otherwise, convert to GenBank.
argchoice:GDE:(GBfilter in1.tmp in1.gen; gde in1.gen; rm in1.*)&
argchoice:Textedit window:($GDE_TEXTEDIT in1.tmp;rm in1.*) &
argchoice:Output file:mv in1.tmp $OUTFILE; echo ' SEQHOUND - GET completed'
argvalue:0

arg:OUTFILE
arglabel:Output file name
argtype:text

in:in1
informat:flat
#------------------- Retrieve Protein GI ( 8/11/04) --------------------------

item:Retrieve protein GIs
itemmethod: python $BIRCH/script/flat2list.py in1 in1.nam; leash -mn $SHMETHOD -mpf in1.nam -of in1.pro.gi; python $BIRCH/script/list2flat.py in1.pro.gi in1.flat;rm in1.nam in1.pro.gi; $GDEOUTPUT
itemhelp:

in:in1
informat:flat

arg:SHMETHOD
arglabel:Retrieve
argtype:choice_menu
argchoice:Protein GIs from DNA GI List:SHoundProteinFromDNAList
argchoice:Protein GIs from Chromosome List:SHoundProteinFromChromosomeList
argchoice:Protein GIs from TaxId List:SHoundProteinFromTaxIDList

argvalue:0

arg:GDEOUTPUT
arglabel:Output to new GDE window?
argtype:chooser
argchoice:Yes:(dgde in1.flat; $RM_CMD -f in1.*)&
argchoice:No:mv in1.flat out1.pro.gi
argvalue:0

out:out1.gi
outformat:gde

############################## Taxonomy ##############################
menu:Taxonomy

#------------------- Genomes ( 8/17/04) --------------------------

item:TaxIDs for all complete genomes in SeqHound
itemmethod: $BIRCH/script/leash -mn SHoundAllGenomes -of in1.taxid; python $BIRCH/script/list2flat.py in1.taxid in1.flat;rm in1.tmp; $GDEOUTPUT
itemhelp:$doc/dGDE/README.Leash

in:in1
informat:flat

arg:GDEOUTPUT
arglabel:Output to new GDE window?
argtype:chooser
argchoice:Yes:(dgde in1.flat; $RM_CMD -f in1.*)&
argchoice:No:mv in1.flat out1
argvalue:0

out:out1
outformat:gde

#------------------- Lineage ( 8/11/04) --------------------------

item:Get Lineage Descriptor
itemmethod: python $BIRCH/script/flat2list.py in1 in1.nam; leash_batch in1.nam in1.tmp -mn SHoundGetTaxLineageFromTaxID -mpi $LINFORMAT; rm in1.nam;$WHERE
itemhelp:$doc/dGDE/README.Leash

in:in1
informat:flat

arg:LINFORMAT
arglabel:Lineage format
argtype:choice_menu
argchoice:FULL:SHoundGetTaxLineage_FULL 
argchoice:GenBank:SHoundGetTaxLineage_GENBANK
argchoice:TaxDB (short):SHoundGetTaxLineage_TAXDBSHORT
argvalue:0

arg:WHERE
arglabel:WHERE TO SEND OUTPUT
argtype:chooser
argchoice:Textedit window:($GDE_TEXTEDIT in1.tmp;rm in1.tmp) &
argchoice:Output file:mv in1.tmp $OUTFILE
argvalue:0

arg:OUTFILE
arglabel:Output file name
argtype:text

#------------------- Ancestors ( 8/17/04) --------------------------

item:Get All Taxonomy Ancestors
itemmethod: python $BIRCH/script/flat2list.py in1 in1.nam; leash.listarray in1.nam in1.flat taxid -mn SHoundGetAllTaxAncestors; rm in1.nam;$GDEOUTPUT
itemhelp:$doc/dGDE/README.Leash

in:in1
informat:flat

arg:GDEOUTPUT
arglabel:Output to new GDE window?
argtype:chooser
argchoice:Yes:(dgde in1.flat; $RM_CMD -f in1.*)&
argchoice:No:mv in1.flat out1
argvalue:0

out:out1
outformat:flat

#------------------- Progeny ( 8/18/04) --------------------------

item:Get Taxonomy Progeny
itemmethod: python $BIRCH/script/flat2list.py in1 in1.nam; leash.listarray in1.nam in1.flat taxid $WHATTOGET; rm in1.nam;$GDEOUTPUT
itemhelp:$doc/dGDE/README.Leash

in:in1
informat:flat

arg:WHATTOGET
arglabel:What to Get
argtype:chooser
argchoice:immediate child nodes:-mn SHoundGetTaxChildNodes 
argchoice:all taxonomy progeny:-mn SHoundGetAllTaxProgeny
argvalue:0

arg:GDEOUTPUT
arglabel:Output to new GDE window?
argtype:chooser
argchoice:Yes:(dgde in1.flat; $RM_CMD -f in1.*)&
argchoice:No:mv in1.flat out1
argvalue:0

out:out1
outformat:flat

#------------------- Name ( 8/12/04) --------------------------

item:Get Name from TaxID
itemmethod: python $BIRCH/script/flat2list.py in1 in1.nam; leash_batch in1.nam in1.tmp -mn SHoundGetTaxNameFromTaxIDByClass -mpi $NAMECLASS; rm in1.nam; $WHERE
itemhelp:$doc/dGDE/README.Leash

in:in1
informat:flat
insave:

arg:NAMECLASS
arglabel:Name Class
argtype:choice_menu
argchoice:none:SLRI_taxon_name_name_class_none 
argchoice:acronym:SLRI_taxon_name_name_class_acronym
argchoice:anamorph:SLRI_taxon_name_name_class_anamorph 
argchoice:blast_name:SLRI_taxon_name_name_class_blast_name
argchoice:common_name:SLRI_taxon_name_name_class_common_name
argchoice:equivalent_name:SLRI_taxon_name_name_class_equivalent_name
argchoice:includes:SLRI_taxon_name_name_class_includes
argchoice:in_part:SLRI_taxon_name_name_class_in_part
argchoice:misnomer:SLRI_taxon_name_name_class_misnomer 
argchoice:misspelling:SLRI_taxon_name_name_class_misspelling
argchoice:preferred_acronym:SLRI_taxon_name_name_class_preferred_acronym
argchoice:preferred_common_name:SLRI_taxon_name_name_class_preferred_common_name
argchoice:scientific_name:SLRI_taxon_name_name_class_scientific_name
argchoice:synonym:SLRI_taxon_name_name_class_synonym
argchoice:teleomorph:SLRI_taxon_name_name_class_teleomorph
argchoice:other:SLRI_taxon_name_name_class_other
argvalue:12

arg:WHERE
arglabel:WHERE TO SEND OUTPUT
argtype:chooser
argchoice:Textedit window:($GDE_TEXTEDIT in1.tmp;rm in1.tmp) &
argchoice:Output file:mv in1.tmp $OUTFILE
argvalue:0

arg:OUTFILE
arglabel:Output file name
argtype:text

#------------------- DNA/Protein From Organism List ( 8/17/04) --------------------------

item:Get DNA/Protein from TaxID
itemmethod: python $BIRCH/script/flat2list.py in1 in1.nam; leash.listarray in1.nam in1.flat $WHATTOGET ; rm in1.nam; $GDEOUTPUT
itemhelp:$doc/dGDE/README.Leash

in:in1
informat:flat
insave:

arg:WHATTOGET
argtype:chooser
arglabel:What to get
argchoice:DNA GI:dna.gi -mn SHoundDNAFromTaxIDIII
argchoice:protein GI:pro.gi -mn SHoundProteinsFromTaxIDIII

argvalue:0

arg:GDEOUTPUT
arglabel:Output to new GDE window?
argtype:chooser
argchoice:Yes:(dgde in1.flat; $RM_CMD -f in1.*)&
argchoice:No:mv in1.flat out1
argvalue:0

out:out1
outformat:flat
