src/lib/blastParse.c 1.25
1.25 2010/01/06 21:09:18 markd
fixed parsing where blastp wraps Identity line
Index: src/lib/blastParse.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/lib/blastParse.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -b -B -U 4 -r1.24 -r1.25
--- src/lib/blastParse.c 12 Apr 2009 18:45:54 -0000 1.24
+++ src/lib/blastParse.c 6 Jan 2010 21:09:18 -0000 1.25
@@ -631,8 +631,12 @@
* Identities = 256/400 (64%), Positives = 306/400 (76%)
* Frame = +1 / -2
* (tblastn)
*
+ * Identities = 1317/10108 (13%), Positives = 2779/10108 (27%), Gaps = 1040/10108
+ * (10%)
+ * - wrap on long lines
+ *
* Handle weird cases where the is only a `Score' line, with no `Identities'
* lines by skipping the alignment; they seem line small, junky alignments.
*/
line = bfNeedNextLine(bf);
@@ -665,16 +669,20 @@
bb->tStrand = words[10][0];
bb->tFrame = atoi(words[10]);
}
+line = bfNeedNextLine(bf);
+boolean wrapped = (startsWith("(", line));
+
/* Process something like:
* Strand = Plus / Plus (blastn)
* Frame = +1 (tblastn)
* Frame = +1 / -2 (tblastx)
* <blank line> (blastp)
* note that wu-tblastn puts frame on Identities line
*/
-line = bfNeedNextLine(bf);
+if (wrapped)
+ line = bfNeedNextLine(bf);
wordCount = chopLine(line, words);
if ((wordCount >= 5) && sameWord("Strand", words[0]))
{
bb->qStrand = getStrand(bf, words[2]);