Commit 99b31701 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Fixed number of bins

parent 6d39308c
......@@ -109,9 +109,10 @@ object BamStats extends ToolCommand {
def processContig(region: BedRecord, bamFile: File, binSize: Int, threadBinSize: Int, outputDir: File): Stats = {
val scattersFutures = region
.scatter(binSize)
.grouped((region.length.toDouble / threadBinSize).ceil.toInt)
.grouped((region.length.toDouble / binSize).ceil.toInt / (region.length.toDouble / threadBinSize).ceil.toInt)
.map(scatters => Future { processThread(scatters, bamFile) })
val stats = waitOnFutures(scattersFutures.toList, Some(region.chr))
.toList
val stats = waitOnFutures(scattersFutures, Some(region.chr))
val contigDir = new File(outputDir, "contigs" + File.separator + region.chr)
contigDir.mkdirs()
stats.writeStatsToFiles(contigDir)
......
......@@ -7,8 +7,8 @@ import org.scalatest.testng.TestNGSuite
import org.testng.annotations.Test
/**
* Created by Sander Bollen on 13-7-16.
*/
* Created by Sander Bollen on 13-7-16.
*/
class HaploTypeCallerGvcfTest extends TestNGSuite with Matchers {
@Test
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment