IUBio

stringsearch batch jobs

macrides at sci.wfeb.edu macrides at sci.wfeb.edu
Sun May 23 18:23:36 EST 1993


In article <17MAY199317433948 at bioch.tamu.edu>, whitsitt at bioch.tamu.edu (Mark S. Whitsitt, N5RJF) writes:
> I am wondering if anyone has written or knows of a VMS command file or 
> executable which will automate the submission of stringsearches etc. as batch 
> jobs.   The GCG package we use does not have the '/batch' option for 
> stringsearch and the users of the computers in our lab are not necessarily able 
> or interested in learning how to create command files for batch submission.  I 
> can write this myself, but figured, why reinvent the wheel?
> 
> Thanks 
> 
> Mark S. Whitsitt, N5RJF        Texas A&M University, Dept of Biochemistry
> Internet:  mwhitsitt at tamu.edu		  College Station, Tx. 77843-2128
> AMPRnet:   n5rjf at n5rjf.ampr.org 			   (409) 845-0832
> Packet/APLINK:  N5RJF @ KE5HE.TX.USA.NA

	Here's an update I did (two years ago, though) of Steve Clark's shell.
Since you're on the internet, you'd be better off doing such searches via
gopher.
				Fote

=========================================================================
 Foteos Macrides           Worcester Foundation for Experimental Biology
 MACRIDES at SCI.WFEB.EDU     222 Maple Avenue, Shrewsbury, MA 01545
=========================================================================
$!------------------------ CUT HERE -------------------------------------
$ orig_veri = f$environment("VERIFY_PROCEDURE")
$ v = f$verify(0) ! (StringSearch turns off verification)
$
$ 	! STRINGSEARCH.COM
$
$	! June 7, 1991 -- Foteos Macrides MACRIDES at WFEB2.BITNET
$                                         MACRIDES at SCI.WFEB.EDU
$
$	! This procedure helps the user execute the GCG program STRINGSEARCH.
$	! The program is run interactively, and the actual search is done in
$	! batch mode.
$
$	! Based on STRINGS.COM for GCG V6:
$	!   Written by Steve Clark
$	!   Samuel Lunenfeld Research Institute
$	!   Mt. Sinai Hospital, Toronto, Canada
$	! Modifications by F.M. for GCG V7:
$	!   Properly handles strings with quotes, e.g., " globin" to get hits
$	!	for words beginning with globin (and exclude hemoglobin).
$	!   Accepts list files.
$	!   Gets /MATCH qualifier if relevant.
$	!   Submits both "definitions" and "complete sequence record" searches
$	!	to batch.
$
$	! Installation:
$	!
$	!   Define command in GENETICS.COM:
$!      $ If f$mode() .eqs. "INTERACTIVE" then -
$!           String*Search :== @device:[directory]StringSearch
$	!
$	!   Create queue in SYSTARTUP_V5.COM:
$!      $ INITIALIZE/QUEUE/START/BATCH/JOB_LIMIT=1/BASE_PRIORITY=3 STRIN$BATCH
$	!
$	!   Define queue-query command in SYLOGIN.COM:
$!	$ STQ :== "SHOW QUEUE/ALL STRIN$BATCH "
$
$	on control_y then goto terminate
$	bell[0,7] = 7
$	ws := "write sys$output"
$	iq := inquire/nopunctuation
$
$	ws ""
$	ws "STRINGSEARCH finds sequences by searching sequence library"
$	ws "documentation for character patterns such as 'globin' or 'Human'."
$	ws ""
$	ws "STRINGSEARCH can search either definitions or complete sequence"
$	ws "records.  The records take 100 times as long to search as the"
$	ws "catalogue.  If you specify more than one word to search for,"
$	ws "(separated by commas) you will have the option to seek entries"
$	ws "that contain all the specified words, any one of them, or a
$	ws "minimum number of them."
$	ws ""
$	ws "STRINGSEARCH through which database?"
$	ws ""
$	ws "1) GenEMBL      (GE)"
$	ws "2) GenBank      (GB)"
$	ws "3) EMBL         (EM)"
$	ws "4) Swiss-Prot   (SW)
$	ws "5) PIR-Protein  (PIR)"
$	ws "6) PIR-Nucleic  (NUCL)"
$	ws "7) VecBase      (VEC)"
$	ws "8) Let me use my own list file (e.g., @MYFILE.LIST)
$	ws ""
$	database := ""
$	myfile := ""
$	mode := ""
$	outfile := ""
$
$get_database:
$
$	iq choice "Please choose one (* 1 *): "
$	if(choice.EQS."") then choice := 1
$	if(choice.EQS."1") then database := GE
$	if(choice.EQS."2") then database := GB
$	if(choice.EQS."3") then database := EM
$	if(choice.EQS."4") then database := SW
$	if(choice.EQS."5") then database := PIR
$	if(choice.EQS."6") then database := NUCL
$	if(choice.EQS."7") then database := VEC
$	if(choice.EQS."8") then goto get_list
$	if(database.EQS."GE") then goto get_genemblset
$	if(database.NES."") then goto ask_subset
$	ws "''bell'"
$	ws "Valid choices are 1,2,3,4,5,6,7 or 8."
$	goto get_database
$
$get_list:
$
$	iq choice "Please specify the list file (e.g., MYFILE.LIST): "
$	if(choice.EQS."") then goto get_list
$	if(f$locate("@",choice).NE.0) then myfile := 'choice'
$       if f$search(myfile) .eqs. "" then goto myfile_not_found
$	if(myfile.NES."") then database := "@''myfile'"
$	if(database.NES."") then goto get_searcharea
$	ws "''bell'"
$	ws "Re-enter the file name without an @."
$	goto get_list
$
$myfile_not_found:
$
$	ws "''bell'"
$	ws "''myfile' does not exist."
$	ws ""
$	goto get_list
$
$get_genemblset:
$
$	! Find out which of the GenEMBL databases should be searched, or
$	! if all of them should be.
$
$	ws ""
$	ws "GenEMBL sequence set to search:"
$	ws " 1) All of the sequences        (GE)"
$	ws " 2) Primate sequences           (PR)"
$	ws " 3) Rodent sequences            (RO)"
$	ws " 4) Other Mammalian sequences   (OM)"
$	ws " 5) Other Vertebrate sequences  (OV)"
$	ws " 6) Invertebrate sequences      (IN)"
$	ws " 7) Plant sequences             (PL)"
$	ws " 8) Bacterial sequences         (BA)"
$	ws " 9) Organelle sequences         (OR)"
$	ws "10) Phage sequences             (PH)"
$	ws "11) Viral sequences             (VI)"
$	ws "12) Structural RNA sequences    (ST)"
$	ws "13) Synthetic sequences         (SY)"
$	ws "14) Unannotated sequences       (UN)"
$	ws ""
$
$ask_genemblset:
$
$	iq choice "Please enter choice (* 1 *): "
$	if(choice.EQS."") then choice := 1
$	database := ""
$	if(choice.EQS."1")  then database := GE
$	if(choice.EQS."2")  then database := PR
$	if(choice.EQS."3")  then database := RO
$	if(choice.EQS."4")  then database := OM
$	if(choice.EQS."5")  then database := OV
$	if(choice.EQS."6")  then database := IN
$	if(choice.EQS."7")  then database := PL
$	if(choice.EQS."8")  then database := BA
$	if(choice.EQS."9")  then database := OR
$	if(choice.EQS."10") then database := PH
$	if(choice.EQS."11") then database := VI
$	if(choice.EQS."12") then database := ST
$	if(choice.EQS."13") then database := SY
$	if(choice.EQS."14") then database := UN
$	if(database.NES."") then goto ask_subset
$	ws "''bell'"
$	ws "Valid responses are 1 - 14, inclusive."
$	goto ask_genemblset
$
$ask_subset:
$
$	! Find out if a subset of the database should be searched
$
$	subset := "*"
$	ws ""
$	ws "How much of ''database' do you want to search?"
$	ws ""
$	ws "1) All of it     (i.e., ''database':*)."
$	ws "2) Only a subset (e.g., ''database':HUM*)."
$	ws ""
$
$ask_subset_choice:
$
$	iq choice "Please enter your choice (* 1 *): "
$	if(choice.EQS."") then goto get_searcharea
$	if(choice.EQS."1") then goto get_searcharea
$	if(choice.EQS."2") then goto get_subset
$	choice := ""
$	ws "''bell'Valid choices are 1 or 2."
$	goto ask_subset_choice
$
$get_subset:
$
$	! Find out what subset of the database to search
$
$	ws ""
$	iq subset "Specify the ''database' subset to search (e.g., HUM*): "
$	if(subset.NES."") then goto get_searcharea
$	ws "''bell'Invalid answer."
$	ws "If you want to search the whole database, type *"
$	goto get_subset
$
$get_searcharea:
$
$	! See which part of the sequence headers to peruse.
$
$	ws ""
$	ws "Do you want to search through:"
$	ws ""
$	ws "1) Definitions"
$	ws "2) Complete sequence records"
$	ws ""
$
$ask_searcharea:
$
$	iq choice "Please choose one (* 1 *): "
$	if(choice.EQS."") then choice := 1
$	if(choice.EQS."1") then mode := "DEFINITIONS_ONLY"
$	if(choice.EQS."2") then mode := "COMPLETE_RECORDS"
$	if(mode.NES."") then goto get_text
$	ws "''bell'"
$	ws "Valid choices are 1 or 2."
$	goto ask_searcharea
$
$get_text:
$
$	! 


More information about the Info-gcg mailing list

Send comments to us at biosci-help [At] net.bio.net