Skip to content

Commit

Permalink
fix: json study_id and then rename to stid
Browse files Browse the repository at this point in the history
  • Loading branch information
mkarmona committed Sep 24, 2018
1 parent d18e74f commit d14e248
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/scala/ot/geckopipe/index/V2DIndex.scala
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ object V2DIndex extends LazyLogging {
StructField("rs_id", StringType) :: Nil)

val studiesSchema = StructType(
StructField("stid", StringType, false) ::
StructField("study_id", StringType, false) ::
StructField("pmid", StringType) ::
StructField("pub_date", StringType) ::
StructField("pub_journal", StringType) ::
Expand Down Expand Up @@ -129,6 +129,7 @@ object V2DIndex extends LazyLogging {
val removeSuffix = udf((col: String) => col.split("\\.").head)

val pStudies = studies
.withColumnRenamed("study_id", "stid")
.withColumn("trait_efos", when(col("trait_efos").isNotNull,
split(col("trait_efos"),";")))

Expand Down

0 comments on commit d14e248

Please sign in to comment.