Skip to content

Commit

Permalink
[ADAM-993] Support loading files using globs and from directory paths.
Browse files Browse the repository at this point in the history
Resolves #993.

* Add private helper functions in ADAMContext to elaborate out globs and
  directory paths when loading files.
* Eliminate unused functions for elaborating paths and loading mixtures
  of read files, and some redundant dictionary loading functions.
* Add tests to cover loading directories/globs of:
  * Parquet files
  * BAM files (with/without using indices)
  * VCF files
  • Loading branch information
fnothaft committed Sep 1, 2016
1 parent 74928e6 commit 2158d4b
Show file tree
Hide file tree
Showing 11 changed files with 970 additions and 263 deletions.
Expand Up @@ -43,12 +43,8 @@ class ListDict(protected val args: ListDictArgs) extends BDGSparkCommand[ListDic
val companion: BDGCommandCompanion = ListDict

def run(sc: SparkContext): Unit = {
val dict = sc.loadDictionary[AlignmentRecord](args.inputPath)
val gRdd = sc.loadAlignments(args.inputPath)

dict.records.foreach {
rec: SequenceRecord =>
println("%s\t%d".format(rec.name, rec.length))
}
println(gRdd.sequences)
}

}

0 comments on commit 2158d4b

Please sign in to comment.