<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://genome.sph.umich.edu/w/index.php?action=history&amp;feed=atom&amp;title=830_-_MaqIndex%3A%3ABuildIndex%28%29</id>
	<title>830 - MaqIndex::BuildIndex() - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://genome.sph.umich.edu/w/index.php?action=history&amp;feed=atom&amp;title=830_-_MaqIndex%3A%3ABuildIndex%28%29"/>
	<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=830_-_MaqIndex::BuildIndex()&amp;action=history"/>
	<updated>2026-09-27T11:19:46Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>http://genome.sph.umich.edu/w/index.php?title=830_-_MaqIndex::BuildIndex()&amp;diff=8894&amp;oldid=prev</id>
		<title>Goncalo: Created page with &quot;&lt;source lang=&quot;cpp&quot;&gt; void MaqIndex::BuildIndex() { 	// This function could use quite a lot of memory ... 	//    4 bytes per word 	//    4 bytes per position 	//    4 bytes per ...&quot;</title>
		<link rel="alternate" type="text/html" href="http://genome.sph.umich.edu/w/index.php?title=830_-_MaqIndex::BuildIndex()&amp;diff=8894&amp;oldid=prev"/>
		<updated>2013-10-28T17:38:41Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt; void MaqIndex::BuildIndex() { 	// This function could use quite a lot of memory ... 	//    4 bytes per word 	//    4 bytes per position 	//    4 bytes per ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void MaqIndex::BuildIndex()&lt;br /&gt;
{&lt;br /&gt;
	// This function could use quite a lot of memory ...&lt;br /&gt;
	//    4 bytes per word&lt;br /&gt;
	//    4 bytes per position&lt;br /&gt;
	//    4 bytes per word in the word index&lt;br /&gt;
&lt;br /&gt;
	bases = 0;&lt;br /&gt;
	for (unsigned int i = 0; i &amp;lt; mask.Length(); i++)&lt;br /&gt;
		if (mask[i] == &amp;#039;1&amp;#039;)&lt;br /&gt;
			bases++;&lt;br /&gt;
&lt;br /&gt;
	unsigned int indexSize = 0;&lt;br /&gt;
	for (unsigned int i = 0; i &amp;lt; reference.Length(); i++)&lt;br /&gt;
		if (GetReferenceWord(i) != -1)&lt;br /&gt;
			indexSize++;&lt;br /&gt;
&lt;br /&gt;
	sortedPositions.PreAllocate(indexSize);&lt;br /&gt;
	for (unsigned int i = 0; i &amp;lt; reference.Length(); i++)&lt;br /&gt;
		if (GetReferenceWord(i) != -1)&lt;br /&gt;
			sortedPositions.Push(i);&lt;br /&gt;
&lt;br /&gt;
	SortIndex();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Goncalo</name></author>
	</entry>
</feed>