I'll let @massie comment but that seems like a unit test artifact, not a real constraint.

Neal <notifications@github.com> wrote:

>>          currentOffsetFromEnd += 1
>>          if (currentOffsetFromEnd > 10000) {
>>            currentOffsetFromEnd = 0
>>          }
>> -        Int.MaxValue - currentOffsetFromEnd
>> +        // NB : this is really ugly - any better way to manufacture
>
>"unmapped" is fine, although there is a dependency in the unit tests on the unmapped reads being at the end:
>
>```scala
>    assert(unmapped.forall(p => p._2 > mapped.takeRight(1)(0)._2))
>```
>Not sure if that reflects something we need to require on production data or just a unit test issue.
>
>---
>Reply to this email directly or view it on GitHub:
>https://github.com/bigdatagenomics/adam/pull/217/files#r11774179<p>In adam-core/src/main/scala/org/bdgenomics/adam/rdd/ADAMRDDFunctions.scala:</p>
><pre style='color:#555'>&gt;          currentOffsetFromEnd += 1
>&gt;          if (currentOffsetFromEnd &gt; 10000) {
>&gt;            currentOffsetFromEnd = 0
>&gt;          }
>&gt; -        Int.MaxValue - currentOffsetFromEnd
>&gt; +        // NB : this is really ugly - any better way to manufacture
></pre>
><p>"unmapped" is fine, although there is a dependency in the unit tests on the unmapped reads being at the end:</p>
>
><div class="highlight highlight-scala"><pre>    <span class="n">assert</span><span class="o">(</span><span class="n">unmapped</span><span class="o">.</span><span class="n">forall</span><span class="o">(</span><span class="n">p</span> <span class="k">=&gt;</span> <span class="n">p</span><span class="o">.</span><span class="n">_2</span> <span class="o">&gt;</span> <span class="n">mapped</span><span class="o">.</span><span class="n">takeRight</span><span class="o">(</span><span class="mi">1</span><span class="o">)(</span><span class="mi">0</span><span class="o">).</span><span class="n">_2</span><span class="o">))</span>
></pre></div>
>
><p>Not sure if that reflects something we need to require on production data or just a unit test issue.</p>
>
><p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href='https://github.com/bigdatagenomics/adam/pull/217/files#r11774179'>view it on GitHub</a>.<img src='https://github.com/notifications/beacon/3752466__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcxMzQ1MjIwMCwiZGF0YSI6eyJpZCI6MzAyOTY1MDF9fQ==--f0081b4817bc3b74b6bbc3f93235bd3231324ef7.gif' height='1' width='1'></p>