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();
}
Aggregations