In article <4q9lc6$po0 at master.ftn.net>, gordonm at Adenine.Neither_Here.Nor.There (Gordon MacPherson) writes:
> Does anyone have any scripts which automate blast searches with large numbers
>of sequence files?
>
The other responses were for Unix systems, here's a simple procedure
for OpenVMS (easily modified if you need other BLAST options or to run other
programs).
Regards,
David Mathog
mathog at seqaxp.bio.caltech.edu
Manager, sequence analysis facility, biology division, Caltech
**********************************************************************
$! DOLOTS.COM
$! 1-MAY-1995, David Mathog, Biology Division, Caltech
$! This routine is an example of how to run multiple jobs in a
$! batch queue. This particular one BLAST's all of the .seq
$! files in a directory ASSUMING that they are nucleic acid.
$!
$! Parameters passed in:
$! P1: The name of the directory
$! P2: The file "mask", defaults to *.seq
$! P3: If set, turns verify on
$!
$! Examples:
$!
$! Run in a batch queue, process [.subdir]*.seq
$!
$! $ submit/parameter=("[.subdir]") dolots
$!
$! Run in a batch queue, process [.subdir]p1*.seq
$!
$! $ submit/parameter=("[.subdir]","p1*.seq") dolots
$!
$! Run interactively (not recommended), process [.subdir]p1*.seq
$!
$! $ @dolots [.subdir] p1*.seq
$!
$ if (P3 .nes. "")then set verify
$ if (P1 .eqs. "")
$then
$ write sys$output "DOLOTS error - you did not specify a directory!"
$ exit
$endif
$!
$ on error then goto baddir
$ on warning then goto baddir
$ set default 'P1'
$ goto gooddir
$!
$BADDIR:
$ write sys$output "DOLOTS error - you did not specify a directory!"
$ exit
$!
$GOODDIR:
$ if(P2 .nes. "")
$then
$ mask = P2
$else
$ mask = "*.SEQ"
$endif
$!
$! Type of blast and search parameters
$!
$ program := "BLAST"
$ database := "/infile2=nr"
$ nscores := "/append=""V=20 B=20"""
$ options := "/DBprotein/list=10/segments=10/default"
$!
$TOP:
$ file = f$search(mask)
$ if(file .eqs. "")then goto done
$ root = f$parse(file,,,"NAME") ! root name of sequence
$ if(root .EQS."") then goto TOP
$ file = root + f$parse(file,,,"TYPE") ! strip directory info
$ file := "''file'"
$ outname := "''root'.blast"
$ write sys$output "BLAST: ''file' -> ''outname'"
$ 'program' 'database'/infile1='file'/out='outname' 'nscores' 'options'
$!
$ goto TOP
$DONE:
$ write sys$output "DOLOTS - all done"
$ exit