Path: utzoo!utgpu!watserv1!watmath!att!emory!swrinde!zaphod.mps.ohio-state.edu!uwm.edu!bionet!crc.ac.uk!mbishop From: mbishop@crc.ac.uk (Martin Bishop) Newsgroups: bionet.software Subject: Minor fasta infelicity Message-ID: <12746.9101261447@crc.ac.uk> Date: 26 Jan 91 14:47:43 GMT Sender: daemon@genbank.bio.net Lines: 25 I came across a problem with fasta when running against small datasets when it is possible that there are no scores higher than the cutoff. Its in fffasta.c in routine showbest() when bbp is a pointer to NULL and then the next bit of code tries to print out the results. I cured this as below: /* This is the place where trouble occurs if no scores greater than cutoff! */ else $ if (bbp == NULL) return; /*fprintf(stderr,"Heading for trouble\n"); fprintf(stderr,"(*bbp).score %d hcutoff %d\n",(*bbp).score,hcutoff); fflush(stderr); */ if ((bbp->score > (2*hcutoff)) || (bbp->score > hcutoff && bbp->gscore > (4*bbp->score/3))) $ istart=istop; nshow += 10; if (istart