Skip to content

Commit

Permalink
Merge pull request #229 from TheJacksonLaboratory/release_v1.0.3
Browse files Browse the repository at this point in the history
Release v1.0.3
  • Loading branch information
ielis authored Apr 12, 2023
2 parents 7ef15f5 + a9560af commit d190644
Show file tree
Hide file tree
Showing 35 changed files with 473 additions and 385 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,20 @@ on:
jobs:
build:
runs-on: ${{ matrix.os }}
env:
JDK_VERSION: ${{ matrix.jdk }}

strategy:
fail-fast: false
matrix:
os: [ windows-latest, macOS-latest, ubuntu-latest ]
jdk: [ 11 ]

steps:
- uses: actions/checkout@v2

- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: '11'
java-version: '17'
distribution: 'adopt'

- name: Build with Maven
run: ./mvnw -B verify --file pom.xml
run: ./mvnw --batch-mode verify
7 changes: 6 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ Changelog
=========

------
latest
v1.0.3
------
- ``SvAnna``
- update dependency versions.
- ``svanna-cli``
- Add support for *v1* and *v2* phenopacket in JSON, YAML, or protobuf binary formats.
- Rework the logging functionality to log all output to standard error output and to allow setting the logging granularity via ``-v`` CLI option.

------
v1.0.2
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
# The short X.Y version.
version = u'1.0'
# The full version, including alpha/beta/rc tags.
release = u'1.0.2'
release = u'1.0.3'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
5 changes: 3 additions & 2 deletions docs/running.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ Analysis input
##############

The input data can be specified in two ways: either as a path to a VCF file along with one or more HPO terms,
or as a *Phenopacket*:
or as a *phenopacket*:

* ``-p | --phenopacket`` - path to Phenopacket in JSON format.
* ``-p | --phenopacket`` - path to a phenopacket file. We support *v1* and *v2* schemas and the file can be in JSON, YAML, or protobuf binary format.
* ``-t | --phenotype-term`` - HPO term describing clinical condition of the proband, may be specified multiple times (e.g. ``--term HP:1234567 --term HP:9876543``).
* ``--vcf`` - path to the input VCF file.

Expand Down Expand Up @@ -84,6 +84,7 @@ SvAnna configuration
* ``--promoter-length`` - number of bases pre-pended to a transcript and evaluated as a promoter region (default: ``2000``).
* ``--promoter-fitness-gain`` - set to ``0.`` to score the promoter variants as strictly as coding variants
or to ``1.`` to completely disregard the promoter variants (default: ``0.6``).
* ``-v`` - set logging output granularity. The option can be set multiple times (e.g. ``-vv``) to increase logging output.

See the next section to learn more about the SvAnna :ref:`rstoutputformats`,
and the :ref:`rstexamples` section to see how SvAnna prioritizes various SV classes.
Expand Down
16 changes: 11 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
<module>svanna-benchmark</module>
</modules>
<groupId>org.monarchinitiative.svanna</groupId>
<version>1.0.2</version>
<version>1.0.3</version>
<name>SvAnna</name>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.10</version>
<version>3.0.5</version>
</parent>

<properties>
Expand All @@ -32,8 +32,9 @@
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>

<phenol.version>2.0.0-RC2</phenol.version>
<silent.genes.version>0.2.0</silent.genes.version>
<phenol.version>2.0.0</phenol.version>
<phenopacket-tools.version>1.0.0-RC2</phenopacket-tools.version>
<silent.genes.version>0.2.5</silent.genes.version>
<h2.version>1.4.200</h2.version>
</properties>

Expand Down Expand Up @@ -101,6 +102,11 @@
<artifactId>silent-genes-io</artifactId>
<version>${silent.genes.version}</version>
</dependency>
<dependency>
<groupId>org.phenopackets.phenopackettools</groupId>
<artifactId>phenopacket-tools-io</artifactId>
<version>${phenopacket-tools.version}</version>
</dependency>

<dependency>
<groupId>org.phenopackets</groupId>
Expand All @@ -125,7 +131,7 @@
<dependency>
<groupId>com.github.samtools</groupId>
<artifactId>htsjdk</artifactId>
<version>2.23.0</version>
<version>3.0.5</version>
<exclusions>
<exclusion>
<groupId>org.tukaani</groupId>
Expand Down
2 changes: 1 addition & 1 deletion svanna-benchmark/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>SvAnna</artifactId>
<groupId>org.monarchinitiative.svanna</groupId>
<version>1.0.2</version>
<version>1.0.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
44 changes: 6 additions & 38 deletions svanna-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>SvAnna</artifactId>
<groupId>org.monarchinitiative.svanna</groupId>
<version>1.0.2</version>
<version>1.0.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>svanna-cli</artifactId>
Expand All @@ -19,6 +19,10 @@
<artifactId>svanna-configuration</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>org.phenopackets.phenopackettools</groupId>
<artifactId>phenopacket-tools-io</artifactId>
</dependency>
<dependency>
<groupId>info.picocli</groupId>
<artifactId>picocli</artifactId>
Expand All @@ -27,21 +31,11 @@
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
</dependency>

<dependency>
<groupId>org.phenopackets</groupId>
<artifactId>phenopacket-schema</artifactId>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java-util</artifactId>
</dependency>

<!-- TESTS -->
<dependency>
<groupId>org.monarchinitiative.svanna</groupId>
Expand All @@ -63,33 +57,7 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-resources</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/assembly-resources</outputDirectory>
<resources>
<resource>
<directory>src/examples</directory>
<filtering>true</filtering>
<includes>
<include>example.csv</include>
<include>example.vcf</include>
<include>run_examples.sh</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
Expand Down
6 changes: 3 additions & 3 deletions svanna-cli/src/assemble/distribution.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
<include>svanna-cli-${version}.jar</include>
</includes>
</fileSet>
<!-- Include example data -->
<fileSet>
<directory>${project.build.directory}/assembly-resources</directory>
<directory>${project.basedir}/src/examples</directory>
<outputDirectory>./examples</outputDirectory>
<includes>
<include>example.vcf</include>
<include>run_examples.sh</include>
<include>**/**</include>
</includes>
</fileSet>
</fileSets>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "example",
"id": "example-phenopacket",
"subject": {
"id": "example",
"id": "Sample",
"ageAtCollection": {
"age": "P2Y"
}
Expand All @@ -12,11 +12,6 @@
"label": "Reduced von Willebrand factor activity"
}
}],
"htsFiles": [{
"uri": "file:///***/***/example.vcf",
"htsFormat": "VCF",
"genomeAssembly": "hg38"
}],
"metaData": {
"created": "2021-07-13T15:08:53.846Z",
"createdBy": "ExampleOrg:ExampleCurator",
Expand Down
30 changes: 30 additions & 0 deletions svanna-cli/src/examples/example-phenopacket.v2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"id": "example-phenopacket",
"subject": {
"id": "Sample",
"timeAtLastEncounter": {
"age": {
"iso8601duration": "P2Y"
}
}
},
"phenotypicFeatures": [{
"type": {
"id": "HP:0008330",
"label": "Reduced von Willebrand factor activity"
}
}],
"metaData": {
"created": "2021-07-13T15:08:53.846Z",
"createdBy": "ExampleOrg:ExampleCurator",
"resources": [{
"id": "hp",
"name": "human phenotype ontology",
"url": "http://purl.obolibrary.org/obo/hp.owl",
"version": "unknown HPO version",
"namespacePrefix": "HP",
"iriPrefix": "http://purl.obolibrary.org/obo/HP_"
}],
"phenopacketSchemaVersion": "2.0.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
footer = Main.FOOTER)
public class Main implements Callable<Integer> {

public static final String VERSION = "svanna-cli v1.0.2";
public static final String VERSION = "svanna-cli v1.0.3";

public static final int WIDTH = 120;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package org.monarchinitiative.svanna.cli.cmd;

import org.monarchinitiative.phenol.ontology.data.TermId;

import java.nio.file.Path;
import java.util.List;
import java.util.Objects;

/**
* SvAnna requires these inputs for the analysis.
*/
class AnalysisData {

private final List<TermId> phenotypeTerms;
private final Path vcf;

AnalysisData(List<TermId> phenotypeTerms, Path vcf) {
this.phenotypeTerms = phenotypeTerms;
this.vcf = vcf;
}

List<TermId> phenotypeTerms() {
return phenotypeTerms;
}

Path vcf() {
return vcf;
}

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
AnalysisData that = (AnalysisData) o;
return Objects.equals(phenotypeTerms, that.phenotypeTerms) && Objects.equals(vcf, that.vcf);
}

@Override
public int hashCode() {
return Objects.hash(phenotypeTerms, vcf);
}

@Override
public String toString() {
return "AnalysisData{" +
"phenotypeTerms=" + phenotypeTerms +
", vcf=" + vcf +
'}';
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package org.monarchinitiative.svanna.cli.cmd;

import org.monarchinitiative.svanna.core.SvAnnaRuntimeException;

/**
* An exception thrown if inputs for the analysis are incomplete or otherwise invalid.
*/
class AnalysisInputException extends SvAnnaRuntimeException {
AnalysisInputException() {
super();
}

AnalysisInputException(String message) {
super(message);
}

AnalysisInputException(String message, Throwable cause) {
super(message, cause);
}

AnalysisInputException(Throwable cause) {
super(cause);
}

AnalysisInputException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
super(message, cause, enableSuppression, writableStackTrace);
}
}
Loading

0 comments on commit d190644

Please sign in to comment.