Package org.rcsb.mmtf.spark.data
Class SegmentDataRDD
- java.lang.Object
-
- org.rcsb.mmtf.spark.data.SegmentDataRDD
-
public class SegmentDataRDD extends java.lang.ObjectA class to hold information and utilities aroundSegmentinformation.- Author:
- Anthony Bradley
-
-
Constructor Summary
Constructors Constructor Description SegmentDataRDD(org.apache.spark.api.java.JavaPairRDD<java.lang.String,Segment> segmentRDD)A constructor for the class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SegmentDataRDDcache()Cache the data.SegmentDataRDDfilterLength(int min, int max)Filter the RDD based on a minimum and maximum length.SegmentDataRDDfilterMaxLength(int max)Filter the RDD based on a maximum length.SegmentDataRDDfilterMinLength(int min)Filter the RDD based on a minimum length.SegmentDataRDDfindNonRedundantSet(double similarity)Filter the segments so a non-redundant set is available.org.apache.spark.api.java.JavaDoubleRDDgetLengthDist()Get the length distribution of this RDD.org.apache.spark.api.java.JavaPairRDD<java.lang.String,Segment>getSegmentRDD()SegmentClustersgroupBySequence()Group by sequence identity.
-
-
-
Constructor Detail
-
SegmentDataRDD
public SegmentDataRDD(org.apache.spark.api.java.JavaPairRDD<java.lang.String,Segment> segmentRDD)
A constructor for the class.- Parameters:
segmentRDD- the input underlyingJavaPairRDD
-
-
Method Detail
-
getSegmentRDD
public org.apache.spark.api.java.JavaPairRDD<java.lang.String,Segment> getSegmentRDD()
- Returns:
- the segmentRDD the underlying
JavaPairRDDofStringSegmentthat can be processed on.
-
getLengthDist
public org.apache.spark.api.java.JavaDoubleRDD getLengthDist()
Get the length distribution of this RDD.- Returns:
- the
JavaDoubleRDDof the lengths
-
filterMinLength
public SegmentDataRDD filterMinLength(int min)
Filter the RDD based on a minimum length.- Parameters:
min- the minimum length to allow.- Returns:
- the
SegmentDataRDDafter filtering
-
filterMaxLength
public SegmentDataRDD filterMaxLength(int max)
Filter the RDD based on a maximum length.- Parameters:
max- the maximum length to allow- Returns:
- the
SegmentDataRDDafter filtering
-
filterLength
public SegmentDataRDD filterLength(int min, int max)
Filter the RDD based on a minimum and maximum length.- Parameters:
min- the minimum length to allowmax- the maximum length to allow- Returns:
- the
SegmentDataRDDafter filtering
-
findNonRedundantSet
public SegmentDataRDD findNonRedundantSet(double similarity)
Filter the segments so a non-redundant set is available.- Parameters:
similarity- the similarity (e.g. sequence identity) to permit- Returns:
- the
SegmentDataRDDof non-redundant sequences
-
groupBySequence
public SegmentClusters groupBySequence()
Group by sequence identity.- Returns:
- the
SegmentDataRDDof non-redundant sequences
-
cache
public SegmentDataRDD cache()
Cache the data. Good if the user wants to produce multiple analyses off the same data.- Returns:
- the cached data object.
-
-