74a0983c45002a4fc009ded30edf24a1859425b5 galt Fri Oct 4 11:16:38 2013 -0700 trying to find reasonable limits for warning for protein and translated dnax; improving warn message; fixes #5798 diff --git src/hg/hgBlat/hgBlat.c src/hg/hgBlat/hgBlat.c index 5706e92..2d0d129 100644 --- src/hg/hgBlat/hgBlat.c +++ src/hg/hgBlat/hgBlat.c @@ -550,53 +550,68 @@ tType = gftDnaX; } else { qType = gftProt; tType = gftDnaX; } } else { qType = gftDna; tType = gftDna; } pslxWriteHead(f, qType, tType); +if (qType == gftProt) + { + minSingleSize = 14; + } +else if (qType == gftDnaX) + { + minSingleSize = 36; + } + + /* Loop through each sequence. */ for (seq = seqList; seq != NULL; seq = seq->next) { printf(" "); fflush(stdout); /* prevent apache cgi timeout by outputting something */ oneSize = realSeqSize(seq, !isTx); if ((seqCount&1) == 0) // Call bot delay every 2nd time starting with first time hgBotDelay(); if (++seqCount > maxSeqCount) { warn("More than 25 input sequences, stopping at %s.", seq->name); break; } if (oneSize > maxSingleSize) { warn("Sequence %s is %d letters long (max is %d), skipping", seq->name, seq->size, maxSingleSize); continue; } if (oneSize < minSingleSize) { - warn("Sequence %s is %d letters long (min is %d), skipping", + warn("Warning: Sequence %s is only %d letters long (%d is the recommended minimum)", seq->name, seq->size, minSingleSize); + // we could use "continue;" here to actually enforce skipping, + // but let's give the short sequence a chance, it might work. + // minimum possible length = tileSize+stepSize, so mpl=16 for dna stepSize=5, mpl=10 for protein. + if (qIsProt && oneSize < 1) // protein does not tolerate oneSize==0 + continue; } totalSize += oneSize; if (totalSize > maxTotalSize) { warn("Sequence %s would take us over the %d letter limit, stopping here.", seq->name, maxTotalSize); break; } conn = gfConnect(serve->host, serve->port); if (isTx) { gvo->reportTargetStrand = TRUE; if (isTxTx) { gfAlignTransTrans(&conn, serve->nibDir, seq, FALSE, 5,