Commit fed29c72 authored by Sander Bollen's avatar Sander Bollen
Browse files

autostyle fixes

parent dca51f45
......@@ -177,9 +177,9 @@ object VcfWithVcf extends ToolCommand {
secondRecord <- secondaryRecords if secondRecord.hasAttribute(f.inputField)
) yield {
secondRecord.getAttribute(f.inputField) match {
case l: List[_] => l
case l: List[_] => l
case y: util.ArrayList[_] => y.toList
case x => List(x)
case x => List(x)
}
}).fold(Nil)(_ ::: _)
}).toMap
......@@ -220,9 +220,10 @@ object VcfWithVcf extends ToolCommand {
case _ => throw new IllegalArgumentException("Type of field " + attribute._1 + " is not numeric")
}
case FieldMethod.unique => scalaListToJavaObjectArrayList(attribute._2.distinct)
case _ => {
case _ => {
print(attribute._2.getClass.toString)
scalaListToJavaObjectArrayList(attribute._2) }
scalaListToJavaObjectArrayList(attribute._2)
}
})
}).make()
}
......
......@@ -60,30 +60,30 @@ object VcfUtils {
val out = new util.ArrayList[Object]()
array.foreach {
case x: Int => out.add(Int.box(x))
case x: Float => out.add(Float.box(x))
case x: Int => out.add(Int.box(x))
case x: Float => out.add(Float.box(x))
case x: String => out.add(x)
case x: Object => out.add(x)
case x => out.add(x.toString)
case x => out.add(x.toString)
}
out
}
def identicalVariantContext(var1: VariantContext, var2: VariantContext): Boolean = {
if(var1.getContig != var2.getContig) {
if (var1.getContig != var2.getContig) {
false
}
if(var1.getStart != var2.getStart) {
if (var1.getStart != var2.getStart) {
false
}
if(var1.getEnd != var2.getEnd) {
if (var1.getEnd != var2.getEnd) {
false
}
if(!var1.getAttributes.forall(x => var2.hasAttribute(x._1)) || !var2.getAttributes.forall(x => var1.hasAttribute(x._1))){
if (!var1.getAttributes.forall(x => var2.hasAttribute(x._1)) || !var2.getAttributes.forall(x => var1.hasAttribute(x._1))) {
false
}
if(!var1.getAttributes.forall(x => var2.getAttribute(x._1) == var1.getAttribute(x._1)) ||
!var2.getAttributes.forall(x => var1.getAttribute(x._1) == var2.getAttribute(x._1))){
if (!var1.getAttributes.forall(x => var2.getAttribute(x._1) == var1.getAttribute(x._1)) ||
!var2.getAttributes.forall(x => var1.getAttribute(x._1) == var2.getAttribute(x._1))) {
false
}
......
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