-
Notifications
You must be signed in to change notification settings - Fork 309
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
Refactor some file writing and reading logic #450
Conversation
Test PASSed. |
@@ -64,6 +64,36 @@ class AlignmentRecordRDDFunctions(rdd: RDD[AlignmentRecord]) | |||
rdd.filter(overlapsQuery) | |||
} | |||
|
|||
def maybeSaveBam(args: ADAMSaveArgs): Boolean = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like how clean this code is. Looks good!
+1 LGTM. |
Squash and rebase on master please and I'll merge this. |
+1, LGTM as well. |
- read “OQ” attr from structured SAMRecord field converting into and out of BAM using ADAM was dropping the “OQ” attr; HTSJDK puts it in its own field but ADAM was looking for it in the catch-all attributes field. - style nits / long lines - ADAMMain formatting - apply predicate shorthand - move adamBamLoad into ADAMContext I'm a little torn about this one, since I see the motivation for having AlignmentRecordContext own logic for things we know will be AlignmentRecords, but adamBamLoad also is called from and calls into (via implicit conversion from SparkContext back into ADAMContext) other things in ADAMContext that made it feel like a more natural fit inside of ADAMContext. - factor out parquet-saving config - factor multi-format saving out of Transform - add helper for saving only aligned records a.k.a. BAM or ADAM records; no FASTQs
squashed and rebased! |
Test PASSed. |
Refactor some file writing and reading logic
Thanks, Ryan! |
adamParquetSave
method that encapsulates the most common file-writing step at the end of ADAM commands, using the existingParquetArgs
options as well as anoutputPath
option.outputPath
file extensionsPer usual, commits are in fairly logical chunks, but I'll squash if it looks good.