diff options
Diffstat (limited to 'macros/latex/contrib/texshade')
-rw-r--r-- | macros/latex/contrib/texshade/README | 2 | ||||
-rw-r--r-- | macros/latex/contrib/texshade/texshade.dtx | 127 | ||||
-rw-r--r-- | macros/latex/contrib/texshade/texshade.pdf | bin | 821876 -> 821957 bytes |
3 files changed, 94 insertions, 35 deletions
diff --git a/macros/latex/contrib/texshade/README b/macros/latex/contrib/texshade/README index 2d2d83caf3..eb7e370ff6 100644 --- a/macros/latex/contrib/texshade/README +++ b/macros/latex/contrib/texshade/README @@ -1,4 +1,4 @@ - TeXshade v1.27 + TeXshade v1.28 >> >> A LaTeX package for setting nucleotide and peptide alignments. >> diff --git a/macros/latex/contrib/texshade/texshade.dtx b/macros/latex/contrib/texshade/texshade.dtx index 8ea0d6febb..92c89fd37a 100644 --- a/macros/latex/contrib/texshade/texshade.dtx +++ b/macros/latex/contrib/texshade/texshade.dtx @@ -426,6 +426,12 @@ % 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 @@ -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,7 +555,18 @@ % % \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:} @@ -1874,17 +1891,19 @@ % 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 % % \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@top{} \xdef\rulername@bottom{} \xdef\rulernamecolor@top{n} \xdef\rulernamecolor@bottom{n} \xdef\rulername@family{n} \xdef\rulername@size{n} +\xdef\exp@rt@pymol{n} \expandafter\def\csname fg@textcolor/\endcsname{White} \expandafter\def\csname fg@color/\endcsname{White} \expandafter\def\csname func@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@fshadetrue} \def\get@fromstack#1;#2;#3;#4;#5@{% @@ -12772,9 +12810,7 @@ \else \xdef\first@{functional} \ifx\first@\last@ - \if\seq@type N \message{<No functional shading on DNA sequences>} - \else \simmodefalse \funcmodetrue \func@shading{#1} - \xdef\seq@type{P} \xdef\prefix@{pep} \fi + \simmodefalse \funcmodetrue \func@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@nstextstyle{4}\fi } -\newcommand\exportconsensus[2][export.txt]{% +\newcommand\exportconsensus[3][chimera]{% \ifx\exp@rt\n@ + \xdef\first@{#1}\xdef\second@{pymol} + \ifx\first@\second@\xdef\exp@rt@pymol{y}\fi \xdef\first@{#2 @} \expandafter\check@letter\first@ \xdef\first@{#2} \ifletter \get@name@number \fi \xdef\exp@rt@num{\first@} \xdef\exp@rt{y} - \immediate\openout\exp@rtfile = #1 + \immediate\openout\exp@rtfile = #3 \fi } @@ -17547,7 +17594,12 @@ \multiply\outerloopcount by 5 \ifnum\outerloopcount<5\relax\outerloopcount=5\fi \xdef\seventh@{n} - \immediate\write\exp@rtfile{\string color col\the\outerloopcount, resi \sixth@} + \ifx\exp@rt@pymol\y@ + \immediate\write\exp@rtfile{\string color col\the\outerloopcount, resi \sixth@} + \else + \immediate\write\exp@rtfile{\string setattr a color col\the\outerloopcount \space :\sixth@} + \immediate\write\exp@rtfile{\string setattr r ribbonColor col\the\outerloopcount \space :\sixth@} + \fi \fi \fi @@ -17651,10 +17703,17 @@ \fi} \def\prep@reexp@rtfile{ + \def\get@c@nsc@l[##1,##2,##3]{\xdef\first@{##1} \xdef\second@{##2} \xdef\third@{##3}} \loopcount=0 \loop \advance\loopcount by 5 - \immediate\write\exp@rtfile{\string set_color col\the\loopcount, \csname\c@nsc@l\the\loopcount\endcsname} + \ifx\exp@rt@pymol\y@ + \immediate\write\exp@rtfile{\string set_color col\the\loopcount, \csname\c@nsc@l\the\loopcount\endcsname} + \else + \xdef\first@{\csname\c@nsc@l\the\loopcount\endcsname} + \expandafter\get@c@nsc@l\first@ + \immediate\write\exp@rtfile{\string colordef col\the\loopcount \space\first@ \space\second@ \space\third@} + \fi \ifnum\loopcount>95\else\repeat } diff --git a/macros/latex/contrib/texshade/texshade.pdf b/macros/latex/contrib/texshade/texshade.pdf Binary files differindex 2df2b88e3b..73f2e37035 100644 --- a/macros/latex/contrib/texshade/texshade.pdf +++ b/macros/latex/contrib/texshade/texshade.pdf |