use of edu.sdsc.mmtf.spark.mappers.StructureToBioassembly in project mmtf-spark by sbl-sdsc.
the class MapToBioAssembly method main.
public static void main(String[] args) {
SparkConf conf = new SparkConf().setMaster("local[*]").setAppName(CustomReportDemo.class.getSimpleName());
JavaSparkContext sc = new JavaSparkContext(conf);
List<String> pdbIds = Arrays.asList("1HV4");
JavaPairRDD<String, StructureDataInterface> bioassemblies = MmtfReader.downloadFullMmtfFiles(pdbIds, sc).flatMapToPair(new StructureToBioassembly());
System.out.println("Number of bioassemblies for 1HV4: " + bioassemblies.count());
sc.close();
}
use of edu.sdsc.mmtf.spark.mappers.StructureToBioassembly 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