org.bdgenomics.adam.rdd.feature

# CoverageRDD

###
Related Doc: package feature

#### 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

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: Any): Boolean

   Definition Classes
     AnyRef → Any

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

   Definition Classes
     AnyRef → Any

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

   Definition Classes
     AnyRef → Any

4. #### 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.

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

   Definition Classes
     Any

6. #### 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

7. #### 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

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

   Attributes
     protected
   Definition Classes
     CoverageRDD → GenomicRDD

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

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

10. #### 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.

11. #### 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.

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

    Definition Classes
      AnyRef

13. #### 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

14. #### 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

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

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

16. #### 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.

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

    Attributes
      protected
    Definition Classes
      GenomicRDD

18. #### 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

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

    Definition Classes
      AnyRef → Any

20. #### 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

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

    Definition Classes
      Any

22. #### 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

23. #### 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

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

    Definition Classes
      AnyRef

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

    Definition Classes
      AnyRef

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

    Definition Classes
      AnyRef

27. #### 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

28. #### 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

29. #### 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

30. #### 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

31. #### 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

32. #### 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

33. #### 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

34. #### 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

35. #### val sequences: SequenceDictionary

    A dictionary describing the reference genome.

    A dictionary describing the reference genome.

    Definition Classes
      CoverageRDD → GenomicRDD

36. #### 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

37. #### 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

38. #### 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

39. #### 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

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

    Definition Classes
      AnyRef

41. #### def toFeatureRDD: FeatureRDD

    Converts CoverageRDD to FeatureRDD.

    Converts CoverageRDD to FeatureRDD.

    returns

      Returns a FeatureRDD from CoverageRDD.

42. #### 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

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

    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

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

    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

45. #### 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