-
-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
minimally functioning sam parser #333
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, probably left more comments than I should have... 😅
return Alignment{}, err | ||
} | ||
parser.line++ | ||
line := strings.TrimSpace(string(lineBytes)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, style: Same as above, disambiguate this from parser.line
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does that mean exactly? What should be disambiguated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parser.line
refers to the line number, while line
refers to the line contents. IMO would help readability to make the difference explicit in the names.
io/sam/sam.go
Outdated
} | ||
|
||
// ParseNext parsers the next read from a parser. Returns an error upon EOF. | ||
func (parser *Parser) ParseNext() (Alignment, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add some whitespace/comments to this to make it easier to read!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes, I definitely need to do that. Lil hard to read right now.
Co-authored-by: Willow Carretero Chavez <[email protected]>
Co-authored-by: Willow Carretero Chavez <[email protected]>
Co-authored-by: Willow Carretero Chavez <[email protected]>
Co-authored-by: Willow Carretero Chavez <[email protected]>
What's the status of this? If it's ready for review, I'll take a look in the coming couple of days. |
Well I haven't updated it to merge into #339 , so a bit to go there. I think it basically works though. |
Alright, will give it a looksie tomorrow then! |
This PR adds a sam file parser. Minimal functioning parser created, needs testing. Doing that next.
Not ready for merge.