Skip to content

Commit

Permalink
2024/09/29-14:23:18 (Linux cray unknown)
Browse files Browse the repository at this point in the history
  • Loading branch information
pbenner committed Sep 29, 2024
1 parent 6bc008c commit a8f7234
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions tools/bamView/bamView.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,20 @@ func bamView(config Config, filenameIn string) {
fmt.Println()

for block := range reader.ReadSingleEnd() {
seqname := "*"
position := "*"
if block.RefID >= 0 {
seqname = reader.Genome.Seqnames[block.RefID]
}
if block.Position >= 0 {
position = strconv.FormatInt(int64(block.Position), 10)
}
if block.Error != nil {
log.Fatal(block.Error)
}
fmt.Printf("%10s %15d %5d:%011s %4d",
reader.Genome.Seqnames[block.RefID],
block.Position,
fmt.Printf("%10s %15s %5d:%011s %4d",
seqname,
position,
block.Flag,
strconv.FormatInt(int64(block.Flag), 2),
block.MapQ)
Expand Down

0 comments on commit a8f7234

Please sign in to comment.