-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix bug where some discontinued chains were not fully loaded as prote…
…in (e.g. in 1O6U)
- Loading branch information
Showing
7 changed files
with
25,031 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
src/test/groovy/cz/siret/prank/DiscontinuedChainsTest.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
package cz.siret.prank | ||
|
||
import cz.siret.prank.domain.Protein | ||
import groovy.transform.CompileStatic | ||
import groovy.util.logging.Slf4j | ||
import org.junit.jupiter.api.Test | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals | ||
|
||
/** | ||
* | ||
*/ | ||
@Slf4j | ||
@CompileStatic | ||
class DiscontinuedChainsTest { | ||
|
||
String PDB_1O6U = 'src/test/resources/data/tricky_cases/1o6u.pdb' | ||
String CIF_1O6U = 'src/test/resources/data/tricky_cases/1o6u.cif' | ||
|
||
@Test | ||
void discontinuedChainsLoading_1O6U_pdb() throws Exception { | ||
Protein prot = Protein.load(PDB_1O6U) | ||
|
||
def chainA = prot.getResidueChain('A') | ||
def chainC = prot.getResidueChain('C') | ||
|
||
|
||
log.info "All Atoms: {}", prot.allAtoms.count | ||
log.info "Protein Atoms: {}", prot.proteinAtoms.count | ||
log.info "Chain A Length: {}", chainA.length | ||
log.info "Chain C Length: {}", chainC.length | ||
|
||
assertEquals(394, chainA.length, "Expected length of chain A") | ||
assertEquals(387, chainC.length, "Expected length of chain C") | ||
assertEquals(10203, prot.allAtoms.count, "Expected number of all structure atoms") | ||
assertEquals(9311, prot.proteinAtoms.count, "Expected number of protein atoms") | ||
|
||
|
||
// P2Rank 2.4.1 | ||
// All Atoms: 10203 | ||
// Protein Atoms: 8229 | ||
// Chain A Length: 321 | ||
// Chain C Length: 322 | ||
|
||
// P2Rank after fix | ||
// All Atoms: 10203 | ||
// Protein Atoms: 9311 | ||
// Chain A Length: 394 | ||
// Chain C Length: 387 | ||
|
||
} | ||
|
||
@Test | ||
void discontinuedChainsLoading_1O6U_cif() throws Exception { | ||
Protein prot = Protein.load(CIF_1O6U) | ||
|
||
def chainA = prot.getResidueChain('A') | ||
def chainC = prot.getResidueChain('C') | ||
|
||
assertEquals(394, chainA.length, "Expected length of chain A") | ||
assertEquals(387, chainC.length, "Expected length of chain C") | ||
assertEquals(10203, prot.allAtoms.count, "Expected number of all structure atoms") | ||
assertEquals(9311, prot.proteinAtoms.count, "Expected number of protein atoms") | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,4 +24,6 @@ class ConfigLoaderTest { | |
assert p.seed == 42 | ||
} | ||
|
||
// TODO test rescore params | ||
|
||
} |
Oops, something went wrong.