biojava/biojava-spark

Name: biojava-spark

Owner: BioJava

Description: :collision: Algorithms that are built around BioJava and run on Apache Spark

Created: 2016-04-29 18:06:39.0

Updated: 2017-09-05 13:33:48.0

Pushed: 2016-08-18 22:46:10.0

Homepage:

Size: 67803

Language: Java

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

BioJava-Spark

Algorithms that are built around BioJava and are running on Apache Spark

Build Status License Status Version

Starting up

Some initial instructions can be found on the mmtf-spark project

https://github.com/rcsb/mmtf-spark

First download and untar a Hadoop sequence file of the PDB (~7 GB download)
 http://mmtf.rcsb.org/v1.0/hadoopfiles/full.tar
-xvf full.tar

Or you can get a C-alpha, phosphate, ligand only version (~800 Mb download)

 http://mmtf.rcsb.org/v1.0/hadoopfiles/reduced.tar
-xvf reduced.tar
Second add the biojava-spark dependecy to your pom
    <dependency>
        <groupId>org.biojava</groupId>
        <artifactId>biojava-spark</artifactId>
        <version>0.2.1</version>
    </dependency>
Extra Biojava examples
Do some simple quality filtering
float maxResolution = 3.0f;
float maxRfree = 0.3f;
StructureDataRDD structureData = new StructureDataRDD("/path/to/file")
            .filterResolution(maxResolution)
            .filterRfree(maxRfree);
Summarsing the elements in the PDB
Map<String, Long> elementCountMap = BiojavaSparkUtils.findAtoms(structureData).countByElement();
Finding inter-atomic contacts from the PDB
    Double mean = BiojavaSparkUtils.findContacts(structureData,
            new AtomSelectObject()
                    .groupNameList(new String[] {"PRO","LYS"})
                    .elementNameList(new String[] {"C"})
                    .atomNameList(new String[] {"CA"}),
                    cutoff)
            .getDistanceDistOfAtomInts("CA", "CA")
            .mean();
    System.out.println("\nMean PRO-LYS CA-CA distance: "+mean);

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.