-
Notifications
You must be signed in to change notification settings - Fork 308
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
76 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
adam-core/src/main/scala/org/bdgenomics/adam/rdd/RegionJoin.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/** | ||
* Licensed to Big Data Genomics (BDG) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The BDG licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.bdgenomics.adam.rdd | ||
|
||
import org.bdgenomics.adam.models.{ SequenceDictionary, ReferenceRegion } | ||
import org.apache.spark.rdd.RDD | ||
import org.apache.spark.SparkContext._ | ||
import scala.Predef._ | ||
import org.apache.spark.SparkContext | ||
import scala.reflect.ClassTag | ||
|
||
trait RegionJoin { | ||
/** | ||
* Performs a region join between two RDDs. | ||
* | ||
* @param sc A SparkContext for the cluster that will perform the join | ||
* @param baseRDD The 'left' side of the join | ||
* @param joinedRDD The 'right' side of the join | ||
* @param tManifest implicit type of baseRDD | ||
* @param uManifest implicit type of joinedRDD | ||
* @tparam T type of baseRDD | ||
* @tparam U type of joinedRDD | ||
* @return An RDD of pairs (x, y), where x is from baseRDD, y is from joinedRDD, and the region | ||
* corresponding to x overlaps the region corresponding to y. | ||
*/ | ||
def partitionAndJoin[T, U](baseRDD: RDD[(ReferenceRegion, T)], | ||
joinedRDD: RDD[(ReferenceRegion, U)])(implicit tManifest: ClassTag[T], | ||
uManifest: ClassTag[U]): RDD[(T, U)] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters