summaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
authorAaron M. Ucko <ucko@debian.org>2005-12-08 22:58:31 +0000
committerAaron M. Ucko <ucko@debian.org>2005-12-08 22:58:31 +0000
commit4b1edc60532e16ec7d0255e1c3552c2e6a33737e (patch)
treeacef5e2808d7dbc8a9c41da8ef71b1436f51718e /network
parent23f1d44b259776e399f7fe0fe883c7e9445e192b (diff)
Load /tmp/.../ncbi-tools6-6.1.20051206 into
branches/upstream/current.
Diffstat (limited to 'network')
-rw-r--r--network/blast3/client/netblap3.c12
-rw-r--r--network/id2arch/id2.asn7
-rw-r--r--network/taxon1/taxon2/tc2proc.c6
-rw-r--r--network/wwwblast/Src/Makefile2
-rw-r--r--network/wwwblast/Src/wblast2.c52
-rw-r--r--network/wwwblast/Src/wwwbutl.c36
6 files changed, 84 insertions, 31 deletions
diff --git a/network/blast3/client/netblap3.c b/network/blast3/client/netblap3.c
index 2179f439..48bd3878 100644
--- a/network/blast3/client/netblap3.c
+++ b/network/blast3/client/netblap3.c
@@ -34,6 +34,12 @@
*
* RCS Modification History:
* $Log: netblap3.c,v $
+* Revision 1.109 2005/10/12 19:49:46 kans
+* EntrezSetServer was removed, so commented out here
+*
+* Revision 1.108 2005/09/13 18:03:57 madden
+* Fix so that tweak_parameters cna be in other_options
+*
* Revision 1.107 2005/08/04 15:54:41 kans
* local variable defined before ASSERT in s_addTweakToOtherOptions for strict C compliance (CodeWarrior Carbon complained)
*
@@ -755,7 +761,7 @@ s_addTweakToOtherOptions(Uint1 tweak_parameters, BlastParametersPtr parameters)
{
other_options = MemNew((kBuffSize)*sizeof(char));
}
- sprintf(other_options+len, "t=%ld", (long) tweak_parameters);
+ sprintf(other_options+len, "-t%ld", (long) tweak_parameters);
parameters->other_options = other_options;
}
@@ -2883,8 +2889,8 @@ NLM_EXTERN Int4 BLASTGetUidsFromQuery(CharPtr query,
*uids = NULL;
EntrezSetProgramName ("BLAST API");
- EntrezSetServer ("www.ncbi.nlm.nih.gov", 80,
- "/entrez/utils/entrez2server.fcgi");
+ /* EntrezSetServer ("www.ncbi.nlm.nih.gov", 80,
+ "/entrez/utils/entrez2server.fcgi"); */
e2rq = EntrezCreateBooleanRequest (!count_only, FALSE,
is_na? "Nucleotide" : "Protein",
diff --git a/network/id2arch/id2.asn b/network/id2arch/id2.asn
index b1c7a86a..00c6c411 100644
--- a/network/id2arch/id2.asn
+++ b/network/id2arch/id2.asn
@@ -1,4 +1,4 @@
---$Revision: 1.16 $
+--$Revision: 1.17 $
--********************************************************************
--
-- Network Id server network access
@@ -446,7 +446,10 @@ ID2-Blob-Id ::= SEQUENCE {
snp (1),
snp-graph (4),
cdd (8),
- mgc (16)
+ mgc (16),
+ hprd (32),
+ sts (64),
+ trna (128)
} DEFAULT main,
sat-key INTEGER,
-- version of blob, optional in some requests
diff --git a/network/taxon1/taxon2/tc2proc.c b/network/taxon1/taxon2/tc2proc.c
index d6c968d0..c088b815 100644
--- a/network/taxon1/taxon2/tc2proc.c
+++ b/network/taxon1/taxon2/tc2proc.c
@@ -1,5 +1,5 @@
/*----------------*/
-/* $Id: tc2proc.c,v 1.38 2005/07/25 18:07:44 lavr Exp $ */
+/* $Id: tc2proc.c,v 1.39 2005/10/25 17:47:26 soussov Exp $ */
/*----------------*/
#include <stdlib.h>
@@ -1570,6 +1570,9 @@ static OrgModPtr copyOrgMod(OrgModPtr src)
static int subtypeConflict(Int2 t1, Int2 t2)
{
if(t1 == t2) return 1;
+#if 1
+ if(t2 == 255) return 1;
+#else
switch(t2) {
case 2:
case 6:
@@ -1582,6 +1585,7 @@ static int subtypeConflict(Int2 t1, Int2 t2)
default:
break;
}
+#endif
return 0;
}
diff --git a/network/wwwblast/Src/Makefile b/network/wwwblast/Src/Makefile
index 54ca853e..4c27b01c 100644
--- a/network/wwwblast/Src/Makefile
+++ b/network/wwwblast/Src/Makefile
@@ -28,7 +28,7 @@ ALL_LIBS = -lncbidesk -lvibgif $(BLAST_LIBS) $(THREAD_LIBS)
ALL_LIBS_CS = -lncbitxc2 -lncbiid1 -lnetblast -lnetcli $(ALL_LIBS)
BL2_LIBS = $(BLAST_LIBS)
# For Blast 2 sequences client/server
-BL2_LIBS_CS = -lncbiid1 -lnetcli $(BLAST_LIBS)
+BL2_LIBS_CS = -lncbiid1 -lnetcli $(BLAST_LIBS) -lblastcompadj
BL2_DEFINE = -DBL2SEQ_STANDALONE
diff --git a/network/wwwblast/Src/wblast2.c b/network/wwwblast/Src/wblast2.c
index ec6830ed..9db717d0 100644
--- a/network/wwwblast/Src/wblast2.c
+++ b/network/wwwblast/Src/wblast2.c
@@ -1,4 +1,4 @@
-/* $Id: wblast2.c,v 1.25 2005/08/19 15:53:50 coulouri Exp $
+/* $Id: wblast2.c,v 1.30 2005/12/05 16:14:48 coulouri Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -27,12 +27,27 @@
*
* Initial Creation Date: 10/23/2000
*
-* $Revision: 1.25 $
+* $Revision: 1.30 $
*
* File Description:
* BLAST 2 Sequences CGI program
*
* $Log: wblast2.c,v $
+* Revision 1.30 2005/12/05 16:14:48 coulouri
+* c99 variable declaration breaks irix and solaris compilers
+*
+* Revision 1.29 2005/10/21 14:12:37 zaretska
+* Added code to treat NCBI_SEQID seq type the same way as ACCESSION_GI to fix bug for Blast2Seq when called from 'Search trace archive...'
+*
+* Revision 1.28 2005/10/19 15:27:16 zaretska
+* Fixed disappearing version number in accession. Strip carriage return from accession/gi enetred in GUI.
+*
+* Revision 1.27 2005/10/04 15:55:21 coulouri
+* correct broken urls
+*
+* Revision 1.26 2005/09/07 14:21:41 coulouri
+* correct broken link
+*
* Revision 1.25 2005/08/19 15:53:50 coulouri
* correct grammar
*
@@ -606,9 +621,9 @@ static void Blast2SeqMainPage(CharPtr warning, CharPtr seq1, CharPtr seq2, CharP
printf("<TD><B><I>\n");
printf("<A HREF=http://www.ncbi.nlm.nih.gov/Entrez><font color=#ffffff>Entrez</font></A>\n");
printf("</I></B></TD>\n");
- printf("<TD><B><I><A HREF=bl2.html><font color=#ffffff>BLAST 2 sequences</font></A></I></B></TD>\n");
+ printf("<TD><B><I><A HREF=wblast2.cgi><font color=#ffffff>BLAST 2 sequences</font></A></I></B></TD>\n");
printf("<TD><B><I><A HREF=http://www.ncbi.nlm.nih.gov/blast><font color=#ffffff>BLAST</font></A></I></B></TD>\n");
- printf("<TD><B><I><A HREF=bl2_seg.html><font color=#ffffff>Example</font></A></I></B></TD>\n");
+ printf("<TD><B><I><A HREF=example.html><font color=#ffffff>Example</font></A></I></B></TD>\n");
printf("<TD><B><I>\n");
printf("<A HREF=http://www.ncbi.nlm.nih.gov/blast/blast_help.html><font color=#ffffff>Help</font></A>\n");
printf("</I></B></TD></TR></TABLE></CENTER>\n");
@@ -649,7 +664,7 @@ static void Blast2SeqMainPage(CharPtr warning, CharPtr seq1, CharPtr seq2, CharP
if (!options) {
printf("This tool produces the alignment of two given sequences using "
#ifndef BL2SEQ_STANDALONE
-"<A HREF=http://www.ncbi.nlm.nih.gov/blast/newblast.html TARGET=one>BLAST</A> engine for local alignment. <BR>The stand-alone executable for blasting two sequences (bl2seq) can be retrieved from <A HREF=ftp://ncbi.nlm.nih.gov/blast/executables> NCBI ftp site</A><br><b><A HREF=http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=10339815&dopt=Abstract>Reference:</A></b> Tatiana A. Tatusova, Thomas L. Madden (1999), \"Blast 2 sequences - a new tool for comparing protein and nucleotide sequences\", FEMS Microbiol Lett. 174:247-250 \
+"<A HREF=\"http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=PubMed&cmd=Retrieve&list_uids=9254694&dopt=Citation\" TARGET=one>BLAST</A> engine for local alignment. <BR>The stand-alone executable for blasting two sequences (bl2seq) can be retrieved from <A HREF=ftp://ftp.ncbi.nlm.nih.gov/blast/executables> NCBI ftp site</A><br><b><A HREF=http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=10339815&dopt=Abstract>Reference:</A></b> Tatiana A. Tatusova, Thomas L. Madden (1999), \"Blast 2 sequences - a new tool for comparing protein and nucleotide sequences\", FEMS Microbiol Lett. 174:247-250 \
<br><BR>"
#else
"BLAST<BR>engine for local alignment.<P>\n"
@@ -1368,9 +1383,10 @@ static void DrawRectAlign(PrymPtr PNTR rect, Int2 k, Int2 color, Int2 height, In
}
#define LOCAL_BUFLEN 255
+
static BioseqPtr
-FindSeqByAccession(CharPtr accver, Int2 id_num)
+FindSeqByAccession(CharPtr accessionOrGi, Int2 id_num)
{
BioseqPtr bsp = NULL;
@@ -1386,18 +1402,22 @@ FindSeqByAccession(CharPtr accver, Int2 id_num)
ByteStorePtr old_seq_data = NULL;
ID1BioseqFetchEnable ("wblast2", TRUE);
-
- if ((gi = atoi(accver)) == 0) {
- accession = StringTokMT(accver, ".", &accver);
-
- if (accver)
- version = atoi(accver);
+
+ if ((gi = atoi(accessionOrGi)) == 0) {
+ Char accver[LOCAL_BUFLEN];
+ CharPtr ptrVersion = NULL;
if((sip = ValNodeNew (NULL)) == NULL)
return NULL;
if((tsip = TextSeqIdNew ()) == NULL)
return NULL;
+
+ StringCpy(accver, accessionOrGi);
+ accession = StringTokMT(accver, ".", &ptrVersion);
+ if (ptrVersion)
+ version = atoi(ptrVersion);
+
tsip->accession = StringSave(accession);
tsip->version = version;
/* GenBank, EMBL, and DDBJ. */
@@ -1777,6 +1797,7 @@ typedef enum {
ACCESSION_GI
} BlastQuerySequenceType;
+
#define MAX_ALLOWED_ID_LEN 20
#define IS_NEWLINE(a) ((a)=='\0' || (a)=='\n' || (a)=='\r')
static int get_sequence_type(char *querystr)
@@ -1886,6 +1907,8 @@ static char * GetAndFormatEnteredSequence(WWWBlastInfoPtr theInfo,int seqNbr,int
if(c) {
*seq_type = get_sequence_type(c);
+ //Treat NCBI_SEQID seq type the same way as ACCESSION_GI
+ *seq_type = (*seq_type == NCBI_SEQID) ? ACCESSION_GI : *seq_type;
//Check here if sequence is enetered with subjetc line !!!
if(*seq_type != ACCESSION_GI && *seq_type != FASTA_WITH_DEFLINE) {
// if (c1 && *c1 != '>') {
@@ -1895,7 +1918,10 @@ static char * GetAndFormatEnteredSequence(WWWBlastInfoPtr theInfo,int seqNbr,int
MemFree(c);
c = seq;
MemFree(sbuf);
- }
+ }
+ if(*seq_type == ACCESSION_GI) {
+ StringTok(c, "\n\r\t");
+ }
}
return c;
}
diff --git a/network/wwwblast/Src/wwwbutl.c b/network/wwwblast/Src/wwwbutl.c
index 94387037..2732555c 100644
--- a/network/wwwblast/Src/wwwbutl.c
+++ b/network/wwwblast/Src/wwwbutl.c
@@ -1,4 +1,4 @@
-/* $Id: wwwbutl.c,v 1.21 2004/01/16 17:35:20 dondosha Exp $
+/* $Id: wwwbutl.c,v 1.22 2005/08/31 20:35:22 coulouri Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -29,12 +29,24 @@
*
* Initial Version Creation Date: 04/21/2000
*
-* $Revision: 1.21 $
+* $Revision: 1.22 $
*
* File Description:
* WWW BLAST/PSI/PHI utilities
*
* $Log: wwwbutl.c,v $
+* Revision 1.22 2005/08/31 20:35:22 coulouri
+* From Mike Gertz:
+* in WWWCreateSearchOptions:
+* - Replaced outmoded adjustment of options->expect_value when
+* compostion-based statistics is used with the newer behavior
+* implemented in blastpgp - increase the expect_value only when
+* mode > 1 composition-based statistics is being used.
+* - By taking no action to modify the hitlist size, implicitly use the
+* default action defined in the BlastSingleQueryResultSize routine;
+* previously it was a bug to not modify the hitlist size in
+* WWWCreateSearchOptions.
+*
* Revision 1.21 2004/01/16 17:35:20 dondosha
* Fixed mouseover problems
*
@@ -201,6 +213,10 @@
#include <wwwblast.h>
+/* Multiplier by which to increase the evalue when mode > 1 composition-based
+ * statistics is being used. */
+#define EVALUE_EXPAND 10
+
void WWWBlastInfoFree(WWWBlastInfoPtr theInfo)
{
Int4 i;
@@ -1486,16 +1502,14 @@ Boolean WWWCreateSearchOptions(WWWBlastInfoPtr theInfo)
options->tweak_parameters = TRUE;
/* Adjustment of expect value and hitlist size */
- if (options->tweak_parameters) {
- options->hitlist_size *= 2; /*allows for extra matches*/
- options->original_expect_value =
- options->expect_value;
- if (options->expect_value < 0.1) {
- options->expect_value =
- MIN(0.1, 10 * options->expect_value);
- }
+ options->kappa_expect_value = options->expect_value;
+ if (options->tweak_parameters > 1) {
+ /* relax the cutoff evalue so that we don't loose too many
+ * hits for which compositional adjustment improves the
+ * evalue. */
+ options->expect_value *= EVALUE_EXPAND;
}
-
+
/* SMITH_WATERMAN */
if (WWWGetValueByName(theInfo->info, "SMITH_WATERMAN") != NULL)