Class SegmentDataRDD


  • public class SegmentDataRDD
    extends java.lang.Object
    A class to hold information and utilities around Segment information.
    Author:
    Anthony Bradley
    • 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 underlying JavaPairRDD
    • Method Detail

      • getSegmentRDD

        public org.apache.spark.api.java.JavaPairRDD<java.lang.String,​Segment> getSegmentRDD()
        Get the JavaPairRDD of the String Segment data. For lower level processing
        Returns:
        the segmentRDD the underlying JavaPairRDD of String Segment that can be processed on.
      • getLengthDist

        public org.apache.spark.api.java.JavaDoubleRDD getLengthDist()
        Get the length distribution of this RDD.
        Returns:
        the JavaDoubleRDD of 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 SegmentDataRDD after filtering
      • filterMaxLength

        public SegmentDataRDD filterMaxLength​(int max)
        Filter the RDD based on a maximum length.
        Parameters:
        max - the maximum length to allow
        Returns:
        the SegmentDataRDD after 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 allow
        max - the maximum length to allow
        Returns:
        the SegmentDataRDD after 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 SegmentDataRDD of 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.