Good call - I will refactor.

Matt Massie <notifications@github.com> wrote:

>>  
>> +	  for (b <- new StringOps(record.getSequence.toString)) {
>> +	    val insertBase = Base.valueOf (b.toString)
>> +
>> +            val pileup = ADAMPileup.newBuilder()
>
>There is a lot of copy-paste that we can move into a function, e.g.
>
>def pileupFromRecord(record: ADAMRecord, ...): ADAMPileup = {
>   // insert copy-paste here.
>}
>
>---
>Reply to this email directly or view it on GitHub:
>https://github.com/massie/adam/pull/5/files#r6790133<p>In adam-commands/src/main/scala/edu/berkeley/cs/amplab/adam/commands/Reads2Ref.scala:</p>
><pre style='color:#555'>&gt;  
>&gt; +	  for (b &lt;- new StringOps(record.getSequence.toString)) {
>&gt; +	    val insertBase = Base.valueOf (b.toString)
>&gt; +
>&gt; +            val pileup = ADAMPileup.newBuilder()
></pre>
><p>There is a lot of copy-paste that we can move into a function, e.g.</p>
>
><p>def pileupFromRecord(record: ADAMRecord, ...): ADAMPileup = {<br>
>   // insert copy-paste here.<br>
>}</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/massie/adam/pull/5/files#r6790133'>view it on GitHub</a>.<img src='https://github.com/notifications/beacon/fIZLoLkaei-JI9T-ls2Mx5xWPAPP4SIlmtkg8ySCnVNvL5AbPiEPuk_WwaA51U0d.gif' height='1' width='1'></p>