Skip to content

Adding table getters and appenders, simplifying, sorting, and variants iterator - #132

Open
LynxJinyangii wants to merge 1 commit into
HighlanderLab:mainfrom
LynxJinyangii:add-multiple-functions-on-pr-131
Open

Adding table getters and appenders, simplifying, sorting, and variants iterator#132
LynxJinyangii wants to merge 1 commit into
HighlanderLab:mainfrom
LynxJinyangii:add-multiple-functions-on-pr-131

Conversation

@LynxJinyangii

Copy link
Copy Markdown
Collaborator

No description provided.

@codecov

codecov Bot commented Apr 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.89396% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
RcppTskit/src/RcppTskit.cpp 99.74% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@gregorgorjanc gregorgorjanc changed the title Add multiple functions on pr 131 Adding variants iterator and other functions Apr 10, 2026
@gregorgorjanc
gregorgorjanc force-pushed the add-multiple-functions-on-pr-131 branch from c443f64 to c309e3a Compare April 10, 2026 10:24
@gregorgorjanc

Copy link
Copy Markdown
Member

I have rebased this to the most recent main branch that contains previous PRs.

@gregorgorjanc

gregorgorjanc commented Apr 11, 2026

Copy link
Copy Markdown
Member

There is quite a bit to review in this PR, so best to make a list of new things! @LynxJinyangii I would appreciate such communication so it's easier to follow your work and thoughts etc. Best to err on the slight "over communication" that "no communication";) Even just copying NEWS.md entries or linking to them in the PR message would be fab.

From what I gather, this is the list of additions we should review:

  • rtsk_table_collection_sort and TableCollection$sort related to Do we have to add TableCollection$sort() method? #99
  • rtsk_treeseq_get_samples and TreeSeqeunce$samples (do we need samples for TableCollection then too? - best to discuss; edit - there is no such method for TableCollection)
  • rtsk_node_table_get_row and TableCollection$node_table_get_row (do we need node_table_get_row for TreeSequence too? - best to discuss)
  • rtsk_const_tsk_no_check_integrity
  • rtsk_variant_iterator_init, rtsk_variant_iterator_next, and TreeSequence$variants

Comment thread RcppTskit/R/Class-TableCollection.R Outdated
@gregorgorjanc

Copy link
Copy Markdown
Member

@LynxJinyangii I have pushed changes to this branch/PR (rebased to main, which required sorting some merge conflicts; and come comments on sort), so best if you first pull before you start changes on your end.

@gregorgorjanc

Copy link
Copy Markdown
Member

I have done some polishing of the code, docs, and terms in my recent commit&push. @LynxJinyangii make sure you git pull on your end so that you get these changes. I have reviewed all but variant/iteration stuff - that will take me more time - but you can work on the comments I provided above in the meantime and then we iterate.

@gregorgorjanc

Copy link
Copy Markdown
Member

@bryo-han do you have capacity to go over this PR while I focus on teaching/course?

@gregorgorjanc gregorgorjanc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LynxJinyangii I have tagged you in a bunch of places where I don't see changes when I last reviewed certain parts. Remember to click on the > or v symbol next to file names to fold and unfold the file so you can see comments as you scroll through the files. Also, when the diff is large GitHub will not render the diff so you have to click on the file display to see diffs and comment sections.

Comment thread RcppTskit/R/Class-TableCollection.R Outdated
Comment thread RcppTskit/R/Class-TableCollection.R Outdated
Comment thread RcppTskit/R/Class-TreeSequence.R Outdated
Comment thread RcppTskit/src/RcppTskit.cpp Outdated
Comment thread RcppTskit/R/RcppExports.R Outdated
Comment thread RcppTskit/src/RcppTskit.cpp Outdated
Comment thread RcppTskit/src/RcppTskit.cpp Outdated
Comment thread RcppTskit/src/RcppTskit.cpp Outdated
Comment thread RcppTskit/NEWS.md Outdated
Comment thread RcppTskit/R/Class-TableCollection.R Outdated
SEXP ts, Rcpp::Nullable<Rcpp::IntegerVector> samples = R_NilValue,
bool isolated_as_missing = true,
Rcpp::Nullable<Rcpp::CharacterVector> alleles = R_NilValue,
double left = 0.0, double right = NA_REAL);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LynxJinyangii Python API has None for all of these args so would be good to be consistent/in-line with that API here to. The Python API then checks the inputs and does what it does. Best to follow that style on our end too. So, put R_NilValue (or should it be NA_REAL?). We can come back to this once I review everything;)

Comment thread RcppTskit/inst/include/RcppTskit_public.hpp Outdated
Comment thread RcppTskit/inst/include/RcppTskit_public.hpp Outdated
Comment thread RcppTskit/inst/include/RcppTskit_public.hpp Outdated
Comment thread RcppTskit/inst/include/RcppTskit_public.hpp
Comment thread RcppTskit/NEWS.md Outdated
Comment thread RcppTskit/NEWS.md Outdated
Comment thread RcppTskit/NEWS.md Outdated
Comment thread RcppTskit/NEWS.md Outdated
Comment thread RcppTskit/NEWS.md Outdated
Comment thread RcppTskit/NEWS.md Outdated
Comment thread RcppTskit/NEWS.md Outdated
Comment thread RcppTskit/NEWS.md Outdated
Comment thread RcppTskit/NEWS.md Outdated
@gregorgorjanc
gregorgorjanc force-pushed the add-multiple-functions-on-pr-131 branch from 1b577fb to d5f4377 Compare August 21, 2026 12:23
@gregorgorjanc gregorgorjanc changed the title Adding variants iterator and other functions Adding table getters and appenders, simplifying, sorting, and variants iterator Aug 21, 2026
@gregorgorjanc

Copy link
Copy Markdown
Member

@LynxJinyangii I have now pushed my changes and squashed commits into one. I still have to review/polish the variants iterator, which will come as part (in sync) of AlphaSimR review.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants