diff --git a/Readers/BamReader.cs b/Readers/BamReader.cs index 1e3be34..5c6f5a0 100644 --- a/Readers/BamReader.cs +++ b/Readers/BamReader.cs @@ -106,9 +106,10 @@ private BamAlignment ReadSequence() var bamAlignment = new BamAlignment { block_size = block_size, + refID = BitConverter.ToInt32(block, offset) }; - bamAlignment.refID = BitConverter.ToInt32(block, offset); offset += 4; + offset += 4; bamAlignment.pos = BitConverter.ToInt32(block, offset) + 1; offset += 4; bamAlignment.l_read_name = block[offset]; offset += 1; bamAlignment.mapq = block[offset]; offset += 1;