a4887527b333527019132f93bfcebab37e594b5a
markd
  Sat Jun 10 12:17:57 2023 -0700
added tests for various mapping PSL type modes and fixed mode checking bug

diff --git src/utils/pslMap/pslMap.c src/utils/pslMap/pslMap.c
index 783c48e..2f552bb 100644
--- src/utils/pslMap/pslMap.c
+++ src/utils/pslMap/pslMap.c
@@ -307,38 +307,34 @@
 {
 if (suffix != NULL)
     addQNameSuffix(mappedPsl);
 pslTabOut(mappedPsl, outPslFh);
 if (mapInfoFh != NULL)
     writeMapInfo(mapInfoFh, inPsl, mapAln, mappedPsl, outPslLine);
 if (mappingPslFh != NULL)
     pslTabOut(mapAln->psl, mappingPslFh);
 }
 
 static boolean mapPslPair(struct psl *inPsl, struct mapAln *mapAln,
                           FILE* outPslFh, FILE *mapInfoFh, FILE *mappingPslFh,
                           unsigned* outPslLineRef)
 /* map one pair of query and target PSL */
 {
-struct psl* mappedPsl;
-if (inPsl->tSize != mapAln->psl->qSize)
-    errAbort("Error: inPsl %s tSize (%d) != mapping alignment %s qSize (%d) (perhaps you need to specify -swapMap?)\n",
-             inPsl->tName, inPsl->tSize, mapAln->psl->qName, mapAln->psl->qSize);
 verbosePslNl(2, "inAln", inPsl);
 verbosePslNl(2, "mapAln", mapAln->psl);
 
-mappedPsl = pslTransMap(mapOpts, inPsl, inPslType, mapAln->psl, mapPslType);
+struct psl* mappedPsl = pslTransMap(mapOpts, inPsl, inPslType, mapAln->psl, mapPslType);
 
 verbosePslNl(2, "mappedAln", mappedPsl);
 
 /* only output if blocks were actually mapped */
 boolean wasMapped = mappedPsl != NULL;
 if (wasMapped)
     {
     mappedPslOutput(inPsl, mapAln, mappedPsl, outPslFh, mapInfoFh, mappingPslFh, *outPslLineRef);
     (*outPslLineRef)++;
     }
 pslFree(&mappedPsl);
 return wasMapped;
 }
 
 static void mapQueryPsl(struct psl* inPsl, struct genomeRangeTree *mapAlns,