From c49eb3a2c514d337a6d5aadbdc0961a08aa718a2 Mon Sep 17 00:00:00 2001 From: Miguel C Date: Mon, 1 Oct 2018 11:51:30 +0100 Subject: [PATCH] fix: return Unit is not ok as joint table has to be returned --- src/main/scala/ot/geckopipe/Main.scala | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/scala/ot/geckopipe/Main.scala b/src/main/scala/ot/geckopipe/Main.scala index 7596aaa..3df3cb5 100644 --- a/src/main/scala/ot/geckopipe/Main.scala +++ b/src/main/scala/ot/geckopipe/Main.scala @@ -64,14 +64,13 @@ class Commands(val ss: SparkSession, val sampleFactor: Double, val c: Configurat val vIdx = vIdxBuilder.load val nearests = vIdxBuilder.loadNearestGenes.map( df => { logger.info("generate variant index LUT with nearest genes (prot-cod and not prot-cod") - val joint = vIdx.table.join(df, VariantIndex.variantColumnNames, "left_outer") - - joint.show(10, false) - joint.write.json(c.output.stripSuffix("/").concat("/variant-index-lut/")) + vIdx.table.join(df, VariantIndex.variantColumnNames, "left_outer") }) nearests match { - case scala.util.Success(_) => logger.info("generated variant index LUT") + case scala.util.Success(table) => + logger.info("write to json variant index LUT") + table.write.json(c.output.stripSuffix("/").concat("/variant-index-lut/")) case scala.util.Failure(ex) => logger.error(ex.getMessage) } }