Skip to content

Commit

Permalink
make bamstats take number of reads to skip
Browse files Browse the repository at this point in the history
  • Loading branch information
brentp committed Nov 6, 2018
1 parent 19c581b commit fc77074
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions covstats/covstats.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func (s Stats) String() string {
const skipReads = 100000

// BamStats takes bam reader sample N well-behaved sites and return the coverage and insert-size info
func BamStats(br *bam.Reader, n int) Stats {
func BamStats(br *bam.Reader, n int, skipReads int) Stats {
br.Omit(bam.AllVariableLengthData)
sizes := make([]int, 0, 2*n)
insertSizes := make([]int, 0, n)
Expand Down Expand Up @@ -251,7 +251,7 @@ func Main() {

genomeBases := 0
mapped := uint64(0)
sizes := BamStats(brdr, cli.N)
sizes := BamStats(brdr, cli.N, skipReads)
var notFound []string
for _, ref := range brdr.Header().Refs() {
genomeBases += ref.Len()
Expand Down

0 comments on commit fc77074

Please sign in to comment.