Skip to content

Commit

Permalink
Bumped toolkit and dependency versions and resolved resulting issues. (
Browse files Browse the repository at this point in the history
…#30)

* Bumped toolkit and dependency versions and resolved resulting issues
  • Loading branch information
tfenne authored Oct 6, 2023
1 parent 6ea1c2c commit 204a5ee
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 39 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ target
.bloop
.metals
.vscode
.bsp
42 changes: 17 additions & 25 deletions build.sc
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
import java.text.SimpleDateFormat
import java.util.Date

import mill._
import mill.scalalib._
import mill.scalalib.publish.{Developer, License, PomSettings, SCM}
import mill.scalalib.publish._
import java.util.jar.Attributes.Name.{IMPLEMENTATION_VERSION => ImplementationVersion}

import ammonite.ops._
import coursier.maven.MavenRepository

import scala.sys.process.Process
Expand All @@ -15,23 +11,23 @@ import scala.util.{Failure, Success, Try}
/** Base trait for build modules. */
trait CommonModule extends SbtModule {
def deployLocal(assembly: PathRef, jarName:String) = {
mkdir(pwd / 'jars)
os.makeDir.all(os.pwd / Symbol("jars"))
println(s"Copying artifact ${assembly.path} to jars / $jarName")
cp.over(assembly.path, pwd / 'jars / jarName)
os.copy(assembly.path, os.pwd / Symbol("jars") / jarName, replaceExisting = true)
}

override def repositories: Seq[coursier.Repository] = super.repositories ++ Seq(
MavenRepository("https://oss.sonatype.org/content/repositories/public"),
MavenRepository("https://oss.sonatype.org/content/repositories/snapshots"),
MavenRepository("https://jcenter.bintray.com/"),
MavenRepository("https://artifactory.broadinstitute.org/artifactory/libs-snapshot/")
MavenRepository("https://broadinstitute.jfrog.io/artifactory/libs-snapshot/")
)
}

/** A base trait for versioning modules. */
trait ReleaseModule extends JavaModule {
/** Execute Git arguments and return the standard output. */
private def git(args: String*): String = %%("git", args)(pwd).out.string.trim
private def git(args: String*): String = os.proc("git", args).call().out.text().trim

/** Get the commit hash at the HEAD of this branch. */
private def gitHead: String = git("rev-parse", "HEAD")
Expand Down Expand Up @@ -73,21 +69,18 @@ trait ReleaseModule extends JavaModule {


object tools extends CommonModule with PublishModule with ReleaseModule {
def scalaVersion = "2.13.3"
def millSourcePath = super.millSourcePath / ammonite.ops.up
def mainClass = Some("com.fulcrumgenomics.sv.cmdline.SvMain")
def artifactName = "fgsv"
def scalaVersion = "2.13.8"
override def millSourcePath = super.millSourcePath / os.up
override def mainClass = Some("com.fulcrumgenomics.sv.cmdline.SvMain")
override def artifactName = "fgsv"
def gitHash = Process("git rev-parse --short HEAD").lineStream.head
def publishVersion = s"0.0.4-${gitHash}-SNAPSHOT"
def publishVersion = s"0.1.0-${gitHash}-SNAPSHOT"
def pomSettings = PomSettings(
description = artifactName(),
organization = "com.fulcrumgenomics",
url = "https://github.com/fulcrumgenomics/fgsv",
licenses = Seq(License("MIT License", "http://www.fulcrumgenomics.com")),
scm = SCM(
"git://github.com:fulcrumgenomics/fgsv.git",
"scm:git://github.com:fulcrumgenomics/fgsv.git"
),
licenses = Seq(License.MIT),
versionControl = VersionControl.github("fulcrumgenomics","fgsv"),
developers = Seq(
Developer("tfenne", "Tim Fennell", "https://github.com/tfenne"),
Developer("nh13", "Nils Homer", "https://github.com/nh13"),
Expand All @@ -101,23 +94,22 @@ object tools extends CommonModule with PublishModule with ReleaseModule {
"com.google.cloud.genomics"
)

def ivyDeps = Agg(
override def ivyDeps = Agg(
ivy"org.scala-lang:scala-compiler:${scalaVersion()}",
ivy"com.fulcrumgenomics:fgbio_2.13:1.5.0".excludeOrg(orgsToExclude:_*),
ivy"org.xerial.snappy:snappy-java:1.1.8.4"
ivy"com.fulcrumgenomics:fgbio_2.13:2.1.0".excludeOrg(orgsToExclude:_*)
)

object test extends Tests {
def ivyDeps = Agg(ivy"org.scalatest::scalatest:3.1.0")
def testFramework = "org.scalatest.tools.Framework"
override def ivyDeps = Agg(ivy"org.scalatest::scalatest:3.1.0")
override def testFramework = "org.scalatest.tools.Framework"

// run mill tools.test.singleTest com.fulcrumgenomics.sv.x.y.x.TestClassName
def singleTest(args: String*) = T.command {
super.runMain("org.scalatest.run", args: _*)
}
}

def javacOptions = Seq("-source", "1.8", "-target", "1.8")
override def javacOptions = Seq("-source", "1.8", "-target", "1.8")

def deployLocal = T { super.deployLocal(assembly(), "fgsv.jar") }
}
4 changes: 2 additions & 2 deletions docs/tools/AggregateSvPileup.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ pileups in the cluster.

## Arguments

|Name|Flag|Type|Description|Required?|Max Values|Default Value(s)|
|----|----|----|-----------|---------|----------|----------------|
|Name|Flag|Type|Description|Required?|Max # of Values|Default Value(s)|
|----|----|----|-----------|---------|---------------|----------------|
|input|i|FilePath|Input text file of pileups generated by SvPileup|Required|1||
|bam|b|PathToBam|Bam file for allele frequency analysis. Must be coordinate sorted version of the file that was input to SvPileup.|Optional|1||
|flank|f|Int|If BAM file is provided: distance upstream and downstream of aggregated breakpoint regions to search for mapped templates that overlap breakends. These are the templates that will be partitioned into those supporting the breakpoint vs. reading through it for the allele frequency calculation. Recommended to use at least the max read pair inner distance used by SvPileup.|Optional|1|1000|
Expand Down
4 changes: 2 additions & 2 deletions docs/tools/FilterAndMerge.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Filters and merges SVPileup output.

## Arguments

|Name|Flag|Type|Description|Required?|Max Values|Default Value(s)|
|----|----|----|-----------|---------|----------|----------------|
|Name|Flag|Type|Description|Required?|Max # of Values|Default Value(s)|
|----|----|----|-----------|---------|---------------|----------------|
|input|i|FilePath|The input pileup file from SvPileup|Required|1||
|output|o|FilePath|The output filtered and merged SvPileup file|Required|1||
|dict|d|PathToSequenceDictionary|The path to the reference sequence dictionary.|Required|1||
Expand Down
8 changes: 4 additions & 4 deletions docs/tools/SvPileup.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The `be` SAM tag contains a comma-delimited list of breakpoints to which a given
semi-colon delimited, with four fields:

1. The unique breakpoint identifier (same identifier found in the tab-delimited output).
2. Either "left" or "right, corresponding to whether the read shows evidence of the genomic left or right side of
2. Either "left" or "right, corresponding to whether the read shows evidence of the genomic left or right side of
the breakpoint as found in the breakpoint file (i.e. `left_pos` or `right_pos`).
3. Either "from" or "into", such that when traversing the breakpoint would read through "from" and then into
"into" in the sequencing order of the read pair. For a split-read alignment, the "from" contains the aligned
Expand All @@ -36,7 +36,7 @@ As described in the Algorithm Overview below, split-read evidence is favored ove
Therefore, if the template (alignments for a read pair) contain both types of evidence, then the `be` tag
will only be added to the split-read alignments (i.e. the primary and supplementary alignments of the read
in the pair that has split-read evidence), and will not be found in the mate's alignment.

## Example output

The following shows two breakpoints:
Expand Down Expand Up @@ -79,8 +79,8 @@ Split read evidence will be returned in favor of across-read-pair evidence when

## Arguments

|Name|Flag|Type|Description|Required?|Max Values|Default Value(s)|
|----|----|----|-----------|---------|----------|----------------|
|Name|Flag|Type|Description|Required?|Max # of Values|Default Value(s)|
|----|----|----|-----------|---------|---------------|----------------|
|input|i|PathToBam|The input query sorted or grouped BAM|Required|1||
|output|o|PathPrefix|The output path prefix|Required|1||
|max-read-pair-inner-distance|d|Int|The maximum _inner_ distance for normal read pair|Optional|1|1000|
Expand Down
3 changes: 1 addition & 2 deletions docs/tools/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ title: fgsv tools

# fgsv tools

The following tools are available in fgsv version 0.0.3-3f469cb.

The following tools are available in fgsv version 0.1.0-fd73568.
## All tools

All tools.
Expand Down
2 changes: 1 addition & 1 deletion mill
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This is a wrapper script, that automatically download mill from GitHub release pages
# You can give the required mill version with MILL_VERSION env variable
# If no version is given, it falls back to the value of DEFAULT_MILL_VERSION
DEFAULT_MILL_VERSION=0.9.12
DEFAULT_MILL_VERSION=0.10.4

set -e

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class FgSvMetricsDoclet extends FgMetricsDoclet {
}

/** Locates the metrics documentation templates and turns them into simple case classes with comments as markdown. */
private lazy val metrics: Seq[MetricDescription] = {
override protected lazy val metrics: Seq[MetricDescription] = {
def simplify(name: String) = if (name.indexOf('.') > 0) name.substring(name.lastIndexOf('.') + 1) else name

findMetricsClasses.map{ template =>
Expand Down Expand Up @@ -89,7 +89,7 @@ class FgSvMetricsDoclet extends FgMetricsDoclet {
}

/** Take the body of a scaladoc comment and renders it into MarkDown. */
private def renderBody(body: Body): String = {
override protected def renderBody(body: Body): String = {
val buffer = new StringBuilder

// Takes a block element and renders it into MarkDown and writes it into the buffer
Expand Down Expand Up @@ -125,6 +125,6 @@ class FgSvMetricsDoclet extends FgMetricsDoclet {
}

/** Turns the text from a heading into the text to use as a link target. */
private def toLinkTarget(heading: String): String = heading.toLowerCase.replace(' ', '-')
override protected def toLinkTarget(heading: String): String = heading.toLowerCase.replace(' ', '-')
}

0 comments on commit 204a5ee

Please sign in to comment.