<commit_before>%!TEX TS-program = lualatex
%!TEX encoding = UTF-8 Unicode

\documentclass[12pt, hidelinks]{exam}
\usepackage{graphicx}
	\graphicspath{{/Users/goby/Pictures/teach/163/lab/}
	{img/}} % set of paths to search for images

\usepackage{geometry}
\geometry{letterpaper, left=1.5in, bottom=1in}                   
%\geometry{landscape}                % Activate for for rotated page geometry
\usepackage[parfill]{parskip}    % Activate to begin paragraphs with an empty line rather than an indent
\usepackage{amssymb, amsmath}
\usepackage{mathtools}
	\everymath{\displaystyle}

\usepackage{fontspec}
\setmainfont[Ligatures={TeX}, BoldFont={* Bold}, ItalicFont={* Italic}, BoldItalicFont={* BoldItalic}, Numbers={OldStyle}]{Linux Libertine O}
\setsansfont[Scale=MatchLowercase,Ligatures=TeX, Numbers=OldStyle]{Linux Biolinum O}
%\setmonofont[Scale=MatchLowercase]{Inconsolatazi4}
\usepackage{microtype}

\usepackage{pdflscape}

% To define fonts for particular uses within a document. For example, 
% This sets the Libertine font to use tabular number format for tables.
 %\newfontfamily{\tablenumbers}[Numbers={Monospaced}]{Linux Libertine O}
% \newfontfamily{\libertinedisplay}{Linux Libertine Display O}

\usepackage{booktabs}
\usepackage{multicol}

\usepackage{adjustbox}

\usepackage{tikz}
\usetikzlibrary{backgrounds}

\usepackage{forest}
\forestset{
  mytree/.style={
    for tree={
      edge+={ultra thick},
      edge path'={
        (!u.parent anchor) -| (.child anchor)
      },
      grow'=north,
      parent anchor=children,
      child anchor=parent,
      anchor=base,
      l sep=1cm,
      s sep=2mm,
      if n children=0{tier=word, align=center, base=bottom}{coordinate, tree node}
    }
  }
}
\forestset{
  declare dimen register={timeline offset},
  timeline offset'=10mm,
  declare toks register={timeline target},
  timeline target=,
  declare boolean={tree node}{0},
  timelinetree/.style={
    for tree={
      edge+={ultra thick},
      edge path'={
        (!u.parent anchor) -| (.child anchor)
      },
      grow=north,
      parent anchor=children,
      child anchor=parent,
      anchor=base,
%      l sep=1cm,
      s sep=2mm,
      if n children=0{tier=word, align=center, base=bottom, not tree node}{coordinate, tree node}
    }
  },
%
	age/.style={
		tikz+={
			\begin{scope}[on background layer] 
				\draw [gray, thick, dotted] () -- ( -| timeline base) node[black,anchor=east]{#1}; 
			\end{scope} 
		}
	},
%
  timeline/.style={
    before drawing tree={
      timeline target/.option=name,
      tempdima/.option=y,
      for tree={
        if={>OR>{y}{tempdima}}{timeline target/.option=name}{},
      }
    },
    tikz+={
      \begin{scope}[on background layer]
        \draw ([xshift=-\foresteregister{timeline offset}]current bounding box.west |- .parent anchor) coordinate (timeline base) -- (\foresteregister{timeline target}.child anchor -| timeline base) node [above] {\textsc{mya}};
      \end{scope}
    },
  },
}

\usepackage{longtable}
%\usepackage{siunitx}
\usepackage{array}

\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}

\usepackage{enumitem}
%\setenumerate{label=\Alph.}
\setlist{leftmargin=*}
\setlist[1]{labelindent=\parindent}
\setlist[enumerate]{label=\textsc{\alph*}.}
\setlist[itemize]{label=\color{gray}\textbullet}

%\usepackage{caption}
%	\captionsetup{labelsep=period, justification=raggedright} % Removes colon following figure / table number.
%	\captionsetup{singlelinecheck=off}
%	\captionsetup[table]{skip=0pt}

\usepackage{hyperref}
%\usepackage{placeins} %PRovides \FloatBarrier to flush all floats before a certain point.
\usepackage{hanging}

\usepackage[sc]{titlesec}

%% Commands for Exam class
\renewcommand{\solutiontitle}{\noindent}
\unframedsolutions
\SolutionEmphasis{\bfseries}

\renewcommand{\questionshook}{%
	\setlength{\leftmargin}{-\leftskip}%
}

\newcommand{\hidepoints}{%
	\pointsinmargin\pointformat{}
}

\newcommand{\showpoints}{%
	\nopointsinmargin\pointformat{(\thepoints)}
}

%Change \half command from 1/2 to .5
\renewcommand*\half{.5}

\pagestyle{headandfoot}
\firstpageheader{\textsc{bi}\,063 Evolution and Ecology}{}{\ifprintanswers\textbf{KEY}\else Name: \enspace \makebox[2.5in]{\hrulefill}\fi}
\runningheader{}{}{\footnotesize{pg. \thepage}}
\footer{}{}{}
\runningheadrule

\newcommand*\AnswerBox[2]{%
    \parbox[t][#1]{0.92\textwidth}{%
    \begin{solution}#2\end{solution}}
%    \vspace*{\stretch{1}}
}

\newenvironment{AnswerPage}[1]
    {\begin{minipage}[t][#1]{0.92\textwidth}%
    \begin{solution}}
    {\end{solution}\end{minipage}
    \vspace*{\stretch{1}}}

\newlength{\basespace}
\setlength{\basespace}{5\baselineskip}

\newcommand{\dna}{\textsc{dna}}

\printanswers

\begin{document}

\subsection*{Use dna sequence to make phylogenetic trees}

You have used homologous characters to construct phylogenetic trees that 
show the relationships among various taxonomic groups. Another method
that can be used to build phylogenetic trees is by comparing \dna{} sequences.
D\textsc{na} is found in all living organisms, from vertebrates to bacteria. As 
organisms evolve, mutations cause their \dna{} to change. The mutations
accumulate in the related lineages since they last shared a common ancestor.
Species that shared a common ancestor recently will have relatively few mutational
differences. Species that shared a common ancestor farther back in time will
have more mutational differences. Thus, the number of mutational differences
can be used to construct phylogenetic trees.

%Earlier, you compared the \dna{} sequence from seven species of made-up birds. 
%The \dna{} sequence from each species was only 20 nucleotides long. That was useful
%to show you how to use \dna{} sequences to make a phylogenetic tree. But, real studies
%often use \dna{} sequences that are several hundred to several thousand nucleotides long
%from dozens of species. Trying to find all of those differences by eye would be nearly impossible
%to do accurately. On the other hand, hundreds of sequences can be converted into a phylogenetic tree very 
%rapidly by computer. 

For this exercise, you will use a common analytical tool to build two phylogenetic trees using \dna{} sequence
from two different genes. Each tree will contain representative species for the major groups of organisms you have
used in the last few labs. After you have the trees, you will draw a complete phylogeny and then map on the
various homologies you have studied to see how the \dna{} sequence data and the homological data support one another.

You will analyze two genes, one at a time, using your laptop computer or one that has been provided for you (log in with your \textsc{se k}ey).   Work in pairs (or three if necessary) to complete the following \ref{final_step} steps for \emph{each} gene.
<commit_msg>Fixed typo.<commit_after>%!TEX TS-program = lualatex
%!TEX encoding = UTF-8 Unicode

\documentclass[12pt, hidelinks]{exam}
\usepackage{graphicx}
	\graphicspath{{/Users/goby/Pictures/teach/163/lab/}
	{img/}} % set of paths to search for images

\usepackage{geometry}
\geometry{letterpaper, left=1.5in, bottom=1in}                   
%\geometry{landscape}                % Activate for for rotated page geometry
\usepackage[parfill]{parskip}    % Activate to begin paragraphs with an empty line rather than an indent
\usepackage{amssymb, amsmath}
\usepackage{mathtools}
	\everymath{\displaystyle}

\usepackage{fontspec}
\setmainfont[Ligatures={TeX}, BoldFont={* Bold}, ItalicFont={* Italic}, BoldItalicFont={* BoldItalic}, Numbers={OldStyle}]{Linux Libertine O}
\setsansfont[Scale=MatchLowercase,Ligatures=TeX, Numbers=OldStyle]{Linux Biolinum O}
%\setmonofont[Scale=MatchLowercase]{Inconsolatazi4}
\usepackage{microtype}

\usepackage{pdflscape}

% To define fonts for particular uses within a document. For example, 
% This sets the Libertine font to use tabular number format for tables.
 %\newfontfamily{\tablenumbers}[Numbers={Monospaced}]{Linux Libertine O}
% \newfontfamily{\libertinedisplay}{Linux Libertine Display O}

\usepackage{booktabs}
\usepackage{multicol}

\usepackage{adjustbox}

\usepackage{tikz}
\usetikzlibrary{backgrounds}

\usepackage{forest}
\forestset{
  mytree/.style={
    for tree={
      edge+={ultra thick},
      edge path'={
        (!u.parent anchor) -| (.child anchor)
      },
      grow'=north,
      parent anchor=children,
      child anchor=parent,
      anchor=base,
      l sep=1cm,
      s sep=2mm,
      if n children=0{tier=word, align=center, base=bottom}{coordinate, tree node}
    }
  }
}
\forestset{
  declare dimen register={timeline offset},
  timeline offset'=10mm,
  declare toks register={timeline target},
  timeline target=,
  declare boolean={tree node}{0},
  timelinetree/.style={
    for tree={
      edge+={ultra thick},
      edge path'={
        (!u.parent anchor) -| (.child anchor)
      },
      grow=north,
      parent anchor=children,
      child anchor=parent,
      anchor=base,
%      l sep=1cm,
      s sep=2mm,
      if n children=0{tier=word, align=center, base=bottom, not tree node}{coordinate, tree node}
    }
  },
%
	age/.style={
		tikz+={
			\begin{scope}[on background layer] 
				\draw [gray, thick, dotted] () -- ( -| timeline base) node[black,anchor=east]{#1}; 
			\end{scope} 
		}
	},
%
  timeline/.style={
    before drawing tree={
      timeline target/.option=name,
      tempdima/.option=y,
      for tree={
        if={>OR>{y}{tempdima}}{timeline target/.option=name}{},
      }
    },
    tikz+={
      \begin{scope}[on background layer]
        \draw ([xshift=-\foresteregister{timeline offset}]current bounding box.west |- .parent anchor) coordinate (timeline base) -- (\foresteregister{timeline target}.child anchor -| timeline base) node [above] {\textsc{mya}};
      \end{scope}
    },
  },
}

\usepackage{longtable}
%\usepackage{siunitx}
\usepackage{array}

\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}

\usepackage{enumitem}
%\setenumerate{label=\Alph.}
\setlist{leftmargin=*}
\setlist[1]{labelindent=\parindent}
\setlist[enumerate]{label=\textsc{\alph*}.}
\setlist[itemize]{label=\color{gray}\textbullet}

%\usepackage{caption}
%	\captionsetup{labelsep=period, justification=raggedright} % Removes colon following figure / table number.
%	\captionsetup{singlelinecheck=off}
%	\captionsetup[table]{skip=0pt}

\usepackage{hyperref}
%\usepackage{placeins} %PRovides \FloatBarrier to flush all floats before a certain point.
\usepackage{hanging}

\usepackage[sc]{titlesec}

%% Commands for Exam class
\renewcommand{\solutiontitle}{\noindent}
\unframedsolutions
\SolutionEmphasis{\bfseries}

\renewcommand{\questionshook}{%
	\setlength{\leftmargin}{-\leftskip}%
}

\newcommand{\hidepoints}{%
	\pointsinmargin\pointformat{}
}

\newcommand{\showpoints}{%
	\nopointsinmargin\pointformat{(\thepoints)}
}

%Change \half command from 1/2 to .5
\renewcommand*\half{.5}

\pagestyle{headandfoot}
\firstpageheader{\textsc{bi}\,063 Evolution and Ecology}{}{\ifprintanswers\textbf{KEY}\else Name: \enspace \makebox[2.5in]{\hrulefill}\fi}
\runningheader{}{}{\footnotesize{pg. \thepage}}
\footer{}{}{}
\runningheadrule

\newcommand*\AnswerBox[2]{%
    \parbox[t][#1]{0.92\textwidth}{%
    \begin{solution}#2\end{solution}}
%    \vspace*{\stretch{1}}
}

\newenvironment{AnswerPage}[1]
    {\begin{minipage}[t][#1]{0.92\textwidth}%
    \begin{solution}}
    {\end{solution}\end{minipage}
    \vspace*{\stretch{1}}}

\newlength{\basespace}
\setlength{\basespace}{5\baselineskip}

\newcommand{\dna}{\textsc{dna}}

%\printanswers

\begin{document}

\subsection*{Use dna sequence to make phylogenetic trees}

You have used homologous characters to construct phylogenetic trees that 
show the relationships among various taxonomic groups. Another method
that can be used to build phylogenetic trees is by comparing \dna{} sequences.
D\textsc{na} is found in all living organisms, from vertebrates to bacteria. As 
organisms evolve, mutations cause their \dna{} to change. The mutations
accumulate in the related lineages since they last shared a common ancestor.
Species that shared a common ancestor recently will have relatively few mutational
differences. Species that shared a common ancestor farther back in time will
have more mutational differences. Thus, the number of mutational differences
can be used to construct phylogenetic trees.

%Earlier, you compared the \dna{} sequence from seven species of made-up birds. 
%The \dna{} sequence from each species was only 20 nucleotides long. That was useful
%to show you how to use \dna{} sequences to make a phylogenetic tree. But, real studies
%often use \dna{} sequences that are several hundred to several thousand nucleotides long
%from dozens of species. Trying to find all of those differences by eye would be nearly impossible
%to do accurately. On the other hand, hundreds of sequences can be converted into a phylogenetic tree very 
%rapidly by computer. 

For this exercise, you will use a common analytical tool to build two phylogenetic trees using \dna{} sequence
from two different genes. Each tree will contain representative species for the major groups of organisms you have
used in the last few labs. After you have the trees, you will draw a complete phylogeny and then map on the
various homologies you have studied to see how the \dna{} sequence data and the homological data support one another.

You will analyze two genes, one at a time, using your laptop computer or one that has been provided for you (log in with your \textsc{se k}ey).   Work in pairs (or three if necessary) to complete the following \ref{final_step} steps for \emph{each} gene.

{'fraction_non_alphanumeric': 0.12540169963579234, 'fraction_numerical': 0.007998286081553953, 'mean_word_length': 4.413219945883262, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6506442', 'n_tokens_mistral': 4636, 'n_tokens_neox': 4256, 'n_words': 1271}