Currently we use both the individual.flags property (to record "remembered", "retained", and "alive") and a special "flags" property in metadata (to record 'is a migrant"). This is because when we first defined metadata, the thinking was that individual.flags should be kept for tskit-specific things. But then later the thinking shifted to "client code should use higher-order bits" (thus, we use bits 16, 17, and 18).
Also, turns out that pyslim.INDIVIDUAL_FLAG_MIGRATED was wrong (it was "1 << 1", which is 2, not 1, which is what it's supposed to be). So I don't think anyone has ever used the flags entry in metadata (or if they did, I'll bet they got wrong answers).
So if we're breaking things, then I propose removing the flags property from individual metadata, for efficiency and simplicity. We can put "migrated" in the individual.flags, as 2**19.
Currently we use both the
individual.flagsproperty (to record "remembered", "retained", and "alive") and a special "flags" property in metadata (to record 'is a migrant"). This is because when we first defined metadata, the thinking was thatindividual.flagsshould be kept for tskit-specific things. But then later the thinking shifted to "client code should use higher-order bits" (thus, we use bits 16, 17, and 18).Also, turns out that
pyslim.INDIVIDUAL_FLAG_MIGRATEDwas wrong (it was "1 << 1", which is 2, not 1, which is what it's supposed to be). So I don't think anyone has ever used the flags entry in metadata (or if they did, I'll bet they got wrong answers).So if we're breaking things, then I propose removing the
flagsproperty from individual metadata, for efficiency and simplicity. We can put "migrated" in theindividual.flags, as2**19.