List < Contig > getShards ( long numberOfBasesPerShard ) { double shardCount = ( end - start ) / ( double ) numberOfBasesPerShard ; List < Contig > shards = Lists . newArrayList ( ) ; for ( int i = 0 ; i < shardCount ; i ++ ) { long shardStart = start + ( i * numberOfBasesPerShard ) ; long shardEnd = Math . min ( end , shardStart + numberOfBasesPerShard ) ; shards . add ( new Contig ( referenceName , shardStart , shardEnd ) ) ; } return shards ; }
being returned to clients .