landscape genetics analysis
0
0
Entering edit mode
milton ruser ▴ 20
@milton-ruser-3949
Last seen 9.6 years ago
Dear all, I would like to stay in touch with those involved with landscape genetics. My interest is mainly to assess how simulated animal movements can influence genetic diversity. We are simulating animal movement using different landscape patterns, and each male-female meeting get a chance of genes exchange. So, on the beginning of the simulation we define a loci structure like: LOCI_struct_start=[ [0,1,0,0,1,1] , [0,1,0,1] ] where we can see to locus with different number of alleles (6 and 4). When female meet a male, there are a chance of female pass the genes combination to offspring, like LOCI_struct_end=[ [1,1,0,1,1,1] , [0,0,0,1] ]. My interest is to estimate both the genes diversity for each “female/potential offspring”, and for the whole “population” (all individual simulated on a specific landscape condition). Below you can find a sample of my data-structure. I would be happy if someone give me some adviser on which package/function to use, or some book that explain Fst, H0, He analysis using R/Bioconductor packages. library(rjson) myDF<-data.frame(cbind(x=c("[[1, 0, 0], [0, 1]]", "[[1, 1, 0], [0, 1]]","[[1, 0, 0], [1, 1]]", "[[0, 0, 1], [0, 1]]"))) myDF lets = unlist(lapply(fromJSON(as.character(myDF[1,])),length)) lets rep(LETTERS[1:length(lets)],lets) sequence(lets) col_names_letters<-paste(rep(LETTERS[1:length(lets)],lets),sequence(le ts),sep="") myDF_new<-NULL for (i in 1:nrow(myDF)) { x<-c(as.character(myDF[i,"x"])) fromJSON(x) unlist(fromJSON(x)) aux_DF<-data.frame(t(cbind(unlist(fromJSON(x))))) myDF_new<-data.frame(rbind(myDF_new,aux_DF)) } colnames(myDF_new)<-col_names_letters myDF_new cheers Milton [[alternative HTML version deleted]]
• 673 views
ADD COMMENT

Login before adding your answer.

Traffic: 750 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6