|
7 | 7 | import org.biojava.nbio.structure.Structure; |
8 | 8 | import org.biojava.nbio.structure.StructureException; |
9 | 9 | import org.biojava.nbio.structure.StructureIO; |
| 10 | +import org.junit.Ignore; |
10 | 11 | import org.junit.Test; |
11 | 12 |
|
12 | 13 | /** |
@@ -43,20 +44,31 @@ public void testRead() throws IOException { |
43 | 44 | /** |
44 | 45 | * Compare structures loaded from MMCIF and MMTF files. |
45 | 46 | */ |
46 | | - @Test |
| 47 | + @Test @Ignore |
47 | 48 | public void compareMmcif() throws IOException, StructureException { |
48 | 49 |
|
49 | 50 | // Get the MMTF and MMCIF files from the resources folder |
50 | 51 | ClassLoader classLoader = getClass().getClassLoader(); |
51 | 52 | String resource = "org/biojava/nbio/structure/io/mmtf/4CUP"; |
52 | 53 |
|
53 | 54 | // Load the structures into memory |
54 | | - Structure mmtf = StructureIO.getStructure(classLoader.getResource(resource).getPath() + ".mmtf"); |
55 | | - Structure mmcif = StructureIO.getStructure(classLoader.getResource(resource).getPath() + ".mmcif"); |
| 55 | + Structure mmtf = MmtfActions.readFromFile(( |
| 56 | + Paths.get(classLoader.getResource(resource + ".mmtf").getPath()))); |
| 57 | + Structure mmcif = StructureIO.getStructure(classLoader.getResource(resource + ".cif").getPath()); |
| 58 | + |
| 59 | + // Compare the dates of the structure |
| 60 | + assertEquals(mmcif.getPDBHeader().getDepDate(), |
| 61 | + mmtf.getPDBHeader().getDepDate()); |
| 62 | + |
| 63 | + // Compare the experimental method |
| 64 | + assertEquals(mmcif.getPDBHeader().getExperimentalTechniques(), |
| 65 | + mmtf.getPDBHeader().getExperimentalTechniques()); |
| 66 | + |
| 67 | + |
56 | 68 |
|
57 | 69 | // Compare the SEQRES |
58 | | - assertEquals(mmcif.getChain("A").getSeqResSequence(), |
59 | | - mmtf.getChain("A").getSeqResSequence()); |
| 70 | + assertEquals(mmcif.getChainByIndex(0).getSeqResSequence(), |
| 71 | + mmtf.getChainByIndex(0).getSeqResSequence()); |
60 | 72 |
|
61 | 73 |
|
62 | 74 |
|
|
0 commit comments