Search in sources :

Example 1 with StructureToProteinDimers

use of edu.sdsc.mmtf.spark.mappers.StructureToProteinDimers in project mmtf-spark by sbl-sdsc.

the class MapToProteinDimers method main.

public static void main(String[] args) {
    SparkConf conf = new SparkConf().setMaster("local[*]").setAppName(MapToProteinDimers.class.getSimpleName());
    JavaSparkContext sc = new JavaSparkContext(conf);
    // single protein chain 5IBZ
    List<String> pdbIds = Arrays.asList("5IBZ");
    JavaPairRDD<String, StructureDataInterface> pdb = MmtfReader.downloadFullMmtfFiles(pdbIds, sc);
    // if distance between C-beta atoms is less than the cutoff distance, two chains are considered in contact
    double cutoffDistance = 8;
    // minimum number of contacts to qualify as an interaction
    int minContacts = 20;
    pdb = // convert to bioassembly (homotetramer with D2 symmetry)
    pdb.flatMapToPair(new StructureToBioassembly()).flatMapToPair(// find all dimers with in bioassembly
    new StructureToProteinDimers(cutoffDistance, minContacts));
    System.out.println("Number of dimers in 5IBZ bioassembly: " + pdb.count());
    sc.close();
}
Also used : StructureToBioassembly(edu.sdsc.mmtf.spark.mappers.StructureToBioassembly) JavaSparkContext(org.apache.spark.api.java.JavaSparkContext) StructureDataInterface(org.rcsb.mmtf.api.StructureDataInterface) SparkConf(org.apache.spark.SparkConf) StructureToProteinDimers(edu.sdsc.mmtf.spark.mappers.StructureToProteinDimers)

Aggregations

StructureToBioassembly (edu.sdsc.mmtf.spark.mappers.StructureToBioassembly)1 StructureToProteinDimers (edu.sdsc.mmtf.spark.mappers.StructureToProteinDimers)1 SparkConf (org.apache.spark.SparkConf)1 JavaSparkContext (org.apache.spark.api.java.JavaSparkContext)1 StructureDataInterface (org.rcsb.mmtf.api.StructureDataInterface)1