Search in sources :

Example 1 with ContainsRnaChain

use of edu.sdsc.mmtf.spark.filters.ContainsRnaChain in project mmtf-spark by sbl-sdsc.

the class FilterProteinDnaComplexes method main.

public static void main(String[] args) throws FileNotFoundException {
    String path = MmtfReader.getMmtfReducedPath();
    SparkConf conf = new SparkConf().setMaster("local[*]").setAppName(FilterProteinDnaComplexes.class.getSimpleName());
    JavaSparkContext sc = new JavaSparkContext(conf);
    long count = MmtfReader.readSequenceFile(path, // read MMTF hadoop sequence file
    sc).filter(// retain pdb entries that contain L-peptide chains
    new ContainsLProteinChain()).filter(// retain pdb entries that contain L-Dna chains
    new ContainsDnaChain()).filter(// filter out an RNA containing entries
    new NotFilter(new ContainsRnaChain())).count();
    System.out.println("# L-peptide/DNA complexes: " + count);
    sc.close();
}
Also used : ContainsDnaChain(edu.sdsc.mmtf.spark.filters.ContainsDnaChain) ContainsRnaChain(edu.sdsc.mmtf.spark.filters.ContainsRnaChain) NotFilter(edu.sdsc.mmtf.spark.filters.NotFilter) JavaSparkContext(org.apache.spark.api.java.JavaSparkContext) SparkConf(org.apache.spark.SparkConf) ContainsLProteinChain(edu.sdsc.mmtf.spark.filters.ContainsLProteinChain)

Aggregations

ContainsDnaChain (edu.sdsc.mmtf.spark.filters.ContainsDnaChain)1 ContainsLProteinChain (edu.sdsc.mmtf.spark.filters.ContainsLProteinChain)1 ContainsRnaChain (edu.sdsc.mmtf.spark.filters.ContainsRnaChain)1 NotFilter (edu.sdsc.mmtf.spark.filters.NotFilter)1 SparkConf (org.apache.spark.SparkConf)1 JavaSparkContext (org.apache.spark.api.java.JavaSparkContext)1