From: GOLD::BITNET%"FUCHS@EMBL.BITNET" "Rainer Fuchs " 18-DEC-1989 14:04 To: Don Gilbert Subj: GCG bugs (II) Received: From UICVM(MAILER) by IUGOLD with Jnet id 0757 for GILBERTD@IUBACS; Mon, 18 Dec 89 14:06 EST Received: by UICVM (Mailer R2.03B) id 2456; Mon, 18 Dec 89 07:54:46 CST Date: Thu, 14 Dec 89 12:27:00 N Reply-To: "Rainer Fuchs (EMBL)" Sender: "INFO-GCG: Univ. of Wisconsin Genetics Analysis Software Discussion" From: "Rainer Fuchs (EMBL)" Subject: GCG bugs (II) To: Don Gilbert > I have encountered several errors in the GCG package ver. 6.1 and I supsect > that more will surface now and then. > > One problem with version 6.1 is that the formatting process of the EMBL flat > file does not include cutting the 4 long squenses in two, which they should > been if SEGMENTS (after WORDSEARCH) and FASTA should work correctly. > In fact FASTA "Dies" if it encounteres one of the four long sequences, while > SEGMENTS just states that the entry is in NON-GCG format. > > The fix below allows FASTA to use the first 100 Kbases correct and then > make the same statemnt, so that the program survives through the whole session . > > Another error encountered by one of my users is the ToNBRF error. > The resultant sequence after using ToNBRF on a FETCHed entry terminates at > the correct site and all is fine fine if the start of the new seq coinsides > with the start of the FETCHed entry. If not the remainder of the seq after > the new termination point still is included as well as several strange control > Characters that can only be seen with EDIT og with type. > > The fixes come just below, firste the FASTA fix then the ToNBRF fix. > > Take notice that the !Status variable in the fix of the FASTA in fact is > |Status (i.e. exclamation pointStatus) > AND you must have C to correct this bug. > > ___________________________8<----------------8<_______________________ > > FASTAFIX > ---------------------------------------------------------------------- > Dear Hans, > > My apologies for mixing up the directions for fixing Fasta. Below > is the correct way to fix the module FastaSearch. Let me know if > you have any troubles with these new directions. I have sent them > out to other people, so I think these should be correct this time! > > Also, you are right, there is a bug in the TONBRF routine, which I will work o n. > I hope to get back to you on that soon. > > Sincerely, > Mary > > > > ----To make the changes---- > > $ gcg > $ gcgsupport > $ get fastasearch clib mod > $ edit temp.c > > Look for routine "showalign". > > Add the following declaration to the top, where the > other variables are declared. > > int checksum; > > Look for the section of code that looks like this. > > /* get sequence info */ > status = OpenF(&openf_channel, &wfn, &sd); > status = ReadSeq(&openf_channel, &strand, &n1); > > Modify the code so that it looks like this. Take special note > that the old call to ReadSEQ is changed to ReadSQ. > > /* get sequence info...using GCG routines */ > status = OpenF(&openf_channel, &wfn, &sd); > if (!status) { > printf("@n *** Error: Cannot open file %s@n@n",bbp->seqname ); > continue; > } > > status = ReadSq(&openf_channel, &strand, &n1, &checksum); > if (!status) { > printf("@n *** Warning: Sequence not in GCG Format: %s@n", > bbp->seqname); > } > > > > > Now, look for the routine "showbest". > > At the top of the routine, where the variables are declared, > add > > int csum; > > Look for a section of code that looks like this. > > /* get sequence info...using GCG routines */ > status = OpenF(&openf_channel, &wfn, &func); > status = ReadSeq(&openf_channel, &strand, &n1); > status = ReadDocString(&openf_channel, &sd); > CloseF(&openf_channel); > > > And replace it with this: > > /* get sequence info */ > status = OpenF(&openf_channel, &wfn, &func); > if (!status) { > printf("@n *** Error: Cannot open file %s@n@n",bbp->seqname); > continue; > } > > status = ReadSq(&openf_channel, &strand, &n1, &csum); > if (!status) { > printf("@n *** Warning: Sequence not in GCG Format: %s@n", > bbp->seqname); > } > > status = ReadDocString(&openf_channel, &sd); > CloseF(&openf_channel); > > > $ cc temp > $ toclib > $ put fastasearch clib > $ make fasta > > > > -------------------------------------------------------------------- > TONBRFFIX > -------------------------------------------------------------------- > > From: IN%"@vms3.macc.wisc.edu:MARYS@MILO.DecNet" "MARYS" 5-DEC-1989 > 03:04:15.24 > To: HUM@bio.aau.DK > CC: > Subj: TONBRF > > Dear Hans, > > As I mentioned in my last message, there was a bug in the TONBRF routine. The > fix is fairly easy to make, so I'll explain how to fix it at your site. I > confess that I haven't had too much time to test it thoroughly, but the > tests I've run it through seem to work. Please don't hesitate to let me > know if you have problems with this. > > Regards, > Mary > > ------ To Fix TONBRF routine ------------ > > $ GCG > $ GCGSupport > $ take TONBRF mod > $ edit TONBRF.FOR > > Look for the section of code which calls the routine > "getrange". Right below it, is an assignment for "length" > as follows: > > 54 length = end > 55 Strand(end+1) = Null > > Change it to the following: > > 54 length = end - begin + 1 > 55 Strand(end+1) = Null > > Now, look for the call to the routine "writeNBRFseq", > as follows: > > 102 Call writeNBRFseq( OutFile, Strand(begin), > 103 & Str_Len(Strand), 50, 10, .false.) > 104 > > And change it to the following: (note that the only > change here is changing "Str_Len(Strand)" to "Length+1" > > 103 Call writeNBRFseq( OutFile, Strand(begin), > 104 & length+1, 50, 10, .false.) > 105 > > $ For TONBRF (make sure if compiles) > $ Save TONBRF > $ Make TONBRF > > > _________________________________________________________________ > Rainer Fuchs, Ph.D. EMBL Data Library fuchs@embl.bitnet