Thread View: bionet.software.sources
1 messages
1 total messages
Started by Thon de Boer
Sat, 05 Sep 1992 19:00
mailfasta 3.0
Author: Thon de Boer
Date: Sat, 05 Sep 1992 19:00
Date: Sat, 05 Sep 1992 19:00
986 lines
31787 bytes
31787 bytes
This is version 3.0 of the mailfasta program. It is a UNIX shell script which
will take a DNA or PROTEIN sequence and will mail it to all the
different mail-servers where it can be searched against the DNA or PROTEIN
databases using the FASTA and/or BLAST programs. It can also be used to identify
ORFs using the GRAIL and/or GeneID/NetGene mail servers and to identify homology
using PROSITE blocks with the BLOCKS server.
It uses the new BLAST server at NCBI and the FLAT server in Japan for FASTA
searches because the services at GenBank will be terminated at the end of this
month.
It is packed as an shell archive. It contains :
mailfasta : the UNIX shell script
cid.c : A small c program which will determine if the sequence is DNA or AA
getentry : A shell script which can be used to retrieve entries of interest
mailfasta.doc : The documentation file
The shar file will unpack all these files and will compile cid.c into cid
using the cc c compiler.
mailfasta makes use oif the program 'readseq' for file conversion.
This program MUST be present and is NOT packed with this shar file.
It can be obtained via FTP from various FTP sites (fly.bio.indiana.edu etc.)
This shar file can also be found on this FTP site. First in the 'incomming'
directory and later in the /molbio/unix directory.
Thon de Boer
#! /bin/sh
# This is a shell archive. Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file". To overwrite existing
# files, type "sh file -c". You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g.. If this archive is complete, you
# will see the following message at the end:
# "End of shell archive."
# Contents: mailfasta getentry cid.c mailfasta.doc
# Wrapped by deboer@bio.vu.nl on Sat Sep 5 17:11:34 1992
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'mailfasta' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'mailfasta'\"
else
echo shar: Extracting \"'mailfasta'\" \(17091 characters\)
sed "s/^X//" >'mailfasta' <<'END_OF_FILE'
X#!/bin/csh
X# Change the MAIL variables below, if your routing is different.
X# These settings are for sites connected to the Internet.
X#
X# Change the readseq alias according to local setup.
X# Readseq can be obtained by ftp from ftp.bio.indiana.edu
X# in directory molbio/readseq
X#
X# Use of readseq and some new messages added by
X# Martti Tolvanen, U of Helsinki, Finland, 29 February 1992
X
X#**************************************************************************
X# You can define your GRAIL user ID as a global variable GRAIL_ID.
X# put this line in your .cshrc :
X# setenv GRAIL_ID your_grail_user_id
X# without the # sign
X
X#**************************************************************************
X# test makes testing easier.
X# If test set to nothing, then normal operation.
X# else use test as mail address.
X
X#set test = deboer@bio.vu.nl
Xset test = ''
X
Xif ($test == '') then
X set MAIL_BLAST = blast@ncbi.nlm.nih.gov
X set MAIL_FLAT = flat-netserv@smlab.eg.gunma-u.ac.jp
X set MAIL_BLOCKS = blocks@howard.fhcrc.org
X set MAIL_GRAIL = grail@ornl.gov
X set MAIL_GENEID = geneid@darwin.bu.edu
Xelse
X set MAIL_BLAST = $test
X set MAIL_FLAT = $test
X set MAIL_BLOCKS = $test
X set MAIL_GRAIL = $test
X set MAIL_GENEID = $test
Xendif
X
X#alias readseq readseq
X
Xecho ' '
Xecho ' MailFasta'
Xecho ' *********'
Xecho By Thon de Boer
Xecho Department of Microbiological Physiology
Xecho Vrije universiteit AMSTERDAM Holland.
Xecho This program is in the Public Domain
Xecho 'Send comments to deboer@bio.vu.nl'
Xecho 'Version 3.0 22 August 1992'
Xecho ' '
Xecho 'Usage : mailfasta [sequencefile1 sequencefile2 ...]'
Xecho ' '
Xecho 'This program will read a sequence file using readseq and mail it to'
Xecho "the different email servers for FASTA, BLAST, BLOCKS, GRAIL and GeneID searches"
Xecho ' '
Xset stop = false
Xwhile ($stop == false)
Xif ($1 == '') then
X set argument = empty
Xelse
X set argument = $1
Xendif
Xif ($argument == empty) then
Xset good=false
Xwhile ($good == false)
Xecho -n 'Enter the filename wich contains the sequence: '
Xset file=$<
Xif ($file != '') then
X if !(-f $file) then
X echo mailfasta: File \'$file\' does not exist
X else
X echo ' '
X more -10 $file
X echo ' '
X echo -n 'Is this the right file ? ([yes]/no) '
X set choice = $<
X switch ($choice)
X case n*:
X breaksw
X default:
X set good=true
X breaksw
X endsw
X endif
Xendif
Xend
X
Xelse if !(-f $argument) then
X echo mailfasta: File \'$argument\' does not exist
X exit
Xelse
X set file = $argument
Xendif # of if ($argument==empty)...
X
Xset filename = $file
Xreadseq $file -l -p > /tmp/mflist$$
Xif (-z /tmp/mflist$$) then
X /bin/rm /tmp/mflist$$
X echo Unknown format of file: $file
X exit
Xendif
X
Xset nseq=`grep ')' /tmp/mflist$$ | wc -l`
Xset iseq=1
Xif ($nseq > 2) then # $nseq is not parsing as digits !
X echo " "
X cat /tmp/mflist$$
X echo -n 'Choose query sequence by number: '
X set iseq=$<
Xendif
Xecho ' '
X
X/bin/rm -f /tmp/mflist$$
X
Xreadseq $file -p -f8 -i$iseq > /tmp/mfseq$$
Xset file=/tmp/mfseq$$
X
Xif {(cid < $file)} then
X set type = DNA
X else
X set type = PROTEIN
X endif
X
Xmore -5 $file
Xecho ""
Xecho -n "Sequence looks like $type. OK? ([yes]/no): "
X set choice = $<
X switch ($choice)
X case n*:
X if ($type == DNA) then
X set type = PROTEIN
X else
X set type = DNA
X endif
X breaksw
X default:
X breaksw
X endsw
X
Xendif
X
Xset loop = true
Xwhile ($loop == true)
Xecho ' '
Xecho '***** Now using' $type file: $filename
Xgrep '>' $file
Xecho ' '
Xendif
Xset db = (GenBank GenBank-new EMBL EMBL-new GB-primate GB-rodent GB-mammal GB-vertebrate GB-invertebrate GB-plant GB-organelle GB-bacteria GB-structuralRNA GB-viral GB-phage GB-synthetic GB-unannotated Non-redundant-DNA GenBank GenBank-new GB-vector EMBL EMBL-new EST Non-redundant-PROTEIN Swiss-Prot PIR GenPept GenPept-new TFD GenPept GenPept-new Swiss-Prot PIR PRF Blocks Grail GeneID)
Xset db1 = (genbank GBNEW/gbnew.seq embl EMBLNEW/emblnew.seq GB/gbpri.seq GB/gbrod.seq GB/gbmam.seq GB/gbvrt.seq GB/gbinv.seq GB/gbpln.seq GB/gborg.seq GB/gbbct.seq GB/gbrna.seq GB/gbvrl.seq GB/gbphg.seq GB/gbsyn.seq GB/gbuna.seq nr genbank gbupdate vector embl emblu dbest)
Xset db2 = ( nr swissprot pir genpept gpupdate tfd genpept GPNEW/gpnew.seq swiss pir prf blocks grail geneid)
Xset dbreal = ($db1 $db2)
Xecho 'Which service(s) do you want to use ?'
Xecho ''
Xecho 'FASTA search'
Xif ($type == DNA) then
X echo ' 1 GenBank (+new) 2 New GB 3 EMBL (+new) 4 New EMBL'
X echo ' GenBank sequence subdivisions (for faster searching)'
X echo ' 5 Primate 6 Rodent 7 Mammal 8 Vertebrate'
X echo ' 9 Invertebrate 10 Plant 11 Organelle 12 Bacterial'
X echo ' 13 Struc. RNA 14 Viral 15 Phage 16 Synthetic'
X echo ' 17 Unanotated'
X echo ''
X echo 'BLAST search'
Xelse
X echo ' 31 All translated reading frames from GenBank'
X echo ' 32 New entries of translated reading frames'
X echo ' 33 SWISS-PROT'
X echo ' 34 PIR'
X echo ' 35 PRF'
X echo ''
X echo 'BLAST search (protein query vs. 6 frames translated database)'
Xendif
X echo " 18 All db's 19 GB 20 New GB 21 GB vector"
X echo ' 22 EMBL 23 New EMBL 24 EST'
Xif ($type == DNA) then
X echo 'BLAST search (All 6 frames against protein database)'
Xelse
X echo 'BLAST search'
Xendif
X echo " 25 all db's 26 SWISS-PROT 27 PIR 28 GenPept"
X echo ' 29 New GenPept 30 TFD'
X echo ''
X echo 'Other services'
Xif ($type == DNA) then
X echo ' 36 BLOCKS 37 GRAIL 38 GeneID/netgene'
Xelse
X echo ' 36 BLOCKS'
Xendif
Xecho ''
X
Xset good=false
Xwhile ($good == false)
X set blast = false
X set fasta = false
X set blocks = false
X set grail = false
X set geneid = false
X set error = false
X echo -n 'Enter the number(s) of your choice (separated by a <SPACE>) : '
X set choice=$<
X set blastx=true
X foreach i ($choice)
X if ($type == DNA) then
X switch($i)
X case [1-9]:
X case 10:
X case 11:
X case 12:
X case 13:
X case 14:
X case 15:
X case 16:
X case 17:
X if ($error == false) then
X set good = true
X set fasta = true
X endif
X breaksw
X case 18:
X case 19:
X case 20:
X case 21:
X case 22:
X case 23:
X case 24:
X if ($error == false) then
X set good = true
X set blast = true
X set blastx = false
X endif
X breaksw
X case 25:
X case 26:
X case 27:
X case 28:
X case 29:
X case 30:
X if ($error == false) then
X set good = true
X set blast = true
X endif
X breaksw
X case 36:
X if ($error == false) then
X set good = true
X set blocks = true
X endif
X breaksw
X case 37:
X if ($error == false) then
X set good = true
X set grail = true
X endif
X breaksw
X case 38:
X if ($error == false) then
X set good = true
X set geneid = true
X endif
X breaksw
X default:
X echo mailfasta: Invalid choice \'$i\'
X set good = false
X set error = true
X breaksw
X endsw
X else
X switch ($i)
X case 31:
X case 32:
X case 33:
X case 34:
X case 35:
X if ($error == false) then
X set good = true
X set fasta = true
X endif
X breaksw
X case 18:
X case 19:
X case 20:
X case 21:
X case 22:
X case 23:
X case 24:
X case 25:
X case 26:
X case 27:
X case 28:
X case 29:
X case 30:
X if ($error == false) then
X set good = true
X set blast = true
X set blastx = false
X endif
X breaksw
X case 36:
X if ($error == false) then
X set good = true
X set blocks = true
X endif
X breaksw
X default:
X echo mailfasta: Invalid choice \'$i\'
X set good = false
X set error = true
X breaksw
X endsw
X endif
Xend #foreach i ($choice)
Xend #while ($good == flase)
X
Xif ($fasta == true) then
X echo ''
X echo 'Enter parameters for the FASTA search'
X set good = false
X while ($good == false)
X echo ' Enter the sensitivity (= ktup, lower number means more sensitive)'
X if ($type == DNA) then
X echo -n ' (3..6) [4]: '
X else
X echo -n ' (1..2) [1]: '
X endif
X set ktup=$<
X if ($ktup != '') then
X if ($type == DNA) then
X switch ($ktup)
X case [3-6]:
X set good = true
X breaksw
X default:
X echo mailfasta: Invalid choice \'$ktup\'
X breaksw
X endsw
X else
X switch ($ktup)
X case [1-2]:
X set good = true
X breaksw
X default:
X echo mailfasta: Invalid choice \'$ktup\'
X breaksw
X endsw
X endif
X else
X if ($type == DNA) then
X set ktup=4
X else
X set ktup=1
X endif
X set good = true
X endif
X end
X echo -n ' Enter the maximum number of matched sequences [100]: '
X set scores=$<
X if ($scores == '') set scores=100
Xelse
X set ktup=''
Xendif
X
Xif ($blast == true) then
X echo ''
X echo 'Enter parameters for the BLAST search'
X echo -n ' Enter the expectation cutoff value (0 - 1000) [10]: '
X set expect=$<
X if ($expect == '') set expect = 10
X echo -n ' Enter the cutoff value (optional): '
X set cutoff=$<
X echo -n ' Enter the maximum number of matched sequences [100]: '
X set blast_scores=$<
X if ($blast_scores == '') set blast_scores=100
X echo -n ' Enter the maximum number of aligned sequences [50]: '
X set blast_align=$<
X if ($blast_align == '') set blast_align=50
X if ($blastx == false) then
X echo -n ' Do you want the histogram ? [yes]/no: '
X set histogram=$<
X switch ($histogram)
X case n*:
X case N*:
X set histogram = no
X breaksw
X default:
X set histogram = yes
X endsw
X else
X set histogram = ''
X endif
Xendif
X
Xif ($grail == true) then
X if ($?GRAIL_ID == '0') then
X echo ''
X echo 'ORF predicting using the GRAIL service'
X echo -n ' Enter your GRAIL user ID: '
X set GRAIL_ID = $<
X if ($GRAIL_ID != '') then
X set good = true
X else
X echo ''
X echo "GRAIL needs your GRAIL ID number, if you don't have one"
X echo ' you can apply for one now'
X echo ''
X echo -n ' Do you want to apply for a GRAIL user ID ? [yes]/no: '
X set input=$<
X switch ($input)
X case n*:
X case N*:
X echo ''
X echo 'OK..Sequence will NOT be submitted to the GRAIL service'
X set grail = false
X breaksw
X default:
X echo -n 'Enter your name: '
X set name = $<
X echo -n 'Enter your address: '
X set address = $<
X echo -n 'Enter your phone number: '
X set phone = $<
X echo -n 'Enter your eMail address: '
X set email = $<
X echo Register > /tmp/mf2$$
X echo $name >> /tmp/mf2$$
X echo $address >> /tmp/mf2$$
X echo $phone >> /tmp/mf2$$
X echo $email >> /tmp/mf2$$
X mail $MAIL_GRAIL < /tmp/mf2$$
X /bin/rm /tmp/mf2$$
X echo 'Your request has been sent to GRAIL.'
X echo 'A email message with the ID number will be sent to you very soon now.'
X set grail = false
X breaksw
X endsw
X endif
X endif
Xendif
X
Xif ($geneid == true) then
X echo ''
X echo 'ORF predicting using the GeneID service'
X echo -n ' Would you also like to use the NETGENE service ? [yes]/no: '
X set NETGENE = $<
X switch ($NETGENE)
X case n*:
X case N*:
X set NETGENE = false
X breaksw
X default:
X set NETGENE = true
X breaksw
X endsw
Xendif
X
Xecho ''
Xecho "|"
Xecho "+--=> You have selected $type file '$filename'"
Xecho ' to be used with the following parameters:'
Xecho ''
X
Xif ($fasta == true) then
X echo 'FASTA search:'
X echo ' KTUP value: '$ktup
X echo ' Number of matched sequences to be listed: '$scores
X echo ' Databank sections to be searched :'
X foreach j ($choice)
X switch ($j)
X case [1-9]:
X case 10:
X case 11:
X case 12:
X case 13:
X case 14:
X case 15:
X case 16:
X case 17:
X case 31:
X case 32:
X case 33:
X case 34:
X case 35:
X echo ' '$db[$j]
X breaksw
X endsw
X end
X echo ' '
Xendif
X
Xif ($blast == true) then
X echo BLAST search:
X echo ' Expectation cutoff: '$expect
X if ($cutoff != '') echo ' Cutoff value: '$cutoff
X echo ' Maximum number of matched sequences: '$blast_scores
X echo ' Maximum number of aligned sequences: '$blast_align
X if ($blastx == false) echo ' Listing of histogram: '$histogram
X echo ' Databank sections to be searched :'
X foreach j ($choice)
X switch ($j)
X case 18:
X case 19:
X case 20:
X case 21:
X case 22:
X case 23:
X case 24:
X if ($type == PROTEIN) then
X echo ' All 6 readingframes of DNA database: '$db[$j]
X else
X echo ' '$db[$j]
X endif
X breaksw
X case 25:
X case 26:
X case 27:
X case 28:
X case 29:
X case 30:
X if ($type == DNA) then
X echo ' 6 readingframes of the query against PROTEIN database: '$db[$j]
X else
X echo ' '$db[$j]
X endif
X breaksw
X endsw
X end
Xendif
X
Xif ($blocks == true) then
X echo ''
X echo 'Homology searching using the BLOCKS server'
Xendif
X
Xif ($grail == true) then
X echo ''
X echo 'ORF predicting using the GRAIL service'
X echo ' using user ID : '$GRAIL_ID
Xendif
X
Xif ($geneid == true) then
X echo ''
X echo 'ORF predicting using the GeneID service'
X if ($NETGENE == true) echo ' plus the NETGENE service'
Xendif
X
Xecho ' '
Xecho -n 'Is this OK? [yes]/no/exit: '
Xset dummy=$<
Xecho ' '
Xswitch ($dummy)
X case n*:
X case N*:
X breaksw
X case e*:
X case E*:
X /bin/rm $file
X exit
X breaksw
X default:
X set loop = false
X foreach i ($choice)
X switch ($i)
X case 18:
X case 19:
X case 20:
X case 21:
X case 22:
X case 23:
X case 24:
X case 25:
X case 26:
X case 27:
X case 28:
X case 29:
X case 30:
X set blastx = false
X if (($i == 25)||($i == 26)||($i == 27)||($i == 28)||($i == 29)||($i == 30)) then
X if ($type == PROTEIN) then
X echo PROGRAM blastp > /tmp/mf$$
X else
X echo PROGRAM blastx > /tmp/mf$$
X set blastx = true
X endif
X else
X if ($type == DNA) then
X echo PROGRAM blastn > /tmp/mf$$
X else
X echo PROGRAM tblastn > /tmp/mf$$
X endif
X endif
X echo DATALIB $dbreal[$i] >> /tmp/mf$$
X echo DESCRIPTION $blast_scores >> /tmp/mf$$
X echo ALIGNMENTS $blast_align >> /tmp/mf$$
X if ($blastx == false) echo HISTOGRAM $histogram >> /tmp/mf$$
X echo EXPECT $expect >> /tmp/mf$$
X if ($cutoff != '') echo CUTOFF $cutoff >> /tmp/mf$$
X echo BEGIN >> /tmp/mf$$
X cat /tmp/mf$$ $file | mail $MAIL_BLAST
X echo Now mailing BLAST search of $filename in section \'$db[$i]\' to NCBI
X breaksw
X case 37:
X if ($grail == true) then
X echo Sequences 1 $GRAIL_ID > /tmp/mf$$
X cat $file >> /tmp/mf$$
X mail $MAIL_GRAIL < /tmp/mf$$
X echo Now mailing $filename for ORF predicting using the GRAIL service
X else
X echo ' ' > /tmp/mf$$ #Create dummy file to avoid error for rm
X endif
X breaksw
X case 38:
X echo Genomic Sequence > /tmp/mf$$
X if ($NETGENE == true) echo NetGene >> /tmp/mf$$
X cat $file >> /tmp/mf$$
X mail $MAIL_GENEID < /tmp/mf$$
X echo Now mailing $filename for ORF predicting using the GeneID service
X breaksw
X case 36:
X cat $file > /tmp/mf$$
X mail $MAIL_BLOCKS < /tmp/mf$$
X echo Now mailing $filename for homology searching using the BLOCKS service
X breaksw
X default:
X echo 'tmpfile file << "*** END ***"' > /tmp/mf$$
X cat $file >> /tmp/mf$$
X echo '*** END ***' >> /tmp/mf$$
X if (($i == 1)||($i == 3)||($i == 31)||($i == 32)||($i == 33)||($i == 34)||($i == 35)) then
X echo fasta -o $scores file '@'$dbreal[$i] $ktup >> /tmp/mf$$
X else
X echo fasta -o $scores file '$'$dbreal[$i] $ktup >> /tmp/mf$$
X endif
X mail $MAIL_FLAT < /tmp/mf$$
X echo Now mailing FASTA search of $filename in section \'$db[$i]\' to FLAT server in Japan
X breaksw
X endsw
X /bin/rm /tmp/mf$$
Xend # foreach i
X/bin/rm /tmp/mfseq$$
Xendsw #dummy
X
Xend #while ($loop == true)
X
Xif ($2 == '') then
X set stop = true
Xelse
X shift
X echo ' '
X echo '-+-+-+- next file -+-+-+-'
Xendif
Xend
Xecho ' '
Xdate
Xecho Search results will be returned by e-mail shortly.
END_OF_FILE
if test 17091 -ne `wc -c <'mailfasta'`; then
echo shar: \"'mailfasta'\" unpacked with wrong size!
fi
chmod +x 'mailfasta'
# end of 'mailfasta'
fi
if test -f 'getentry' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'getentry'\"
else
echo shar: Extracting \"'getentry'\" \(2042 characters\)
sed "s/^X//" >'getentry' <<'END_OF_FILE'
X#!/bin/csh
X# RETRIEVE_NCBI = adress of retrieve mailserver of Genbank.
X# Change if routing for your site is different.
Xset RETRIEVE_NCBI = retrieve@ncbi.nlm.nih.gov
X
Xif ($1 != '') then
X set datalib = $1
X shift
X switch ($datalib)
X case gb:
X case GB:
X case genb*:
X case GENB*:
X set datalib = genbank
X breaksw
X case gbu*:
X case GBU*:
X set datalib = gbupdate
X breaksw
X case embl:
X case EMBL:
X set datalib = EMBL
X breaksw
X case emblu*:
X case EMBLU*:
X set datalib = emblupdate
X case *est:
X case *EST:
X set datalib = dbest
X breaksw
X case s*:
X case S*:
X set datalib = swissprot
X breaksw
X case p*:
X case P*:
X set datalib = pir
X breaksw
X case gp:
X case GP:
X case genp*:
X case GENP*:
X set datalib = genpept
X breaksw
X case gpu*:
X case GPU*:
X set datalib = gpupdate
X breaksw
X case tfd:
X case TFD:
X set datalib = tfd
X breaksw
X default:
X echo getentry: Unknown database \'$datalib\'
X exit
X breaksw
X endsw
X
X echo DATALIB $datalib > /tmp/ge$$
X echo BEGIN >> /tmp/ge$$
X set stop = false
X while ($stop == false)
X echo $1 >> /tmp/ge$$
X shift
X if ($1 == '') set stop = true
X end
X more /tmp/ge$$
X echo ''
X mail $RETRIEVE_NCBI < /tmp/ge$$
X /bin/rm /tmp/ge$$
X echo 'Entry request(s) mailed to NCBI'
X echo Entries will appear in the mailbox in a few moments.
Xelse
X echo getentry: Retrieve a sequence database entry via mail from NCBI
X echo 'Usage: getentry database entry [entry entry ....]'
X echo ' database is the name of database where entry is to be retrieved from'
X echo ' and can be one of the following : genbank/GB, gbu(pdate), EMBL, EMBLu(pdate)'
X echo ' EST, S(wiss-prot), P(ir), Genp(ept), GPU(pdate)'
X echo ' entry must be a locus name'
Xendif
END_OF_FILE
if test 2042 -ne `wc -c <'getentry'`; then
echo shar: \"'getentry'\" unpacked with wrong size!
fi
chmod +x 'getentry'
# end of 'getentry'
fi
if test -f 'cid.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'cid.c'\"
else
echo shar: Extracting \"'cid.c'\" \(573 characters\)
sed "s/^X//" >'cid.c' <<'END_OF_FILE'
X#include <stdio.h>
X
Xmain ()
X{
X int ca,cc,cg,ct,total,i,ch;
X float result;
X ca=cc=cg=ct=total=i=0;
X while((ch = getchar()) == ';') readln();
X if (ch =='>') readln();
X while((ch = getchar()) != EOF)
X { switch (ch)
X { case 'a':
X case 'A': ca++; break;
X case 'c':
X case 'C': cc++; break;
X case 't':
X case 'T': ct++; break;
X case 'g':
X case 'G': cg++; break;
X }
X if (((ch>=65)&&(ch<=90))||((ch>=97)&&(ch<=122))) total++;
X}
X result = (float)(ca+cc+ct+cg)/total;
X if (result>=.85) exit(0);
X else exit(1);
X}
X
Xreadln()
X{
X while(getchar() != 10);
X}
END_OF_FILE
if test 573 -ne `wc -c <'cid.c'`; then
echo shar: \"'cid.c'\" unpacked with wrong size!
fi
# end of 'cid.c'
fi
if test -f 'mailfasta.doc' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'mailfasta.doc'\"
else
echo shar: Extracting \"'mailfasta.doc'\" \(6359 characters\)
sed "s/^X//" >'mailfasta.doc' <<'END_OF_FILE'
XMAILFASTA and GETENTRY
X
XNAME
X mailfasta - send a sequence file for comparison with sequence databases
X or for ORF predicting
X getentry - get an entry from the sequence databases
X
XSYNOPSIS
X mailfasta [sequencefile1 sequencefile2 ...]
X
X getentry database entry1 [entry2 ...]
X
XDESCRIPTION
X
X MAILFASTA 3.0
X
X The FLAT site in Japan and the NCBI site in US contain several sequence
X databases. A sequence can be compared with these databases by sending
X a specially formatted email message to the sites mail-server.
X On the sites the sequence is compared to the databases with the FASTA,
X program (at the FLAT site) or the BLAST program (at NCBI) and the results
X will be e-mailed back.
X
X There are two other mailservers which will take a DNA sequence and
X try to predict exon-intron splice sites and gene organisation. These
X are GRAIL and GeneID.
X
X Another way to find homology in sequences is to compare it with a
X database of blocks of AA sequences derived from the PROSITE database.
X This can be done with the BLOCKS mailserver. DNA sequences will be
X translated in the 6 reading frames and a BLOCKS search will be done on
X those 6 AA sequences.
X
X
X Mailfasta is a interactive program which reads a sequence file (either
X DNA or (one letter coded) protein) and asks which databases is to be
X searched or what service is to be used.
X Then it asks the sensitivity of the search and the maximum
X number of best-ranked results. It will send the sequence to the apropriate
X site and the results of the search will be e-mailed back.
X The sequence file can have several formats. The program readseq is used
X to translate all the different formats. This program MUST be present
X and is not packed with the mailfasta program. It can be obtained via
X anonymous ftp from several sources. (ftp.bio.indiana.edu::/molbio/readseq)
X
X The ORF predicting GRAIL server can only be used if a valid user id
X is given. If you don't have a GRAIL user id you can aply for one in
X the program. It will ask you for your name and address and will sent
X your request to GRAIL. GRAIL will provide you with the userid via email.
X If you do have a GRAIL userid, you can make a global variable
X GRAIL_USERID by adding this line to your .cshrc file :
X setenv GRAIL_ID your_grail_user_id
X but you can also enter it when it asks you for one.
X
X The program will check whether the sequence is DNA or PROTEIN, simply
X by counting the percentage of the bases G, A, T and C. For this, a small
X c program is used, called cid.c. This program comes with the program.
X It must be present and compiled to 'cid'. The shar file will compile it.
X If you did not use the shar file to install 'mailfasta' you will have
X to compile it yourself, by using the command 'cc -o cid cid.c'.
X
X
X GETENTRY
X
X Entries of interest can be obtained with the program getentry.
X entry is the locus name which can be found in the FASTA or BLAST output.
X The entries will be e-mailed back.
X A entry from the BLOCKS database can be retrieved by sending a email
X to blocks@howard.fhcrc.org with the block number in the subject line.
X
XDATABASES
X FASTA searches are sent to the FLAT server in Japan. There the sequence
X can be compared to the GenBank and EMBL DNA database and the Swiss-Prot,
X PIR and PRF AA databases. It is also possible to compare DNA sequences
X to subsets of the GenBank database.
X
X BLAST searches are sent to the NCBI server in the US. There the sequence
X can be compared to GenBank, EMBL, Vector subset of GB, Expressed Sequence
X Tags database (EST), Swiss-Prot, PIR, GenPept and Transcription Factor
X Database (TFD).
X If a AA database is chosen for a DNA sequence, the sequence will be
X translated in the 6 reading frames and the resulting AA sequences will be
X compared to the AA databases. If a DNA database is chosen for a AA
X sequence, the database will be translated in the 6 reading frames and
X the AA sequences will be compared to the translated DNA database.
X
XHELP
X Help or more information on interpreting the results can be obtained
X by sending HELP in an email message to the following adresses :
X
X FASTA : flat-netserv@smlab.eg.gunma-u.ac.jp
X BLAST : blast@ncbi.nlm.nih.gov
X BLOCKS : blocks@howard.fhcrc.org
X GRAIL : grail@ornl.gov
X GENEID : geneid@darwin.bu.edu
X
X RETRIEVE : retrieve@ncbi.nlm.nih.gov (getentry)
X
XBUGS
X you tell me :-)
X
XFILES
X cid A c program which checks if a file is a DNA sequence
X or a protein sequence. If a file contains more than
X 85% A, C, G and T's it is considered to be a DNA file.
X This file MUST be present and compiled from cid.c.
X readseq A file conversion program. Must be present.
X Program can be obtained via anonymous ftp
X from fly.bio.indiana.edu.
X mailfasta.doc This documentation
X /tmp/mflist$$
X /tmp/mfseq$$
X /tmp/mf$$ Temporary storage of the email message.
X /tmp/ge$$ Temporary storage for getentry
X
X
XCHANGES SINCE THE LAST VERSION
X There have been a lot of changes since the last version of mailfasta (2.1)
X Version 3.0 no longer uses the FASTA and BLAST server at the GenBank site
X (genbank.bio.net) as those services will be terminated soon. Instead it
X uses the FASTA server at the FLAT site in Japan. This site does not have
X the vector subset, so this cannot be searched using the FASTA program.
X Version 3.0 now uses the NCBI site with the BLAST program which can search
X almost all DNA and PROTEIN databases.
X It can also search a query for PROSITE blocks using the BLOCKS server.
X ORF predicting is now possible using the GRAIL and GeneID/NetGene server.
X Retrieving sequnce entries is no handled by the NCBI RETRIEVE server.
X Getentry now needs a database name and a LOCUS name from that database to
X be retrieved. A better way to retrieve sequence entries is to use the
X gopher hole at iubio and the EMBNET hole in switserland.
X
XLast change: September, 5 1992
END_OF_FILE
if test 6359 -ne `wc -c <'mailfasta.doc'`; then
echo shar: \"'mailfasta.doc'\" unpacked with wrong size!
fi
# end of 'mailfasta.doc'
fi
echo shar: Now compiling cid.c using cc
cc -o cid cid.c
echo 'I have unshared mailfasta 3.0' | mail deboer@bio.vu.nl
echo shar: End of shell archive.
exit 0
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads