pinskylab / genomics

Wrangling of genomic data and identity analysis
3 stars 2 forks source link

Access transition sizes from other scripts #9

Closed agdedrick closed 5 years ago

agdedrick commented 5 years ago

For the info in the plot here, would it be possible to save the transition sizes to female as an RData output so it can be sourced from other scripts (thinking specifically about ones in the Clownfish_persistence repository)? Having one vector of the transition sizes from J to F and one from M to F would be great or together in one vector with a J or M indicator is also fine.

Had a discussion with @mstuart1 about how to best source/show scripts in one repository that produce output that is used as input for other scripts/repositories without duplicating the analysis but also making it clear/visible what was done to future viewers. Will continue to think about (and see here for the ongoing discussion!

Thanks!

mstuart1 commented 5 years ago

Saved 2 RData files recap_first_males = fish that were recaptures and this observation is the first time they were breeding males.

recap_first_females = fish that were recaptures and this observation is the first time they were females.

agdedrick commented 5 years ago

This is great, thanks! Would it also be possible to have similar RData files but separating out the first time a recaptured fish was female into those that had last been caught as juveniles and those last caught as males? So, one data frame with fish that were recaptures, most recently caught as a juvenile, and this is their first observation as a female and one with fish that were recaptures, most recently caught as a male, and this is their first observation as a female. Or same data frame but with a M/J column indicating what they were at most recent capture before female.

(The logic here is I'd like to get sizes as close to the transition to female as possible. I'm assuming that there might be some fish caught as a juvenile, then not caught for several years and then next caught as a female - they might have been female longer than those caught most recently as a male. But maybe not? If that doesn't describe many fish and most first-females were also caught the year before they were female, then pulling apart whether they were J or M doesn't matter).