Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
heuermh committed Mar 2, 2017
1 parent e74c392 commit d77a184
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import org.bdgenomics.utils.interval.array.{
}
import org.bdgenomics.utils.misc.Logging
import scala.collection.JavaConversions._
import scala.math.max
import scala.reflect.ClassTag

private[adam] case class FeatureArray(
Expand Down Expand Up @@ -116,8 +117,8 @@ object FeatureRDD {
// create sequence records with length max(start, end) + 1L
val sequenceRecords = rdd
.keyBy(_.getContigName)
.map(kv => (kv._1, Math.max(kv._2.getStart, kv._2.getEnd) + 1L))
.reduceByKey(math.max(_, _))
.map(kv => (kv._1, max(kv._2.getStart, kv._2.getEnd) + 1L))
.reduceByKey(max(_, _))
.map(kv => SequenceRecord(kv._1, kv._2))

val sd = new SequenceDictionary(sequenceRecords.collect.toVector)
Expand Down

0 comments on commit d77a184

Please sign in to comment.