Skip to content

Commit

Permalink
[ADAM-780] Make DecadentRead package private.
Browse files Browse the repository at this point in the history
This change changes the DecadentRead class and object from public to package
private (org.bdgenomics.adam). Additionally, we mark both items as deprecated
in favor of the RichAlignmentRecord. Resolves #780.
  • Loading branch information
fnothaft committed Oct 6, 2015
1 parent 1f89fb8 commit b878311
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,12 @@ class Transform(protected val args: TransformArgs) extends BDGSparkCommand[Trans
}

def run(sc: SparkContext) {
// warn if aligned read predicate or projection flags are used improperly
if ((args.useAlignedReadPredicate || args.limitProjection) &&
(args.forceLoadBam || args.forceLoadFastq || args.forceLoadIFastq)) {
log.warn("-aligned_read_predicate and -limit_projection only apply to Parquet files, but a non-Parquet force load flag was passed.")
}

val rdd =
if (args.forceLoadBam) {
sc.loadBam(args.inputPath)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ import org.bdgenomics.adam.rich.RichAlignmentRecord._
import org.bdgenomics.adam.util.{ MdTag, QualityScore }
import org.bdgenomics.formats.avro.AlignmentRecord

object DecadentRead extends Logging with Serializable {
@deprecated("Use RichAlignmentRecord wherever possible in new development.", since = "0.18.0")
private[adam] object DecadentRead extends Logging with Serializable {
type Residue = DecadentRead#Residue

// Constructors
Expand Down Expand Up @@ -72,7 +73,8 @@ object DecadentRead extends Logging with Serializable {
implicit def decay(rdd: RDD[DecadentRead]): RDD[AlignmentRecord] = rdd.map(_.record)
}

class DecadentRead(val record: RichAlignmentRecord) extends Logging {
@deprecated("Use RichAlignmentRecord wherever possible in new development.", since = "0.18.0")
private[adam] class DecadentRead(val record: RichAlignmentRecord) extends Logging {
// Can't be a primary alignment unless it has been aligned
require(!record.getPrimaryAlignment || record.getReadMapped, "Unaligned read can't be a primary alignment")

Expand Down

0 comments on commit b878311

Please sign in to comment.