-
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
Basic PGEN writer #8
base: main
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## main #8 +/- ##
==========================================
+ Coverage 68.51% 72.67% +4.15%
==========================================
Files 9 10 +1
Lines 432 527 +95
==========================================
+ Hits 296 383 +87
- Misses 136 144 +8
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Thanks, this looks awesome. Are all the variant record types |
Yeah all variant record types are |
Have you checked if the output file works with Plink 2? |
Sorry, haven't had much time to work on this pr this past week. No I haven't yet.... To merge this pr, I still need to:
|
The issue is that we are not closing the file we opened. |
Sorry, do you mean the Line 54 in bb2e33a
I think that syntax closes the io automatically when the block is done. |
Not necessarily. I think it’s `Pgen` struct not having a close function
attached to it.
|
@biona001 Please let me know if you think it is ready to be merged. |
I have not checked if the result can be run/read by other PGEN readers. I haven't had time to do that yet |
Thanks for the update. By the way, adding |
This pr adds the
write_pgen
functionality which saves a dosage matrix into a PGEN file. Any suggestion is highly appreciated.write_pgen
, all hard-call genotypes are missing, while dosage values are saved in data track 4 of variant recordswrite_pgen
is about ~6x slower than reading variant by variant, but I'm not sure how to optimize further. This line takes up roughly 70% of the time but I'm not sure if we can replace it with anything elsePGENFiles.jl/src/write.jl
Line 197 in ba32323
psam
andpvar
files are also outputted. I'm not sure if it's better to output apvar.zst
instead, but that would require addingCodecZlib.jl
as another dependencyIf this seems fine, I still need to add some documentation