texlive[69371] Master/texmf-dist: texshade (10jan24)

commits+karl at tug.org commits+karl at tug.org
Wed Jan 10 21:44:24 CET 2024


Revision: 69371
          https://tug.org/svn/texlive?view=revision&revision=69371
Author:   karl
Date:     2024-01-10 21:44:24 +0100 (Wed, 10 Jan 2024)
Log Message:
-----------
texshade (10jan24)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/texshade/README
    trunk/Master/texmf-dist/doc/latex/texshade/texshade.pdf
    trunk/Master/texmf-dist/source/latex/texshade/texshade.dtx
    trunk/Master/texmf-dist/tex/latex/texshade/texshade.sty

Modified: trunk/Master/texmf-dist/doc/latex/texshade/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/texshade/README	2024-01-10 20:44:04 UTC (rev 69370)
+++ trunk/Master/texmf-dist/doc/latex/texshade/README	2024-01-10 20:44:24 UTC (rev 69371)
@@ -1,4 +1,4 @@
-    TeXshade v1.27
+    TeXshade v1.28
     >>
     >> A LaTeX package for setting nucleotide and peptide alignments.
     >>

Modified: trunk/Master/texmf-dist/doc/latex/texshade/texshade.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/texshade/texshade.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/texshade/texshade.dtx	2024-01-10 20:44:04 UTC (rev 69370)
+++ trunk/Master/texmf-dist/source/latex/texshade/texshade.dtx	2024-01-10 20:44:24 UTC (rev 69371)
@@ -426,8 +426,14 @@
 %      Introduction: a second full ruler with independent [top] and [bottom] 
 %      options, and the possibility to show ruler names.}
 %
+%    \changes{1.28}{2024-01-10}{%
+%      Introduction: functional shading on DNA sequences using the 
+%      Brewer color scheme.
+%      Corrections:  the consensus export file format is now set by  
+%                     default to chimera with pymol as an alternative option.}
 %
 %
+%
 % \CharacterTable
 %  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
 %   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
@@ -465,7 +471,7 @@
 %            for further information, updates and on-line documentation 
 %            see my homepage at
 %            \texttt{www.pharmazie.uni-kiel.de/chem/Prof\_Beitz/biotex.html} }}
-%    \date{\small v1.27; 2024/01/06\\[2pt]}
+%    \date{\small v1.28; 2024/01/10\\[2pt]}
 %    \maketitle
 %    \begin{abstract}
 %      Setting alignments of nucleotides and peptides for publication 
@@ -549,10 +555,21 @@
 %    
 %    \subsection{Version History}
 %    
-%    \textbf{v1.7  2024/01/06}
+%    \textbf{v1.28  2024/01/10}
 %    \medskip
 %
 %    \emph{Introduction:}
+%    Functional shading on DNA sequences was added. 
+%
+%    \emph{Correction}: Consensus export files can be in chimera 
+%    or pymol format.
+%
+%    \medskip
+%
+%    \textbf{v1.27  2024/01/06}
+%    \medskip
+%
+%    \emph{Introduction:}
 %     The possibility to show a second full ruler at the [top] or [bottom]
 %    was introduced plus the option to show ruler names by
 %     |\nameruler|. The |rulername| style can be adjusted using the
@@ -1874,11 +1891,12 @@
 %    relative frequency of a base or amino acid at this 
 %    position [7]. Thus, more information is contained in logos than in
 %    a standard consensus sequence.
-%    The example below shows a DNA sequence alignment with the logo on the  
-%    top.
+%    The example below shows a DNA sequence alignment with functional
+%    shading and the logo on the  top (the logo also use the `functional' 
+%    colors, p.\pageref{funcdef}).
 %
 %    It must be remarked that a logo from only five sequences does not
-%    produce meaningful results - it rather illustrates the technique.
+%    produce too meaningful results---it rather illustrates the technique.
 %
 %    \medskip
 %    
@@ -1885,6 +1903,7 @@
 %    \begin{texshade}{AQPDNA.MSF}
 %       \setends{1}{414..443}
 %       \showsequencelogo{top}
+%       \shadingmode[DNA]{functional}
 %    \end{texshade}
 %    
 %    Code:\medskip
@@ -1894,6 +1913,7 @@
 %    \begin{texshade}{AQPDNA.MSF}
 %       \setends{1}{414..443}
 %       \showsequencelogo{top}
+%       \shadingmode[DNA]{functional}
 %    \end{texshade}
 %    \end{verbatim}}    
 %    
@@ -1943,7 +1963,7 @@
 %    The same logo is shown below but with frequency correction turned
 %    on (|\dofrequencycorrection|), see p.\pageref{Lshowsequencelogo}.
 %    This takes into account the difference between the amino acid 
-%    distribution in the alignment and the equal distribution of
+%    distribution in the alignment and an equal distribution of
 %    5\% for each residue.
 %    \medskip
 %
@@ -2645,8 +2665,8 @@
 %    
 %    \item |\shadingmode[|\meta{type}|]{functional}|\label{funcdef}
 %       There are seven different functional shading modes available for
-%       peptide sequences; nucleotide sequences can not be shaded due
-%       to functional aspects. Five of \TeXshade's functional modes
+%       peptide sequences, and one for DNA sequences. 
+%       Five of \TeXshade's functional modes
 %       correspond to the four `alphabets' employed by \textsc{Karlin} 
 %       and \textsc{Ghandour} for peptide alignments [2] or by the
 %       rasmol software. Additional 
@@ -2686,7 +2706,7 @@
 %       of the residue in \AA$^2$, i.\,e. it is a measure for the size
 %       of a residue's sidechain. The accessible area value (also in 
 %       \AA$^2$) gives information about the size of the surface area
-%       which is accessible by solvent molecules within the folded 
+%       which is typically accessible by solvent molecules within the folded 
 %       protein. A very small area means that the residue is
 %       strongly buried and is thus very hydrophobic. Hydrophilic
 %       residues in turn possess large accessible areas due
@@ -2705,6 +2725,12 @@
 %       
 %       \end{itemize}
 %       
+%       Functional shading can also be shown for DNA sequences
+%       using:
+%       \begin{itemize}
+%       \item \meta{type} = |DNA|
+%       \end{itemize}
+%       
 %       \label{Lclearfuncgroups}
 %       If no \meta{type} or an unknown \meta{type} is designated as option
 %       all functional groups and shading colors are cleared. This is
@@ -2838,8 +2864,8 @@
 %
 %    with 
 %    \meta{scale} |Gray|, |BlueRed|, |RedBlue|, |GreenRed|, |RedGreen|,
-%    |ColdHot| (recommended), |HotCold|, or |T-Coffee| \ref{TCoffee}, and \meta{position} |top| 
-%    or |bottom|. 
+%    |ColdHot| (recommended), |HotCold|, or |T-Coffee| (see \ref{TCoffee}), and 
+%    \meta{position} |top| or |bottom|. 
 %
 %    The first color defines the foreground, i.e. the letters, the
 %    second color---if specified---defines the background. 
@@ -2848,11 +2874,10 @@
 %    weight tables below). For an example output see page
 %    \pageref{shadecons}. You can find more information on color scales 
 %    on page \pageref{Lgraphs}. The calculated consensus colors can be exported
-%    as a Pymol [8] \label{Lexportconsensus}
-%    script by |\exportconsensus[|\meta{filename}|]{|\meta{seqref}|}|.
-%    If no \meta{filename} is specified |export.txt| will be used. The 
-%    generated file can be opened in Pymol in order to shade a 3D model
-%    of the sequence \meta{seqref}.
+%    as a Pymol [8] \label{Lexportconsensus} script or Chimera command file (default)
+%    by |\exportconsensus[|\meta{pymol/chimera}|]{|\meta{seqref}|}{|\meta{filename}|}|.
+%    The generated file can be opened in Pymol or Chimera, resp., in order to 
+%    shade a 3D model of the sequence \meta{seqref}.
 %
 %    To hide the consensus use 
 %    |\hideconsensus|. The consensus
@@ -3038,7 +3063,7 @@
 %    
 %    Optional color sets correspond to the functional shading modes
 %    |chemical|, |rasmol|, |hydropathy|, |structure|, |standard area|, 
-%    |accessible area| (see p.\pageref{funcdef}). The |\showsequencelogo| 
+%    |accessible area|, |DNA| (see p.\pageref{funcdef}). The |\showsequencelogo| 
 %    command can be reversed by |\hidesequencelogo|.
 %
 %    \label{Llogocolor}\label{Lclearlogocolors}
@@ -5770,7 +5795,8 @@
 %                &             & |chemical| \\
 %                &             & |rasmol| \\
 %                &             & |standard area| \\
-%                &             & |accessible area| \\ \hline
+%                &             & |accessible area| \\
+%                &             & |DNA| \\ \hline
 %    \end{tabular}
 %    \end{center}
 %    \medskip
@@ -5801,7 +5827,6 @@
 %    \quad|\allmatchresidues{|\meta{res.col.}|}{|\meta{shad.col.}|}{|\meta{case}|}{|\meta{style}|}|
 %       
 %    \quad|\defshadingcolors{|\meta{name}|}|
-%    \newpage
 %    
 %    \quad|\funcshadingstyle{|\meta{residue}|}{|\meta{res.col.}|}{|\meta{shad.color}|}|
 %    
@@ -5850,7 +5875,7 @@
 %    \quad|\showconsensus[|\meta{color/scale}|[,|\meta{color/scale}|]]{|\meta{top/bot.}|}|
 %       \hfill[\pageref{Lshowconsensus}]
 %
-%    \quad|\exportconsensus[|\meta{filename}|]{|\meta{seqref}|}|
+%    \quad|\exportconsensus[|\meta{pymol/chimera}|]{|\meta{seqref}|}{|\meta{filename}|}|
 %       \hfill[\pageref{Lexportconsensus}]
 %
 %    \quad|\hideconsensus|
@@ -5883,7 +5908,8 @@
 %       \hfill[\pageref{Lgappenalty}]
 %    
 %    \vspace{1.5\baselineskip}
-%    
+%    \newpage
+%
 %    \textbf{Sequence logos}
 %    \medskip
 %    
@@ -5917,7 +5943,7 @@
 %    \quad|\undofrequencycorrection|
 %       \hfill[\pageref{Lundofrequencycorrection}]
 %    
-%    \vspace{1.5\baselineskip}
+%    \bigskip
 %    
 %    \textbf{Subfamily logos}
 %    \medskip
@@ -5951,7 +5977,7 @@
 %    
 %
 %
-%    \vspace{1.5\baselineskip}
+%    \bigskip
 %    
 %    \textbf{Structure memes}
 %    \medskip
@@ -6642,8 +6668,8 @@
 %    \begin{macrocode}
 %<*texshade>
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{texshade}[2023/06/04 LaTeX TeXshade (v1.27)]
-\message{Package `texshade', Version 1.27 of 2024/01/06.}
+\ProvidesPackage{texshade}[2024/01/10 LaTeX TeXshade (v1.28)]
+\message{Package `texshade', Version 1.28 of 2024/01/10}
 
 \PassOptionsToPackage{dvips}{color}
 \PassOptionsToPackage{dvips}{graphicx}
@@ -6787,6 +6813,7 @@
 \xdef\rulername at top{} \xdef\rulername at bottom{}
 \xdef\rulernamecolor at top{n} \xdef\rulernamecolor at bottom{n}
 \xdef\rulername at family{n} \xdef\rulername at size{n}
+\xdef\exp at rt@pymol{n}
 \expandafter\def\csname fg at textcolor/\endcsname{White}
 \expandafter\def\csname fg at color/\endcsname{White}
 \expandafter\def\csname func at style/\endcsname{\csname textup\endcsname}
@@ -8276,6 +8303,10 @@
 \definecolor{TC8}           {cmyk}{0,0.8,1,0}
 \definecolor{TC9}           {cmyk}{0,0.875,1,0}
 \definecolor{TC99}          {cmyk}{0,0,0,0}
+\definecolor{BrewerC}      {cmyk}{0.35,0.07,0,0}
+\definecolor{BrewerG}      {cmyk}{0.90,0.30,0,0}
+\definecolor{BrewerT}      {cmyk}{0.30,0,0.45,0}
+\definecolor{BrewerA}      {cmyk}{0.80,0,1,0}	
 \definecolor{LightGreenYellow}   {cmyk}{0.08,0,0.35,0}
 \definecolor{LightYellow}        {cmyk}{0,0,0.50,0}
 \definecolor{LightGoldenrod}     {cmyk}{0,0.05,0.42,0}
@@ -9559,8 +9590,15 @@
       \funcgroup{18-19 eV (MY)}{MY}{White}{BlueRed80}{upper}{up}
       \funcgroup{17-18 eV (W)}{W}{White}{BlueRed100}{upper}{up}
    \else
+   \xdef\second@{DNA}
+   \ifx\temp@\second@
+      \funcgroup{C}{Cc}{Black}{BrewerC}{upper}{up}
+      \funcgroup{G}{Gg}{White}{BrewerG}{upper}{up}
+      \funcgroup{A}{Aa}{Black}{BrewerA}{upper}{up}
+      \funcgroup{T, U}{TtUu}{Black}{BrewerT}{upper}{up}
+   \else
    \message{<Unknown shading mode - clearing `funcgroups'>}
-   \fi\fi\fi\fi\fi\fi\fi\fi
+   \fi\fi\fi\fi\fi\fi\fi\fi\fi
 }
 \def\shadeallresidues{\all at fshadetrue}
 \def\get at fromstack#1;#2;#3;#4;#5@{%
@@ -12772,9 +12810,7 @@
    \else
    \xdef\first@{functional}
    \ifx\first@\last@
-      \if\seq at type N \message{<No functional shading on DNA sequences>}
-      \else \simmodefalse \funcmodetrue \func at shading{#1} 
-            \xdef\seq at type{P} \xdef\prefix@{pep} \fi
+     \simmodefalse \funcmodetrue \func at shading{#1}
    \else
    \xdef\first@{T-Coffee}
    \ifx\first@\last@
@@ -13088,7 +13124,16 @@
       \logocolor{CFH}{BlueRed60}
       \logocolor{MY}{BlueRed80}
       \logocolor{W}{BlueRed100}
-   \fi\fi\fi\fi\fi\fi\fi\fi
+   \else
+   \xdef\second@{DNA}
+   \ifx\first@\second@
+      \clearlogocolors
+      \logocolor{A}{BrewerA}
+      \logocolor{C}{BrewerC}
+      \logocolor{G}{BrewerG}
+      \logocolor{T}{BrewerT}
+      \logocolor{U}{BrewerT}
+   \fi\fi\fi\fi\fi\fi\fi\fi\fi
 }
 \newcommand\findsubfamily[2][n]{%
    \xdef\first@{#1}
@@ -14395,13 +14440,15 @@
    \ifx\temp@\first@ \xdef\tr at nstextstyle{4}\fi
 }
 
-\newcommand\exportconsensus[2][export.txt]{%
+\newcommand\exportconsensus[3][chimera]{%
    \ifx\exp at rt\n@
+      \xdef\first@{#1}\xdef\second@{pymol}
+      \ifx\first@\second@\xdef\exp at rt@pymol{y}\fi
       \xdef\first@{#2 @} \expandafter\check at letter\first@
       \xdef\first@{#2}   \ifletter \get at name@number \fi
       \xdef\exp at rt@num{\first@}
       \xdef\exp at rt{y}
-      \immediate\openout\exp at rtfile = #1
+      \immediate\openout\exp at rtfile = #3
    \fi
 }
 
@@ -17547,7 +17594,12 @@
                 \multiply\outerloopcount by 5
                 \ifnum\outerloopcount<5\relax\outerloopcount=5\fi
                 \xdef\seventh@{n}
-                \immediate\write\exp at rtfile{\string color col\the\outerloopcount, resi \sixth@}
+                \ifx\exp at rt@pymol\y@
+                   \immediate\write\exp at rtfile{\string color col\the\outerloopcount, resi \sixth@}
+                \else
+                   \immediate\write\exp at rtfile{\string setattr a color col\the\outerloopcount \space :\sixth@}
+                   \immediate\write\exp at rtfile{\string setattr r ribbonColor col\the\outerloopcount \space :\sixth@}
+                \fi
              \fi
          \fi
 
@@ -17651,10 +17703,17 @@
  \fi}
  
 \def\prep at reexp@rtfile{
+  \def\get at c@nsc at l[##1,##2,##3]{\xdef\first@{##1} \xdef\second@{##2} \xdef\third@{##3}}
    \loopcount=0
    \loop
       \advance\loopcount by 5
-      \immediate\write\exp at rtfile{\string set_color col\the\loopcount, \csname\c at nsc@l\the\loopcount\endcsname}
+      \ifx\exp at rt@pymol\y@
+         \immediate\write\exp at rtfile{\string set_color col\the\loopcount, \csname\c at nsc@l\the\loopcount\endcsname}
+      \else
+         \xdef\first@{\csname\c at nsc@l\the\loopcount\endcsname}
+         \expandafter\get at c@nsc at l\first@
+         \immediate\write\exp at rtfile{\string colordef col\the\loopcount \space\first@ \space\second@ \space\third@}
+      \fi
    \ifnum\loopcount>95\else\repeat
 }
 

Modified: trunk/Master/texmf-dist/tex/latex/texshade/texshade.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/texshade/texshade.sty	2024-01-10 20:44:04 UTC (rev 69370)
+++ trunk/Master/texmf-dist/tex/latex/texshade/texshade.sty	2024-01-10 20:44:24 UTC (rev 69371)
@@ -13,8 +13,8 @@
 %% 
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{texshade}[2023/06/04 LaTeX TeXshade (v1.27)]
-\message{Package `texshade', Version 1.27 of 2024/01/06.}
+\ProvidesPackage{texshade}[2024/01/10 LaTeX TeXshade (v1.28)]
+\message{Package `texshade', Version 1.28 of 2024/01/10}
 
 \PassOptionsToPackage{dvips}{color}
 \PassOptionsToPackage{dvips}{graphicx}
@@ -158,6 +158,7 @@
 \xdef\rulername at top{} \xdef\rulername at bottom{}
 \xdef\rulernamecolor at top{n} \xdef\rulernamecolor at bottom{n}
 \xdef\rulername at family{n} \xdef\rulername at size{n}
+\xdef\exp at rt@pymol{n}
 \expandafter\def\csname fg at textcolor/\endcsname{White}
 \expandafter\def\csname fg at color/\endcsname{White}
 \expandafter\def\csname func at style/\endcsname{\csname textup\endcsname}
@@ -1639,6 +1640,10 @@
 \definecolor{TC8}           {cmyk}{0,0.8,1,0}
 \definecolor{TC9}           {cmyk}{0,0.875,1,0}
 \definecolor{TC99}          {cmyk}{0,0,0,0}
+\definecolor{BrewerC}      {cmyk}{0.35,0.07,0,0}
+\definecolor{BrewerG}      {cmyk}{0.90,0.30,0,0}
+\definecolor{BrewerT}      {cmyk}{0.30,0,0.45,0}
+\definecolor{BrewerA}      {cmyk}{0.80,0,1,0} 
 \definecolor{LightGreenYellow}   {cmyk}{0.08,0,0.35,0}
 \definecolor{LightYellow}        {cmyk}{0,0,0.50,0}
 \definecolor{LightGoldenrod}     {cmyk}{0,0.05,0.42,0}
@@ -2919,8 +2924,15 @@
       \funcgroup{18-19 eV (MY)}{MY}{White}{BlueRed80}{upper}{up}
       \funcgroup{17-18 eV (W)}{W}{White}{BlueRed100}{upper}{up}
    \else
+   \xdef\second@{DNA}
+   \ifx\temp@\second@
+      \funcgroup{C}{Cc}{Black}{BrewerC}{upper}{up}
+      \funcgroup{G}{Gg}{White}{BrewerG}{upper}{up}
+      \funcgroup{A}{Aa}{Black}{BrewerA}{upper}{up}
+      \funcgroup{T, U}{TtUu}{Black}{BrewerT}{upper}{up}
+   \else
    \message{<Unknown shading mode - clearing `funcgroups'>}
-   \fi\fi\fi\fi\fi\fi\fi\fi
+   \fi\fi\fi\fi\fi\fi\fi\fi\fi
 }
 \def\shadeallresidues{\all at fshadetrue}
 \def\get at fromstack#1;#2;#3;#4;#5@{%
@@ -6127,9 +6139,7 @@
    \else
    \xdef\first@{functional}
    \ifx\first@\last@
-      \if\seq at type N \message{<No functional shading on DNA sequences>}
-      \else \simmodefalse \funcmodetrue \func at shading{#1}
-            \xdef\seq at type{P} \xdef\prefix@{pep} \fi
+     \simmodefalse \funcmodetrue \func at shading{#1}
    \else
    \xdef\first@{T-Coffee}
    \ifx\first@\last@
@@ -6443,7 +6453,16 @@
       \logocolor{CFH}{BlueRed60}
       \logocolor{MY}{BlueRed80}
       \logocolor{W}{BlueRed100}
-   \fi\fi\fi\fi\fi\fi\fi\fi
+   \else
+   \xdef\second@{DNA}
+   \ifx\first@\second@
+      \clearlogocolors
+      \logocolor{A}{BrewerA}
+      \logocolor{C}{BrewerC}
+      \logocolor{G}{BrewerG}
+      \logocolor{T}{BrewerT}
+      \logocolor{U}{BrewerT}
+   \fi\fi\fi\fi\fi\fi\fi\fi\fi
 }
 \newcommand\findsubfamily[2][n]{%
    \xdef\first@{#1}
@@ -7750,13 +7769,15 @@
    \ifx\temp@\first@ \xdef\tr at nstextstyle{4}\fi
 }
 
-\newcommand\exportconsensus[2][export.txt]{%
+\newcommand\exportconsensus[3][chimera]{%
    \ifx\exp at rt\n@
+      \xdef\first@{#1}\xdef\second@{pymol}
+      \ifx\first@\second@\xdef\exp at rt@pymol{y}\fi
       \xdef\first@{#2 @} \expandafter\check at letter\first@
       \xdef\first@{#2}   \ifletter \get at name@number \fi
       \xdef\exp at rt@num{\first@}
       \xdef\exp at rt{y}
-      \immediate\openout\exp at rtfile = #1
+      \immediate\openout\exp at rtfile = #3
    \fi
 }
 
@@ -10889,7 +10910,12 @@
                 \multiply\outerloopcount by 5
                 \ifnum\outerloopcount<5\relax\outerloopcount=5\fi
                 \xdef\seventh@{n}
-                \immediate\write\exp at rtfile{\string color col\the\outerloopcount, resi \sixth@}
+                \ifx\exp at rt@pymol\y@
+                   \immediate\write\exp at rtfile{\string color col\the\outerloopcount, resi \sixth@}
+                \else
+                   \immediate\write\exp at rtfile{\string setattr a color col\the\outerloopcount \space :\sixth@}
+                   \immediate\write\exp at rtfile{\string setattr r ribbonColor col\the\outerloopcount \space :\sixth@}
+                \fi
              \fi
          \fi
 
@@ -10993,10 +11019,17 @@
  \fi}
 
 \def\prep at reexp@rtfile{
+  \def\get at c@nsc at l[##1,##2,##3]{\xdef\first@{##1} \xdef\second@{##2} \xdef\third@{##3}}
    \loopcount=0
    \loop
       \advance\loopcount by 5
-      \immediate\write\exp at rtfile{\string set_color col\the\loopcount, \csname\c at nsc@l\the\loopcount\endcsname}
+      \ifx\exp at rt@pymol\y@
+         \immediate\write\exp at rtfile{\string set_color col\the\loopcount, \csname\c at nsc@l\the\loopcount\endcsname}
+      \else
+         \xdef\first@{\csname\c at nsc@l\the\loopcount\endcsname}
+         \expandafter\get at c@nsc at l\first@
+         \immediate\write\exp at rtfile{\string colordef col\the\loopcount \space\first@ \space\second@ \space\third@}
+      \fi
    \ifnum\loopcount>95\else\repeat
 }
 



More information about the tex-live-commits mailing list.