Skip to content

Commit

Permalink
drop a couple unnecessary variables
Browse files Browse the repository at this point in the history
  • Loading branch information
hpratt committed Nov 11, 2020
1 parent 2f361ce commit f3ac213
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
}

group = "com.genomealmanac"
version = "0.6.0"
version = "0.6.1"
val artifactID = "bam-aggregate-task"

repositories {
Expand Down
4 changes: 0 additions & 4 deletions src/main/kotlin/step/BarcodeMap.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ private val log = KotlinLogging.logger {}
*/
fun barcodeMap(regions: List<Region>, alignments: Path, forwardShift: Int = 0, reverseShift: Int = 0, strand: String? = null): Map<String, Map<String, Int>> {

val values: List<MutableList<Int>> = regions.map {
(it.start..it.end).map { 0 }.toMutableList()
}
val queryExtension = max(abs(forwardShift), abs(reverseShift)) + 1

SamReaderFactory.makeDefault().validationStringency(ValidationStringency.SILENT).enable(SamReaderFactory.Option.INCLUDE_SOURCE_IN_RECORDS).open(alignments.toFile()).use {
Expand All @@ -43,7 +40,6 @@ fun barcodeMap(regions: List<Region>, alignments: Path, forwardShift: Int = 0, r
}
val start = pileUpStart(alignment, forwardShift, reverseShift)
if (start >= region.start && start <= region.end) {
val coordinate = if (region.strand == '+') start - region.start else region.end - start
val barcode = alignment.getAttribute("CB")?.toString()
if (barcode === null) return@forEach
if (!results.containsKey(barcode)) results[barcode] = mutableMapOf()
Expand Down

0 comments on commit f3ac213

Please sign in to comment.