88485cfa7f13affa28ec5765fe9b2db90cce42b6 markd Tue Dec 8 21:02:15 2020 -0800 hgPcr working diff --git src/inc/genoFind.h src/inc/genoFind.h index 62e02d9..f4c245a 100644 --- src/inc/genoFind.h +++ src/inc/genoFind.h @@ -30,30 +30,32 @@ #endif #ifndef AXT_H #include "axt.h" #endif struct gfConnection /* connection to a gfServer. This supports reuse of the connection for dynamic * servers and reopening a connection for static server. */ { int fd; // socket descriptor, -1 if closed char *hostName; // need when reconnecting int port; boolean isDynamic; // is this a dynamic server? + char *genome; // genome name for dynamic server + char *genomeDataDir; // genome data directory for dynamic server }; enum gfConstants { gfMinMatch = 2, gfMaxGap = 2, gfTileSize = 11, gfMaxTileUse = 1024, gfPepMaxTileUse = 30000, }; struct gfSeqSource /* Where a block of sequence comes from. */ { struct gfSeqSource *next; char *fileName; /* Name of file. */ @@ -362,58 +364,55 @@ /* Set up to catch broken pipe signals. */ int gfReadMulti(int sd, void *vBuf, size_t size); /* Read in until all is read or there is an error. */ /* --- Some routines for dealing with gfServer at a high level ---- */ struct hash *gfFileCacheNew(); /* Create hash for storing info on .nib and .2bit files. */ void gfFileCacheFree(struct hash **pCache); /* Free up resources in cache. */ void gfAlignStrand(struct gfConnection *conn, char *nibDir, struct dnaSeq *seq, boolean isRc, int minMatch, - struct hash *tFileCache, struct gfOutput *out, - char *genome, char *genomeDataDir); + struct hash *tFileCache, struct gfOutput *out); /* Search genome on server with one strand of other sequence to find homology. * Then load homologous bits of genome locally and do detailed alignment. * Call 'outFunction' with each alignment that is found. gfSavePsl is a handy * outFunction to use. */ void gfAlignTrans(struct gfConnection *conn, char *nibDir, aaSeq *seq, - int minMatch, struct hash *tFileHash, struct gfOutput *out, - char *genome, char *genomeDataDir); + int minMatch, struct hash *tFileHash, struct gfOutput *out); /* Search indexed translated genome on server with an amino acid sequence. * Then load homologous bits of genome locally and do detailed alignment. * Call 'outFunction' with each alignment that is found. */ void gfAlignTransTrans(struct gfConnection *conn, char *nibDir, struct dnaSeq *seq, boolean qIsRc, int minMatch, struct hash *tFileCache, - struct gfOutput *out, boolean isRna, - char *genome, char *genomeDataDir); + struct gfOutput *out, boolean isRna); /* Search indexed translated genome on server with an dna sequence. Translate * this sequence in three frames. Load homologous bits of genome locally * and do detailed alignment. Call 'outFunction' with each alignment * that is found. */ -struct gfConnection *gfMayConnect(char *hostName, char *portName, boolean isDynamic); -/* Set up our network connection to server, or return NULL. */ +struct gfConnection *gfMayConnect(char *hostName, char *portName, char *genome, char *genomeDataDir); +/* Set up our network connection to server, or return NULL. genome and genomeDataDir are for dynamic server. */ -struct gfConnection *gfConnect(char *hostName, char *portName, boolean isDynamic); -/* Set up our network connection to server. Aborts on error. */ +struct gfConnection *gfConnect(char *hostName, char *portName, char *genome, char *genomeDataDir); +/* Set up our network connection to server. Aborts on error. genome and genomeDataDir are for dynamic server. */ void gfBeginRequest(struct gfConnection *conn); /* called before a request is started. If the connect is not open, reopen * it. */ void gfEndRequest(struct gfConnection *conn); /* End a request that might be followed by another requests. For * a static server, this closed the connection. A dynamic server * it is left open. */// void gfDisconnect(struct gfConnection **pConn); /* Disconnect from server */ int gfDefaultRepMatch(int tileSize, int stepSize, boolean protTiles); /* Figure out appropriate step repMatch value. */