af700cd3f80530f9addd7e1e8b8f9ed7663a93b4
max
  Thu Nov 6 01:07:48 2025 -0800
allowing non-20bp crispr guides in crispr track, email from Eric Malekos, no redmine

diff --git src/hg/hgc/bigBedClick.c src/hg/hgc/bigBedClick.c
index 8153c29d50f..72263adcb6d 100644
--- src/hg/hgc/bigBedClick.c
+++ src/hg/hgc/bigBedClick.c
@@ -137,31 +137,32 @@
     char* scoreStr = parts[2];
 
     // get score and strand
     char strand = *(posStrand+strlen(posStrand)-1);
     int pos = atol(posStrand);
     int scoreInt = atoi(scoreStr);
     float score = (float)scoreInt/1000;
 
     // get the DNA sequence - this is slow! twoBit currently does not cache
     // if the input is not sorted and this list is sorted by off-target score (CFD)
     struct dnaSeq *seq = hDnaFromSeq(database, chrom, pos, pos+23, dnaUpper);
     if (strand=='-')
         reverseComplement(seq->dna, seq->size);
     char *guideSeq = (char*)slPairFindVal(extraFields, "guideSeq");
     // PAM = the last three chars of the off-target
-    char *pam = seq->dna+20;
+    int seqLen = strlen(seq->dna);
+    char *pam = seq->dna+(seqLen-3);
         
     // print sequence + PAM
     printf("<td><tt>");
     printMismatchString(guideSeq, seq->dna);
     printf("&nbsp;%s", pam);
     printf("</tt></td>\n");
 
     // print score of off-target
     printf("<td>%0.3f</td>", score);
 
     // print name of this locus
     if (hasLocus)
         {
         struct sqlResult *sr = hRangeQuery(conn, "locusName", chrom, pos, pos+23, NULL, 0);
         char **row;