Skip to content

Commit

Permalink
Fix index from 1 for genes
Browse files Browse the repository at this point in the history
Bump version to 5.1.5
Remove Artifactory resolver for jobserver
  • Loading branch information
Grifs committed Aug 23, 2023
1 parent 755d1c9 commit 9c274a1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ There's still a lot of work to be done on this (version numbers don't reflect ev
| 5.1.2 | 4.1.1 | 0.11.1 | 2.4.7 |
| 5.1.3 | 4.1.1 | 0.11.1 | 2.4.7 |
| 5.1.4 | 4.1.2 | 0.11.1 | 2.4.7 |
| 5.1.5 | 4.1.2 | 0.11.1 | 2.4.7 |

# API Documentation

Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name := "LuciusAPI"

import aether.AetherKeys._

ThisBuild / version := "5.1.4"
ThisBuild / version := "5.1.5"

scalaVersion := "2.11.12"

Expand Down
5 changes: 3 additions & 2 deletions src/main/scala/com/dataintuitive/luciusapi/IO.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import io.GenesIO._
import io.{ Version, DatedVersionedObject, State }

import org.apache.spark.sql.SparkSession
import org.apache.spark.sql.functions.{lit, typedLit, concat, array, monotonicallyIncreasingId, col}
import org.apache.spark.sql.functions.{lit, typedLit, concat, array, col, row_number}
import org.apache.spark.sql.expressions.Window

import org.apache.hadoop.fs.{FileSystem, Path}

Expand All @@ -20,7 +21,7 @@ object IO {
val genesRaw = sparkSession.read.parquet(geneAnnotationsFile)
val genesMapped = genesRaw
.drop("gene_description", "probe_set_id")
.withColumn("index", monotonicallyIncreasingId.cast("integer"))
.withColumn("index",row_number().over(Window.orderBy(lit(1))))
.withColumnRenamed("gene_id", "id")
.withColumn("entrezid", typedLit(Option.empty[Set[String]]))
.withColumn("ensemblid", typedLit(Option.empty[Set[String]]))
Expand Down

0 comments on commit 9c274a1

Please sign in to comment.