Thanks to #665, now the SLiM IDs of mutations carried by a tskit mutation are recorded in two places: the mutation's derived_state, and in it's metdata["derived_states"]. Ideally, when reading things back in, we would ignore the former and only use the latter, but this is complicated because we're using the tsk_variant machinery, which returns alleles. So to use the metadata instead we'd need to either extend the tsk_variant behavior or write our own. This would be fine but also not top priority.
So currently, to read in the file we need the derived_state column to have the comma-separated list of mutations IDs in it. Are there any requirements on the metadata? Does the code check that these agree? We should record this in treerec/implementation.md and in the manual if it's not there already (I'm only partway through checking).
Thanks to #665, now the SLiM IDs of mutations carried by a tskit mutation are recorded in two places: the mutation's
derived_state, and in it'smetdata["derived_states"]. Ideally, when reading things back in, we would ignore the former and only use the latter, but this is complicated because we're using thetsk_variantmachinery, which returns alleles. So to use the metadata instead we'd need to either extend thetsk_variantbehavior or write our own. This would be fine but also not top priority.So currently, to read in the file we need the
derived_statecolumn to have the comma-separated list of mutations IDs in it. Are there any requirements on the metadata? Does the code check that these agree? We should record this intreerec/implementation.mdand in the manual if it's not there already (I'm only partway through checking).