Skip to content

Commit 9c274a1

Browse files
committed
Fix index from 1 for genes
Bump version to 5.1.5 Remove Artifactory resolver for jobserver
1 parent 755d1c9 commit 9c274a1

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ There's still a lot of work to be done on this (version numbers don't reflect ev
1515
| 5.1.2 | 4.1.1 | 0.11.1 | 2.4.7 |
1616
| 5.1.3 | 4.1.1 | 0.11.1 | 2.4.7 |
1717
| 5.1.4 | 4.1.2 | 0.11.1 | 2.4.7 |
18+
| 5.1.5 | 4.1.2 | 0.11.1 | 2.4.7 |
1819

1920
# API Documentation
2021

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name := "LuciusAPI"
22

33
import aether.AetherKeys._
44

5-
ThisBuild / version := "5.1.4"
5+
ThisBuild / version := "5.1.5"
66

77
scalaVersion := "2.11.12"
88

src/main/scala/com/dataintuitive/luciusapi/IO.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import io.GenesIO._
88
import io.{ Version, DatedVersionedObject, State }
99

1010
import org.apache.spark.sql.SparkSession
11-
import org.apache.spark.sql.functions.{lit, typedLit, concat, array, monotonicallyIncreasingId, col}
11+
import org.apache.spark.sql.functions.{lit, typedLit, concat, array, col, row_number}
12+
import org.apache.spark.sql.expressions.Window
1213

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

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

0 commit comments

Comments
 (0)