Skip to content

Commit

Permalink
fix: return Unit is not ok as joint table has to be returned
Browse files Browse the repository at this point in the history
  • Loading branch information
mkarmona committed Oct 1, 2018
1 parent 6eb0114 commit c49eb3a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/main/scala/ot/geckopipe/Main.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit c49eb3a

Please sign in to comment.