[med-svn] [Git][med-team/snpeff][master] 19 commits: Deleting pom.xml patch, using d/maven.rules and d/maven.ignoreRules instead
Pierre Gruet
gitlab at salsa.debian.org
Thu Dec 10 22:47:57 GMT 2020
Pierre Gruet pushed to branch master at Debian Med / snpeff
Commits:
c815b412 by Pierre Gruet at 2020-12-04T17:06:49+01:00
Deleting pom.xml patch, using d/maven.rules and d/maven.ignoreRules instead
- - - - -
b98871be by Pierre Gruet at 2020-12-04T17:07:47+01:00
Attempting to git rid of akka using java.util.concurrent
- - - - -
cb1c0e77 by Pierre Gruet at 2020-12-04T17:08:46+01:00
Switching to biojava4
- - - - -
c753fcad by Pierre Gruet at 2020-12-04T17:09:19+01:00
Taking samtools in libhtsjdk-java
- - - - -
e576b574 by Pierre Gruet at 2020-12-04T17:10:07+01:00
Adding scala as a dependency in the pom
- - - - -
dcf7f6da by Pierre Gruet at 2020-12-04T17:11:08+01:00
Updating build-dependencies
- - - - -
e8d6c062 by Pierre Gruet at 2020-12-04T17:11:34+01:00
export LC_ALL=C.UTF-8
- - - - -
7b981b72 by Pierre Gruet at 2020-12-04T17:12:17+01:00
debhelper-compat 13
- - - - -
240cf46f by Pierre Gruet at 2020-12-04T17:12:41+01:00
Standards version 4.5.1
- - - - -
5e5ade1a by Pierre Gruet at 2020-12-04T17:15:01+01:00
Removing binary package snpsift, of which source is not in this package
- - - - -
fe681da2 by Pierre Gruet at 2020-12-08T21:43:12+01:00
Reordering binary packages to put Maven stuff in the first one
- - - - -
0f8c0f43 by Pierre Gruet at 2020-12-08T21:43:33+01:00
Having the unit tests run
- - - - -
678aa07c by Pierre Gruet at 2020-12-08T21:43:56+01:00
Adding a manifest for the main class and the classpath of the jar
- - - - -
e2e4ae63 by Pierre Gruet at 2020-12-08T21:46:23+01:00
Drop d/maven.cleanIgnoreRules and d/maven.publishedRules which do nothing
- - - - -
531438da by Pierre Gruet at 2020-12-09T21:19:25+01:00
Cleaning maven files in debian/
- - - - -
70555d6e by Pierre Gruet at 2020-12-09T23:00:15+01:00
Deleting rules linked to snpeff itself in d/maven.rules
- - - - -
301b16b7 by Pierre Gruet at 2020-12-10T07:43:39+01:00
Changing the section of the package to java
- - - - -
94094d57 by Pierre Gruet at 2020-12-10T23:47:11+01:00
Having the complete version number in pom and in the name of the jar
- - - - -
0772e188 by Pierre Gruet at 2020-12-10T23:47:30+01:00
Update todo in d/changelog
- - - - -
19 changed files:
- debian/changelog
- debian/control
- + debian/libsnpeff-java.manifest
- debian/libsnpeff-java.poms
- − debian/maven.cleanIgnoreRules
- debian/maven.ignoreRules
- − debian/maven.properties
- − debian/maven.publishedRules
- debian/maven.rules
- + debian/patches/adapting_to_htsjdk.patch
- + debian/patches/adding_scala_in_pom.patch
- + debian/patches/depending_on_biojava4.patch
- + debian/patches/fix_tests.patch
- − debian/patches/pom_xml.patch
- + debian/patches/prepare_to_put_package_version_in_pom.xml
- + debian/patches/replacing_akka_with_java_util_concurrent.patch
- debian/patches/series
- debian/rules
- − debian/snpeff.poms
Changes:
=====================================
debian/changelog
=====================================
@@ -1,14 +1,11 @@
-snpeff (4.3t+dfsg-1) UNRELEASED; urgency=low
+snpeff (4.3t+dfsg-1) UNRELEASED; urgency=medium
* Initial release (Closes: #<bug>)
TODO:
- apfloat 1.6.3:
- https://github.com/mtommila/apfloat
- http://www.apfloat.org/apfloat_java/maven.html
- charts4j 1.3:
- https://mvnrepository.com/artifact/com.googlecode.charts4j/charts4j/1.3
- com.typesafe.akka:akka-actor 2.0.1
- distlib 0.9.1:
- https://sourceforge.net/projects/statdistlib/?source=navbar
+ - replace name of the jar SnpEff.jar to snpeff.jar (Java policy)
+ - fill in debian/copyright, maybe remove the html/ folder.
+ - complete the binary package snpeff, add manpage, ...
+ - check my patch replacing akka with java.util.concurrent.
+ - snpsift is to package elsewhere on its own.
- -- Andreas Tille <tille at debian.org> Wed, 22 Apr 2020 15:04:51 +0200
+ -- Pierre Gruet <pgtdebian at free.fr> Thu, 10 Dec 2020 22:40:03 +0100
=====================================
debian/control
=====================================
@@ -1,15 +1,15 @@
Source: snpeff
Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
Uploaders: Andreas Tille <tille at debian.org>
-Section: science
+Section: java
Priority: optional
-Build-Depends: debhelper-compat (= 12),
+Build-Depends: debhelper-compat (= 13),
javahelper,
default-jdk,
default-jdk-doc,
maven-debian-helper,
libmaven-assembly-plugin-java,
- libtrove-java,
+ libtrove3-java,
liblog4j1.2-java,
libhtsjdk-java,
libbiojava4-java,
@@ -18,7 +18,6 @@ Build-Depends: debhelper-compat (= 12),
libcommons-io-java,
libcommons-cli-java,
libcommons-math3-java,
- libcommons-cli-java-doc,
libfreemarker-java,
libmaven-javadoc-plugin-java,
junit4-doc,
@@ -27,18 +26,26 @@ Build-Depends: debhelper-compat (= 12),
libcommons-math3-java-doc,
libfreemarker-java-doc,
liblog4j1.2-java-doc,
- libtrove-java-doc
-Standards-Version: 4.5.0
+ libhtsjdk-java-doc,
+ libbiojava4-java-doc,
+ libtrove3-java-doc,
+ libcharts4j-java,
+ libapfloat-java,
+ libdistlib-java,
+ scala-library
+Standards-Version: 4.5.1
Vcs-Browser: https://salsa.debian.org/med-team/snpeff
Vcs-Git: https://salsa.debian.org/med-team/snpeff.git
Homepage: http://snpeff.sourceforge.net/
Rules-Requires-Root: no
-Package: snpeff
+Package: libsnpeff-java
Architecture: all
-Depends: ${java:Depends},
- ${misc:Depends}
-Description: genetic variant annotation and effect prediction toolbox
+Depends: ${misc:Depends},
+ ${maven:Depends}
+Suggests: ${maven:OptionalDepends},
+ libsnpeff-java-doc
+Description: genetic variant annotation and effect prediction toolbox - lib
SnpEff is a variant annotation and effect prediction tool. It annotates
and predicts the effects of variants on genes (such as amino acid
changes).
@@ -51,15 +58,29 @@ Description: genetic variant annotation and effect prediction toolbox
calculates the effects they produce on known genes (e.g. amino acid
changes). A list of effects and annotations that SnpEff can calculate
can be found here.
+ .
+ This package contains the library.
-Package: libsnpeff-java
+Package: snpeff
Architecture: all
-Depends: ${misc:Depends},
- ${maven:Depends}
-Suggests: ${maven:OptionalDepends},
- libsnpeff-java-doc
-Description: Snp Effect
- Variant annotation and effect prediction package.
+Depends: ${java:Depends},
+ ${misc:Depends},
+ libsnpeff-java (= ${binary:Version})
+Description: genetic variant annotation and effect prediction toolbox - tool
+ SnpEff is a variant annotation and effect prediction tool. It annotates
+ and predicts the effects of variants on genes (such as amino acid
+ changes).
+ .
+ The inputs are predicted variants (SNPs, insertions, deletions and
+ MNPs). The input file is usually obtained as a result of a sequencing
+ experiment, and it is usually in variant call format (VCF).
+ .
+ SnpEff analyzes the input variants. It annotates the variants and
+ calculates the effects they produce on known genes (e.g. amino acid
+ changes). A list of effects and annotations that SnpEff can calculate
+ can be found here.
+ .
+ This package contains the command line tool.
Package: libsnpeff-java-doc
Architecture: all
@@ -72,14 +93,3 @@ Description: Documentation for Snp Effect
Variant annotation and effect prediction package.
.
This package contains the API documentation of libsnpeff-java.
-
-Package: snpsift
-Architecture: all
-Depends: ${java:Depends},
- ${misc:Depends}
-Description: annotates genomic variants using databases
- SnpSift annotates genomic variants using databases, filters, and
- manipulates genomic annotated variants. Once you annotated your files
- using SnpEff, you can use SnpSift to help you filter large genomic
- datasets in order to find the most significant variants for your
- experiment.
=====================================
debian/libsnpeff-java.manifest
=====================================
@@ -0,0 +1,3 @@
+/usr/share/java/SnpEff.jar:
+ Class-Path: /usr/share/java/apfloat.jar /usr/share/java/charts4j.jar /usr/share/java/commons-cli.jar /usr/share/java/trove4j.jar /usr/share/java/freemarker.jar /usr/share/java/distlib.jar /usr/share/java/htsjdk.jar /usr/share/java/commons-math3.jar /usr/share/java/commons-io.jar /usr/share/java/commons-codec.jar /usr/share/java/log4j-1.2.jar /usr/share/java/biojava4-core.jar /usr/share/java/biojava4-structure.jar /usr/share/java/scala-library.jar
+ Main-Class: org.snpeff.SnpEff
=====================================
debian/libsnpeff-java.poms
=====================================
@@ -25,4 +25,4 @@
# --site-xml=<location>: Optional, the location for site.xml if it needs to be installed.
# Empty by default. [mh_install]
#
-pom.xml --has-package-version
+pom.xml
=====================================
debian/maven.cleanIgnoreRules deleted
=====================================
@@ -1 +0,0 @@
-
=====================================
debian/maven.ignoreRules
=====================================
@@ -1,10 +1,2 @@
-com.googlecode.charts4j charts4j * * * *
com.typesafe.akka akka-actor * * * *
-distlib distlib * * * *
-org.apache.maven.plugins maven-assembly-plugin * * * *
-org.apache.maven.plugins maven-javadoc-plugin * * * *
-org.apfloat apfloat * * * *
-org.biojava biojava3-core * * * *
-org.biojava biojava3-structure * * * *
-samtools samtools * * * *
=====================================
debian/maven.properties deleted
=====================================
@@ -1,5 +0,0 @@
-# Include here properties to pass to Maven during the build.
-# For example:
-# maven.test.skip=true
-# project.build.sourceEncoding=UTF-8
-
=====================================
debian/maven.publishedRules deleted
=====================================
@@ -1,2 +0,0 @@
-
-org.snpeff SnpEff jar s/.*/debian/ * *
=====================================
debian/maven.rules
=====================================
@@ -1,6 +1,15 @@
junit junit jar s/4\..*/4.x/ * *
-org.snpeff SnpEff jar * * *
-org.snpeff SnpEff jar s/.*/debian/ * *
log4j log4j * s/1\.2\..*/1.2.x/ * *
-net.sf.trove4j trove4j * s/.*/2.x/ * *
+net.sf.trove4j trove4j * s/.*/debian/ * *
+org.apfloat apfloat jar s/.*/debian/ * *
+distlib distlib jar s/.*/debian/ * *
+com.googlecode.charts4j charts4j jar s/.*/debian/ * *
+commons-cli commons-cli jar s/.*/debian/ * *
+junit junit jar s/4\..*/4.x/ * *
+org.freemarker freemarker jar s/.*/debian/ * *
+org.apache.commons commons-math3 jar s/.*/debian/ * *
+commons-io commons-io jar s/.*/debian/ * *
+commons-codec commons-codec jar s/.*/debian/ * *
+s/samtools/com.github.samtools/ s/samtools/htsjdk/ jar s/.*/debian/ * *
+org.scala-lang scala-library jar s/2\..*/2.11.x/ * *
=====================================
debian/patches/adapting_to_htsjdk.patch
=====================================
@@ -0,0 +1,156 @@
+Description: adapting the program to use samtools from htsjdk
+ Imports in Java headers have to be changed.
+ SAMFileReader has to be changed to SamReader.
+Author: Pierre Gruet <pgtdebian at free.fr>
+Origin: htsjdk-api.patch of Sascha Steinbiss for fastqc
+Forwarded: not-needed
+Last-Update: 2020-12-04
+
+--- a/src/main/java/org/snpeff/coverage/CountReads.java
++++ b/src/main/java/org/snpeff/coverage/CountReads.java
+@@ -1,6 +1,7 @@
+ package org.snpeff.coverage;
+
+ import java.io.File;
++import java.io.IOException;
+ import java.util.ArrayList;
+ import java.util.Collection;
+ import java.util.HashSet;
+@@ -22,9 +23,12 @@
+ import org.snpeff.util.Timer;
+ import org.snpeff.vcf.VcfEntry;
+
+-import net.sf.samtools.SAMFileReader;
+-import net.sf.samtools.SAMFileReader.ValidationStringency;
+-import net.sf.samtools.SAMRecord;
++import htsjdk.samtools.SamInputResource;
++import htsjdk.samtools.SamReader;
++import htsjdk.samtools.SamReaderFactory;
++import htsjdk.samtools.ValidationStringency;
++import htsjdk.samtools.SAMRecord;
++import htsjdk.samtools.util.RuntimeIOException;
+
+ /**
+ * Count how many reads map (from many SAM/BAM files) onto markers
+@@ -197,35 +201,40 @@
+ * Count all markers from a SAM/BAM file
+ */
+ void countSamFile(String fileName) {
+- // Open file
+- int readNum = 1;
+- SAMFileReader sam = new SAMFileReader(new File(fileName));
+- sam.setValidationStringency(ValidationStringency.SILENT);
+-
+- for (SAMRecord samRecord : sam) {
+- try {
+- if (!samRecord.getReadUnmappedFlag()) { // Mapped?
+- Chromosome chr = genome.getOrCreateChromosome(samRecord.getReferenceName());
+- if (chr != null) {
+- // Create a marker from read
+- Marker read = new Marker(chr, samRecord.getAlignmentStart(), samRecord.getAlignmentEnd(), false, "");
+- readLengthCount++;
+- readLengthSum += read.size();
+-
+- countMarker(fileName, read);
+- }
+- }
+-
+- if (verbose) Gpr.showMark(readNum, SHOW_EVERY);
+- readNum++;
+- } catch (Exception e) {
+- countExceptions++;
+- if (countExceptions < 10) e.printStackTrace();
+- else if (countExceptions == 10) System.err.println("Not showing more exceptions!");
+- }
+-
+- }
+- sam.close();
++ try {
++ // Open file
++ int readNum = 1;
++ SamInputResource sir = SamInputResource.of(new File(fileName));
++ SamReaderFactory srf = SamReaderFactory.makeDefault().validationStringency(ValidationStringency.SILENT);
++ SamReader sam = srf.open(sir);
++
++ for (SAMRecord samRecord : sam) {
++ try {
++ if (!samRecord.getReadUnmappedFlag()) { // Mapped?
++ Chromosome chr = genome.getOrCreateChromosome(samRecord.getReferenceName());
++ if (chr != null) {
++ // Create a marker from read
++ Marker read = new Marker(chr, samRecord.getAlignmentStart(), samRecord.getAlignmentEnd(), false, "");
++ readLengthCount++;
++ readLengthSum += read.size();
++
++ countMarker(fileName, read);
++ }
++ }
++
++ if (verbose) Gpr.showMark(readNum, SHOW_EVERY);
++ readNum++;
++ } catch (Exception e) {
++ countExceptions++;
++ if (countExceptions < 10) e.printStackTrace();
++ else if (countExceptions == 10) System.err.println("Not showing more exceptions!");
++ }
++
++ }
++ sam.close();
++ } catch (final IOException e) {
++ throw new RuntimeIOException(e);
++ }
+ }
+
+ /**
+--- a/src/main/java/org/snpeff/snpEffect/commandLine/SnpEffCmdCount.java
++++ b/src/main/java/org/snpeff/snpEffect/commandLine/SnpEffCmdCount.java
+@@ -11,9 +11,11 @@
+ import org.snpeff.util.Gpr;
+ import org.snpeff.util.Timer;
+
+-import net.sf.samtools.AbstractBAMFileIndex;
+-import net.sf.samtools.BAMIndexMetaData;
+-import net.sf.samtools.SAMFileReader;
++import htsjdk.samtools.AbstractBAMFileIndex;
++import htsjdk.samtools.BAMIndexMetaData;
++import htsjdk.samtools.SamInputResource;
++import htsjdk.samtools.SamReader;
++import htsjdk.samtools.SamReaderFactory;
+
+ /**
+ * Count reads from a BAM file given a list of intervals
+@@ -42,8 +44,10 @@
+ int countTotalReads(String samFileName) {
+ try {
+ if (verbose) Timer.showStdErr("Counting reads on file: " + samFileName);
+- SAMFileReader samReader = new SAMFileReader(new File(samFileName));
+- AbstractBAMFileIndex index = (AbstractBAMFileIndex) samReader.getIndex();
++ SamInputResource sir = SamInputResource.of(new File(samFileName));
++ SamReaderFactory srf = SamReaderFactory.makeDefault();
++ SamReader samReader = srf.open(sir);
++ AbstractBAMFileIndex index = (AbstractBAMFileIndex) samReader.indexing().getIndex();
+ int count = 0;
+ for (int i = 0; i < index.getNumberOfReferences(); i++) {
+ BAMIndexMetaData meta = index.getMetaData(i);
+--- a/src/main/java/org/snpeff/snpEffect/commandLine/SnpEffCmdPdb.java
++++ b/src/main/java/org/snpeff/snpEffect/commandLine/SnpEffCmdPdb.java
+@@ -35,7 +35,7 @@
+ import org.snpeff.util.Gpr;
+ import org.snpeff.util.Timer;
+
+-import net.sf.samtools.util.RuntimeEOFException;
++import htsjdk.samtools.util.RuntimeEOFException;
+
+ /**
+ * PDB distance analysis
+--- a/src/main/java/net/sf/samtools/tabix/TabixReader.java
++++ b/src/main/java/net/sf/samtools/tabix/TabixReader.java
+@@ -41,7 +41,7 @@
+ import org.snpeff.interval.Variant;
+ import org.snpeff.util.Gpr;
+
+-import net.sf.samtools.util.BlockCompressedInputStream;
++import htsjdk.samtools.util.BlockCompressedInputStream;
+
+ public class TabixReader implements Iterable<String> {
+
=====================================
debian/patches/adding_scala_in_pom.patch
=====================================
@@ -0,0 +1,19 @@
+Description: Adding the scala library as a dependency
+Author: Pierre Gruet <pgtdebian at free.fr>
+Forwarded: no
+Last-Update: 2020-12-04
+
+--- a/pom.xml
++++ b/pom.xml
+@@ -118,6 +118,11 @@
+ <scope>system</scope>
+ <systemPath>/usr/share/java/biojava4-structure.jar</systemPath>
+ </dependency>
++ <dependency>
++ <groupId>org.scala-lang</groupId>
++ <artifactId>scala-library</artifactId>
++ <version>2.11.x</version>
++ </dependency>
+ </dependencies>
+
+ <repositories>
=====================================
debian/patches/depending_on_biojava4.patch
=====================================
@@ -0,0 +1,127 @@
+Description: Adapt pom and imports to biojava4
+Author: Pierre Gruet <pgtdebian at free.fr>
+Forwarded: not-needed
+Last-Update: 2020-12-02
+
+--- a/pom.xml
++++ b/pom.xml
+@@ -106,13 +106,17 @@
+ </dependency>
+ <dependency>
+ <groupId>org.biojava</groupId>
+- <artifactId>biojava3-core</artifactId>
+- <version>3.0.7</version>
++ <artifactId>biojava4-core</artifactId>
++ <version>debian</version>
++ <scope>system</scope>
++ <systemPath>/usr/share/java/biojava4-core.jar</systemPath>
+ </dependency>
+ <dependency>
+ <groupId>org.biojava</groupId>
+- <artifactId>biojava3-structure</artifactId>
+- <version>3.0.7</version>
++ <artifactId>biojava4-structure</artifactId>
++ <version>debian</version>
++ <scope>system</scope>
++ <systemPath>/usr/share/java/biojava4-structure.jar</systemPath>
+ </dependency>
+ </dependencies>
+
+--- a/src/main/java/org/snpeff/pdb/DistanceResult.java
++++ b/src/main/java/org/snpeff/pdb/DistanceResult.java
+@@ -1,6 +1,6 @@
+ package org.snpeff.pdb;
+
+-import org.biojava.bio.structure.AminoAcid;
++import org.biojava.nbio.structure.AminoAcid;
+ import org.snpeff.interval.Chromosome;
+ import org.snpeff.interval.Transcript;
+ import org.snpeff.util.Gpr;
+--- a/src/main/java/org/snpeff/pdb/PdbFile.java
++++ b/src/main/java/org/snpeff/pdb/PdbFile.java
+@@ -4,10 +4,10 @@
+ import java.io.IOException;
+ import java.io.InputStream;
+
+-import org.biojava.bio.structure.Structure;
+-import org.biojava.bio.structure.io.FileParsingParameters;
+-import org.biojava.bio.structure.io.PDBFileParser;
+-import org.biojava3.core.util.InputStreamProvider;
++import org.biojava.nbio.structure.Structure;
++import org.biojava.nbio.structure.io.FileParsingParameters;
++import org.biojava.nbio.structure.io.PDBFileParser;
++import org.biojava.nbio.core.util.InputStreamProvider;
+
+ /**
+ * A structure that reads PDB files
+--- a/src/main/java/org/snpeff/snpEffect/commandLine/SnpEffCmdPdb.java
++++ b/src/main/java/org/snpeff/snpEffect/commandLine/SnpEffCmdPdb.java
+@@ -15,16 +15,16 @@
+ import java.util.Set;
+ import java.util.zip.GZIPOutputStream;
+
+-import org.biojava.bio.structure.AminoAcid;
+-import org.biojava.bio.structure.Atom;
+-import org.biojava.bio.structure.Calc;
+-import org.biojava.bio.structure.Chain;
+-import org.biojava.bio.structure.Compound;
+-import org.biojava.bio.structure.DBRef;
+-import org.biojava.bio.structure.Group;
+-import org.biojava.bio.structure.Structure;
+-import org.biojava.bio.structure.StructureException;
+-import org.biojava.bio.structure.io.PDBFileReader;
++import org.biojava.nbio.structure.AminoAcid;
++import org.biojava.nbio.structure.Atom;
++import org.biojava.nbio.structure.Calc;
++import org.biojava.nbio.structure.Chain;
++import org.biojava.nbio.structure.Compound;
++import org.biojava.nbio.structure.DBRef;
++import org.biojava.nbio.structure.Group;
++import org.biojava.nbio.structure.GroupType;
++import org.biojava.nbio.structure.Structure;
++import org.biojava.nbio.structure.io.PDBFileReader;
+ import org.snpeff.SnpEff;
+ import org.snpeff.interval.Gene;
+ import org.snpeff.interval.Transcript;
+@@ -171,7 +171,7 @@
+ if (debug) Gpr.debug("\tMapping OK :\t" + trId + "\terror: " + err);
+
+ int trAaLen = tr.protein().length();
+- int pdbAaLen = chain.getAtomGroups("amino").size();
++ int pdbAaLen = chain.getAtomGroups(GroupType.AMINOACID).size();
+
+ for (IdMapperEntry idm : idmapsOri) {
+ if (trId.equals(idm.trId) && pdbId.equals(idm.pdbId)) {
+@@ -261,12 +261,8 @@
+
+ for (Atom atom1 : aa1.getAtoms())
+ for (Atom atom2 : aa2.getAtoms()) {
+- try {
+- double dist = Calc.getDistance(atom1, atom2);
+- distMin = Math.min(distMin, dist);
+- } catch (StructureException e) {
+- throw new RuntimeException(e);
+- }
++ double dist = Calc.getDistance(atom1, atom2);
++ distMin = Math.min(distMin, dist);
+ }
+
+ return distMin;
+@@ -307,14 +303,14 @@
+ * I.e.: Organism matches
+ */
+ boolean filterPdbChain(Chain chain) {
+- if (chain.getHeader() == null) return false;
++ if (chain.getCompound() == null) return false;
+
+ // Try 'ORGANISM_SCINETIFIC'
+- String orgs = chain.getHeader().getOrganismScientific();
++ String orgs = chain.getCompound().getOrganismScientific();
+ if (orgs != null && orgs.indexOf(pdbOrganismScientific) >= 0) return true;
+
+ // Try 'ORGANISM_COMMON'
+- orgs = chain.getHeader().getOrganismCommon();
++ orgs = chain.getCompound().getOrganismCommon();
+ if (orgs == null) return false;
+
+ // Multiple organisms?
=====================================
debian/patches/fix_tests.patch
=====================================
@@ -0,0 +1,88 @@
+Description: bringing corrections in failing tests
+ Deactivating tests requiring files that do not exist.
+ Correcting an assertEquals to care for tiny numerical differences.
+Author: Pierre Gruet <pgtdebian at free.fr>
+Forwarded: no
+Last-Update: 2020-12-08
+
+--- a/src/main/java/org/snpeff/snpEffect/testCases/unity/TestCasesGenomicSequences.java
++++ b/src/main/java/org/snpeff/snpEffect/testCases/unity/TestCasesGenomicSequences.java
+@@ -4,6 +4,7 @@
+ import java.util.Random;
+
+ import org.junit.Assert;
++import org.junit.Ignore;
+ import org.junit.Test;
+ import org.snpeff.binseq.GenomicSequences;
+ import org.snpeff.interval.Chromosome;
+@@ -56,6 +57,7 @@
+ * Create many small chromosomes, check that they are saved in only one sequences.bin file
+ * Test that we can recover the exact sequences
+ */
++ @Ignore("relies on a file that does not exist")
+ @Test
+ public void test_01() {
+ Gpr.debug("Test");
+@@ -115,6 +117,7 @@
+ * and the large ones are saved into separate files
+ * Test that we can recover the exact sequences
+ */
++ @Ignore("relies on a file that does not exist")
+ @Test
+ public void test_02() {
+ Gpr.debug("Test");
+--- a/src/main/java/org/snpeff/snpEffect/testCases/unity/TestCasesZzz.java
++++ b/src/main/java/org/snpeff/snpEffect/testCases/unity/TestCasesZzz.java
+@@ -3,6 +3,7 @@
+ import java.util.List;
+
+ import org.junit.Assert;
++import org.junit.Ignore;
+ import org.junit.Test;
+ import org.snpeff.snpEffect.testCases.integration.TestCasesIntegrationBase;
+ import org.snpeff.util.Gpr;
+@@ -68,6 +69,7 @@
+ * at GRCh38 chr1:1232300 includes NM_016176.3:c.-562A>C and NM_016547.2:c.-562A>C.
+ *
+ */
++ @Ignore("it seems the file does not contain testHg38Chr1")
+ @Test
+ public void test_06_hgvs_upstream_negative_strand() {
+ Gpr.debug("Test");
+--- a/src/main/java/org/snpeff/snpEffect/testCases/unity/TestCasesCytoBands.java
++++ b/src/main/java/org/snpeff/snpEffect/testCases/unity/TestCasesCytoBands.java
+@@ -1,6 +1,7 @@
+ package org.snpeff.snpEffect.testCases.unity;
+
+ import org.junit.Assert;
++import org.junit.Ignore;
+ import org.junit.Test;
+ import org.snpeff.interval.Chromosome;
+ import org.snpeff.interval.CytoBands;
+@@ -22,6 +23,7 @@
+ /**
+ * Test that we can load cytobands
+ */
++ @Ignore("seems to rely on a file which does not exist")
+ @Test
+ public void test01() {
+ Gpr.debug("Test");
+@@ -39,6 +41,7 @@
+ /**
+ * Query cytobands
+ */
++ @Ignore("seems to rely on a file which does not exist")
+ @Test
+ public void test02() {
+ Gpr.debug("Test");
+--- a/src/main/java/org/snpeff/snpEffect/testCases/unity/TestCasesGenePvalueList.java
++++ b/src/main/java/org/snpeff/snpEffect/testCases/unity/TestCasesGenePvalueList.java
+@@ -134,7 +134,7 @@
+
+ // Check pvalues
+ double pvalue = gpl.score(ScoreSummary.Z_SCORES);
+- Assert.assertEquals(0.01651203260896289, pvalue);
++ Assert.assertEquals(0.01651203260896289, pvalue, 1.E-13);
+ }
+
+ /**
=====================================
debian/patches/pom_xml.patch deleted
=====================================
@@ -1,339 +0,0 @@
-Author: Andreas Tille
-FIXME: I've found this on my hard disk some time ago - no idea what I was approaching
-
---- a/pom.xml
-+++ b/pom.xml
-@@ -1,194 +1,143 @@
--<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-- <modelVersion>4.0.0</modelVersion>
-- <groupId>org.snpeff</groupId>
-- <artifactId>SnpEff</artifactId>
-- <packaging>jar</packaging>
-- <name>Snp Effect</name>
-- <description>Variant annotation and effect prediction package.</description>
-- <url>http://snpeff.sourceforge.net/</url>
-- <licenses>
-- <license>
-- <name>GNU LESSER GENERAL PUBLIC LICENSE, Version 3.0</name>
-- <url>http://www.gnu.org/licenses/lgpl-3.0.txt</url>
-- <distribution>repo</distribution>
-- </license>
-- </licenses>
-- <!--
-+<?xml version='1.0' encoding='UTF-8'?>
-+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-+ <modelVersion>4.0.0</modelVersion>
-+ <groupId>org.snpeff</groupId>
-+ <artifactId>SnpEff</artifactId>
-+ <version>4.3</version>
-+ <packaging>jar</packaging><properties>
-+
-+ <debian.hasPackageVersion/>
-+
-+ <debian.mavenRules>org.snpeff SnpEff jar s/.*/debian/ * *</debian.mavenRules>
-+
-+ <debian.originalVersion>4.3</debian.originalVersion>
-+
-+ <debian.package>libsnpeff-java</debian.package>
-+ </properties>
-+
-+ <name>Snp Effect</name>
-+ <description>Variant annotation and effect prediction package.</description>
-+ <url>http://snpeff.sourceforge.net/</url>
-+ <licenses>
-+ <license>
-+ <name>GNU LESSER GENERAL PUBLIC LICENSE, Version 3.0</name>
-+ <url>http://www.gnu.org/licenses/lgpl-3.0.txt</url>
-+ <distribution>repo</distribution>
-+ </license>
-+ </licenses>
-+ <!--
- <scm>
- <url>https://snpeff.svn.sourceforge.net/svnroot/snpeff/SnpEffect/</url>
- <connection>https://snpeff.svn.sourceforge.net/svnroot/snpeff/SnpEffect/</connection>
- </scm>
- -->
-- <developers>
-- <developer>
-- <id>pcingola</id>
-- <name>Pablo Cingolani</name>
-- <email>pcingola at users.sourceforge.net</email>
-- </developer>
-- </developers>
--
-- <dependencies>
-- <dependency>
-- <groupId>org.apfloat</groupId>
-- <artifactId>apfloat</artifactId>
-- <version>1.6.3</version>
-- </dependency>
-- <dependency>
-- <groupId>com.googlecode.charts4j</groupId>
-- <artifactId>charts4j</artifactId>
-- <version>1.3</version>
-- </dependency>
-- <dependency>
-- <groupId>commons-cli</groupId>
-- <artifactId>commons-cli</artifactId>
-- <version>1.2</version>
-- </dependency>
-- <dependency>
-- <groupId>com.typesafe.akka</groupId>
-- <artifactId>akka-actor</artifactId>
-- <version>2.0.1</version>
-- </dependency>
-- <dependency>
-- <groupId>junit</groupId>
-- <artifactId>junit</artifactId>
-- <version>4.4</version>
-- </dependency>
-- <dependency>
-- <groupId>net.sf.trove4j</groupId>
-- <artifactId>trove4j</artifactId>
-- <version>3.0.2</version>
-- </dependency>
-- <dependency>
-- <groupId>org.freemarker</groupId>
-- <artifactId>freemarker</artifactId>
-- <version>2.3.19</version>
-- </dependency>
-- <dependency>
-- <groupId>distlib</groupId>
-- <artifactId>distlib</artifactId>
-- <version>0.9.1</version>
-- </dependency>
-- <dependency>
-- <groupId>samtools</groupId>
-- <artifactId>samtools</artifactId>
-- <version>1.107</version>
-- </dependency>
-- <dependency>
-- <groupId>org.apache.commons</groupId>
-- <artifactId>commons-math3</artifactId>
-- <version>3.2</version>
-- </dependency>
-- <dependency>
-- <groupId>commons-io</groupId>
-- <artifactId>commons-io</artifactId>
-- <version>2.4</version>
-- </dependency>
-- <dependency>
-- <groupId>commons-codec</groupId>
-- <artifactId>commons-codec</artifactId>
-- <version>1.10</version>
-- </dependency>
-- <dependency>
-- <groupId>log4j</groupId>
-- <artifactId>log4j</artifactId>
-- <version>1.2.15</version>
-- <exclusions>
-- <exclusion>
-- <groupId>com.sun.jdmk</groupId>
-- <artifactId>jmxtools</artifactId>
-- </exclusion>
-- <exclusion>
-- <groupId>com.sun.jmx</groupId>
-- <artifactId>jmxri</artifactId>
-- </exclusion>
-- </exclusions>
-- </dependency>
-- <dependency>
-- <groupId>org.biojava</groupId>
-- <artifactId>biojava3-core</artifactId>
-- <version>3.0.7</version>
-- </dependency>
-- <dependency>
-- <groupId>org.biojava</groupId>
-- <artifactId>biojava3-structure</artifactId>
-- <version>3.0.7</version>
-- </dependency>
-- </dependencies>
--
-- <repositories>
-- <repository>
-- <id>central</id>
-- <name>Central Repository</name>
-- <url>http://repo.maven.apache.org/maven2</url>
-- <layout>default</layout>
-- <snapshots>
-- <enabled>false</enabled>
-- </snapshots>
-- </repository>
-- <repository>
-- <id>hadoop-bam</id>
-- <name>Hadoop-BAM</name>
-- <url>http://hadoop-bam.sourceforge.net/maven/</url>
-- </repository>
-- <repository>
-- <id>ncimvn-public</id>
-- <name>Public NIH repository</name>
-- <url>https://ncimvn.nci.nih.gov/nexus/content/groups/public/</url>
-- </repository>
-- <repository>
-- <id>typesafe</id>
-- <name>Typesafe Repository</name>
-- <url>http://repo.typesafe.com/typesafe/releases/</url>
-- </repository>
-- </repositories>
--
-- <build>
-- <plugins>
-- <plugin>
-- <groupId>org.apache.maven.plugins</groupId>
-- <artifactId>maven-compiler-plugin</artifactId>
-- <version>2.3.2</version>
-- <configuration>
-- <source>1.8</source>
-- <target>1.8</target>
-- <encoding>ISO-8859-1</encoding>
-- <showDeprecation>true</showDeprecation>
-- <showWarnings>true</showWarnings>
-- </configuration>
-- </plugin>
-- <plugin>
-- <groupId>org.apache.maven.plugins</groupId>
-- <artifactId>maven-resources-plugin</artifactId>
-- <version>2.4.3</version>
-- <configuration>
-- <encoding>ISO-8859-1</encoding>
-- </configuration>
-- </plugin>
-- <plugin>
-- <groupId>org.apache.maven.plugins</groupId>
-- <artifactId>maven-assembly-plugin</artifactId>
-- <version>2.2-beta-5</version>
-- <configuration>
-- <descriptorRefs>
-- <descriptorRef>jar-with-dependencies</descriptorRef>
-- </descriptorRefs>
-- <archive>
-- <manifest>
-- <mainClass>org.snpeff.SnpEff</mainClass>
-- </manifest>
-- </archive>
-- </configuration>
-- </plugin>
-- <plugin>
-- <groupId>org.apache.maven.plugins</groupId>
-- <artifactId>maven-javadoc-plugin</artifactId>
-- <version>2.8.1</version>
-- <configuration>
-- <encoding>ISO-8859-1</encoding>
-- </configuration>
-- </plugin>
-- </plugins>
-- </build>
-- <version>4.3</version>
--</project>
-+ <developers>
-+ <developer>
-+ <id>pcingola</id>
-+ <name>Pablo Cingolani</name>
-+ <email>pcingola at users.sourceforge.net</email>
-+ </developer>
-+ </developers>
-+ <dependencies>
-+ <dependency>
-+ <groupId>commons-cli</groupId>
-+ <artifactId>commons-cli</artifactId>
-+ <version>debian</version>
-+ </dependency>
-+ <dependency>
-+ <groupId>junit</groupId>
-+ <artifactId>junit</artifactId>
-+ <version>4.x</version>
-+ </dependency>
-+ <dependency>
-+ <groupId>net.sf.trove4j</groupId>
-+ <artifactId>trove4j</artifactId>
-+ <version>2.x</version>
-+ </dependency>
-+ <dependency>
-+ <groupId>org.freemarker</groupId>
-+ <artifactId>freemarker</artifactId>
-+ <version>debian</version>
-+ </dependency>
-+ <dependency>
-+ <groupId>org.apache.commons</groupId>
-+ <artifactId>commons-math3</artifactId>
-+ <version>debian</version>
-+ </dependency>
-+ <dependency>
-+ <groupId>commons-io</groupId>
-+ <artifactId>commons-io</artifactId>
-+ <version>debian</version>
-+ </dependency>
-+ <dependency>
-+ <groupId>commons-codec</groupId>
-+ <artifactId>commons-codec</artifactId>
-+ <version>debian</version>
-+ </dependency>
-+ <dependency>
-+ <groupId>log4j</groupId>
-+ <artifactId>log4j</artifactId>
-+ <version>1.2.x</version>
-+ <exclusions>
-+ <exclusion>
-+ <groupId>com.sun.jdmk</groupId>
-+ <artifactId>jmxtools</artifactId>
-+ </exclusion>
-+ <exclusion>
-+ <groupId>com.sun.jmx</groupId>
-+ <artifactId>jmxri</artifactId>
-+ </exclusion>
-+ </exclusions>
-+ </dependency>
-+ </dependencies>
-+ <repositories>
-+ <repository>
-+ <id>central</id>
-+ <name>Central Repository</name>
-+ <url>http://repo.maven.apache.org/maven2</url>
-+ <layout>default</layout>
-+ <snapshots>
-+ <enabled>false</enabled>
-+ </snapshots>
-+ </repository>
-+ <repository>
-+ <id>hadoop-bam</id>
-+ <name>Hadoop-BAM</name>
-+ <url>http://hadoop-bam.sourceforge.net/maven/</url>
-+ </repository>
-+ <repository>
-+ <id>ncimvn-public</id>
-+ <name>Public NIH repository</name>
-+ <url>https://ncimvn.nci.nih.gov/nexus/content/groups/public/</url>
-+ </repository>
-+ <repository>
-+ <id>typesafe</id>
-+ <name>Typesafe Repository</name>
-+ <url>http://repo.typesafe.com/typesafe/releases/</url>
-+ </repository>
-+ </repositories>
-+ <build>
-+ <plugins>
-+ <plugin>
-+ <groupId>org.apache.maven.plugins</groupId>
-+ <artifactId>maven-compiler-plugin</artifactId>
-+ <version>2.3.2</version>
-+ <configuration>
-+ <source>1.8</source>
-+ <target>1.8</target>
-+ <encoding>ISO-8859-1</encoding>
-+ <showDeprecation>true</showDeprecation>
-+ <showWarnings>true</showWarnings>
-+ </configuration>
-+ </plugin>
-+ <plugin>
-+ <groupId>org.apache.maven.plugins</groupId>
-+ <artifactId>maven-resources-plugin</artifactId>
-+ <version>2.4.3</version>
-+ <configuration>
-+ <encoding>ISO-8859-1</encoding>
-+ </configuration>
-+ </plugin>
-+ </plugins>
-+ </build>
-+</project>
-\ No newline at end of file
=====================================
debian/patches/prepare_to_put_package_version_in_pom.xml
=====================================
@@ -0,0 +1,17 @@
+Description: Preparing pom.xml to receive the right version number
+ Upstream provides a pom.xml with a version number that does not wholly
+ corresponds to the package upstream version. We put a @VERSION@ in the pom,
+ which will be replaced by the correct version number in debian/rules.
+Author: Pierre Gruet <pgtdebian at free.fr>
+Forwarded: not-needed
+Last-Update: 2020-12-10
+
+--- a/pom.xml
++++ b/pom.xml
+@@ -199,5 +199,5 @@
+ </plugin>
+ </plugins>
+ </build>
+- <version>4.3</version>
++ <version>@VERSION@</version>
+ </project>
=====================================
debian/patches/replacing_akka_with_java_util_concurrent.patch
=====================================
@@ -0,0 +1,436 @@
+Description: replacing akka using java.util.concurrent
+Author: Pierre Gruet <pgtdebian at free.fr>
+Forwarded: no
+Last-Update: 2020-12-04
+
+--- /dev/null
++++ b/src/main/java/org/snpeff/akka/ConcurrentFactory.java
+@@ -0,0 +1,6 @@
++package org.snpeff.akka;
++
++public interface ConcurrentFactory {
++
++ public ConcurrentActor create();
++}
+--- /dev/null
++++ b/src/main/java/org/snpeff/akka/ConcurrentActor.java
+@@ -0,0 +1,4 @@
++package org.snpeff.akka;
++
++public abstract class ConcurrentActor {
++}
+--- /dev/null
++++ b/src/main/java/org/snpeff/akka/ConcurrentProperties.java
+@@ -0,0 +1,14 @@
++package org.snpeff.akka;
++
++public class ConcurrentProperties {
++
++ public ConcurrentProperties(ConcurrentFactory pFactory) {
++ this.factory = pFactory;
++ }
++
++ public ConcurrentFactory getFactory() {
++ return factory;
++ }
++
++ private ConcurrentFactory factory;
++}
+--- a/src/main/java/org/snpeff/akka/Master.java
++++ b/src/main/java/org/snpeff/akka/Master.java
+@@ -8,10 +8,12 @@
+ import org.snpeff.akka.msg.Work;
+ import org.snpeff.util.Gpr;
+
+-import akka.actor.ActorRef;
+-import akka.actor.Props;
+-import akka.actor.UntypedActor;
+-import akka.routing.SmallestMailboxRouter;
++import java.util.concurrent.CompletionService;
++import java.util.concurrent.ExecutionException;
++import java.util.concurrent.ExecutorCompletionService;
++import java.util.concurrent.Executors;
++import java.util.concurrent.ExecutorService;
++import java.util.concurrent.Future;
+
+ /**
+ * Master: Distributes the jobs to all workers, sends the results to 'listener'
+@@ -21,7 +23,7 @@
+ * @param <TI>
+ * @param <TO>
+ */
+-public abstract class Master<TI, TO> extends UntypedActor implements Iterable<TI>, Iterator<TI> {
++public abstract class Master<TI, TO> extends ConcurrentActor implements Iterable<TI>, Iterator<TI> {
+
+ public static int LOAD_FACTOR = 3; // Number of works distributed per worker
+
+@@ -40,15 +42,17 @@
+ protected int countInputObjects; // Count number of input objects
+ protected int numWorkers; // Number of workers (threads)
+ protected int sentWorks; // Number of workers still working
+- protected ActorRef workerRouter;
+ protected HashMap<Long, Result<TO>> worksBySerial;
++ protected ExecutorService pool;
++ protected CompletionService<Result<TO>> completion;
++ protected ConcurrentProperties props;
+
+ /**
+ * Constructor
+ * @param numWorkers: How may workers will be used
+ * @param listener : Listener
+ */
+- public Master(Props props, int numWorkers) {
++ public Master(ConcurrentProperties props, int numWorkers) {
+ // Initialize
+ sentWorks = 0;
+ this.numWorkers = numWorkers;
+@@ -58,9 +62,10 @@
+ showEvery = DEFAULT_SHOW_EVERY;
+ countInputObjects = 1;
+
+- // Create router
+- SmallestMailboxRouter router = new SmallestMailboxRouter(numWorkers);
+- workerRouter = getContext().actorOf(props.withRouter(router), "workerRouter");
++ this.props = props;
++ // Create workers
++ pool = Executors.newFixedThreadPool(numWorkers);
++ completion = new ExecutorCompletionService<Result<TO>>(pool);
+ }
+
+ @Override
+@@ -124,43 +129,54 @@
+ * Master-receive: Handle-messages
+ */
+ @SuppressWarnings("unchecked")
+- @Override
+- public void onReceive(Object message) {
+-
+- //---
+- // Message specific processing
+- //---
+- if (message instanceof StartMaster) {
+- if (debug) Gpr.debug("Start");
+-
+- // Process start message
+- StartMaster start = (StartMaster) message;
+- startMaster(start);
+- } else if (message instanceof Result) {
+- // Process results
+- sentWorks--;
+- Result<TO> result = (Result<TO>) message;
+- if (debug) Gpr.debug("Result: " + result.serialNumber);
+- processResults(result);
+- } else unhandled(message);
+-
+- //---
+- // Distribute some work
+- //---
+- int threshold = LOAD_FACTOR * numWorkers; // We want all the workers to have some work at all times
+- if (sentWorks < threshold) {
+- // Send all works to workers
+- for (Work<TI> work : this.iterableWork()) {
+- sentWorks++;
+- workerRouter.tell(work, getSelf());
+- if (debug) Gpr.debug("Sent: " + work.serialNumber);
+- if (sentWorks >= threshold) break; // Enough, wait until we get some results
+- }
++ public void get(Object message) {
+
+- // Nothing else to do? => Stop
+- if ((sentWorks == 0) && !hasNext()) shutdown(); // Shutdown all agents (including router)
+- }
+- }
++ //---
++ // Message specific processing
++ //---
++ if (message instanceof StartMaster) {
++ if (debug) Gpr.debug("Start");
++
++ // Process start message
++ StartMaster start = (StartMaster) message;
++ startMaster(start);
++ } else throw new RuntimeException("Message of unknown type received by Master.");
++
++ while ((sentWorks != 0) || hasNext()) {
++ //---
++ // Distribute some work
++ //---
++ int threshold = LOAD_FACTOR * numWorkers; // We want all the workers to have some work at all times
++ if (sentWorks < threshold) {
++ // Send all works to workers
++ for (Work<TI> work : this.iterableWork()) {
++ sentWorks++;
++ Worker wrker = (Worker)(props.getFactory().create());
++ wrker.setMessage(work);
++ completion.submit(wrker);
++ if (debug) Gpr.debug("Sent: " + work.serialNumber);
++ if (sentWorks >= threshold) break; // Enough, wait until we get some results
++ }
++
++ //Process results.
++ try {
++ Future<Result<TO>> result = completion.take();
++ sentWorks--;
++ if (debug) Gpr.debug("Result: " + result.get().serialNumber);
++ processResults(result.get());
++ } catch (ExecutionException e) {
++ System.out.println(e.getMessage());
++ System.exit(1);
++ } catch (InterruptedException e) {
++ System.out.println(e.getMessage());
++ System.exit(1);
++ }
++
++ // Nothing else to do? => Stop
++ if ((sentWorks == 0) && !hasNext()) pool.shutdown(); // Shutdown all agents
++ }
++ }
++ }
+
+ /**
+ * Output all contents of a result
+@@ -203,14 +219,6 @@
+ }
+
+ /**
+- * Shut down all agents
+- */
+- protected void shutdown() {
+- if (debug) Gpr.debug("Shutting down");
+- getContext().system().shutdown();
+- }
+-
+- /**
+ * This is executed when the 'start' message arrives (at the beginning of the processing)
+ * @param startMaster
+ */
+--- a/src/main/java/org/snpeff/akka/Worker.java
++++ b/src/main/java/org/snpeff/akka/Worker.java
+@@ -3,7 +3,7 @@
+ import org.snpeff.akka.msg.Result;
+ import org.snpeff.akka.msg.Work;
+
+-import akka.actor.UntypedActor;
++import java.util.concurrent.Callable;
+
+ /**
+ * Worker: Performs a simple work and get the data back
+@@ -13,12 +13,13 @@
+ *
+ * @author pablocingolani
+ */
+-public class Worker<TI, TO> extends UntypedActor {
++public class Worker<TI, TO> extends ConcurrentActor implements Callable<Result<TO>> {
+
+ private static int WORKER_ID = 0;
+ private static String WORKER_ID_MUTEX = "WORKER_ID_MUTEX";
+
+ protected int id;
++ protected Object message;
+
+ public static int getId() {
+ synchronized (WORKER_ID_MUTEX) {
+@@ -28,6 +29,7 @@
+
+ public Worker() {
+ id = getId();
++ message=null;
+ }
+
+ /**
+@@ -57,11 +59,16 @@
+
+ @SuppressWarnings("unchecked")
+ @Override
+- public void onReceive(Object message) {
++ public Result<TO> call() {
++ Result<TO> result;
+ if (message instanceof Work) {
+ // Perform some kind of calculation
+- Result<TO> result = calculate((Work<TI>) message);
+- getSender().tell(result, getSelf());
+- } else unhandled(message);
++ result = calculate((Work<TI>) message);
++ } else throw new RuntimeException("Message received by Worker does not require any work.");
++ return result;
+ }
+-}
+\ No newline at end of file
++
++ public void setMessage(Object pMessage) {
++ this.message = pMessage;
++ }
++}
+--- a/src/main/java/org/snpeff/akka/vcf/MasterVcf.java
++++ b/src/main/java/org/snpeff/akka/vcf/MasterVcf.java
+@@ -5,7 +5,7 @@
+ import org.snpeff.fileIterator.VcfFileIterator;
+ import org.snpeff.vcf.VcfEntry;
+
+-import akka.actor.Props;
++import org.snpeff.akka.ConcurrentProperties;
+
+ /**
+ * A master that prcess VCF files
+@@ -19,7 +19,7 @@
+ protected String addHeader[]; // Add lines to VCF header before showing it
+ protected VcfFileIterator vcfFileIterator;
+
+- public MasterVcf(Props props, int numWorkers) {
++ public MasterVcf(ConcurrentProperties props, int numWorkers) {
+ super(props, numWorkers);
+ }
+
+@@ -70,7 +70,7 @@
+ }
+ } catch (Throwable t) {
+ t.printStackTrace();
+- shutdown();
++ pool.shutdown();
+ }
+ }
+ }
+--- a/src/main/java/org/snpeff/akka/vcf/VcfWorkQueue.java
++++ b/src/main/java/org/snpeff/akka/vcf/VcfWorkQueue.java
+@@ -2,10 +2,8 @@
+
+ import org.snpeff.snpEffect.Config;
+
+-import akka.actor.Actor;
+-import akka.actor.ActorRef;
+-import akka.actor.ActorSystem;
+-import akka.actor.Props;
++import org.snpeff.akka.Master;
++import org.snpeff.akka.ConcurrentProperties;
+
+ /**
+ * A work queue that processes a VCF file
+@@ -18,11 +16,10 @@
+
+ String fileName;
+ int batchSize, showEvery;
+- Class<? extends Actor> masterClazz;
+- Props masterProps;
++ ConcurrentProperties masterProps;
+ Config config;
+
+- public VcfWorkQueue(String fileName, Config config, int batchSize, int showEvery, Props masterProps) {
++ public VcfWorkQueue(String fileName, Config config, int batchSize, int showEvery, ConcurrentProperties masterProps) {
+ this.fileName = fileName;
+ this.batchSize = batchSize;
+ this.showEvery = showEvery;
+@@ -30,19 +27,12 @@
+ this.config = config;
+ }
+
++ //Argument wait is now unused.
+ public void run(boolean wait) {
+- // Create an Akka system
+- ActorSystem workQueue = ActorSystem.create("vcfWorkQueue");
+-
+ // Create the master
+- ActorRef master;
+- if (masterClazz != null) master = workQueue.actorOf(new Props(masterClazz), "masterVcf");
+- else master = workQueue.actorOf(masterProps, "masterVcf");
++ Master master = (Master)(masterProps.getFactory().create());
+
+ // Start processing
+- master.tell(new StartMasterVcf(fileName, config, batchSize, showEvery));
+-
+- // Wait until completion
+- if (wait) workQueue.awaitTermination();
++ master.get(new StartMasterVcf(fileName, config, batchSize, showEvery));
+ }
+ }
+--- a/src/main/java/org/snpeff/akka/vcfStr/MasterVcfStr.java
++++ b/src/main/java/org/snpeff/akka/vcfStr/MasterVcfStr.java
+@@ -2,7 +2,9 @@
+
+ import org.snpeff.akka.vcf.MasterVcf;
+
+-import akka.actor.Props;
++import org.snpeff.akka.ConcurrentActor;
++import org.snpeff.akka.ConcurrentFactory;
++import org.snpeff.akka.ConcurrentProperties;
+
+ /**
+ * A simple demo of a master process
+@@ -12,7 +14,13 @@
+ public class MasterVcfStr extends MasterVcf<String> {
+
+ public MasterVcfStr(int numWorkers) {
+- super(new Props(WorkerVcfStr.class), numWorkers);
++ super(new ConcurrentProperties(
++ new ConcurrentFactory() {
++ @Override
++ public ConcurrentActor create() {
++ return new WorkerVcfStr();
++ }
++ }), numWorkers);
+ }
+
+ }
+--- a/src/main/java/org/snpeff/snpEffect/commandLine/SnpEffCmdEff.java
++++ b/src/main/java/org/snpeff/snpEffect/commandLine/SnpEffCmdEff.java
+@@ -47,9 +47,10 @@
+ import org.snpeff.vcf.VcfEntry;
+ import org.snpeff.vcf.VcfGenotype;
+
+-import akka.actor.Actor;
+-import akka.actor.Props;
+-import akka.actor.UntypedActorFactory;
++import org.snpeff.akka.ConcurrentFactory;
++import org.snpeff.akka.ConcurrentActor;
++import org.snpeff.akka.ConcurrentProperties;
++
+ import freemarker.template.Configuration;
+ import freemarker.template.DefaultObjectWrapper;
+ import freemarker.template.Template;
+@@ -496,12 +497,12 @@
+ VcfFileIterator vcf = new VcfFileIterator(inputFile, config.getGenome());
+
+ // Master factory
+- Props props = new Props(new UntypedActorFactory() {
++ ConcurrentProperties props = new ConcurrentProperties(new ConcurrentFactory() {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+- public Actor create() {
++ public ConcurrentActor create() {
+ MasterEff master = new MasterEff(numWorkers, snpEffCmdEff, snpEffectPredictor, outputFormatter, filterIntervals);
+ master.setAddHeader(vcfOutForm.getNewHeaderLines().toArray(new String[0]));
+ return master;
+--- a/src/main/java/org/snpeff/snpEffect/commandLine/eff/MasterEff.java
++++ b/src/main/java/org/snpeff/snpEffect/commandLine/eff/MasterEff.java
+@@ -6,9 +6,9 @@
+ import org.snpeff.snpEffect.SnpEffectPredictor;
+ import org.snpeff.snpEffect.commandLine.SnpEffCmdEff;
+
+-import akka.actor.Actor;
+-import akka.actor.Props;
+-import akka.actor.UntypedActorFactory;
++import org.snpeff.akka.ConcurrentFactory;
++import org.snpeff.akka.ConcurrentActor;
++import org.snpeff.akka.ConcurrentProperties;
+
+ /**
+ * Master agent for SnpEff 'eff' command
+@@ -18,14 +18,14 @@
+ public class MasterEff extends MasterVcf<String> {
+
+ public MasterEff(int numWorkers, final SnpEffCmdEff snpEffCmdEff, final SnpEffectPredictor snpEffectPredictor, final OutputFormatter outputFormatter, final IntervalForest filterIntervals) {
+- super(new Props( //
++ super(new ConcurrentProperties( //
+ // Create a factory
+- new UntypedActorFactory() {
++ new ConcurrentFactory() {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+- public Actor create() {
++ public ConcurrentActor create() {
+ return new WorkerEff(snpEffCmdEff, snpEffectPredictor, outputFormatter.clone(), filterIntervals);
+ }
+
=====================================
debian/patches/series
=====================================
@@ -1 +1,6 @@
-pom_xml.patch
+replacing_akka_with_java_util_concurrent.patch
+depending_on_biojava4.patch
+adapting_to_htsjdk.patch
+adding_scala_in_pom.patch
+fix_tests.patch
+prepare_to_put_package_version_in_pom.xml
=====================================
debian/rules
=====================================
@@ -2,7 +2,36 @@
# DH_VERBOSE := 1
+include /usr/share/dpkg/default.mk
+
export JAVA_HOME=/usr/lib/jvm/default-java
+export LC_ALL=C.UTF-8
%:
dh $@ --with javahelper
+
+override_dh_auto_clean:
+ dh_auto_clean
+ # Removing the unit tests we copied into a subdirectory of src/test.
+ if [ -e src/test/java/org ]; then \
+ $(RM) -rf src/test/java/org; \
+ fi
+ # Replacing our pom with the true version number by the original one.
+ if [ -e pom.xml.old ]; then \
+ mv pom.xml.old pom.xml; \
+ fi
+
+override_dh_auto_configure:
+ # Upstream provides pom.xml with an incomplete version number. We do a trick
+ # with a patch in debian/patches and with the next lines to put the right one.
+ cp pom.xml pom.xml.old
+ sed 's/@VERSION@/$(DEB_VERSION_UPSTREAM)/ ; s/\+dfsg[[:digit:]]*//' pom.xml.old > pom.xml
+ dh_auto_configure
+
+override_dh_auto_test:
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+ # Moving the unit tests into a subdir of src/test so that Maven sees them.
+ mkdir -p src/test/java/org/snpeff/snpEffect/testCases/unity
+ cp -a src/main/java/org/snpeff/snpEffect/testCases/unity src/test/java/org/snpeff/snpEffect/testCases
+ dh_auto_test
+endif
=====================================
debian/snpeff.poms deleted
=====================================
@@ -1,28 +0,0 @@
-# List of POM files for the package
-# Format of this file is:
-# <path to pom file> [option]*
-# where option can be:
-# --ignore: ignore this POM and its artifact if any
-# --ignore-pom: don't install the POM. To use on POM files that are created
-# temporarily for certain artifacts such as Javadoc jars. [mh_install, mh_installpoms]
-# --no-parent: remove the <parent> tag from the POM
-# --package=<package>: an alternative package to use when installing this POM
-# and its artifact
-# --has-package-version: to indicate that the original version of the POM is the same as the upstream part
-# of the version for the package.
-# --keep-elements=<elem1,elem2>: a list of XML elements to keep in the POM
-# during a clean operation with mh_cleanpom or mh_installpom
-# --artifact=<path>: path to the build artifact associated with this POM,
-# it will be installed when using the command mh_install. [mh_install]
-# --java-lib: install the jar into /usr/share/java to comply with Debian
-# packaging guidelines
-# --usj-name=<name>: name to use when installing the library in /usr/share/java
-# --usj-version=<version>: version to use when installing the library in /usr/share/java
-# --no-usj-versionless: don't install the versionless link in /usr/share/java
-# --dest-jar=<path>: the destination for the real jar.
-# It will be installed with mh_install. [mh_install]
-# --classifier=<classifier>: Optional, the classifier for the jar. Empty by default.
-# --site-xml=<location>: Optional, the location for site.xml if it needs to be installed.
-# Empty by default. [mh_install]
-#
-pom.xml
View it on GitLab: https://salsa.debian.org/med-team/snpeff/-/compare/ddb09726588ba978ba10bc1b27e077b785cb86ee...0772e188d7e0fad41547fc151ff3be89ba8e9a16
--
View it on GitLab: https://salsa.debian.org/med-team/snpeff/-/compare/ddb09726588ba978ba10bc1b27e077b785cb86ee...0772e188d7e0fad41547fc151ff3be89ba8e9a16
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20201210/61b9eae1/attachment-0001.html>
More information about the debian-med-commit
mailing list