[med-svn] [Git][med-team/snpeff][master] 8 commits: Depending on libbiojava5-java instead of libbiojava4-java
Pierre Gruet (@pgt)
gitlab at salsa.debian.org
Wed Feb 23 21:35:48 GMT 2022
Pierre Gruet pushed to branch master at Debian Med / snpeff
Commits:
47d6a800 by Pierre Gruet at 2022-02-22T21:25:34+01:00
Depending on libbiojava5-java instead of libbiojava4-java
- - - - -
17b160f6 by Pierre Gruet at 2022-02-22T21:25:48+01:00
Refreshing patches
- - - - -
6b38b498 by Pierre Gruet at 2022-02-22T21:27:52+01:00
Refreshing d/maven.rules
- - - - -
3bd81514 by Pierre Gruet at 2022-02-22T22:27:11+01:00
biojava-sequencing in biojava4 is biojava-genome in biojava5
- - - - -
bb6ad153 by Pierre Gruet at 2022-02-22T22:27:31+01:00
Removing junit4-doc as BD
- - - - -
f634677a by Pierre Gruet at 2022-02-23T21:44:56+01:00
Splitting contents of patch use_... into two more precisely targetted patches
- - - - -
b9198911 by Pierre Gruet at 2022-02-23T22:32:37+01:00
Adding forgotten import of Disabled class
- - - - -
b26f5919 by Pierre Gruet at 2022-02-23T22:34:43+01:00
Updating changelog
- - - - -
12 changed files:
- debian/changelog
- debian/control
- debian/copyright
- debian/libsnpeff-java.manifest
- debian/maven.rules
- + debian/patches/alternatives_to_biojava6_classes_in_biojava5.patch
- − debian/patches/depending_on_biojava4.patch
- debian/patches/exclude_tests_with_missing_data.patch
- debian/patches/omit_unused_junit_classes_and_integration_tests.patch
- debian/patches/series
- debian/patches/use_fastq_from_biojava4.patch → debian/patches/use_fastq_from_biojava5.patch
- debian/tests/run-unit-test
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,14 @@
+snpeff (5.1+dfsg-2) UNRELEASED; urgency=medium
+
+ * Depending on libbiojava5-java instead of libbiojava4-java
+ * Refreshing patches
+ * Refreshing d/maven.rules
+ * Removing junit4-doc as build-dependency
+ * Putting changes related to FastQ classes and biojava5 classes into two
+ different patches
+
+ -- Pierre Gruet <pgt at debian.org> Wed, 23 Feb 2022 22:32:46 +0100
+
snpeff (5.1+dfsg-1) unstable; urgency=medium
* New upstream version 5.1+dfsg
=====================================
debian/control
=====================================
@@ -12,7 +12,7 @@ Build-Depends: debhelper-compat (= 13),
libmaven-assembly-plugin-java,
libtrove3-java,
libhtsjdk-java,
- libbiojava4-java,
+ libbiojava5-java,
junit5,
libcommons-codec-java,
libcommons-io-java,
@@ -21,13 +21,12 @@ Build-Depends: debhelper-compat (= 13),
libfreemarker-java,
libjaxb-api-java,
libmaven-javadoc-plugin-java,
- junit4-doc,
libcommons-codec-java-doc,
libcommons-io-java-doc,
libcommons-math3-java-doc,
libfreemarker-java-doc,
libhtsjdk-java-doc,
- libbiojava4-java-doc,
+ libbiojava5-java-doc,
libtrove3-java-doc,
libcharts4j-java,
libapfloat-java,
@@ -42,7 +41,7 @@ Package: libsnpeff-java
Architecture: all
Depends: ${misc:Depends},
${maven:Depends},
- libbiojava4-java,
+ libbiojava5-java,
libhtsjdk-java
Suggests: ${maven:OptionalDepends},
libsnpeff-java-doc
=====================================
debian/copyright
=====================================
@@ -18,7 +18,7 @@ Files-Excluded: */config/OLD
src/main/java/org/snpeff/fastq/FastqBuilder.java
src/main/java/org/snpeff/fastq/FastqVariant.java
tests/old
-Comment: The three files in src/main/java/ are provided by biojava4-live..
+Comment: The three files in src/main/java/ are provided by biojava5-live..
Other files are useless or have unclear copyright.
Files: *
=====================================
debian/libsnpeff-java.manifest
=====================================
@@ -1,3 +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/biojava4-core.jar /usr/share/java/biojava4-structure.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/biojava5-core.jar /usr/share/java/biojava5-structure.jar
Main-Class: org.snpeff.SnpEff
=====================================
debian/maven.rules
=====================================
@@ -1,6 +1,4 @@
-junit junit jar s/4\..*/4.x/ * *
-log4j log4j * s/1\.2\..*/1.2.x/ * *
net.sf.trove4j trove4j * s/.*/debian/ * *
org.apfloat apfloat jar s/.*/debian/ * *
distlib distlib jar s/.*/debian/ * *
@@ -11,4 +9,6 @@ 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/ * *
-org.scala-lang scala-library jar s/2\..*/2.11.x/ * *
+org.biojava biojava-core jar s/.*/5.x/ * *
+org.biojava biojava-genome jar s/.*/5.x/ * *
+org.biojava biojava-structure jar s/.*/5.x/ * *
=====================================
debian/patches/alternatives_to_biojava6_classes_in_biojava5.patch
=====================================
@@ -0,0 +1,77 @@
+Description: Modifying some calls to be compatible with biojava5-live, the
+ software being written for biojava6.
+Author: Pierre Gruet <pgt at debian.org>
+Forwarded: not-needed
+Last-Update: 2022-02-23
+
+--- a/src/main/java/org/snpeff/pdb/DistanceResult.java
++++ b/src/main/java/org/snpeff/pdb/DistanceResult.java
+@@ -189,19 +189,19 @@
+ }
+
+ public void setAa1(AminoAcid aa) {
+- String pdbId = aa.getChain().getStructure().getPDBHeader().getPdbId().toString();
++ String pdbId = aa.getChain().getParent().getPDBCode();
+ setPdbId(pdbId);
+ pdbChainId1 = aa.getChainId();
+ aaPos1 = aa.getResidueNumber().getSeqNum() - 1;
+- aa1 = aa.getChemComp().getOneLetterCode().charAt(0);
++ aa1 = aa.getChemComp().getOne_letter_code().charAt(0);
+ }
+
+ public void setAa2(AminoAcid aa) {
+- String pdbId = aa.getChain().getStructure().getPDBHeader().getPdbId().toString();
++ String pdbId = aa.getChain().getParent().getPDBCode();
+ setPdbId(pdbId);
+ pdbChainId2 = aa.getChainId();
+ aaPos2 = aa.getResidueNumber().getSeqNum() - 1;
+- aa2 = aa.getChemComp().getOneLetterCode().charAt(0);
++ aa2 = aa.getChemComp().getOne_letter_code().charAt(0);
+ }
+
+ void setPdbId(String pdbId) {
+--- a/src/main/java/org/snpeff/snpEffect/commandLine/SnpEffCmdPdb.java
++++ b/src/main/java/org/snpeff/snpEffect/commandLine/SnpEffCmdPdb.java
+@@ -128,7 +128,7 @@
+ */
+ List<IdMapperEntry> checkSequencePdbGenome(Structure pdbStruct, Chain chain, String trId, List<IdMapperEntry> idmapsOri) {
+ List<IdMapperEntry> idmapsNew = new ArrayList<>();
+- String pdbId = pdbStruct.getPDBHeader().getPdbId().toString();
++ String pdbId = pdbStruct.getPDBCode();
+
+ // Does chain pass filter criteria?
+ if (!filterPdbChain(chain)) return idmapsNew;
+@@ -149,13 +149,13 @@
+ int aaPos = aa.getResidueNumber().getSeqNum() - 1;
+ if (aaPos < 0) continue; // I don't know why some PDB coordinates are negative...
+
+- char aaLetter = aa.getChemComp().getOneLetterCode().charAt(0);
++ char aaLetter = aa.getChemComp().getOne_letter_code().charAt(0);
+ if (prot.length() > aaPos) {
+ char trAaLetter = prot.charAt(aaPos);
+ if (aaLetter == trAaLetter) countMatch++;
+ else countMismatch++;
+ } else countMismatch++;
+- sb.append(aa.getChemComp().getOneLetterCode());
++ sb.append(aa.getChemComp().getOne_letter_code());
+ }
+
+ // Only use mappings that have low error rate
+@@ -204,7 +204,7 @@
+ * transcript)
+ */
+ List<IdMapperEntry> checkSequencePdbGenome(Structure pdbStruct, String trId) {
+- String pdbId = pdbStruct.getPDBHeader().getPdbId().toString();
++ String pdbId = pdbStruct.getPDBCode();
+ if (debug) System.err.println("\nChecking '" + trId + "'\t<->\t'" + pdbId + "'");
+ List<IdMapperEntry> idmapsOri = idMapper.getByPdbId(pdbId);
+ List<IdMapperEntry> idmapsNew = new ArrayList<>();
+@@ -461,7 +472,7 @@
+ * Filter IdMaps for a specific chain
+ */
+ List<IdMapperEntry> idMapChain(Structure pdbStruct, Chain chain, List<IdMapperEntry> idMaps) {
+- String pdbId = pdbStruct.getPDBHeader().getPdbId().toString();
++ String pdbId = pdbStruct.getPDBCode();
+ List<IdMapperEntry> idMapChain = new ArrayList<>();
+ for (IdMapperEntry idmap : idMaps) {
+ if (idmap.pdbId.equals(pdbId) //
=====================================
debian/patches/depending_on_biojava4.patch deleted
=====================================
@@ -1,26 +0,0 @@
-Description: Adapt pom and imports to biojava4
-Author: Pierre Gruet <pgt at debian.org>
-Forwarded: not-needed
-Last-Update: 2022-01-23
-
---- a/pom.xml
-+++ b/pom.xml
-@@ -101,12 +101,16 @@
- <dependency>
- <groupId>org.biojava</groupId>
- <artifactId>biojava-core</artifactId>
-- <version>6.0.4</version>
-+ <version>debian</version>
-+ <scope>system</scope>
-+ <systemPath>/usr/share/java/biojava4-core.jar</systemPath>
- </dependency>
- <dependency>
- <groupId>org.biojava</groupId>
- <artifactId>biojava-structure</artifactId>
-- <version>6.0.4</version>
-+ <version>debian</version>
-+ <scope>system</scope>
-+ <systemPath>/usr/share/java/biojava4-structure.jar</systemPath>
- </dependency>
- <dependency>
- <groupId>com.github.samtools</groupId>
=====================================
debian/patches/exclude_tests_with_missing_data.patch
=====================================
@@ -54,3 +54,20 @@ Last-Update: 2022-01-29
@Test
public void test_02() {
Log.debug("Test");
+--- a/src/main/java/org/snpeff/snpEffect/testCases/unity/TestCasesNmers.java
++++ b/src/main/java/org/snpeff/snpEffect/testCases/unity/TestCasesNmers.java
+@@ -1,5 +1,6 @@
+ package org.snpeff.snpEffect.testCases.unity;
+
++import org.junit.jupiter.api.Disabled;
+ import org.junit.jupiter.api.Test;
+ import org.snpeff.binseq.coder.DnaCoder;
+ import org.snpeff.nmer.Nmer;
+@@ -47,6 +48,7 @@
+ }
+ }
+
++ @Disabled("Needed data are not in the source tarball")
+ @Test
+ public void test_20_Nmers_read_write() {
+ Log.debug("Test");
=====================================
debian/patches/omit_unused_junit_classes_and_integration_tests.patch
=====================================
@@ -7,7 +7,7 @@ Last-Update: 2022-01-29
--- a/pom.xml
+++ b/pom.xml
-@@ -178,6 +178,9 @@
+@@ -172,6 +172,9 @@
<encoding>ISO-8859-1</encoding>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
@@ -17,7 +17,7 @@ Last-Update: 2022-01-29
</configuration>
</plugin>
<plugin>
-@@ -211,6 +214,16 @@
+@@ -205,6 +208,16 @@
<encoding>ISO-8859-1</encoding>
</configuration>
</plugin>
=====================================
debian/patches/series
=====================================
@@ -1,6 +1,6 @@
-depending_on_biojava4.patch
alter_pom_for_debian_packaging.patch
update_launching_script_and_config_file_for_Debian.patch
-use_fastq_from_biojava4.patch
+use_fastq_from_biojava5.patch
omit_unused_junit_classes_and_integration_tests.patch
exclude_tests_with_missing_data.patch
+alternatives_to_biojava6_classes_in_biojava5.patch
=====================================
debian/patches/use_fastq_from_biojava4.patch → debian/patches/use_fastq_from_biojava5.patch
=====================================
@@ -1,7 +1,7 @@
-Description: Using Fastq* classes from biojava4-live
+Description: Using Fastq* classes from biojava5-live
Author: Pierre Gruet <pgt at debian.org>
Forwarded: not-needed
-Last-Update: 2021-03-16
+Last-Update: 2022-02-22
--- a/src/main/java/org/snpeff/Fastq2Fastq.java
+++ b/src/main/java/org/snpeff/Fastq2Fastq.java
@@ -10,8 +10,8 @@ Last-Update: 2021-03-16
-import org.snpeff.fastq.Fastq;
-import org.snpeff.fastq.FastqVariant;
-+import org.biojava.nbio.sequencing.io.fastq.Fastq;
-+import org.biojava.nbio.sequencing.io.fastq.FastqVariant;
++import org.biojava.nbio.genome.io.fastq.Fastq;
++import org.biojava.nbio.genome.io.fastq.FastqVariant;
import org.snpeff.fileIterator.FastqFileIterator;
import org.snpeff.util.GprSeq;
import org.snpeff.util.Log;
@@ -22,7 +22,7 @@ Last-Update: 2021-03-16
import java.io.InputStreamReader;
-import org.snpeff.fastq.FastqVariant;
-+import org.biojava.nbio.sequencing.io.fastq.FastqVariant;
++import org.biojava.nbio.genome.io.fastq.FastqVariant;
import org.snpeff.util.GprSeq;
import org.snpeff.util.Log;
@@ -34,8 +34,8 @@ Last-Update: 2021-03-16
import org.snpeff.binseq.coder.DnaQualityCoder;
-import org.snpeff.fastq.Fastq;
-import org.snpeff.fastq.FastqVariant;
-+import org.biojava.nbio.sequencing.io.fastq.Fastq;
-+import org.biojava.nbio.sequencing.io.fastq.FastqVariant;
++import org.biojava.nbio.genome.io.fastq.Fastq;
++import org.biojava.nbio.genome.io.fastq.FastqVariant;
/**
* Binary packed DNA sequence and base calling quality
@@ -46,7 +46,7 @@ Last-Update: 2021-03-16
import java.io.IOException;
-import org.snpeff.fastq.FastqVariant;
-+import org.biojava.nbio.sequencing.io.fastq.FastqVariant;
++import org.biojava.nbio.genome.io.fastq.FastqVariant;
/**
* DnaAndQualitySequence with an ID
@@ -57,7 +57,7 @@ Last-Update: 2021-03-16
import org.snpeff.binseq.comparator.DnaQualSubsequenceComparator;
import org.snpeff.binseq.comparator.DnaSubsequenceComparator;
-import org.snpeff.fastq.FastqVariant;
-+import org.biojava.nbio.sequencing.io.fastq.FastqVariant;
++import org.biojava.nbio.genome.io.fastq.FastqVariant;
import org.snpeff.util.Gpr;
import org.snpeff.util.Log;
@@ -69,8 +69,8 @@ Last-Update: 2021-03-16
import org.snpeff.binseq.coder.DnaCoder;
-import org.snpeff.fastq.Fastq;
-import org.snpeff.fastq.FastqVariant;
-+import org.biojava.nbio.sequencing.io.fastq.Fastq;
-+import org.biojava.nbio.sequencing.io.fastq.FastqVariant;
++import org.biojava.nbio.genome.io.fastq.Fastq;
++import org.biojava.nbio.genome.io.fastq.FastqVariant;
import org.snpeff.fileIterator.FastqFileIterator;
import org.snpeff.util.Gpr;
import org.snpeff.util.Log;
@@ -82,8 +82,8 @@ Last-Update: 2021-03-16
import org.snpeff.binseq.indexer.SuffixIndexerNmer;
-import org.snpeff.fastq.Fastq;
-import org.snpeff.fastq.FastqVariant;
-+import org.biojava.nbio.sequencing.io.fastq.Fastq;
-+import org.biojava.nbio.sequencing.io.fastq.FastqVariant;
++import org.biojava.nbio.genome.io.fastq.Fastq;
++import org.biojava.nbio.genome.io.fastq.FastqVariant;
import org.snpeff.fileIterator.FastaFileIterator;
import org.snpeff.fileIterator.FastqFileIterator;
import org.snpeff.util.Gpr;
@@ -92,7 +92,7 @@ Last-Update: 2021-03-16
@@ -1,5 +1,7 @@
package org.snpeff.fastq;
-+import org.biojava.nbio.sequencing.io.fastq.Fastq;
++import org.biojava.nbio.genome.io.fastq.Fastq;
+
/**
* Simple maipulation of fastq sequences
@@ -102,8 +102,8 @@ Last-Update: 2021-03-16
@@ -1,5 +1,8 @@
package org.snpeff.fastq;
-+import org.biojava.nbio.sequencing.io.fastq.Fastq;
-+import org.biojava.nbio.sequencing.io.fastq.FastqBuilder;
++import org.biojava.nbio.genome.io.fastq.Fastq;
++import org.biojava.nbio.genome.io.fastq.FastqBuilder;
+
/**
* Trim fastq sequence when quality drops below a threshold
@@ -114,7 +114,7 @@ Last-Update: 2021-03-16
import java.util.Collections;
import java.util.LinkedList;
-+import org.biojava.nbio.sequencing.io.fastq.Fastq;
++import org.biojava.nbio.genome.io.fastq.Fastq;
+
/**
* Trim fastq sequence when:
@@ -125,22 +125,20 @@ Last-Update: 2021-03-16
import java.util.Collections;
import java.util.LinkedList;
-+import org.biojava.nbio.sequencing.io.fastq.Fastq;
++import org.biojava.nbio.genome.io.fastq.Fastq;
+
/**
* Trim fastq sequence when median quality drops below a threshold
*
--- a/pom.xml
+++ b/pom.xml
-@@ -113,6 +113,13 @@
- <systemPath>/usr/share/java/biojava4-structure.jar</systemPath>
+@@ -109,6 +109,11 @@
+ <version>6.0.4</version>
</dependency>
<dependency>
+ <groupId>org.biojava</groupId>
-+ <artifactId>biojava4-sequencing</artifactId>
-+ <version>debian</version>
-+ <scope>system</scope>
-+ <systemPath>/usr/share/java/biojava4-sequencing.jar</systemPath>
++ <artifactId>biojava-genome</artifactId>
++ <version>5.x</version>
+ </dependency>
+ <dependency>
<groupId>com.github.samtools</groupId>
@@ -155,9 +153,9 @@ Last-Update: 2021-03-16
-import org.snpeff.fastq.Fastq;
-import org.snpeff.fastq.FastqBuilder;
-import org.snpeff.fastq.FastqVariant;
-+import org.biojava.nbio.sequencing.io.fastq.Fastq;
-+import org.biojava.nbio.sequencing.io.fastq.FastqBuilder;
-+import org.biojava.nbio.sequencing.io.fastq.FastqVariant;
++import org.biojava.nbio.genome.io.fastq.Fastq;
++import org.biojava.nbio.genome.io.fastq.FastqBuilder;
++import org.biojava.nbio.genome.io.fastq.FastqVariant;
import org.snpeff.util.Log;
/**
@@ -168,159 +166,8 @@ Last-Update: 2021-03-16
-import org.snpeff.fastq.Fastq;
-import org.snpeff.fastq.FastqVariant;
-+import org.biojava.nbio.sequencing.io.fastq.Fastq;
-+import org.biojava.nbio.sequencing.io.fastq.FastqVariant;
++import org.biojava.nbio.genome.io.fastq.Fastq;
++import org.biojava.nbio.genome.io.fastq.FastqVariant;
import java.io.BufferedReader;
import java.io.IOException;
---- a/src/main/java/org/snpeff/pdb/DistanceResult.java
-+++ b/src/main/java/org/snpeff/pdb/DistanceResult.java
-@@ -189,19 +189,19 @@
- }
-
- public void setAa1(AminoAcid aa) {
-- String pdbId = aa.getChain().getStructure().getPDBHeader().getPdbId().toString();
-+ String pdbId = aa.getChain().getParent().getPDBCode();
- setPdbId(pdbId);
- pdbChainId1 = aa.getChainId();
- aaPos1 = aa.getResidueNumber().getSeqNum() - 1;
-- aa1 = aa.getChemComp().getOneLetterCode().charAt(0);
-+ aa1 = aa.getChemComp().getOne_letter_code().charAt(0);
- }
-
- public void setAa2(AminoAcid aa) {
-- String pdbId = aa.getChain().getStructure().getPDBHeader().getPdbId().toString();
-+ String pdbId = aa.getChain().getParent().getPDBCode();
- setPdbId(pdbId);
- pdbChainId2 = aa.getChainId();
- aaPos2 = aa.getResidueNumber().getSeqNum() - 1;
-- aa2 = aa.getChemComp().getOneLetterCode().charAt(0);
-+ aa2 = aa.getChemComp().getOne_letter_code().charAt(0);
- }
-
- void setPdbId(String pdbId) {
---- a/src/main/java/org/snpeff/snpEffect/commandLine/SnpEffCmdPdb.java
-+++ b/src/main/java/org/snpeff/snpEffect/commandLine/SnpEffCmdPdb.java
-@@ -113,9 +113,9 @@
- Map<String, String> chain2uniproId = new HashMap<String, String>();
- for (DBRef dbref : pdbStruct.getDBRefs()) {
- if (debug)
-- Log.debug("PDB_DBREF\tchain:" + dbref.getChainName() + "\tdb: " + dbref.getDatabase() + "\tID: " + dbref.getDbAccession());
-+ Log.debug("PDB_DBREF\tchain:" + dbref.getChainId() + "\tdb: " + dbref.getDatabase() + "\tID: " + dbref.getDbAccession());
- if (dbref.getDatabase().equals(UNIPROT_DATABASE))
-- chain2uniproId.put(dbref.getChainName(), dbref.getDbAccession());
-+ chain2uniproId.put(dbref.getChainId(), dbref.getDbAccession());
- }
- return chain2uniproId;
- }
-@@ -128,7 +128,7 @@
- */
- List<IdMapperEntry> checkSequencePdbGenome(Structure pdbStruct, Chain chain, String trId, List<IdMapperEntry> idmapsOri) {
- List<IdMapperEntry> idmapsNew = new ArrayList<>();
-- String pdbId = pdbStruct.getPDBHeader().getPdbId().toString();
-+ String pdbId = pdbStruct.getPDBCode();
-
- // Does chain pass filter criteria?
- if (!filterPdbChain(chain)) return idmapsNew;
-@@ -149,13 +149,13 @@
- int aaPos = aa.getResidueNumber().getSeqNum() - 1;
- if (aaPos < 0) continue; // I don't know why some PDB coordinates are negative...
-
-- char aaLetter = aa.getChemComp().getOneLetterCode().charAt(0);
-+ char aaLetter = aa.getChemComp().getOne_letter_code().charAt(0);
- if (prot.length() > aaPos) {
- char trAaLetter = prot.charAt(aaPos);
- if (aaLetter == trAaLetter) countMatch++;
- else countMismatch++;
- } else countMismatch++;
-- sb.append(aa.getChemComp().getOneLetterCode());
-+ sb.append(aa.getChemComp().getOne_letter_code());
- }
-
- // Only use mappings that have low error rate
-@@ -171,7 +171,7 @@
-
- for (IdMapperEntry idm : idmapsOri) {
- if (trId.equals(idm.trId) && pdbId.equals(idm.pdbId)) {
-- idmapsNew.add(idm.cloneAndSet(chain.getId(), pdbAaLen, trAaLen));
-+ idmapsNew.add(idm.cloneAndSet(chain.getId().toString(), pdbAaLen, trAaLen));
- break;
- }
- }
-@@ -204,7 +204,7 @@
- * transcript)
- */
- List<IdMapperEntry> checkSequencePdbGenome(Structure pdbStruct, String trId) {
-- String pdbId = pdbStruct.getPDBHeader().getPdbId().toString();
-+ String pdbId = pdbStruct.getPDBCode();
- if (debug) System.err.println("\nChecking '" + trId + "'\t<->\t'" + pdbId + "'");
- List<IdMapperEntry> idmapsOri = idMapper.getByPdbId(pdbId);
- List<IdMapperEntry> idmapsNew = new ArrayList<>();
-@@ -300,13 +300,24 @@
- * Return true if the PDB's chain passes the criteria I.e.: Organism matches
- */
- boolean filterPdbChain(Chain chain) {
-- // note: Compound is replaced by EntityInfo in biojava 5.x
-- for (EntityInfo entityInfo : chain.getStructure().getEntityInfos()) {
-- if (contains(entityInfo.getOrganismCommon(), pdbOrganismCommon) || contains(entityInfo.getOrganismScientific(), pdbOrganismScientific)) {
-- return true;
-- }
-- }
-- return false;
-+ if (chain.getCompound() == null) return false;
-+
-+ // Try 'ORGANISM_SCINETIFIC'
-+ String orgs = chain.getCompound().getOrganismScientific();
-+ if (orgs != null && orgs.indexOf(pdbOrganismScientific) >= 0) return true;
-+
-+ // Try 'ORGANISM_COMMON'
-+ orgs = chain.getCompound().getOrganismCommon();
-+ if (orgs == null) return false;
-+
-+ // Multiple organisms?
-+ if (orgs.indexOf(' ') > 0) {
-+ for (String org : orgs.split("\\s"))
-+ if (org.equals(pdbOrganismCommon)) return true;
-+
-+ }
-+
-+ return orgs.equals(pdbOrganismCommon);
- }
-
- /**
-@@ -461,7 +472,7 @@
- * Filter IdMaps for a specific chain
- */
- List<IdMapperEntry> idMapChain(Structure pdbStruct, Chain chain, List<IdMapperEntry> idMaps) {
-- String pdbId = pdbStruct.getPDBHeader().getPdbId().toString();
-+ String pdbId = pdbStruct.getPDBCode();
- List<IdMapperEntry> idMapChain = new ArrayList<>();
- for (IdMapperEntry idmap : idMaps) {
- if (idmap.pdbId.equals(pdbId) //
-@@ -523,7 +534,7 @@
- }
-
- boolean isCompound(Structure pdbStruct) {
-- List<EntityInfo> compounds = pdbStruct.getEntityInfos();
-+ List<Compound> compounds = pdbStruct.getCompounds();
- return compounds != null && !compounds.isEmpty();
- }
-
-@@ -708,7 +719,7 @@
- // Analyze distance between amino acids in different chains
- for (Chain chain1 : pdbStruct.getChains()) {
-
-- String chainId1 = chain1.getId();
-+ String chainId1 = chain1.getId().toString();
- List<IdMapperEntry> idMapChain1 = idMapChain(pdbStruct, chain1, idMapConfirmed);
- if (idMapChain1.isEmpty()) {
- if (debug) Log.debug("Empty maps for chain '" + chainId1 + "'");
-@@ -716,7 +727,7 @@
- }
-
- for (Chain chain2 : pdbStruct.getChains()) {
-- String chainId2 = chain2.getId();
-+ String chainId2 = chain2.getId().toString();
- if (chainId1.compareTo(chainId2) >= 0) continue; // Only calculate once
-
- // Compare UNIPROT IDs
=====================================
debian/tests/run-unit-test
=====================================
@@ -28,7 +28,7 @@ cp -a tests/ "${AUTOPKGTEST_TMP}"
cd "${AUTOPKGTEST_TMP}"
mkdir classes/
-javac -d classes -cp /usr/share/java/junit-jupiter-api.jar:/usr/share/java/snpeff.jar:/usr/share/java/biojava4-core.jar:/usr/share/java/biojava4-sequencing.jar:/usr/share/java/biojava4-structure.jar org/snpeff/snpEffect/testCases/*/*.java
+javac -d classes -cp /usr/share/java/junit-jupiter-api.jar:/usr/share/java/snpeff.jar:/usr/share/java/biojava5-core.jar:/usr/share/java/biojava5-genome.jar:/usr/share/java/biojava5-structure.jar org/snpeff/snpEffect/testCases/*/*.java
# Only running unit tests, not integration ones (needing data from the Internet)
-java -jar /usr/share/java/junit-platform-console-standalone.jar --class-path /usr/share/java/snpeff.jar:/usr/share/java/biojava4-sequencing.jar:classes --select-package org.snpeff.snpEffect.testCases.unity
+java -jar /usr/share/java/junit-platform-console-standalone.jar --class-path /usr/share/java/snpeff.jar:/usr/share/java/biojava5-genome.jar:classes --select-package org.snpeff.snpEffect.testCases.unity
View it on GitLab: https://salsa.debian.org/med-team/snpeff/-/compare/99b80e49b0a8b7fa8a2c15627971ea3c159279ff...b26f5919d0aec62a29b2c6647a33ccc470606637
--
View it on GitLab: https://salsa.debian.org/med-team/snpeff/-/compare/99b80e49b0a8b7fa8a2c15627971ea3c159279ff...b26f5919d0aec62a29b2c6647a33ccc470606637
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/20220223/09f60d6b/attachment-0001.htm>
More information about the debian-med-commit
mailing list