org.bdgenomics.adam.rdd.features

# CoverageRDD

###
Related Doc: package features

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

An RDD containing Coverage.

rdd

  Coverage

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

     Coverage

   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 clone(): AnyRef

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

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

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

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

    Definition Classes
      AnyRef

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

    Definition Classes
      GenomicRDD

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

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

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

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

    Attributes
      protected
    Definition Classes
      GenomicRDD

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

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

    Definition Classes
      AnyRef → Any

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

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

    Definition Classes
      Any

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

    Definition Classes
      GenomicRDD

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

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

    Definition Classes
      AnyRef

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

    Definition Classes
      AnyRef

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

    Definition Classes
      AnyRef

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

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

    Coverage

    Coverage

    Definition Classes
      CoverageRDD → GenomicRDD

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

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

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

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

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

31. #### val sequences: SequenceDictionary

    A dictionary describing the reference genome.

    A dictionary describing the reference genome.

    Definition Classes
      CoverageRDD → GenomicRDD

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

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

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

    Definition Classes
      AnyRef

35. #### def toFeatureRDD: FeatureRDD

    Converts CoverageRDD to FeatureRDD.

    Converts CoverageRDD to FeatureRDD.

    returns

      Returns a FeatureRDD from CoverageRDD.

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

    Definition Classes
      GenomicRDD

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

    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

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

    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

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