$! PROFILESEARCH.COM $ ! A procedure to run the Profilesearch program in Batch $ ! using the example in the Program Manual as defaults $ ! $ On error then goto quit $ On severe_error then goto quit $ !INTERACTIVE: $ MODE:='F$MODE()' $ IF MODE .EQS. "BATCH" then goto Batch $ ! $ ! Determine the default directory $ currdir=f$directory() $ ! $ ! Defaults $ ! file1="GenDocData:Pretty.Prf" $ file2="NBRF:*" $ defgap="4.50" $ defgaplen="0.05" $ Queue="OFFPEAK" $! $ Create sys$output **AFRC Batch version - Use $FETCH PROFILESEARCH.COM to amend other parameters** PROFILESEARCH uses a "profile" (representing a group of aligned sequences) as a probe to search the database for new sequences with similarity to the group. The profile is created with the program PROFILE. $ ! $ if P1 .nes. "" then goto infile1 $ ! $ ! Get name of profile file & check it exists $ ! $ write sys$output "" $ inquire/nopunct P1 "PROFILESEARCH with what query profile ? " $ infile1: $ if P1 .eqs. "" then goto quit $ if f$search(P1) .nes. "" then goto infile2 $ write sys$output "" $ inquire/nopunct P1 "Cannot read ''P1'. What file ? " $ goto infile1 $ ! $ ! Get database files/entries to read $ ! $ Infile2: $! For full file-spec ID use the following 11-Jun-1990 $! filestart=f$parse(".",P1,,,"syntax_only") $! outfile=f$parse(".PFS;",P1,,,"syntax_only") $ filestart=f$element(0,".",P1) $ outfile=filestart+".Pfs" $ ! $ if P2 .nes. "" then goto definition $ write sys$output "" $ inquire/nopunct P2 "Search for query in what sequence(s) (* ''file2' *) ? " $ if P2 .eqs. "" then P2=file2 $ ! $ definition: $ ATSTART:=FALSE $ If f$extract(0,1,P2) .nes."@" then goto gapweight $ ATSTART:=TRUE $ ATFILE:='P2' $ P2=f$element(1,"@",P2) $ ! $ gapweight: $ if P3 .nes. "" then goto lenweight $ write sys$output "" $ inquire/nopunct P3 "What is the gap weight (* ''defgap' *) ? " $ if P3 .eqs. "" then P3=defgap $! $ lenweight: $ if P4 .nes. "" then goto outfile $ write sys$output "" $ inquire/nopunct P4 "What is the gap length weight (* ''defgaplen' *) ? " $ if P4 .eqs. "" then P4=defgaplen $! $ ! Get output file name $ ! $ outfile: $ if P5 .nes. "" then goto que $ write sys$output "" $ inquire/nopunct P5 "What should I call the output file (* ''outfile' *) ? " $ if P5 .eqs. "" then P5=outfile $ filestart=f$element(0,".",P5) $ ! $ Que: $ if P6 .nes. "" then goto submit $ write sys$output "" $ inquire/nopunct P6 "Submit to which batch queue (* ''queue' *) ? " $ if P6 .eqs. "" then P6=queue $ goto submit $! $! Submit to self as batch $ Submit: $ If atstart then P2:='atfile' $ write sys$output "" $ Submit/q='P6'/CPU=infinite/NOTIFY/NOPRINT/- Parameter=('P1',''"''P2'"','P3','P4','P5','currdir')/- log_file='currdir''filestart'.log 'f$environment("procedure") $ !f$environment passes on the name and location of this COMFILE $ ! so you only need to execute with @PROFILESEARCH $ ! $ write sys$output "" $ write sys$output "The log of your batch job will be in ",currdir,filestart,".LOG" $ ! $ ! Normal end or Abandon batch submission $ ! $ Quit: $ exit $ !============================================================= $ BATCH: $ ! $ ! $ ! Set up UWGCG if not already done by LOGIN.COM $ IF f$logical("GENSITECOM").eqs."" then $GCG7 $ ! $ Set Working_Set/Limit=1200 $ ! $ ! FigureOut ProfileSearch.Figure ! plot not yet available $ ! $ Del/sym/glob Profilesearch $ Profilesearch:==$GenUtil:Profilesearch $ Set verify $ ! Set default directory .. $ set default 'P6' $ ProfileSearch /- INfile1='P1'/- INfile2='P2'/- GAPweight='P3'/- LENgthweight='P4'/- OUTfile='P5'/- LIStsize=100 /NOMONitor /SUMmary /Default $exit