Skip to content
Snippets Groups Projects
Commit 48f983ae authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Fix style warnings

parent e4b00c4a
No related branches found
No related tags found
No related merge requests found
...@@ -3,14 +3,13 @@ package nl.lumc.sasc.biopet.tools ...@@ -3,14 +3,13 @@ package nl.lumc.sasc.biopet.tools
import java.io.File import java.io.File
import java.util import java.util
import htsjdk.samtools.reference.{ReferenceSequenceFileFactory, ReferenceSequenceFileWalker, ReferenceSequenceFile, FastaSequenceFile} import htsjdk.samtools.reference.{ FastaSequenceFile, ReferenceSequenceFileFactory }
import htsjdk.variant.variantcontext.writer.{ AsyncVariantContextWriter, VariantContextWriterBuilder }
import htsjdk.variant.variantcontext.{ Allele, GenotypeBuilder, VariantContextBuilder } import htsjdk.variant.variantcontext.{ Allele, GenotypeBuilder, VariantContextBuilder }
import htsjdk.variant.variantcontext.writer.{ VariantContextWriterBuilder, AsyncVariantContextWriter }
import htsjdk.variant.vcf._ import htsjdk.variant.vcf._
import nl.lumc.sasc.biopet.utils.ToolCommand import nl.lumc.sasc.biopet.utils.ToolCommand
import scala.collection.JavaConversions._ import scala.collection.JavaConversions._
import scala.io.Source import scala.io.Source
/** /**
...@@ -81,15 +80,13 @@ object GensToVcf extends ToolCommand { ...@@ -81,15 +80,13 @@ object GensToVcf extends ToolCommand {
val start = genotypeValues(2).toInt val start = genotypeValues(2).toInt
if (genotypeValues(4) == "-") { if (genotypeValues(4) == "-") {
val seq = fastaFile.getSubsequenceAt(cmdArgs.contig, start - 1, start + genotypeValues(4).length - 1) val seq = fastaFile.getSubsequenceAt(cmdArgs.contig, start - 1, start + genotypeValues(4).length - 1)
(start - 1, (start + genotypeValues(4).length - 1), (start - 1, start + genotypeValues(4).length - 1,
Allele.create(new String(seq.getBases), true), Allele.create(new String(Array(seq.getBases.head)))) Allele.create(new String(seq.getBases), true), Allele.create(new String(Array(seq.getBases.head))))
} else { } else {
val ref = Allele.create(genotypeValues(3), true) val ref = Allele.create(genotypeValues(3), true)
(start, (ref.length - 1 + start), Allele.create(genotypeValues(3), true), Allele.create(genotypeValues(4))) (start, ref.length - 1 + start, Allele.create(genotypeValues(3), true), Allele.create(genotypeValues(4)))
} }
} }
//val start = genotypeValues(2).toInt
//val end = ref.length - 1 + start
val genotypes = samples.toList.zipWithIndex.map { val genotypes = samples.toList.zipWithIndex.map {
case (sampleName, index) => case (sampleName, index) =>
val gps = Array( val gps = Array(
......
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