Skip to content

Commit

Permalink
Fixed FastqRecord.trimmedTo to use len >= length to decide whether to…
Browse files Browse the repository at this point in the history
… trim or not (#288)
  • Loading branch information
tfenne authored Oct 5, 2017
1 parent 0280b20 commit faa16a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/scala/com/fulcrumgenomics/fastq/FastqRecord.scala
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ case class FastqRecord(name: String, bases: String, quals: String, comment: Opti
* @return a record with length <= len
*/
def trimmedTo(len: Int) : FastqRecord = {
if (len > this.length) this
if (len >= this.length) this
else copy(bases=this.bases.substring(0, len), quals=this.quals.substring(0, len))
}

Expand Down

0 comments on commit faa16a8

Please sign in to comment.