Skip to content

Is there a way to save tag and/or custom metadata to the .trees output by SLiM? #198

Answered by petrelharp
elissasoroj asked this question in Q&A
Discussion options

You must be logged in to vote

Whoops - what @benjeffery says is right, but I think the question is about adding the information to individuals or nodes' metadata within SLiM. This is not possible, unfortunately - it'd be nice to do in the future, but doing it in a way that doesn't affect performance significantly is hard. However, it is possible to add arbitrary information to the top-level metadata, which gets at parts of your question - now treeSeqOutput takes a metadata argument that can be anything you want, and will be available as ts.metadata['SLiM']['user_metadata']. This can for instance contain the SLiM IDs and tags of all individuals alive at the end of the simulation, which you could use for reloading.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@jeromekelleher
Comment options

@elissasoroj
Comment options

Comment options

You must be logged in to vote
1 reply
@petrelharp
Comment options

Answer selected by elissasoroj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants