ts read and write (double cross over breakpoints included) - #22
ts read and write (double cross over breakpoints included)#22LynxJinyangii wants to merge 19 commits into
Conversation
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment Thanks for integrating Codecov - We've got you covered ☂️ |
|
@LynxJinyangii I had a quick look, but there are a lot of changes so it will take me time. Very quickly. In R function documentation goes above the function when using Roxygen; no inside docstrings like in Python;) Please ensure all functions have at least some rudimentary docs so we know what the args are supposed to be (type, description, etc.). You will see in AlphaSimR that user facing functions have substantial docs, but also internal functions have some basic docs, so let's strive for that. You don't need to mark code changes by "Jinyang edited/added/changed" - we have diff tool to track this. It would be helpful if you communicate why we need another It would also be easier to review if you clearly set the intent behind the changes when you open a PR. Here is a good example gaynorr#276. Alternatively, a PR can just refer to an issue where the idea/implementation plan is laid out gaynorr#280. Can you please briefly describe your changes here so we can understand the high-level approach before we get lost in the weeds of the code review? |
|
@gregorgorjanc Thanks for the feedback. I'm currently adding ts things to runMacsTs, things at the R level (e.g. makeFoundersFromTs.R) might still change. I'll come back to documentation and comments once the core structure is more defined. Why use RecHistGen?
Main changes:
|
|
To make the variants() -related functions work, I temporaily linked it to RcppTskit version on https://github.com/LynxJinyangii/RcppTskit/tree/add-multiple-functions-on-pr-131 |
|
Recent commits are about runMacTS (or a staged way for advanced users: 1. ancestry simulation; 2. mutation simulation; 3. inbred leaf expansion (optional); 4. convert TS to |
There was a problem hiding this comment.
@LynxJinyangii as mentioned it’s MaCS and we have runMacs(), so please follow that across the code base.
| #' @return List with ancestry table collections and metadata. | ||
| #' @keywords internal | ||
| #' @noRd | ||
| simAnc <- function(args, nChr, inbred, ploidy, nThreads, seed, |
There was a problem hiding this comment.
Please add small examples to all functions so we can test them as a user what they do and also showing the basic use cases
| hot | ||
| } | ||
|
|
||
| .runMacTS_map_from_hotspots <- function(path, nChr, seqLen, genLen, usePhysicalPositions) { |
There was a problem hiding this comment.
Please document all functions or we loose understanding of the code
| #' | ||
| #' @return `MapPop` by default; otherwise a list with `pop`, `tables`, and metadata. | ||
| #' @keywords internal | ||
| #' @noRd |
There was a problem hiding this comment.
@LynxJinyangii Looks like all of these are noRd, so there won’t be many pages or what happens?
There was a problem hiding this comment.
@LynxJinyangii will we need this now that you have added/sorted TS recording in C++?
|
@LynxJinyangii I had a quick look and I am getting lost in the code - you have done a lot and likely used LLMs a lot too (which is ok), but we now have lots of code change across several files and looks like 20+ functions and I am not clear what is needed and what not. I appreciate you have done a lot of testing and several iterations, but it seems that we now have all of this mushed up together into this PR, so you are pushing onto me now to tease all this out, figure what you did, review it, test it, which will not work. For me to make a sense I need:
Will you be able to address this? |
ts read, sampling SNPs, and write out after simulation (mainly in R)
double cross over breakpoints included (mainly in Cpp)