|
40 | 40 | import com.bioinceptionlabs.reactionblast.fingerprints.interfaces.IFeature; |
41 | 41 | import static com.bioinceptionlabs.reactionblast.tools.ReactionSimilarityTool.getSimilarity; |
42 | 42 | import static com.bioinceptionlabs.reactionblast.tools.TestUtility.BUG_RXN_DIR; |
| 43 | +import static com.bioinceptionlabs.reactionblast.tools.TestUtility.BRENDA_RXN_DIR; |
43 | 44 | import static com.bioinceptionlabs.reactionblast.tools.TestUtility.KEGG_RXN_DIR; |
44 | 45 |
|
45 | 46 | /** |
@@ -1906,6 +1907,234 @@ public void Rhea10074() throws Exception { |
1906 | 1907 | // .getFormedCleavedWFingerprint(); |
1907 | 1908 | // assertEquals(1, formedCleavedWFingerprint.getFeatureCount()); |
1908 | 1909 | // } |
| 1910 | + |
| 1911 | + /** |
| 1912 | + * R00001 - Polyphosphate polyphosphohydrolase (fundamental hydrolysis reaction) |
| 1913 | + * This reaction may have zero formed/cleaved bonds but should still produce a valid solution. |
| 1914 | + * |
| 1915 | + * @throws Exception |
| 1916 | + */ |
| 1917 | + @Test |
| 1918 | + public void R00001() throws Exception { |
| 1919 | + String reactionID = "R00001"; |
| 1920 | + ReactionMechanismTool testReactions = testReactions(reactionID, KEGG_RXN_DIR); |
| 1921 | + BondChangeCalculator bcc = testReactions |
| 1922 | + .getSelectedSolution() |
| 1923 | + .getBondChangeCalculator(); |
| 1924 | + int totalChanges = bcc.getFormedCleavedWFingerprint().getFeatureCount() |
| 1925 | + + bcc.getOrderChangesWFingerprint().getFeatureCount() |
| 1926 | + + bcc.getStereoChangesWFingerprint().getFeatureCount(); |
| 1927 | + assertTrue(totalChanges >= 0); |
| 1928 | + } |
| 1929 | + |
| 1930 | + /** |
| 1931 | + * R00002 - Polyphosphate kinase / ATP diphosphohydrolase |
| 1932 | + * |
| 1933 | + * @throws Exception |
| 1934 | + */ |
| 1935 | + @Test |
| 1936 | + public void R00002() throws Exception { |
| 1937 | + String reactionID = "R00002"; |
| 1938 | + ReactionMechanismTool testReactions = testReactions(reactionID, KEGG_RXN_DIR); |
| 1939 | + IPatternFingerprinter formedCleavedWFingerprint = testReactions |
| 1940 | + .getSelectedSolution() |
| 1941 | + .getBondChangeCalculator() |
| 1942 | + .getFormedCleavedWFingerprint(); |
| 1943 | + assertTrue(formedCleavedWFingerprint.getFeatureCount() > 0); |
| 1944 | + } |
| 1945 | + |
| 1946 | + /** |
| 1947 | + * R00004 - Adenylate kinase / ATP-AMP transphosphorylase |
| 1948 | + * |
| 1949 | + * @throws Exception |
| 1950 | + */ |
| 1951 | + @Test |
| 1952 | + public void R00004() throws Exception { |
| 1953 | + String reactionID = "R00004"; |
| 1954 | + ReactionMechanismTool testReactions = testReactions(reactionID, KEGG_RXN_DIR); |
| 1955 | + IPatternFingerprinter formedCleavedWFingerprint = testReactions |
| 1956 | + .getSelectedSolution() |
| 1957 | + .getBondChangeCalculator() |
| 1958 | + .getFormedCleavedWFingerprint(); |
| 1959 | + assertTrue(formedCleavedWFingerprint.getFeatureCount() > 0); |
| 1960 | + } |
| 1961 | + |
| 1962 | + /** |
| 1963 | + * R00005 - Nucleoside-diphosphate kinase / ATP-nucleotide transphosphorylase |
| 1964 | + * |
| 1965 | + * @throws Exception |
| 1966 | + */ |
| 1967 | + @Test |
| 1968 | + public void R00005() throws Exception { |
| 1969 | + String reactionID = "R00005"; |
| 1970 | + ReactionMechanismTool testReactions = testReactions(reactionID, KEGG_RXN_DIR); |
| 1971 | + IPatternFingerprinter formedCleavedWFingerprint = testReactions |
| 1972 | + .getSelectedSolution() |
| 1973 | + .getBondChangeCalculator() |
| 1974 | + .getFormedCleavedWFingerprint(); |
| 1975 | + assertTrue(formedCleavedWFingerprint.getFeatureCount() > 0); |
| 1976 | + } |
| 1977 | + |
| 1978 | + /** |
| 1979 | + * R00006 - ATP phosphohydrolase |
| 1980 | + * |
| 1981 | + * @throws Exception |
| 1982 | + */ |
| 1983 | + @Test |
| 1984 | + public void R00006() throws Exception { |
| 1985 | + String reactionID = "R00006"; |
| 1986 | + ReactionMechanismTool testReactions = testReactions(reactionID, KEGG_RXN_DIR); |
| 1987 | + IPatternFingerprinter formedCleavedWFingerprint = testReactions |
| 1988 | + .getSelectedSolution() |
| 1989 | + .getBondChangeCalculator() |
| 1990 | + .getFormedCleavedWFingerprint(); |
| 1991 | + assertTrue(formedCleavedWFingerprint.getFeatureCount() > 0); |
| 1992 | + } |
| 1993 | + |
| 1994 | + /** |
| 1995 | + * R00009 - ATP pyrophosphohydrolase |
| 1996 | + * |
| 1997 | + * @throws Exception |
| 1998 | + */ |
| 1999 | + @Test |
| 2000 | + public void R00009() throws Exception { |
| 2001 | + String reactionID = "R00009"; |
| 2002 | + ReactionMechanismTool testReactions = testReactions(reactionID, KEGG_RXN_DIR); |
| 2003 | + IPatternFingerprinter formedCleavedWFingerprint = testReactions |
| 2004 | + .getSelectedSolution() |
| 2005 | + .getBondChangeCalculator() |
| 2006 | + .getFormedCleavedWFingerprint(); |
| 2007 | + assertTrue(formedCleavedWFingerprint.getFeatureCount() > 0); |
| 2008 | + } |
| 2009 | + |
| 2010 | + /** |
| 2011 | + * R00010 - ITP pyrophosphohydrolase |
| 2012 | + * |
| 2013 | + * @throws Exception |
| 2014 | + */ |
| 2015 | + @Test |
| 2016 | + public void R00010() throws Exception { |
| 2017 | + String reactionID = "R00010"; |
| 2018 | + ReactionMechanismTool testReactions = testReactions(reactionID, KEGG_RXN_DIR); |
| 2019 | + IPatternFingerprinter formedCleavedWFingerprint = testReactions |
| 2020 | + .getSelectedSolution() |
| 2021 | + .getBondChangeCalculator() |
| 2022 | + .getFormedCleavedWFingerprint(); |
| 2023 | + assertTrue(formedCleavedWFingerprint.getFeatureCount() > 0); |
| 2024 | + } |
| 2025 | + |
| 2026 | + /** |
| 2027 | + * R00015 - ATP adenylyltransferase |
| 2028 | + * |
| 2029 | + * @throws Exception |
| 2030 | + */ |
| 2031 | + @Test |
| 2032 | + public void R00015() throws Exception { |
| 2033 | + String reactionID = "R00015"; |
| 2034 | + ReactionMechanismTool testReactions = testReactions(reactionID, KEGG_RXN_DIR); |
| 2035 | + IPatternFingerprinter formedCleavedWFingerprint = testReactions |
| 2036 | + .getSelectedSolution() |
| 2037 | + .getBondChangeCalculator() |
| 2038 | + .getFormedCleavedWFingerprint(); |
| 2039 | + assertTrue(formedCleavedWFingerprint.getFeatureCount() > 0); |
| 2040 | + } |
| 2041 | + |
| 2042 | + /** |
| 2043 | + * R00024 - GTP cyclohydrolase |
| 2044 | + * |
| 2045 | + * @throws Exception |
| 2046 | + */ |
| 2047 | + @Test |
| 2048 | + public void R00024() throws Exception { |
| 2049 | + String reactionID = "R00024"; |
| 2050 | + ReactionMechanismTool testReactions = testReactions(reactionID, KEGG_RXN_DIR); |
| 2051 | + IPatternFingerprinter formedCleavedWFingerprint = testReactions |
| 2052 | + .getSelectedSolution() |
| 2053 | + .getBondChangeCalculator() |
| 2054 | + .getFormedCleavedWFingerprint(); |
| 2055 | + assertTrue(formedCleavedWFingerprint.getFeatureCount() > 0); |
| 2056 | + } |
| 2057 | + |
| 2058 | + /** |
| 2059 | + * R00090 - Succinate-CoA ligase |
| 2060 | + * |
| 2061 | + * @throws Exception |
| 2062 | + */ |
| 2063 | + @Test |
| 2064 | + public void R00090() throws Exception { |
| 2065 | + String reactionID = "R00090"; |
| 2066 | + ReactionMechanismTool testReactions = testReactions(reactionID, KEGG_RXN_DIR); |
| 2067 | + IPatternFingerprinter formedCleavedWFingerprint = testReactions |
| 2068 | + .getSelectedSolution() |
| 2069 | + .getBondChangeCalculator() |
| 2070 | + .getFormedCleavedWFingerprint(); |
| 2071 | + assertTrue(formedCleavedWFingerprint.getFeatureCount() > 0); |
| 2072 | + } |
| 2073 | + |
| 2074 | + /** |
| 2075 | + * R09688 - KEGG reaction |
| 2076 | + * |
| 2077 | + * @throws Exception |
| 2078 | + */ |
| 2079 | + @Test |
| 2080 | + public void R09688() throws Exception { |
| 2081 | + String reactionID = "R09688"; |
| 2082 | + ReactionMechanismTool testReactions = testReactions(reactionID, KEGG_RXN_DIR); |
| 2083 | + IPatternFingerprinter formedCleavedWFingerprint = testReactions |
| 2084 | + .getSelectedSolution() |
| 2085 | + .getBondChangeCalculator() |
| 2086 | + .getFormedCleavedWFingerprint(); |
| 2087 | + assertTrue(formedCleavedWFingerprint.getFeatureCount() > 0); |
| 2088 | + } |
| 2089 | + |
| 2090 | + /** |
| 2091 | + * R09907 - KEGG reaction |
| 2092 | + * |
| 2093 | + * @throws Exception |
| 2094 | + */ |
| 2095 | + @Test |
| 2096 | + public void R09907() throws Exception { |
| 2097 | + String reactionID = "R09907"; |
| 2098 | + ReactionMechanismTool testReactions = testReactions(reactionID, KEGG_RXN_DIR); |
| 2099 | + IPatternFingerprinter formedCleavedWFingerprint = testReactions |
| 2100 | + .getSelectedSolution() |
| 2101 | + .getBondChangeCalculator() |
| 2102 | + .getFormedCleavedWFingerprint(); |
| 2103 | + assertTrue(formedCleavedWFingerprint.getFeatureCount() > 0); |
| 2104 | + } |
| 2105 | + |
| 2106 | + /** |
| 2107 | + * R10106 - KEGG reaction |
| 2108 | + * |
| 2109 | + * @throws Exception |
| 2110 | + */ |
| 2111 | + @Test |
| 2112 | + public void R10106() throws Exception { |
| 2113 | + String reactionID = "R10106"; |
| 2114 | + ReactionMechanismTool testReactions = testReactions(reactionID, KEGG_RXN_DIR); |
| 2115 | + IPatternFingerprinter formedCleavedWFingerprint = testReactions |
| 2116 | + .getSelectedSolution() |
| 2117 | + .getBondChangeCalculator() |
| 2118 | + .getFormedCleavedWFingerprint(); |
| 2119 | + assertTrue(formedCleavedWFingerprint.getFeatureCount() > 0); |
| 2120 | + } |
| 2121 | + |
| 2122 | + /** |
| 2123 | + * BRENDA reaction 391 |
| 2124 | + * |
| 2125 | + * @throws Exception |
| 2126 | + */ |
| 2127 | + @Test |
| 2128 | + public void Brenda391() throws Exception { |
| 2129 | + String reactionID = "391"; |
| 2130 | + ReactionMechanismTool testReactions = testReactions(reactionID, BRENDA_RXN_DIR); |
| 2131 | + IPatternFingerprinter formedCleavedWFingerprint = testReactions |
| 2132 | + .getSelectedSolution() |
| 2133 | + .getBondChangeCalculator() |
| 2134 | + .getFormedCleavedWFingerprint(); |
| 2135 | + assertTrue(formedCleavedWFingerprint.getFeatureCount() > 0); |
| 2136 | + } |
| 2137 | + |
1909 | 2138 | private Set<IFeature> ignoreHydrogenChanges(Collection<IFeature> features) { |
1910 | 2139 | Set<IFeature> selected = new TreeSet<>(); |
1911 | 2140 | features.stream().filter((f) -> (!f.getPattern().contains("H"))).forEachOrdered((f) -> { |
|
0 commit comments