Skip to content

minimally functioning sam parser - #333

Closed
Koeng101 wants to merge 12 commits into
mainfrom
samParser
Closed

Koeng101 wants to merge 12 commits into
mainfrom
samParser

Conversation

@Koeng101

@Koeng101 Koeng101 commented Aug 17, 2023 •

Copy link
Copy Markdown
Contributor

This PR adds a sam file parser. Minimal functioning parser created, needs testing. Doing that next.

Not ready for merge.

@carreter carreter left a comment

Copy link
Copy Markdown
Collaborator

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... 😅

Comment thread io/sam/SAMv1.pdf
Comment thread io/sam/sam.go
Comment thread io/sam/sam.go Outdated
Comment thread io/sam/sam.go Outdated
Comment thread io/sam/sam.go Outdated
Comment thread io/sam/sam.go Outdated
Comment thread io/sam/sam.go
Comment thread io/sam/sam.go Outdated
Comment thread io/sam/sam.go
return Alignment{}, err
}
parser.line++
line := strings.TrimSpace(string(lineBytes))

Copy link
Copy Markdown
Collaborator

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.

Copy link
Copy Markdown
Contributor Author

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?

Copy link
Copy Markdown
Collaborator

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.

Comment thread io/sam/sam.go Outdated
}

// ParseNext parsers the next read from a parser. Returns an error upon EOF.
func (parser *Parser) ParseNext() (Alignment, error) {

Copy link
Copy Markdown
Collaborator

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!

Copy link
Copy Markdown
Contributor Author

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.

Koeng101 and others added 11 commits September 10, 2023 21:38
Co-authored-by: Willow Carretero Chavez <sandiegobutterflies@gmail.com>
Co-authored-by: Willow Carretero Chavez <sandiegobutterflies@gmail.com>
Co-authored-by: Willow Carretero Chavez <sandiegobutterflies@gmail.com>
Co-authored-by: Willow Carretero Chavez <sandiegobutterflies@gmail.com>
@carreter carreter removed the draft label Sep 23, 2023
@carreter

Copy link
Copy Markdown
Collaborator

What's the status of this? If it's ready for review, I'll take a look in the coming couple of days.

@Koeng101

Copy link
Copy Markdown
Contributor Author

Well I haven't updated it to merge into #339 , so a bit to go there. I think it basically works though.

@carreter

Copy link
Copy Markdown
Collaborator

Alright, will give it a looksie tomorrow then!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked Waiting for another PR/issue to be merged/closed.

2 participants