Search in sources :

Example 6 with InteractionFilter

use of edu.sdsc.mmtf.spark.interactions.InteractionFilter in project mmtf-spark by sbl-sdsc.

the class InteractionFilterTest method test6.

@Test
public void test6() {
    InteractionFilter filter = new InteractionFilter();
    filter.setQueryElements(true, "N", "O");
    assertEquals(true, filter.isQueryElement("O"));
    assertEquals(true, filter.isQueryElement("N"));
    assertEquals(false, filter.isQueryElement("S"));
}
Also used : InteractionFilter(edu.sdsc.mmtf.spark.interactions.InteractionFilter) Test(org.junit.Test)

Example 7 with InteractionFilter

use of edu.sdsc.mmtf.spark.interactions.InteractionFilter in project mmtf-spark by sbl-sdsc.

the class InteractionFilterTest method test7.

@Test
public void test7() {
    InteractionFilter filter = new InteractionFilter();
    filter.setQueryElements(false, "N", "O");
    assertEquals(false, filter.isQueryElement("N"));
    assertEquals(false, filter.isQueryElement("O"));
    assertEquals(true, filter.isQueryElement("S"));
}
Also used : InteractionFilter(edu.sdsc.mmtf.spark.interactions.InteractionFilter) Test(org.junit.Test)

Example 8 with InteractionFilter

use of edu.sdsc.mmtf.spark.interactions.InteractionFilter in project mmtf-spark by sbl-sdsc.

the class InteractionFilterTest method test9.

@Test
public void test9() {
    InteractionFilter filter = new InteractionFilter();
    filter.setTargetElements(false, "N", "O");
    assertEquals(false, filter.isTargetElement("N"));
    assertEquals(false, filter.isTargetElement("O"));
    assertEquals(true, filter.isTargetElement("S"));
}
Also used : InteractionFilter(edu.sdsc.mmtf.spark.interactions.InteractionFilter) Test(org.junit.Test)

Example 9 with InteractionFilter

use of edu.sdsc.mmtf.spark.interactions.InteractionFilter in project mmtf-spark by sbl-sdsc.

the class InteractionFilterTest method test2.

@Test
public void test2() {
    InteractionFilter filter = new InteractionFilter();
    filter.setQueryGroups(false, "HOH", "ZN");
    assertEquals(false, filter.isQueryGroup("ZN"));
    assertEquals(false, filter.isQueryGroup("HOH"));
    assertEquals(true, filter.isQueryGroup("MN"));
}
Also used : InteractionFilter(edu.sdsc.mmtf.spark.interactions.InteractionFilter) Test(org.junit.Test)

Example 10 with InteractionFilter

use of edu.sdsc.mmtf.spark.interactions.InteractionFilter in project mmtf-spark by sbl-sdsc.

the class InteractionFilterTest method test5.

@Test
public void test5() {
    InteractionFilter filter = new InteractionFilter();
    assertEquals(true, filter.isQueryGroup("ZN"));
    assertEquals(true, filter.isTargetGroup("ZN"));
    assertEquals(true, !filter.isProhibitedTargetGroup("ZN"));
}
Also used : InteractionFilter(edu.sdsc.mmtf.spark.interactions.InteractionFilter) Test(org.junit.Test)

Aggregations

InteractionFilter (edu.sdsc.mmtf.spark.interactions.InteractionFilter)12 Test (org.junit.Test)9 SparkConf (org.apache.spark.SparkConf)3 JavaSparkContext (org.apache.spark.api.java.JavaSparkContext)3 Row (org.apache.spark.sql.Row)3 StructureDataInterface (org.rcsb.mmtf.api.StructureDataInterface)3 ContainsLProteinChain (edu.sdsc.mmtf.spark.filters.ContainsLProteinChain)2 Resolution (edu.sdsc.mmtf.spark.filters.Resolution)2 SimpleDateFormat (java.text.SimpleDateFormat)2 HashSet (java.util.HashSet)2 CommandLine (org.apache.commons.cli.CommandLine)2 Pisces (edu.sdsc.mmtf.spark.webfilters.Pisces)1