src/hg/encode/validateFiles/validateFiles.c 1.42

1.42 2010/05/21 18:05:14 braney
allow N's in both reference and query if nMatch is on.
Index: src/hg/encode/validateFiles/validateFiles.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/encode/validateFiles/validateFiles.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -b -B -U 4 -r1.41 -r1.42
--- src/hg/encode/validateFiles/validateFiles.c	11 May 2010 02:06:22 -0000	1.41
+++ src/hg/encode/validateFiles/validateFiles.c	21 May 2010 18:05:14 -0000	1.42
@@ -135,9 +135,9 @@
 // checkMismatch -- if the sequence has an N, we call this a mismatch
 //   by default unless nMatch is set, in which case we don't call
 //   it a mismatch
 {
-if (ch1 != 'n')
+if ((ch1 != 'n') && (ch2 != 'n'))
     return ch1 != ch2;
 
 return !nMatch;
 }
@@ -1233,9 +1233,9 @@
 
    if (! checkCigarMismatches(file, bd->count, chrom, bam->core.pos, strand, query, cigarPacked, core->n_cigar))
     {
     char *cigar = bamGetCigar(bam);
-    warn("align: ciglen %d cigar %s qlen %d pos %d lenght %d strand %c\n",bam->core.n_cigar, cigar, bam->core.l_qname, bam->core.pos,  bam->core.l_qseq, bamIsRc(bam) ? '-' : '+');
+    warn("align: ciglen %d cigar %s qlen %d pos %d length %d strand %c\n",bam->core.n_cigar, cigar, bam->core.l_qname, bam->core.pos,  bam->core.l_qseq, bamIsRc(bam) ? '-' : '+');
 
     if (++(*errs) >= maxErrors)
         errAbort("Aborting .. found %d errors\n", *errs);
     }