public class MapperUtils extends Object implements Serializable
| Constructor and Description |
|---|
MapperUtils() |
| Modifier and Type | Method and Description |
|---|---|
static org.biojava.nbio.structure.Structure |
byteArrToBiojavaStruct(String pdbCodePlus,
byte[] inputByteArr)
Converts a byte array of the messagepack (mmtf) to a Biojava structure.
|
static org.apache.spark.api.java.JavaPairRDD<org.apache.hadoop.io.Text,org.apache.hadoop.io.BytesWritable> |
generateRdd(List<String> inputList,
String ccdUrl)
PDB RDD generator.
|
static scala.Tuple2<String,byte[]> |
getByteArray(String pdbId)
Get the available data as a byte array from an input PDB id.
|
static scala.Tuple2<String,byte[]> |
getByteArray(String pdbId,
String producer)
Get the available data as a byte array from an input PDB id.
|
public static org.biojava.nbio.structure.Structure byteArrToBiojavaStruct(String pdbCodePlus, byte[] inputByteArr) throws IOException
pdbCodePlus - The pdb code is the first four characters. Additional characters can be used.inputByteArr - The message pack bytre array to be decoded.IOExceptionpublic static org.apache.spark.api.java.JavaPairRDD<org.apache.hadoop.io.Text,org.apache.hadoop.io.BytesWritable> generateRdd(List<String> inputList, String ccdUrl)
JavaPairRDD
with key Text and value BytesWritable.sparkContext - the input JavaSparkContextinputList - a List of Strings of the input PDB idsJavaPairRDD with key Text and value BytesWritablepublic static scala.Tuple2<String,byte[]> getByteArray(String pdbId) throws IOException, org.biojava.nbio.structure.StructureException
pdbId - the input PDB idorg.biojava.nbio.structure.StructureException - an error parsing the Structure using BiojavaIOException - an error accessing the filepublic static scala.Tuple2<String,byte[]> getByteArray(String pdbId, String producer) throws IOException, org.biojava.nbio.structure.StructureException
pdbId - the input PDB idorg.biojava.nbio.structure.StructureException - an error parsing the Structure using BiojavaIOException - an error accessing the fileCopyright © 2016 Biojava. All Rights Reserved.