Skip to content

Commit

Permalink
Update dependencies (#39)
Browse files Browse the repository at this point in the history
* Use sbt 1.10.7

* Update plugins

* Update dependencies and fix errors

* Updated scalafmt and scalafix

* Formatting carnage

* Require sbt and Update scalafmt in GitHub actions

* Set version to 3.13.0-SNAPSHOT

* Require Java 11

* Roll back to samtools 3.0.5

Any versions beyond 3.0.5 will require JDK 17 or higher

* Update documentation
  • Loading branch information
mtomko authored Feb 11, 2025
1 parent a2d29de commit 1afbf72
Show file tree
Hide file tree
Showing 63 changed files with 521 additions and 534 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ jobs:
- uses: actions/checkout@v4
- uses: jrouly/scalafmt-native-action@v3
with:
version: "3.8.1"
- name: Set up JDK 8
version: "3.8.3"
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'
java-version: '11'
- name: Setup sbt launcher
uses: sbt/setup-sbt@v1
- run: sbt "scalafixAll --check"
- name: Run tests
run: make test-all
8 changes: 5 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ jobs:
- run: git config --global user.name "GPP Informatics"
- uses: jrouly/scalafmt-native-action@v3
with:
version: "3.8.1"
- name: Set up JDK 8
version: "3.8.3"
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'
java-version: '11'
- name: Setup sbt launcher
uses: sbt/setup-sbt@v1
- run: sbt "scalafixAll --check"
- name: Run tests
run: make test-all
Expand Down
3 changes: 2 additions & 1 deletion .scalafix.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ OrganizeImports {
expandRelative = true
groups = ["re:javax?\\.", "scala.", "*"]
groupedImports = Merge
removeUnused = false
removeUnused = true
targetDialect = Scala3
}
23 changes: 18 additions & 5 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,16 +1,29 @@
# PoolQ3 .scalafmt configuration
version=3.8.1
# PoolQ .scalafmt configuration
version=3.8.3
runner.dialect = scala3
fileOverride {
"glob:**.sbt" {
runner.dialect = sbt1
}
}

style = IntelliJ
# start with basic IntelliJ configuration
preset = IntelliJ

# customizations
align.preset=none
importSelectors = singleLine
maxColumn = 120
newlines.afterCurlyLambdaParams=squash
continuationIndent.defnSite = 4
newlines.afterCurlyLambdaParams = squash
newlines.topLevelStatementBlankLines = [
{ blanks = 1 }
]
project.git = true
rewrite.rules = [AvoidInfix, RedundantBraces, RedundantParens, Imports, SortModifiers]

# rewrite rules
rewrite.rules = [AvoidInfix, Imports, RedundantBraces, RedundantParens, SortModifiers]
rewrite.imports.expand = false
rewrite.imports.sort = ascii
rewrite.redundantBraces.generalExpressions = false
rewrite.redundantBraces.includeUnitMethods = false
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PoolQ 3.0

Copyright (c) 2024 Genetic Perturbation Platform, The Broad Institute of Harvard and MIT.
Copyright (c) 2025 Genetic Perturbation Platform, The Broad Institute of Harvard and MIT.

[![Build Status](/~https://github.com/broadinstitute/poolq/actions/workflows/ci.yml/badge.svg)](/~https://github.com/broadinstitute/poolq/actions/workflows/ci.yml)

Expand Down
36 changes: 18 additions & 18 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ val artifactId = "poolq"

inThisBuild(
List(
scalaVersion := "3.3.3",
scalaVersion := "3.6.3",
semanticdbEnabled := true,
semanticdbVersion := scalafixSemanticdb.revision,
versionScheme := Some("early-semver")
Expand All @@ -11,21 +11,21 @@ inThisBuild(

lazy val versions = new {
val betterFiles = "3.9.2"
val catsEffect3 = "3.5.4"
val cats = "2.10.0"
val commonsIo = "2.16.1"
val commonsText = "1.12.0"
val catsEffect3 = "3.5.7"
val cats = "2.13.0"
val commonsIo = "2.18.0"
val commonsText = "1.13.0"
val commonsMath3 = "3.6.1"
val fastutil = "8.5.13"
val fs2 = "3.10.2"
val fastutil = "8.5.15"
val fs2 = "3.11.0"
val log4s = "1.10.0"
val logback = "1.2.13"
val munit = "0.7.29"
val munitCatsEffect3 = "1.0.7"
val munit = "1.1.0"
val munitCatsEffect3 = "2.0.0"
val samTools = "3.0.5"
val scalaCheck = "1.18.0"
val scalaCsv = "1.3.10"
val scalaTest = "3.2.18"
val scalaCheck = "1.18.1"
val scalaCsv = "2.0.0"
val scalaTest = "3.2.19"
val scalaTestPlusScalaCheck = "3.2.18.0"
val scopt = "4.1.0"
val slf4j = "1.7.36"
Expand All @@ -52,7 +52,7 @@ lazy val libraries = new {
val commonsText = "org.apache.commons" % "commons-text" % versions.commonsText
val munit = "org.scalameta" %% "munit" % versions.munit
val munitScalacheck = "org.scalameta" %% "munit-scalacheck" % versions.munit
val munitCatsEffect3 = "org.typelevel" %% "munit-cats-effect-3" % versions.munitCatsEffect3
val munitCatsEffect = "org.typelevel" %% "munit-cats-effect" % versions.munitCatsEffect3
val scalaTest = "org.scalatest" %% "scalatest" % versions.scalaTest
val scalaCheck = "org.scalacheck" %% "scalacheck" % versions.scalaCheck
val scalaTestPlusScalaCheck = "org.scalatestplus" %% "scalacheck-1-17" % versions.scalaTestPlusScalaCheck
Expand All @@ -77,7 +77,7 @@ lazy val dependencies =
libraries.fs2Core % Test,
libraries.fs2Io % Test,
libraries.munit % Test,
libraries.munitCatsEffect3 % Test,
libraries.munitCatsEffect % Test,
libraries.munitScalacheck % Test,
libraries.scalaCheck % Test,
libraries.scalaTest % Test,
Expand All @@ -99,11 +99,11 @@ lazy val headerSettings = List(
lazy val assemblySettings = List(
assembly / assemblyJarName := "../bin/poolq3.jar",
assembly / assemblyMergeStrategy := {
case "logback.xml" => MergeStrategy.first
case "logback-test.xml" => MergeStrategy.discard
case PathList("module-info.class") => MergeStrategy.discard
case "logback.xml" => MergeStrategy.first
case "logback-test.xml" => MergeStrategy.discard
case PathList("module-info.class") => MergeStrategy.discard
case PathList("META-INF", "versions", xs @ _, "module-info.class") => MergeStrategy.discard
case "module-info.class" => MergeStrategy.first
case "module-info.class" => MergeStrategy.first
case x =>
val old = (assembly / assemblyMergeStrategy).value
old(x)
Expand Down
6 changes: 3 additions & 3 deletions docs/MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

PoolQ is a counter for indexed samples from next-gen sequencing of pooled DNA.

_This documentation covers PoolQ version 3.11.0 (last updated 02/13/2024)._
_This documentation covers PoolQ version 3.13.0 (last updated 02/11/2025)._

## Background

Expand Down Expand Up @@ -550,8 +550,8 @@ it, you need to download the zip file and unzip it.

## Prerequisites

PoolQ is built for Java 8. To run PoolQ, you will need a JRE for version 8 or later. To compile
PoolQ you will need a Java 8 JDK. You can download an appropriate JRE or JDK from Oracle at:
PoolQ is built for Java 11. To run PoolQ, you will need a JRE for version 11 or later. To compile
PoolQ you will need a Java 11 JDK. You can download an appropriate JRE or JDK from Oracle at:

> [http://www.oracle.com/technetwork/java/javase/downloads/index.html](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.9.9
sbt.version=1.10.7
10 changes: 5 additions & 5 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
addSbtPlugin("ch.epfl.scala" % "sbt-missinglink" % "0.3.6")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.0")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.14.0")
addSbtPlugin("com.codecommit" % "sbt-github-packages" % "0.5.3")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "1.2.0")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.12.0")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.13.1")
addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.3.1")
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.4.0")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0")
addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.1")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.11")
addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.2")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.4")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.3.0")
50 changes: 12 additions & 38 deletions src/main/scala/org/broadinstitute/gpp/poolq3/PoolQ.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,43 +13,17 @@ import cats.syntax.all.*
import org.broadinstitute.gpp.poolq3.PoolQConfig.synthesizeArgs
import org.broadinstitute.gpp.poolq3.barcode.{BarcodePolicy, Barcodes, barcodeSource}
import org.broadinstitute.gpp.poolq3.parser.{BarcodeSet, CloseableIterable, ReferenceData}
import org.broadinstitute.gpp.poolq3.process.{
Consumer,
NoOpConsumer,
PoolQProcess,
ScoringConsumer,
UnexpectedSequenceTracker
}
import org.broadinstitute.gpp.poolq3.process.{Consumer, NoOpConsumer, PoolQProcess, ScoringConsumer, UnexpectedSequenceTracker}
import org.broadinstitute.gpp.poolq3.reference.{ExactReference, Reference}
import org.broadinstitute.gpp.poolq3.reports.{
BarcodeCountsWriter,
CorrelationFileWriter,
CountsWriter,
LogNormalizedCountsWriter,
QualityWriter,
RunInfoWriter,
UmiQualityWriter,
UnexpectedSequenceWriter
}
import org.broadinstitute.gpp.poolq3.types.{
BarcodeCountsFileType,
ConditionBarcodeCountsSummaryFileType,
CountsFileType,
LogNormalizedCountsFileType,
OutputFileType,
PoolQRunSummary,
PoolQSummary,
QualityFileType,
RunInfoFileType,
UnexpectedSequencesFileType
}
import org.broadinstitute.gpp.poolq3.reports.{BarcodeCountsWriter, CorrelationFileWriter, CountsWriter, LogNormalizedCountsWriter, QualityWriter, RunInfoWriter, UmiQualityWriter, UnexpectedSequenceWriter}
import org.broadinstitute.gpp.poolq3.types.{BarcodeCountsFileType, ConditionBarcodeCountsSummaryFileType, CountsFileType, LogNormalizedCountsFileType, OutputFileType, PoolQRunSummary, PoolQSummary, QualityFileType, RunInfoFileType, UnexpectedSequencesFileType}
import org.log4s.{Logger, getLogger}

object PoolQ:

private[this] val log: Logger = getLogger
private val log: Logger = getLogger

private[this] val AlwaysWrittenFiles: Set[OutputFileType] =
private val AlwaysWrittenFiles: Set[OutputFileType] =
Set(
CountsFileType,
QualityFileType,
Expand Down Expand Up @@ -238,11 +212,11 @@ object PoolQ:
}

private[poolq3] def makeRowBarcodePolicy(
rowReferenceData: ReferenceData,
rowBarcodePolicyStr: String,
reverseRowBarcodePolicyStr: Option[String],
reverseRowReads: Option[(Option[String], Path)],
skipShortReads: Boolean
rowReferenceData: ReferenceData,
rowBarcodePolicyStr: String,
reverseRowBarcodePolicyStr: Option[String],
reverseRowReads: Option[(Option[String], Path)],
skipShortReads: Boolean
): (BarcodePolicy, Option[BarcodePolicy], Int) =
(reverseRowBarcodePolicyStr, reverseRowReads)
.mapN { (revPolicy, _) =>
Expand All @@ -256,11 +230,11 @@ object PoolQ:
(rowBarcodePolicy, None, rowBarcodePolicy.length)
}

private[this] def logCli(config: PoolQConfig): Unit =
private def logCli(config: PoolQConfig): Unit =
val logStr =
synthesizeArgs(config)
.map {
case (param, "") => s"--$param"
case (param, "") => s"--$param"
case (param, arg) => s"--$param $arg"
}
.mkString(" \\\n")
Expand Down
Loading

0 comments on commit 1afbf72

Please sign in to comment.