-
Notifications
You must be signed in to change notification settings - Fork 37
shift the migrant flag from metadata to the flags column #668
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
fb295de
shift the migrant flag from metadata to the flags column
bhaller 3d45be3
error in schema and test machinery
petrelharp 9a65a4d
Merge pull request #669 from petrelharp/fix_666
bhaller 04f4051
a little cleanup of SLIM_TSK_INDIVIDUAL_MIGRATED handling
bhaller 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
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
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
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
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 |
|---|---|---|
|
|
@@ -145,37 +145,37 @@ typedef struct __attribute__((__packed__)) { | |
| slim_pedigreeid_t pedigree_id_; // 8 bytes (int64_t): the SLiM pedigree ID for this individual, assigned by pedigree rec | ||
| slim_pedigreeid_t pedigree_p1_; // 8 bytes (int64_t): the SLiM pedigree ID for this individual's parent 1 | ||
| slim_pedigreeid_t pedigree_p2_; // 8 bytes (int64_t): the SLiM pedigree ID for this individual's parent 2 | ||
| slim_age_t age_; // 4 bytes (int32_t): the age of the individual (-1 for WF models) | ||
| slim_objectid_t subpopulation_id_; // 4 bytes (int32_t): the subpopulation the individual belongs to | ||
| int32_t sex_; // 4 bytes (int32_t): the sex of the individual, as defined by the IndividualSex enum | ||
| uint32_t flags_; // 4 bytes (uint32_t): assorted flags, see below | ||
| int64_t tag_; // 8 bytes (int64_t): the `tag` property value | ||
| double tagF_; // 8 bytes (double): the `tagF` property value | ||
|
|
||
| slim_age_t age_; // 4 bytes (int32_t): the age of the individual (-1 for WF models) | ||
| slim_objectid_t subpopulation_id_; // 4 bytes (int32_t): the subpopulation the individual belongs to | ||
|
|
||
| int16_t sex_; // 2 bytes (int16_t): the sex of the individual, as defined by the IndividualSex enum | ||
|
Collaborator
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. here the number of bytes changed, but it didn't change in the schema |
||
| uint8_t tagL0_set_; // 1 byte (uint8_t): a flag indicating whether `tagL0` is set | ||
| uint8_t tagL0_; // 1 byte (uint8_t): the `tagL0` property value | ||
| uint8_t tagL1_set_; // 1 byte (uint8_t): a flag indicating whether `tagL1` is set | ||
| uint8_t tagL1_; // 1 byte (uint8_t): the `tagL1` property value | ||
| uint8_t tagL2_set_; // 1 byte (uint8_t): a flag indicating whether `tagL2` is set | ||
| uint8_t tagL2_; // 1 byte (uint8_t): the `tagL2` property value | ||
|
|
||
| uint8_t tagL3_set_; // 1 byte (uint8_t): a flag indicating whether `tagL3` is set | ||
| uint8_t tagL3_; // 1 byte (uint8_t): the `tagL3` property value | ||
| uint8_t tagL4_set_; // 1 byte (uint8_t): a flag indicating whether `tagL4` is set | ||
| uint8_t tagL4_; // 1 byte (uint8_t): the `tagL4` property value | ||
|
|
||
| // NOTE: after this point the packed struct is only aligned to a two-byte boundary! | ||
| // NOTE: after this point the packed struct is only aligned to a four-byte boundary! | ||
|
|
||
| _IndividualPerTraitMetadata per_trait_[]; // 16 bytes per entry: 0 or more per-trait entries (count determined by the schema!) | ||
| } IndividualMetadataRec; | ||
|
|
||
| #define SLIM_INDIVIDUAL_METADATA_MIGRATED 0x01 // set if the individual has migrated in this cycle | ||
|
|
||
| // We double-check the size of these records to make sure we understand what they contain and how they're packed | ||
| // BCH 2/11/2026: Note that all of these metadata structs are now actually variable-length; this is just a base. | ||
| static_assert(sizeof(_MutationPerTraitMetadata) == 12, "_MutationPerTraitMetadata is not 12 bytes!"); | ||
| static_assert(sizeof(MutationTableMetadataRec) == 36, "MutationTableMetadataRec is not 36 bytes!"); | ||
| static_assert(sizeof(HaplosomeMetadataRec) == 9, "HaplosomeMetadataRec is not 9 bytes!"); | ||
| static_assert(sizeof(_IndividualPerTraitMetadata) == 16, "_IndividualPerTraitMetadata is not 16 bytes!"); | ||
| static_assert(sizeof(IndividualMetadataRec) == 66, "IndividualMetadataRec is not 66 bytes!"); | ||
| static_assert(sizeof(IndividualMetadataRec) == 60, "IndividualMetadataRec is not 60 bytes!"); | ||
|
|
||
| // We check endianness on the platform we're building on; we assume little-endianness in our read/write code, I think. | ||
| #if defined(__BYTE_ORDER__) | ||
|
|
||
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 |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 3.13 |
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.
Uh oh!
There was an error while loading. Please reload this page.