a97f8a0fffb31a2b3521e573a03f454fb60275d3
markd
  Tue May 30 21:30:12 2023 -0700
Add mechnaism to fix problem with mapping prot-prot via prot-na alignment by explictly specifying the type of alignments

diff --git src/utils/pslMap/usage.txt src/utils/pslMap/usage.txt
index b70742f..6708eec 100644
--- src/utils/pslMap/usage.txt
+++ src/utils/pslMap/usage.txt
@@ -1,43 +1,61 @@
 pslMap - map PSLs alignments to new targets using alignments of the old target to the new target.
 usage:
    pslMap [options] inPsl mapFile outPsl
 
 pslMap - map PSLs alignments to new targets using alignments of
 the old target to the new target.  Given inPsl and mapPsl, where
 the target of inPsl is the query of mapPsl, create a new PSL
 with the query of inPsl aligned to all the targets of mapPsl.
+
 If inPsl is a protein to nucleotide alignment and mapPsl is a
 nucleotide to nucleotide alignment, the resulting alignment is
-nucleotide to nucleotide alignment of a hypothetical mRNA that
+nucleotide to nucleotide alignment of the CDS coordinates mRNA that
 would code for the protein.  This is useful as it gives base
-alignments of spliced codons.  A chain file may be used instead
-mapPsl.
+alignments of spliced codons.
+
+Protein to NA alignments can be determine from the PSL, otherwise
+they are assumed to be NA-NA unless the types of the alignments are
+specified with -inType and -mapType.  The following combinations are
+valid, along with the type of output,
+
+     inPslType   mapPslType  outPslType
+     na_na       na_na       na_na
+     prot_prot   prot_prot   prot_prot
+     prot_na     na_na       cds_na
+     prot_prot   na_na       cds_na
+     prot_prot   prot_na     cds_na
+
+A chain file may be used instead mapPsl.
 
 Options:
   -chainMapFile - mapFile is a chain file instead of a psl file
   -swapMap - swap query and target sides of map file.
   -swapIn - swap query and target sides of inPsl file.
   -suffix=str - append str to the query ids in the output
    alignment.  Useful with protein alignments, where the result
    is not actually and alignment of the protein.
   -keepTranslated - if either psl is translated, the output psl
    will be translated (both strands explicted).  Normally an
    untranslated psl will always be created
   -mapFileWithInQName - The first column of the mapFile PSL records are a qName,
    the remainder is a standard PSL.  When an inPsl record is mapped, only
    mapping records are used with the corresponding qName.
+  -inType=type - input alignment type (prot-port, prot-na, na-na)
+   This is the type swapping if -swapIn is supplied.
+  -mapType=type - map alignment type (prot-port, prot-na, na-na)
+   This is the type swapping if -swapMap is supplied.
   -mapInfo=file - output a file with information about each mapping.
    The file has the following columns:
      o srcQName, srcQStart, srcQEnd, srcQSize - qName, etc of
        psl being mapped (source alignment)
      o srcTName, srcTStart, srcTEnd - tName, etc of psl being
        mapped
      o srcStrand - strand of psl being mapped
      o srcAligned - number of aligned based in psl being mapped
      o mappingQName, mappingQStart, mappingQEnd - qName, etc of
        mapping psl used to map alignment
      o mappingTName, mappingTStart, mappingTEnd - tName, etc of
        mapping psl
      o mappingStrand - strand of mapping psl
      o mappingId - chain id, or psl file row
      o mappedQName mappedQStart, mappedQEnd - qName, etc of