-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
init minimap2 #46
init minimap2 #46
Conversation
* add samtools (without documentation) to minimap2 branch.
Okay, so here are my thoughts:
|
It looks totally clear, it would just frustrate me personally not to get the output as a string. Alternatively, it'd be helpful to write a sam parser. Also, I might totally be misunderstanding the language features here since I don't know go |
Autogenerated from code (see what docs look like here, vs the code)
Just merged the sam parser into this tree :) |
Perfect - that solves it! |
Yea that is a Go thing. The expectation is there that you will just write 2 more lines of code to get a string. Originally when we were writing parsers back in the day, we did everything as strings, but then moved onto the more idiomatic Go ways, and it unlocks a lot of efficiency. // Create output buffer
var buf bytes.Buffer
// Execute the Minimap2 function
_ = minimap2.Minimap2(templateFile, fastqFile, &buf)
output := buf.String() The expectation in the standard library for this kind of thing is that you work with io.Writer / io.Reader (for stream parsing and such), rather than writing everything into memory. IMO these kinds of interfaces are one of my favorite parts of Go, because pretty much everything implements those two from the standard library. Want to read from a torrent and write to an http connection? It's literally same types as reading and writing from files. |
Also, just merging in samtools now... Adding docs, then merging into main! This basically implements the pipeline of |
Clarifying this: this is specifically for things that will be written / read that are rather large. Sam files are definitely... this (can be gb to tb in size). |
This PR adds minimap2 through
os/exec
(python equivalent of subprocess)