use of edu.sdsc.mmtf.spark.filters.ContainsPolymerChainType in project mmtf-spark by sbl-sdsc.
the class FilterByPolymerChainType method main.
public static void main(String[] args) throws FileNotFoundException {
String path = MmtfReader.getMmtfReducedPath();
SparkConf conf = new SparkConf().setMaster("local[*]").setAppName(FilterByPolymerChainType.class.getSimpleName());
JavaSparkContext sc = new JavaSparkContext(conf);
long count = MmtfReader.readSequenceFile(path, // read MMTF hadoop sequence file
sc).filter(new ContainsPolymerChainType(ContainsPolymerChainType.DNA_LINKING, ContainsPolymerChainType.RNA_LINKING)).filter(new NotFilter(new ContainsLProteinChain())).filter(new NotFilter(new ContainsDSaccharideChain())).count();
System.out.println("# pure DNA and RNA entries: " + count);
sc.close();
}
Aggregations