Skip to content

Commit

Permalink
[ADAM-1703] Expose ValidationStringency in AnySAMOutFormatter.
Browse files Browse the repository at this point in the history
Resolves #1703.
  • Loading branch information
fnothaft committed Sep 6, 2017
1 parent 80449dc commit c8550bc
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import scala.collection.mutable.ListBuffer
* An OutFormatter that automatically infers whether the piped input is SAM or
* BAM. Autodetecting streamed CRAM is not currently supported.
*/
class AnySAMOutFormatter extends OutFormatter[AlignmentRecord] {
case class AnySAMOutFormatter(stringency: ValidationStringency = ValidationStringency.STRICT) extends OutFormatter[AlignmentRecord] {

/**
* Reads alignment records from an input stream. Autodetects SAM/BAM format.
Expand All @@ -41,6 +41,7 @@ class AnySAMOutFormatter extends OutFormatter[AlignmentRecord] {

// make reader
val reader = SamReaderFactory.makeDefault()
.validationStringency(stringency)
.open(SamInputResource.of(is))

SAMIteratorConverter(reader)
Expand Down

0 comments on commit c8550bc

Please sign in to comment.