org.bdgenomics.adam.rdd.feature

# CoverageRDD

#### case class CoverageRDD(rdd: RDD[Coverage], sequences: SequenceDictionary) extends GenomicRDD[Coverage, CoverageRDD] with Product with Serializable

An RDD containing Coverage data.

rdd

  An RDD containing data describing how many reads cover a genomic locus/region.

sequences

  A dictionary describing the reference genome.

Linear Supertypes
Serializable, Serializable, Product, Equals, GenomicRDD[Coverage, CoverageRDD], AnyRef, Any
Ordering

1. Alphabetic
2. By inheritance

Inherited

1. CoverageRDD
2. Serializable
3. Serializable
4. Product
5. Equals
6. GenomicRDD
7. AnyRef
8. Any

1. Hide All
2. Show all

Learn more about member selection
Visibility

1. Public
2. All

### Instance Constructors

1. #### new CoverageRDD(rdd: RDD[Coverage], sequences: SequenceDictionary)

   rdd

     An RDD containing data describing how many reads cover a genomic locus/region.

   sequences

     A dictionary describing the reference genome.

### Value Members

1. #### final def !=(arg0: AnyRef): Boolean

   Definition Classes
     AnyRef

2. #### final def !=(arg0: Any): Boolean

   Definition Classes
     Any

3. #### final def ##(): Int

   Definition Classes
     AnyRef → Any

4. #### final def ==(arg0: AnyRef): Boolean

   Definition Classes
     AnyRef

5. #### final def ==(arg0: Any): Boolean

   Definition Classes
     Any

6. #### def aggregatedCoverage(bpPerBin: Int = 1): CoverageRDD

   Gets coverage overlapping specified ReferenceRegion.

   Gets coverage overlapping specified ReferenceRegion. For large ReferenceRegions, base pairs per bin (bpPerBin) can be specified to bin together ReferenceRegions of equal size. The coverage of each bin is the mean coverage over all base pairs in that bin.

   bpPerBin

     base pairs per bin, number of bases to combine to one bin.

   returns

     RDD of Coverage Records.

7. #### final def asInstanceOf[T0]: T0

   Definition Classes
     Any

8. #### def broadcastRegionJoin[X, Y <: GenomicRDD[X, Y], Z <: GenomicRDD[(Coverage, X), Z]](genomicRdd: GenomicRDD[X, Y])(implicit tTag: ClassTag[Coverage], xTag: ClassTag[X]): GenomicRDD[(Coverage, X), Z]

   Performs a broadcast inner join between this RDD and another RDD.

   Performs a broadcast inner join between this RDD and another RDD.

   In a broadcast join, the left RDD (this RDD) is collected to the driver, and broadcast to all the nodes in the cluster. The key equality function used for this join is the reference region overlap function. Since this is an inner join, all values who do not overlap a value from the other RDD are dropped.

   genomicRdd

     The right RDD in the join.

   returns

     Returns a new genomic RDD containing all pairs of keys that overlapped in the genomic coordinate space.

   Definition Classes
     GenomicRDD

9. #### def broadcastRegionJoinAndGroupByRight[X, Y <: GenomicRDD[X, Y], Z <: GenomicRDD[(Iterable[Coverage], X), Z]](genomicRdd: GenomicRDD[X, Y])(implicit tTag: ClassTag[Coverage], xTag: ClassTag[X]): GenomicRDD[(Iterable[Coverage], X), Z]

   Performs a broadcast inner join between this RDD and another RDD.

   Performs a broadcast inner join between this RDD and another RDD.

   In a broadcast join, the left RDD (this RDD) is collected to the driver, and broadcast to all the nodes in the cluster. The key equality function used for this join is the reference region overlap function. Since this is an inner join, all values who do not overlap a value from the other RDD are dropped.

   genomicRdd

     The right RDD in the join.

   returns

     Returns a new genomic RDD containing all pairs of keys that overlapped in the genomic coordinate space.

   Definition Classes
     GenomicRDD

10. #### def buildTree(rdd: RDD[(ReferenceRegion, Coverage)])(implicit tTag: ClassTag[Coverage]): IntervalArray[ReferenceRegion, Coverage]

    Attributes
      protected
    Definition Classes
      CoverageRDD → GenomicRDD

11. #### def clone(): AnyRef

    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

12. #### def collapse: CoverageRDD

    Merges adjacent ReferenceRegions with the same coverage value.

    Merges adjacent ReferenceRegions with the same coverage value. This reduces the loss of coverage information while reducing the number of records in the RDD. For example, adjacent records Coverage("chr1", 1, 10, 3.0) and Coverage("chr1", 10, 20, 3.0) would be merged into one record Coverage("chr1", 1, 20, 3.0).

    returns

      merged tuples of adjacent ReferenceRegions and coverage.

13. #### def coverage(bpPerBin: Int = 1): CoverageRDD

    Gets coverage overlapping specified ReferenceRegion.

    Gets coverage overlapping specified ReferenceRegion. For large ReferenceRegions, base pairs per bin (bpPerBin) can be specified to bin together ReferenceRegions of equal size. The coverage of each bin is coverage of the first base pair in that bin.

    bpPerBin

      base pairs per bin, number of bases to combine to one bin.

    returns

      RDD of Coverage Records.

14. #### final def eq(arg0: AnyRef): Boolean

    Definition Classes
      AnyRef

15. #### def filterByOverlappingRegion(query: ReferenceRegion): CoverageRDD

    Runs a filter that selects data in the underlying RDD that overlaps a single genomic region.

    Runs a filter that selects data in the underlying RDD that overlaps a single genomic region.

    query

      The region to query for.

    returns

      Returns a new GenomicRDD containing only data that overlaps the query region.

    Definition Classes
      GenomicRDD

16. #### def filterByOverlappingRegions(querys: List[ReferenceRegion]): CoverageRDD

    Runs a filter that selects data in the underlying RDD that overlaps several genomic regions.

    Runs a filter that selects data in the underlying RDD that overlaps several genomic regions.

    querys

      The regions to query for.

    returns

      Returns a new GenomicRDD containing only data that overlaps the querys region.

    Definition Classes
      GenomicRDD

17. #### def finalize(): Unit

    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @throws( classOf[java.lang.Throwable] )

18. #### def flatten(): CoverageRDD

    Gets flattened RDD of coverage, with coverage mapped to a ReferenceRegion at each base pair.

    Gets flattened RDD of coverage, with coverage mapped to a ReferenceRegion at each base pair.

    returns

      CoverageRDD of flattened Coverage records.

19. #### def flattenRddByRegions(): RDD[(ReferenceRegion, Coverage)]

    Attributes
      protected
    Definition Classes
      GenomicRDD

20. #### def fullOuterShuffleRegionJoin[X, Y <: GenomicRDD[X, Y], Z <: GenomicRDD[(Option[Coverage], Option[X]), Z]](genomicRdd: GenomicRDD[X, Y], optPartitions: Option[Int] = None)(implicit tTag: ClassTag[Coverage], xTag: ClassTag[X]): GenomicRDD[(Option[Coverage], Option[X]), Z]

    Performs a sort-merge full outer join between this RDD and another RDD.

    Performs a sort-merge full outer join between this RDD and another RDD.

    In a sort-merge join, both RDDs are co-partitioned and sorted. The partitions are then zipped, and we do a merge join on each partition. The key equality function used for this join is the reference region overlap function. Since this is a full outer join, if a value from either RDD does not overlap any values in the other RDD, it will be paired with a `None` in the product of the join.

    genomicRdd

      The right RDD in the join.

    returns

      Returns a new genomic RDD containing all pairs of keys that overlapped in the genomic coordinate space, and values that did not overlap will be paired with a `None`.

    Definition Classes
      GenomicRDD

21. #### final def getClass(): Class[_]

    Definition Classes
      AnyRef → Any

22. #### def getReferenceRegions(elem: Coverage): Seq[ReferenceRegion]

    Gets sequence of ReferenceRegions from Coverage element.

    Gets sequence of ReferenceRegions from Coverage element. Since coverage maps directly to a single genomic region, this method will always return a Seq of exactly one ReferenceRegion.

    elem

      The Coverage to get an underlying region for.

    returns

      Sequence of ReferenceRegions extracted from Coverage.

    Attributes
      protected
    Definition Classes
      CoverageRDD → GenomicRDD

23. #### final def isInstanceOf[T0]: Boolean

    Definition Classes
      Any

24. #### lazy val jrdd: JavaRDD[Coverage]

    The underlying RDD of genomic data, as a JavaRDD.

    The underlying RDD of genomic data, as a JavaRDD.

    Definition Classes
      GenomicRDD

25. #### def leftOuterShuffleRegionJoin[X, Y <: GenomicRDD[X, Y], Z <: GenomicRDD[(Coverage, Option[X]), Z]](genomicRdd: GenomicRDD[X, Y], optPartitions: Option[Int] = None)(implicit tTag: ClassTag[Coverage], xTag: ClassTag[X]): GenomicRDD[(Coverage, Option[X]), Z]

    Performs a sort-merge left outer join between this RDD and another RDD.

    Performs a sort-merge left outer join between this RDD and another RDD.

    In a sort-merge join, both RDDs are co-partitioned and sorted. The partitions are then zipped, and we do a merge join on each partition. The key equality function used for this join is the reference region overlap function. Since this is a left outer join, all values in the right RDD that do not overlap a value from the left RDD are dropped. If a value from the left RDD does not overlap any values in the right RDD, it will be paired with a `None` in the product of the join.

    genomicRdd

      The right RDD in the join.

    returns

      Returns a new genomic RDD containing all pairs of keys that overlapped in the genomic coordinate space, and all keys from the left RDD that did not overlap a key in the right RDD.

    Definition Classes
      GenomicRDD

26. #### final def ne(arg0: AnyRef): Boolean

    Definition Classes
      AnyRef

27. #### final def notify(): Unit

    Definition Classes
      AnyRef

28. #### final def notifyAll(): Unit

    Definition Classes
      AnyRef

29. #### def pipe[X, Y <: GenomicRDD[X, Y], V <: InFormatter[Coverage, CoverageRDD, V]](cmd: String, files: Seq[String] = Seq.empty, environment: Map[String, String] = Map.empty, flankSize: Int = 0)(implicit tFormatterCompanion: InFormatterCompanion[Coverage, CoverageRDD, V], xFormatter: OutFormatter[X], convFn: (CoverageRDD, RDD[X]) ⇒ Y, tManifest: ClassTag[Coverage], xManifest: ClassTag[X]): Y

    Pipes genomic data to a subprocess that runs in parallel using Spark.

    Pipes genomic data to a subprocess that runs in parallel using Spark.

    Files are substituted in to the command with a $x syntax. E.g., to invoke a command that uses the first file from the files Seq, use $0.

    Pipes require the presence of an InFormatterCompanion and an OutFormatter as implicit values. The InFormatterCompanion should be a singleton whose apply method builds an InFormatter given a specific type of GenomicRDD. The implicit InFormatterCompanion yields an InFormatter which is used to format the input to the pipe, and the implicit OutFormatter is used to parse the output from the pipe.

    X

      The type of the record created by the piped command.

    Y

      A GenomicRDD containing X's.

    V

      The InFormatter to use for formatting the data being piped to the command.

    cmd

      Command to run.

    files

      Files to make locally available to the commands being run. Default is empty.

    environment

      A map containing environment variable/value pairs to set in the environment for the newly created process. Default is empty.

    flankSize

      Number of bases to flank each command invocation by.

    returns

      Returns a new GenomicRDD of type Y.

    Definition Classes
      GenomicRDD

30. #### val rdd: RDD[Coverage]

    An RDD containing data describing how many reads cover a genomic locus/region.

    An RDD containing data describing how many reads cover a genomic locus/region.

    Definition Classes
      CoverageRDD → GenomicRDD

31. #### def replaceRdd(newRdd: RDD[Coverage]): CoverageRDD

    newRdd

      The RDD to replace the underlying RDD with.

    returns

      Returns a new CoverageRDD with the underlying RDD replaced.

    Attributes
      protected
    Definition Classes
      CoverageRDD → GenomicRDD

32. #### def rightOuterBroadcastRegionJoin[X, Y <: GenomicRDD[X, Y], Z <: GenomicRDD[(Option[Coverage], X), Z]](genomicRdd: GenomicRDD[X, Y])(implicit tTag: ClassTag[Coverage], xTag: ClassTag[X]): GenomicRDD[(Option[Coverage], X), Z]

    Performs a broadcast right outer join between this RDD and another RDD.

    Performs a broadcast right outer join between this RDD and another RDD.

    In a broadcast join, the left RDD (this RDD) is collected to the driver, and broadcast to all the nodes in the cluster. The key equality function used for this join is the reference region overlap function. Since this is a right outer join, all values in the left RDD that do not overlap a value from the right RDD are dropped. If a value from the right RDD does not overlap any values in the left RDD, it will be paired with a `None` in the product of the join.

    genomicRdd

      The right RDD in the join.

    returns

      Returns a new genomic RDD containing all pairs of keys that overlapped in the genomic coordinate space, and all keys from the right RDD that did not overlap a key in the left RDD.

    Definition Classes
      GenomicRDD

33. #### def rightOuterBroadcastRegionJoinAndGroupByRight[X, Y <: GenomicRDD[X, Y], Z <: GenomicRDD[(Iterable[Coverage], X), Z]](genomicRdd: GenomicRDD[X, Y])(implicit tTag: ClassTag[Coverage], xTag: ClassTag[X]): GenomicRDD[(Iterable[Coverage], X), Z]

    Performs a broadcast right outer join between this RDD and another RDD.

    Performs a broadcast right outer join between this RDD and another RDD.

    In a broadcast join, the left RDD (this RDD) is collected to the driver, and broadcast to all the nodes in the cluster. The key equality function used for this join is the reference region overlap function. Since this is a right outer join, all values in the left RDD that do not overlap a value from the right RDD are dropped. If a value from the right RDD does not overlap any values in the left RDD, it will be paired with a `None` in the product of the join.

    genomicRdd

      The right RDD in the join.

    returns

      Returns a new genomic RDD containing all pairs of keys that overlapped in the genomic coordinate space, and all keys from the right RDD that did not overlap a key in the left RDD.

    Definition Classes
      GenomicRDD

34. #### def rightOuterShuffleRegionJoin[X, Y <: GenomicRDD[X, Y], Z <: GenomicRDD[(Option[Coverage], X), Z]](genomicRdd: GenomicRDD[X, Y], optPartitions: Option[Int] = None)(implicit tTag: ClassTag[Coverage], xTag: ClassTag[X]): GenomicRDD[(Option[Coverage], X), Z]

    Performs a sort-merge right outer join between this RDD and another RDD.

    Performs a sort-merge right outer join between this RDD and another RDD.

    In a sort-merge join, both RDDs are co-partitioned and sorted. The partitions are then zipped, and we do a merge join on each partition. The key equality function used for this join is the reference region overlap function. Since this is a right outer join, all values in the left RDD that do not overlap a value from the right RDD are dropped. If a value from the right RDD does not overlap any values in the left RDD, it will be paired with a `None` in the product of the join.

    genomicRdd

      The right RDD in the join.

    returns

      Returns a new genomic RDD containing all pairs of keys that overlapped in the genomic coordinate space, and all keys from the right RDD that did not overlap a key in the left RDD.

    Definition Classes
      GenomicRDD

35. #### def rightOuterShuffleRegionJoinAndGroupByLeft[X, Y <: GenomicRDD[X, Y], Z <: GenomicRDD[(Option[Coverage], Iterable[X]), Z]](genomicRdd: GenomicRDD[X, Y], optPartitions: Option[Int] = None)(implicit tTag: ClassTag[Coverage], xTag: ClassTag[X]): GenomicRDD[(Option[Coverage], Iterable[X]), Z]

    Performs a sort-merge right outer join between this RDD and another RDD, followed by a groupBy on the left value, if not null.

    Performs a sort-merge right outer join between this RDD and another RDD, followed by a groupBy on the left value, if not null.

    In a sort-merge join, both RDDs are co-partitioned and sorted. The partitions are then zipped, and we do a merge join on each partition. The key equality function used for this join is the reference region overlap function. In the same operation, we group all values by the left item in the RDD. Since this is a right outer join, all values from the right RDD who did not overlap a value from the left RDD are placed into a length-1 Iterable with a `None` key.

    genomicRdd

      The right RDD in the join.

    returns

      Returns a new genomic RDD containing all pairs of keys that overlapped in the genomic coordinate space, grouped together by the value they overlapped in the left RDD, and all values from the right RDD that did not overlap an item in the left RDD.

    Definition Classes
      GenomicRDD

36. #### def save(filePath: String, asSingleFile: Boolean): Unit

    Saves coverage as feature file.

    Saves coverage as feature file.

    filePath

      The location to write the output.

    See also

      FeatureRDD.save

      Supported file formats include bed, narrowPeak and parquet. Coverage is saved as a feature where coverage is stored in score attribute. val chrom = feature.getContigName val start = feature.getStart val end = feature.getEnd val name = Features.nameOf(feature) val coverage = feature.getScore

37. #### val sequences: SequenceDictionary

    A dictionary describing the reference genome.

    A dictionary describing the reference genome.

    Definition Classes
      CoverageRDD → GenomicRDD

38. #### def shuffleRegionJoin[X, Y <: GenomicRDD[X, Y], Z <: GenomicRDD[(Coverage, X), Z]](genomicRdd: GenomicRDD[X, Y], optPartitions: Option[Int] = None)(implicit tTag: ClassTag[Coverage], xTag: ClassTag[X]): GenomicRDD[(Coverage, X), Z]

    Performs a sort-merge inner join between this RDD and another RDD.

    Performs a sort-merge inner join between this RDD and another RDD.

    In a sort-merge join, both RDDs are co-partitioned and sorted. The partitions are then zipped, and we do a merge join on each partition. The key equality function used for this join is the reference region overlap function. Since this is an inner join, all values who do not overlap a value from the other RDD are dropped.

    genomicRdd

      The right RDD in the join.

    returns

      Returns a new genomic RDD containing all pairs of keys that overlapped in the genomic coordinate space.

    Definition Classes
      GenomicRDD

39. #### def shuffleRegionJoinAndGroupByLeft[X, Y <: GenomicRDD[X, Y], Z <: GenomicRDD[(Coverage, Iterable[X]), Z]](genomicRdd: GenomicRDD[X, Y], optPartitions: Option[Int] = None)(implicit tTag: ClassTag[Coverage], xTag: ClassTag[X]): GenomicRDD[(Coverage, Iterable[X]), Z]

    Performs a sort-merge inner join between this RDD and another RDD, followed by a groupBy on the left value.

    Performs a sort-merge inner join between this RDD and another RDD, followed by a groupBy on the left value.

    In a sort-merge join, both RDDs are co-partitioned and sorted. The partitions are then zipped, and we do a merge join on each partition. The key equality function used for this join is the reference region overlap function. Since this is an inner join, all values who do not overlap a value from the other RDD are dropped. In the same operation, we group all values by the left item in the RDD.

    genomicRdd

      The right RDD in the join.

    returns

      Returns a new genomic RDD containing all pairs of keys that overlapped in the genomic coordinate space, grouped together by the value they overlapped in the left RDD..

    Definition Classes
      GenomicRDD

40. #### def sort(): CoverageRDD

    Sorts our genome aligned data by reference positions, with contigs ordered by index.

    Sorts our genome aligned data by reference positions, with contigs ordered by index.

    returns

      Returns a new RDD containing sorted data.

    Definition Classes
      GenomicRDD
    Note

      Does not support data that is unaligned or where objects align to multiple positions.

    See also

      sortLexicographically

41. #### def sortLexicographically(): CoverageRDD

    Sorts our genome aligned data by reference positions, with contigs ordered lexicographically.

    Sorts our genome aligned data by reference positions, with contigs ordered lexicographically.

    returns

      Returns a new RDD containing sorted data.

    Definition Classes
      GenomicRDD
    Note

      Does not support data that is unaligned or where objects align to multiple positions.

    See also

      sort

42. #### final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
      AnyRef

43. #### def toFeatureRDD: FeatureRDD

    Converts CoverageRDD to FeatureRDD.

    Converts CoverageRDD to FeatureRDD.

    returns

      Returns a FeatureRDD from CoverageRDD.

44. #### def transform(tFn: (RDD[Coverage]) ⇒ RDD[Coverage]): CoverageRDD

    Applies a function that transforms the underlying RDD into a new RDD.

    Applies a function that transforms the underlying RDD into a new RDD.

    tFn

      A function that transforms the underlying RDD.

    returns

      A new RDD where the RDD of genomic data has been replaced, but the metadata (sequence dictionary, and etc) is copied without modification.

    Definition Classes
      GenomicRDD

45. #### final def wait(): Unit

    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

46. #### final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

47. #### final def wait(arg0: Long): Unit

    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

### Inherited from Serializable

### Inherited from Product

### Inherited from Equals

### Inherited from GenomicRDD[Coverage, CoverageRDD]

### Inherited from AnyRef

### Inherited from Any

### Ungrouped