Hi Peter,
Thank you very much, that helps a lot!
I figured out I had been missing a few things: I believed that it was completely
impossible to sample individuals from >0 time units without remembering them.
Actually (if I am not mistaken again!) it is always possible to access individuals
that were alive x time units ago with
ts.individuals_alive_at(x) BUT we may not
be able to get the full genomic information for all of them (many of which will
e considered as non-samples), so this is when remembering them is useful.
Also, if I am not wrong, there might be two causes for an individual to be 'non-sample'
in the final recapited, simplified, mutated tree:
(a) if the individuals retained after simplification, and the individuals remembered
do not fully overlap (so we need to simplify with, as input, the node IDs of every individual
ever remembered during forward simulation).
(b) because some alive individuals with a non-sample node may be still retained after
simplification, so actually no matter what, it is mandatory to check that both individuals
nodes are samples before trying to output their genotypes, or to use the suggested
option ts.individuals_alive_at(x, samples_only=T) if available.
I suppose it would be possible to circumvent that feature when extracting genotypes,
e.g. by building the indivlist = [ ] of
ts.write_vcf(vcffile, individuals=indivlist) with another
option than
ts.individuals_alive_at(x, samples_only=T) ?
Especially in a case of serial sampling, where I would like to get the genotype of every
individual ever remembered even if not alive at time x?
I was thinking, maybe, saving a text file of all remembered individual IDs at each
sampling instance in SLiM, and binding these IDs into a single list (
indivlist = [ ] ) to pass
as argument in
ts.write_vcf(vcffile, individuals=indivlist) in pyslim.
Again, thank you so much for your quick and thoughtful answer,
I am having the best time discovering SLiM/pyslim!
Warm greetings,
Chrys