474b9ac55dcb8e3c4cc56b00d52bd210b7989038
markd
  Thu Mar 7 22:59:45 2024 -0800
create PSLs for supplementary alignments that correct represent the query alignment.  RM: 33209

diff --git src/utils/bamToPsl/bamToPsl.c src/utils/bamToPsl/bamToPsl.c
index 09cc543..7c3fc94 100644
--- src/utils/bamToPsl/bamToPsl.c
+++ src/utils/bamToPsl/bamToPsl.c
@@ -50,31 +50,33 @@
 /* Read two column file into hash keyed by first column */
 {
 struct hash *hash = hashNew(0);
 struct lineFile *lf = netLineFileOpen(fileName);
 char *row[2];
 while (lineFileRow(lf, row))
     hashAdd(hash, row[0], cloneString(row[1]));
 
 lineFileClose(&lf);
 return hash;
 }
 
 static void convertToPsl(bam1_t *aln, bam_header_t *head, struct hash *chromAlias, FILE *f)
 /* convert one alignment to a psl */
 {
-struct psl *psl = bamToPslUnscored(aln, head);
+// includes hard masked in PSL so that supplementary alignments create PSLs that reflect the
+// entire query
+struct psl *psl = bamToPslUnscored2(aln, head, TRUE);
 if (psl != NULL)
     {
     if (chromAlias)
         {
         struct hashEl *hel = NULL;
         if ((hel = hashLookup(chromAlias, psl->tName)) != NULL)
             psl->tName = cloneString((char *)hel->val); /* memory leak */
         }
     pslTabOut(psl, f);  /* no free of this psl data, memory leak */
     pslFree(&psl);
     }
 }
 
 static void convertToFasta(bam1_t *aln, struct hash *fastaDoneSeqs, FILE *faF)
 /* output a FASTA record of the query sequence */