Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADAM-1481] Refactor ADAMContext loadXxx methods for consistency #1487

Merged
merged 8 commits into from Apr 19, 2017
19 changes: 11 additions & 8 deletions adam-core/src/main/scala/org/bdgenomics/adam/rdd/ADAMContext.scala
Expand Up @@ -165,7 +165,8 @@ class ADAMContext(@transient val sc: SparkContext) extends Serializable with Log
}

/**
* @param pathName The (possibly globbed) path to load a VCF from.
* @param pathName The path name to load VCF format metadata from.
* Globs/directories are supported.
* @return Returns a tuple of metadata from the VCF header, including the
* sequence dictionary and a list of the samples contained in the VCF.
*/
Expand All @@ -180,7 +181,8 @@ class ADAMContext(@transient val sc: SparkContext) extends Serializable with Log
}

/**
* @param pathName The (possibly globbed) path to load a VCF from.
* @param pathName The path name to load VCF format metadata from.
* Globs/directories are supported.
* @return Returns a tuple of metadata from the VCF header, including the
* sequence dictionary and a list of the samples contained in the VCF.
*
Expand Down Expand Up @@ -492,10 +494,11 @@ class ADAMContext(@transient val sc: SparkContext) extends Serializable with Log
* the reads from a fragment in a single split. This allows us to eliminate
* an expensive groupBy when loading a BAM file as fragments.
*
* @param pathName The path name to load reads from. Globs/directories are
* supported.
* @param stringency The validation stringency to use when reading the header.
* @return Returns true if all files described by the filepath are queryname
* @param pathName The path name to load SAM/BAM/CRAM formatted alignment records from.
* Globs/directories are supported (todo: confirm).
* @param stringency The validation stringency to use when validating the
* SAM/BAM/CRAM format header. Defaults to ValidationStringency.STRICT.
* @return Returns true if all files described by the path name are queryname
* sorted.
*/
private[rdd] def filesAreQuerynameSorted(
Expand Down Expand Up @@ -536,8 +539,8 @@ class ADAMContext(@transient val sc: SparkContext) extends Serializable with Log
* header. SAMRecords are read from the file and converted to the
* AlignmentRecord schema.
*
* @param pathName The path name to load SAM/BAM/CRAM formatted alignments from. Globs/directories are
* supported (todo: confirm).
* @param pathName The path name to load SAM/BAM/CRAM formatted alignment records from.
* Globs/directories are supported (todo: confirm).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can confirm; globs/directories are supported.

* @return Returns an AlignmentRecordRDD which wraps the RDD of alignment records,
* sequence dictionary representing contigs the alignment records may be aligned to,
* and the record group dictionary for the alignment records if one is available.
Expand Down