-
Notifications
You must be signed in to change notification settings - Fork 5
Adding variants iterator and other functions #132
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
Open
LynxJinyangii
wants to merge
13
commits into
HighlanderLab:main
Choose a base branch
from
LynxJinyangii:add-multiple-functions-on-pr-131
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
c309e3a
Add variants, table row helpers, and related tests
gregorgorjanc 8bb475d
Review/comments on TableCollection sort()
gregorgorjanc 094183a
Only effective use of const and polish ts
gregorgorjanc ccaf32a
Polishing terminology and code
gregorgorjanc fef7582
Unit test for content of node_table_get_row
gregorgorjanc db0b90b
make TableCollection() aligned with Python version
LynxJinyangii e33fc2d
add tests
LynxJinyangii 352d7e5
add add_row() functions for population migration provenance table
LynxJinyangii b343f23
add relaxed validator validate_integer_numeric_scalar_arg to allow us…
LynxJinyangii 0602237
polish validators and add get_row() functions for other tables
LynxJinyangii fdd40d0
add tests
LynxJinyangii 6a74096
polish based on comments in 0602237
LynxJinyangii 7ec71f3
polish based on comments in fdd40d0
LynxJinyangii File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,6 +40,28 @@ and releases adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html | |
| - Added `rtsk_mutation_table_add_row()` and | ||
| `TableCollection$mutation_table_add_row()` to append mutation rows from | ||
| \code{R}, mirroring `tsk_mutation_table_add_row()`. | ||
| - Added `rtsk_population_table_add_row()` and | ||
| `TableCollection$population_table_add_row()` to append population rows from | ||
| \code{R}, mirroring `tsk_population_table_add_row()`. | ||
| - Added `rtsk_migration_table_add_row()` and | ||
| `TableCollection$migration_table_add_row()` to append migration rows from | ||
| \code{R}, mirroring `tsk_migration_table_add_row()`. | ||
| - Added `rtsk_provenance_table_add_row()` and | ||
| `TableCollection$provenance_table_add_row()` to append provenance rows from | ||
| \code{R}, mirroring `tsk_provenance_table_add_row()`. | ||
| - Added `rtsk_node_table_get_row()` and `TableCollection$node_table_get_row()` | ||
| to retrieve node-table rows by 0-based row index. | ||
| - Added `rtsk_table_collection_sort()` and `TableCollection$sort()` to sort | ||
| table collections with 0-based `edge_start`, `site_start`, and | ||
| `mutation_start` semantics. | ||
| - Added low-level variant iterators | ||
| (`rtsk_variant_iterator_init()`/`rtsk_variant_iterator_next()`) and a | ||
| user-facing `TreeSequence$variants()` method to iterate over decoded | ||
| site-by-site variants from \code{R}, aligned with `tskit` Python API | ||
| semantics for `samples`, `isolated_as_missing`, `alleles`, and | ||
| `left`/`right` intervals. | ||
| - Added `rtsk_treeseq_get_samples()` and `TreeSequence$samples()` to retrieve | ||
| sample node IDs from a tree sequence. | ||
| - TODO | ||
|
|
||
| ### Changed | ||
|
|
@@ -53,6 +75,9 @@ and releases adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html | |
| `pointer` to `xptr`. | ||
| - Ensured `TableCollection$tree_sequence()` matches `tskit Python` API: | ||
| it now builds indexes on the `TableCollection`, if indexes are not present. | ||
| - Improved table row getter APIs and documentation for better `tskit C`/Python | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @LynxJinyangii I think we can remove 78-80 since getters have been introduced as part of 0.3.0 anyway. |
||
| parity. | ||
| - Refined integer validation behavior across scalar and optional vector inputs. | ||
| - We now use `bit64::integer64` (signed 64 bit integer) instead of `int` aiming | ||
| to approach `tsk_size_t` in `tskit C` (unsigned 64 bit integer); in low-level | ||
| `rtsk_treeseq_get_num_*()` wrappers and count/metadata-length fields. | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reduce to
Addedrtsk_table_collection_sort()andTableCollection$sort()to sort table collectionso we don't document arguments here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LynxJinyangii I believe this one is still not addressed.