Skip to content

Commit

Permalink
[ADAM-1703] Expose ValidationStringency in AnySAMOutFormatter.
Browse files Browse the repository at this point in the history
  • Loading branch information
fnothaft committed Aug 30, 2017
1 parent bac6c1d commit 69dcfa5
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 69dcfa5

Please sign in to comment.