mirror of
https://github.com/rdk/p2rank.git
synced 2026-06-04 12:44:24 +08:00
support BinaryCIF (bcif) input format
This commit is contained in:
BIN
distro/test_data/1fbl.bcif
Normal file
BIN
distro/test_data/1fbl.bcif
Normal file
Binary file not shown.
BIN
distro/test_data/2W83.bcif.gz
Normal file
BIN
distro/test_data/2W83.bcif.gz
Normal file
Binary file not shown.
@@ -61,7 +61,7 @@ class PdbUtils {
|
||||
|
||||
String ext = Futils.realExtension(file)
|
||||
|
||||
if (ext == "cif") {
|
||||
if (ext == "cif" || ext == "bcif" ) {
|
||||
return loadFromCifFile(file)
|
||||
} else { // pdb / ent
|
||||
return loadFromPdbFile(file)
|
||||
|
||||
@@ -15,14 +15,17 @@ import static org.junit.jupiter.api.Assertions.assertEquals
|
||||
*/
|
||||
@CompileStatic
|
||||
class StructureParsingTest {
|
||||
|
||||
Path installDir = Paths.get("distro").toAbsolutePath()
|
||||
Path dataDir = path installDir, "test_data"
|
||||
|
||||
Path pdb_1fbl = path dataDir, "1fbl.pdb.gz"
|
||||
Path cif_1fbl = path dataDir, "1fbl.cif"
|
||||
Path bcif_1fbl = path dataDir, "1fbl.bcif"
|
||||
|
||||
Path pdb_2W83 = path dataDir, "2W83.pdb"
|
||||
Path cif_2W83 = path dataDir, "2W83.cif"
|
||||
Path bcif_2W83 = path dataDir, "2W83.bcif.gz"
|
||||
|
||||
@Test
|
||||
void pdbVsCifEquality() throws Exception {
|
||||
@@ -30,6 +33,12 @@ class StructureParsingTest {
|
||||
doTestPdbVsCifEquality(pdb_2W83, cif_2W83)
|
||||
}
|
||||
|
||||
@Test
|
||||
void cifVsBcifEquality() throws Exception {
|
||||
doTestPdbVsCifEquality(cif_1fbl, bcif_1fbl)
|
||||
doTestPdbVsCifEquality(cif_2W83, bcif_2W83)
|
||||
}
|
||||
|
||||
void doTestPdbVsCifEquality(Path pdbFile, Path cifFile) {
|
||||
Protein pdb = Protein.load(pdbFile.toString())
|
||||
Protein cif = Protein.load(cifFile.toString())
|
||||
|
||||
@@ -37,15 +37,19 @@ class DafaultPrankPredictorTest {
|
||||
|
||||
Path pdb_1fbl = path dataDir, "1fbl.pdb.gz"
|
||||
Path cif_1fbl = path dataDir, "1fbl.cif"
|
||||
Path bcif_1fbl = path dataDir, "1fbl.bcif"
|
||||
|
||||
Path pdb_2W83 = path dataDir, "2W83.pdb"
|
||||
Path cif_2W83 = path dataDir, "2W83.cif.zst"
|
||||
Path bcif_2W83 = path dataDir, "2W83.bcif.gz"
|
||||
|
||||
List<Path> testFiles = [ //should be liganated proteins with easily predictable binding sites
|
||||
pdb_1fbl,
|
||||
cif_1fbl,
|
||||
bcif_1fbl,
|
||||
pdb_2W83,
|
||||
cif_2W83,
|
||||
bcif_2W83,
|
||||
path(dataDir, "liganated", "1a82a.pdb"),
|
||||
path(dataDir, "liganated", "1aaxa.pdb"),
|
||||
path(dataDir, "liganated", "1nlu.pdb"),
|
||||
|
||||
Reference in New Issue
Block a user