Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading to biojava 5 #214

Merged
merged 29 commits into from
Apr 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
5685a20
First round of refactoring for conversion to biojava5
josemduarte Feb 13, 2018
8fd8210
Only 2 more compilation problems: AxisAligner and Subunits
josemduarte Feb 14, 2018
bf75e23
Solving compilation problems in tests
josemduarte Feb 14, 2018
a77ac6a
Solved AxisAligner compilation problem
josemduarte Feb 14, 2018
701d81a
All compilation errors gone!
josemduarte Feb 14, 2018
c3847b7
Adapting to latest 5-snapshot
josemduarte Mar 6, 2018
c169065
ncs-related fixes
Mar 7, 2018
207d3d8
Updating to biojava final 5.0.o release
josemduarte Apr 14, 2018
73337a9
A few fixes related to poly chains and chain ids. All tests pass now.
josemduarte Apr 14, 2018
3812d26
Enabled test that was disabled by default, it doesn't pass yet
josemduarte Apr 14, 2018
f27e8c7
Fixed TestLargeStructures
josemduarte Apr 14, 2018
1c40e11
Improving test
josemduarte Apr 14, 2018
8573380
Run test by default
josemduarte Apr 14, 2018
94e5f5f
Removed all remaining warnings and fixed some bugs. All tests fine
josemduarte Apr 14, 2018
93b5640
Fix for #205 and tests
josemduarte Apr 15, 2018
e475fcc
Now writing out only non-redundant NCS interface files, #205
josemduarte Apr 15, 2018
a572cdb
Fixed problem in assembly diagram json generation, added new test for it
josemduarte Apr 15, 2018
7e66be6
Must handle also writing of pymol files properly, #205
josemduarte Apr 15, 2018
ec76f3f
Test for issue #141, currently failing
josemduarte Apr 15, 2018
3da5c28
Better string building
josemduarte Apr 16, 2018
b6fbd35
Mitigation for #141
josemduarte Apr 16, 2018
8a7acb9
Important bugfix: we have to do polymeric entities only when using ge…
josemduarte Apr 16, 2018
d85849a
Bugfix and better test case
josemduarte Apr 17, 2018
67a04a1
Now hbm2ddl setting can be passed in config file
josemduarte Apr 17, 2018
29f84e6
Bugfix for ncs case: NPE in writing scores to model
josemduarte Apr 17, 2018
64c621c
Bugfix: helical symmetry in projection not handled correctly since bi…
josemduarte Apr 18, 2018
254f4ad
Bugfix: use all atoms for packing of chains without rep atoms
josemduarte Apr 18, 2018
4ccd925
Bugfix: non redundant ncs interfaces for diagram files
josemduarte Apr 18, 2018
d1a9265
Minor bugfix in logging
josemduarte Apr 18, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions eppic-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<artifactId>eppic-cli</artifactId>

<properties>
<biojava.version>4.2.10</biojava.version>
<biojava.version>5.0.0</biojava.version>
</properties>

<repositories>
Expand Down Expand Up @@ -261,16 +261,7 @@

<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>

<excludes>
<!-- we exclude by default the long tests, they will only be
executed if explicitly called -->
<exclude>**/TestLargeStructures.java</exclude>

</excludes>
</configuration>
<version>2.21.0</version>
</plugin>

<!-- Buildnumber plugin to get the git SHA hash -->
Expand Down
23 changes: 11 additions & 12 deletions eppic-cli/src/main/java/eppic/ChainEvolContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
import org.biojava.nbio.core.exceptions.CompoundNotFoundException;
import org.biojava.nbio.structure.Atom;
import org.biojava.nbio.structure.Chain;
import org.biojava.nbio.structure.Compound;
import org.biojava.nbio.structure.EntityInfo;
import org.biojava.nbio.structure.Group;
import org.biojava.nbio.structure.StructureTools;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.xml.sax.SAXException;
Expand Down Expand Up @@ -105,7 +104,7 @@ public String toString() {

private boolean isProtein;

private Compound compound;
private EntityInfo entity;


/**
Expand All @@ -122,26 +121,26 @@ public ChainEvolContext(ChainEvolContextList parent, String sequence, String seq
this.searchWithFullUniprot = true;
this.queryWarnings = new ArrayList<String>();
this.isProtein = true;
this.compound = null;
this.entity = null;
}

/**
* Construct a ChainEvolContext from a Chain
* @param parent
* @param compound
*/
public ChainEvolContext(ChainEvolContextList parent, Compound compound) {
public ChainEvolContext(ChainEvolContextList parent, EntityInfo compound) {
this.parent = parent;
Chain chain = compound.getRepresentative();

this.sequenceId = chain.getChainID();
this.sequenceId = chain.getName();
this.hasQueryMatch = false;
this.searchWithFullUniprot = true;
this.queryWarnings = new ArrayList<String>();

this.isProtein = StructureTools.isProtein(chain);
this.isProtein = chain.isProtein();

this.compound = compound;
this.entity = compound;

this.pdbToUniProtMapper = new PdbToUniProtMapper(compound);

Expand All @@ -156,8 +155,8 @@ public boolean isProtein() {
return isProtein;
}

public Compound getCompound() {
return compound;
public EntityInfo getCompound() {
return entity;
}

/**
Expand Down Expand Up @@ -526,13 +525,13 @@ public void blastForHomologs(EppicParams params)
if (searchMode==HomologsSearchMode.GLOBAL) {

LOGGER.info("Using full UniProt sequence {} {}-{} for blast search (entity {})",
query.getUniId(), queryInterv.beg, queryInterv.end, compound.getMolId());
query.getUniId(), queryInterv.beg, queryInterv.end, entity.getMolId());

searchWithFullUniprot = true;
} else if (searchMode==HomologsSearchMode.LOCAL) {

LOGGER.info("Using UniProt {} subsequence {}-{} for blast search (entity {})",
query.getUniId(), queryInterv.beg, queryInterv.end, compound.getMolId());
query.getUniId(), queryInterv.beg, queryInterv.end, entity.getMolId());
searchWithFullUniprot = false;
}

Expand Down
32 changes: 15 additions & 17 deletions eppic-cli/src/main/java/eppic/ChainEvolContextList.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
import java.util.List;
import java.util.TreeMap;

import org.biojava.nbio.structure.Compound;
import org.biojava.nbio.structure.EntityInfo;
import org.biojava.nbio.structure.EntityType;
import org.biojava.nbio.structure.Structure;
import org.biojava.nbio.structure.StructureException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -66,14 +66,17 @@ public ChainEvolContextList(Structure pdb, EppicParams params) throws SQLExcepti
this.useLocalUniprot = false;
}

for (Compound chainCluster:pdb.getCompounds()) {

// in mmCIF files some sugars are annotated as compounds with no chains linked to them, e.g. 3s26
if (chainCluster.getChains().isEmpty()) continue;

ChainEvolContext cec = new ChainEvolContext(this, chainCluster);

cecs.put(cec.getSequenceId(), cec);
for (EntityInfo chainCluster:pdb.getEntityInfos()) {

if (chainCluster.getType() == EntityType.POLYMER) {

// in mmCIF files some sugars are annotated as compounds with no chains linked to them, e.g. 3s26
if (chainCluster.getChains().isEmpty()) continue;

ChainEvolContext cec = new ChainEvolContext(this, chainCluster);

cecs.put(cec.getSequenceId(), cec);
}
}

}
Expand Down Expand Up @@ -115,13 +118,8 @@ public void addChainEvolContext(String representativeChain, ChainEvolContext cec
* @return
*/
public ChainEvolContext getChainEvolContext(String pdbChainCode) {
try {
Compound compound = pdb.getChainByPDB(pdbChainCode).getCompound();
return cecs.get( compound.getRepresentative().getChainID() );
} catch (StructureException e) {
LOGGER.error("Unexpected exception",e);
return null;
}
EntityInfo compound = pdb.getPolyChainByPDB(pdbChainCode).getEntityInfo();
return cecs.get( compound.getRepresentative().getName() );
}

/**
Expand Down
Loading