Commit 10a2a09b authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Remove val in for loops

parent da908cbb
......@@ -79,10 +79,10 @@ object BedToInterval extends ToolCommand {
val bedFile = Source.fromFile(commandArgs.inputFile)
for (
line <- bedFile.getLines;
val split = line.split("\t") if split.size >= 3;
val chr = split(0);
val start = split(1);
val stop = split(2) if start forall Character.isDigit if stop forall Character.isDigit
split = line.split("\t") if split.size >= 3;
chr = split(0);
start = split(1);
stop = split(2) if start forall Character.isDigit if stop forall Character.isDigit
) {
if (!refsMap.contains(chr)) throw new IllegalStateException("Chr '" + chr + "' in bed file not found in bam file")
writer.write(chr + "\t" + start + "\t" + stop + "\t")
......
......@@ -37,7 +37,7 @@ object FindRepeatsPacBio extends ToolCommand {
for (
bedLine <- Source.fromFile(commandArgs.inputBed).getLines;
val values = bedLine.split("\t"); if values.size >= 3
values = bedLine.split("\t"); if values.size >= 3
) {
val interval = new QueryInterval(bamHeader.getSequenceIndex(values(0)), values(1).toInt, values(2).toInt)
val bamIter = bamReader.query(Array(interval), false)
......
......@@ -115,7 +115,7 @@ object MpileupToVcf extends ToolCommand {
class Counts(var forward: Int, var reverse: Int)
for (
line <- inputStream;
val values = line.split("\t");
values = line.split("\t");
if values.size > 5
) {
val chr = values(0)
......
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