Skip to content
Snippets Groups Projects
Commit 31a7e23d authored by Sander Bollen's avatar Sander Bollen
Browse files

small refactor: method name correction

parent a1605bf2
No related branches found
No related tags found
No related merge requests found
...@@ -116,7 +116,7 @@ object CheckAllelesVcfInBam extends ToolCommand { ...@@ -116,7 +116,7 @@ object CheckAllelesVcfInBam extends ToolCommand {
} }
val counts = for (samRecord <- bamIter if !filterRead(samRecord)) { val counts = for (samRecord <- bamIter if !filterRead(samRecord)) {
checkAlles(samRecord, vcfRecord) match { checkAlleles(samRecord, vcfRecord) match {
case Some(a) => if (countReports(sample).aCounts.contains(a)) countReports(sample).aCounts(a) += 1 case Some(a) => if (countReports(sample).aCounts.contains(a)) countReports(sample).aCounts(a) += 1
else countReports(sample).aCounts += (a -> 1) else countReports(sample).aCounts += (a -> 1)
case _ => countReports(sample).notFound += 1 case _ => countReports(sample).notFound += 1
...@@ -142,7 +142,7 @@ object CheckAllelesVcfInBam extends ToolCommand { ...@@ -142,7 +142,7 @@ object CheckAllelesVcfInBam extends ToolCommand {
writer.close() writer.close()
} }
def checkAlles(samRecord: SAMRecord, vcfRecord: VariantContext): Option[String] = { def checkAlleles(samRecord: SAMRecord, vcfRecord: VariantContext): Option[String] = {
val readStartPos = List.range(0, samRecord.getReadBases.length) val readStartPos = List.range(0, samRecord.getReadBases.length)
.find(x => samRecord.getReferencePositionAtReadPosition(x + 1) == vcfRecord.getStart) getOrElse { return None } .find(x => samRecord.getReferencePositionAtReadPosition(x + 1) == vcfRecord.getStart) getOrElse { return None }
val readBases = samRecord.getReadBases val readBases = samRecord.getReadBases
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment