diff --git a/.Rhistory b/.Rhistory index 4617df8050a9f9a7c663ae9ae45c5de0d5a36d0e..84a1385b297f884c6ed7ed38dfa8256d40b530ba 100644 --- a/.Rhistory +++ b/.Rhistory @@ -1,51 +1,3 @@ -tab <- tab %>% mutate(n_geno = tab %>% select(n_HM1,n_HM2,n_HT) %>% rowSums(na.rm=TRUE)) -#calculate proportion of each genotype -tab <- tab %>% mutate(p_HM1 = n_HM1/n_geno) -tab <- tab %>% mutate(p_HM2 = n_HM2/n_geno) -tab <- tab %>% mutate(p_HT = n_HT/n_geno) -tab <- tab %>% mutate(p_NA = n_NA/(n_geno+n_NA)) -#stop if cross != "F2" or "N2" -if(!cross %in% c("F2","N2")){ -stop("Cross must be F2 or N2") -} -#stop of homo&hetero or pval not specified -if((is.na(homo)==TRUE & is.na(hetero)==TRUE) | is.na(pval)==TRUE){ -stop("Arguments homo and hetero or argument pval must be specified") -} -# #stop if no value for "homo" for F2 cross -# if(cross=="F2" & (is.na(homo)==TRUE | is.na(hetero)==TRUE)){ -# stop("Arguments homo and hetero must be specified for F2 crosses") -# } -# -# #stop if no value for "homo" and "hetero" for N2 cross -# if(cross=="N2" & (is.na(homo)==TRUE | is.na(hetero)==TRUE)){ -# stop("Arguments homo and hetero must be specified for N2 crosses") -# } -#exclude markers according to proportion of na -tab <- tab %>% mutate(exclude_prop=case_when(p_NA > na ~ 1, #exclude markers according to proportion of na -cross=="F2" & (p_HM1 < homo | p_HM2 < homo | p_HT < hetero) ~ 1, #exclude markers according to proportion of homozygous individuals for F2 cross -cross=="N2" & (p_HM1 < homo | p_HT < hetero) ~ 1, #exclude markers according to proportion of homozygous and heterozygous individuals for N2 cross -T ~ 0)) -tab <- tab %>% select(-c(p_HM1,p_HM2,p_HT,p_NA,n_geno)) -return(tab) -} -tab2 <- mark_prop(tab2,cross="F2",homo=0.1,hetero=0.1) -mark_prop <- function(tab,cross,homo=NA,hetero=NA,pval=NA,na=0.5){ -#calculate total number of individuals genotyped for each marker -tab <- tab %>% mutate(n_geno = tab %>% select(n_HM1,n_HM2,n_HT) %>% rowSums(na.rm=TRUE)) -#calculate proportion of each genotype -tab <- tab %>% mutate(p_HM1 = n_HM1/n_geno) -tab <- tab %>% mutate(p_HM2 = n_HM2/n_geno) -tab <- tab %>% mutate(p_HT = n_HT/n_geno) -tab <- tab %>% mutate(p_NA = n_NA/(n_geno+n_NA)) -#stop if cross != "F2" or "N2" -if(!cross %in% c("F2","N2")){ -stop("Cross must be F2 or N2") -} -#stop of homo&hetero or pval not specified -if((is.na(homo)==TRUE | is.na(hetero)==TRUE) & is.na(pval)==TRUE){ -stop("Arguments homo and hetero or argument pval must be specified") -} # #stop if no value for "homo" for F2 cross # if(cross=="F2" & (is.na(homo)==TRUE | is.na(hetero)==TRUE)){ # stop("Arguments homo and hetero must be specified for F2 crosses") @@ -55,23 +7,19 @@ stop("Arguments homo and hetero or argument pval must be specified") # if(cross=="N2" & (is.na(homo)==TRUE | is.na(hetero)==TRUE)){ # stop("Arguments homo and hetero must be specified for N2 crosses") # } -#exclude markers according to proportion of na -tab <- tab %>% mutate(exclude_prop=case_when(p_NA > na ~ 1, #exclude markers according to proportion of na -cross=="F2" & (p_HM1 < homo | p_HM2 < homo | p_HT < hetero) ~ 1, #exclude markers according to proportion of homozygous individuals for F2 cross -cross=="N2" & (p_HM1 < homo | p_HT < hetero) ~ 1, #exclude markers according to proportion of homozygous and heterozygous individuals for N2 cross -T ~ 0)) -tab <- tab %>% select(-c(p_HM1,p_HM2,p_HT,p_NA,n_geno)) -return(tab) +# #exclude markers according to proportion of na +# tab <- tab %>% mutate(exclude_prop=case_when(p_NA > na ~ 1, #exclude markers according to proportion of na +# cross=="F2" & (p_HM1 < homo | p_HM2 < homo | p_HT < hetero) ~ 1, #exclude markers according to proportion of homozygous individuals for F2 cross +# cross=="N2" & (p_HM1 < homo | p_HT < hetero) ~ 1, #exclude markers according to proportion of homozygous and heterozygous individuals for N2 cross +# T ~ 0)) +# tab <- tab %>% select(-c(p_HM1,p_HM2,p_HT,p_NA,n_geno)) +# return(tab) } -tab2 <- mark_prop(tab2,cross="F2",homo=0.1,hetero=0.1) -tab2 <- mark_prop(tab2,cross="F2",na=0.05) -tab2 <- mark_prop(tab2,cross="F2",pval=0.05) -tab2 <- mark_prop(tab2,cross="F2",homo=0.05) -tab2 <- mark_prop(tab2,cross="F2",hetero=0.05) -tab2 <- mark_prop(tab2,cross="F2",pval=0.05) +test_tab <- tab2[1:20,] +tab3 <- mark_prop(test_tab,cross="F2",pval=0.05) mark_prop <- function(tab,cross,homo=NA,hetero=NA,pval=NA,na=0.5){ #calculate total number of individuals genotyped for each marker -tab <- tab %>% mutate(n_geno = tab %>% select(n_HM1,n_HM2,n_HT) %>% rowSums(na.rm=TRUE)) +tab <- tab %>% mutate(n_geno = (n_HM1 + n_HM2 + n_HT)) #calculate proportion of each genotype tab <- tab %>% mutate(p_HM1 = n_HM1/n_geno) tab <- tab %>% mutate(p_HM2 = n_HM2/n_geno) @@ -100,47 +48,35 @@ T ~ exclude_prop } #stop with pval chisq.test if(is.na(pval)==FALSE){ -#block pval result if all missing genotypes -tab <- tab %>% mutate(chi_pval=case_when(p_HM1=0 & p_HM2 = 0 & p_HT = 0 ~ NA, -tab2 <- mark_prop(tab2,cross="F2",pval=0.05) -mark_prop <- function(tab,cross,homo=NA,hetero=NA,pval=NA,na=0.5){ -#calculate total number of individuals genotyped for each marker -tab <- tab %>% mutate(n_geno = tab %>% select(n_HM1,n_HM2,n_HT) %>% rowSums(na.rm=TRUE)) -#calculate proportion of each genotype -tab <- tab %>% mutate(p_HM1 = n_HM1/n_geno) -tab <- tab %>% mutate(p_HM2 = n_HM2/n_geno) -tab <- tab %>% mutate(p_HT = n_HT/n_geno) -tab <- tab %>% mutate(p_NA = n_NA/(n_geno+n_NA)) -#stop if cross != "F2" or "N2" -if(!cross %in% c("F2","N2")){ -stop("Cross must be F2 or N2") +tab <- tab %>% filter(p_NA != 1) %>% rowwise() %>% +mutate(.,chi_pval = tibble(n_HM1,n_HM2,n_HT) %>% +chisq.test(p=c(0.25,0.25,0.5)) %>% .$p.value) %>% +full_join(.,tab) } -#stop of homo&hetero or pval not specified -if((is.na(homo)==TRUE | is.na(hetero)==TRUE) & is.na(pval)==TRUE){ -stop("Arguments homo and hetero or argument pval must be specified") -} -#stop with prop of na -tab <- tab %>% -mutate(exclude_prop=case_when(p_NA > na ~ 1, -T ~ 0)) -#stop with prop of homo/hetero -if(is.na(pval)==TRUE){ -tab <- tab %>% -mutate(exclude_prop=case_when(p_NA > na ~ 1, -cross=="F2" & (p_HM1 < homo | p_HM2 < homo | p_HT < hetero) ~ 1, -cross=="N2" & (p_HM1 < homo | p_HT < hetero) ~ 1, -T ~ exclude_prop -)) +print(tab) +# #stop if no value for "homo" for F2 cross +# if(cross=="F2" & (is.na(homo)==TRUE | is.na(hetero)==TRUE)){ +# stop("Arguments homo and hetero must be specified for F2 crosses") +# } +# +# #stop if no value for "homo" and "hetero" for N2 cross +# if(cross=="N2" & (is.na(homo)==TRUE | is.na(hetero)==TRUE)){ +# stop("Arguments homo and hetero must be specified for N2 crosses") +# } +# #exclude markers according to proportion of na +# tab <- tab %>% mutate(exclude_prop=case_when(p_NA > na ~ 1, #exclude markers according to proportion of na +# cross=="F2" & (p_HM1 < homo | p_HM2 < homo | p_HT < hetero) ~ 1, #exclude markers according to proportion of homozygous individuals for F2 cross +# cross=="N2" & (p_HM1 < homo | p_HT < hetero) ~ 1, #exclude markers according to proportion of homozygous and heterozygous individuals for N2 cross +# T ~ 0)) +# tab <- tab %>% select(-c(p_HM1,p_HM2,p_HT,p_NA,n_geno)) +# return(tab) } -#stop with pval chisq.test -if(is.na(pval)==FALSE){ -#block pval result if all missing genotypes -tab <- tab %>% mutate(chi_pval=case_when(p_HM1=0 & p_HM2 = 0 & p_HT = 0 ~ NA, -tab2 <- mark_prop(tab2,cross="F2",pval=0.05) -mark_prop(tab2,cross="F2",pval=0.05) +test_tab <- tab2[1:20,] +tab3 <- mark_prop(test_tab,cross="F2",pval=0.05) +View(tab3) mark_prop <- function(tab,cross,homo=NA,hetero=NA,pval=NA,na=0.5){ #calculate total number of individuals genotyped for each marker -tab <- tab %>% mutate(n_geno = tab %>% select(n_HM1,n_HM2,n_HT) %>% rowSums(na.rm=TRUE)) +tab <- tab %>% mutate(n_geno = (n_HM1 + n_HM2 + n_HT)) #calculate proportion of each genotype tab <- tab %>% mutate(p_HM1 = n_HM1/n_geno) tab <- tab %>% mutate(p_HM2 = n_HM2/n_geno) @@ -169,47 +105,36 @@ T ~ exclude_prop } #stop with pval chisq.test if(is.na(pval)==FALSE){ -#block pval result if all missing genotypes -tab <- tab %>% mutate(chi_pval=case_when(p_HM1=0 & p_HM2 = 0 & p_HT = 0 ~ NA, -tab2 <- mark_prop(tab2,cross="F2",pval=0.05) -mark_prop(tab2,cross="F2",pval=0.05) -mark_prop <- function(tab,cross,homo=NA,hetero=NA,pval=NA,na=0.5){ -#calculate total number of individuals genotyped for each marker -tab <- tab %>% mutate(n_geno = tab %>% select(n_HM1,n_HM2,n_HT) %>% rowSums(na.rm=TRUE)) -#calculate proportion of each genotype -tab <- tab %>% mutate(p_HM1 = n_HM1/n_geno) -tab <- tab %>% mutate(p_HM2 = n_HM2/n_geno) -tab <- tab %>% mutate(p_HT = n_HT/n_geno) -tab <- tab %>% mutate(p_NA = n_NA/(n_geno+n_NA)) -#stop if cross != "F2" or "N2" -if(!cross %in% c("F2","N2")){ -stop("Cross must be F2 or N2") -} -#stop of homo&hetero or pval not specified -if((is.na(homo)==TRUE | is.na(hetero)==TRUE) & is.na(pval)==TRUE){ -stop("Arguments homo and hetero or argument pval must be specified") +#stock colnames to join +names <- colnames(tab) +tab <- tab %>% filter(p_NA != 1) %>% rowwise() %>% +mutate(.,chi_pval = tibble(n_HM1,n_HM2,n_HT) %>% +chisq.test(p=c(0.25,0.25,0.5)) %>% .$p.value) %>% +full_join(.,tab,by=names) } -#stop with prop of na -tab <- tab %>% -mutate(exclude_prop=case_when(p_NA > na ~ 1, -T ~ 0)) -#stop with prop of homo/hetero -if(is.na(pval)==TRUE){ -tab <- tab %>% -mutate(exclude_prop=case_when(p_NA > na ~ 1, -cross=="F2" & (p_HM1 < homo | p_HM2 < homo | p_HT < hetero) ~ 1, -cross=="N2" & (p_HM1 < homo | p_HT < hetero) ~ 1, -T ~ exclude_prop -)) +print(tab) +# #stop if no value for "homo" for F2 cross +# if(cross=="F2" & (is.na(homo)==TRUE | is.na(hetero)==TRUE)){ +# stop("Arguments homo and hetero must be specified for F2 crosses") +# } +# +# #stop if no value for "homo" and "hetero" for N2 cross +# if(cross=="N2" & (is.na(homo)==TRUE | is.na(hetero)==TRUE)){ +# stop("Arguments homo and hetero must be specified for N2 crosses") +# } +# #exclude markers according to proportion of na +# tab <- tab %>% mutate(exclude_prop=case_when(p_NA > na ~ 1, #exclude markers according to proportion of na +# cross=="F2" & (p_HM1 < homo | p_HM2 < homo | p_HT < hetero) ~ 1, #exclude markers according to proportion of homozygous individuals for F2 cross +# cross=="N2" & (p_HM1 < homo | p_HT < hetero) ~ 1, #exclude markers according to proportion of homozygous and heterozygous individuals for N2 cross +# T ~ 0)) +# tab <- tab %>% select(-c(p_HM1,p_HM2,p_HT,p_NA,n_geno)) +# return(tab) } -#stop with pval chisq.test -if(is.na(pval)==FALSE){ -#block pval result if all missing genotypes -tab <- tab %>% mutate(chi_pval=case_when(p_HM1=0 & p_HM2 = 0 & p_HT = 0 ~ NA, -tab2 <- mark_prop(tab2,cross="F2",pval=0.05) +test_tab <- tab2[1:20,] +tab3 <- mark_prop(test_tab,cross="F2",pval=0.05) mark_prop <- function(tab,cross,homo=NA,hetero=NA,pval=NA,na=0.5){ #calculate total number of individuals genotyped for each marker -tab <- tab %>% mutate(n_geno = tab %>% select(n_HM1,n_HM2,n_HT) %>% rowSums(na.rm=TRUE)) +tab <- tab %>% mutate(n_geno = (n_HM1 + n_HM2 + n_HT)) #calculate proportion of each genotype tab <- tab %>% mutate(p_HM1 = n_HM1/n_geno) tab <- tab %>% mutate(p_HM2 = n_HM2/n_geno) @@ -238,11 +163,36 @@ T ~ exclude_prop } #stop with pval chisq.test if(is.na(pval)==FALSE){ -#block pval result if all missing genotypes -tab <- tab %>% mutate(chi_pval=case_when(p_HM1=0 & p_HM2 = 0 & p_HT = 0 ~ NA, +#stock colnames to join +names <- colnames(tab) +tab <- tab %>% filter(p_NA != 1) %>% rowwise() %>% +mutate(.,chi_pval = tibble(n_HM1,n_HM2,n_HT) %>% +chisq.test(p=c(0.25,0.25,0.5)) %>% .$p.value) %>% +full_join(.,tab,by=names) +} +print(tab) +# #stop if no value for "homo" for F2 cross +# if(cross=="F2" & (is.na(homo)==TRUE | is.na(hetero)==TRUE)){ +# stop("Arguments homo and hetero must be specified for F2 crosses") +# } +# +# #stop if no value for "homo" and "hetero" for N2 cross +# if(cross=="N2" & (is.na(homo)==TRUE | is.na(hetero)==TRUE)){ +# stop("Arguments homo and hetero must be specified for N2 crosses") +# } +# #exclude markers according to proportion of na +# tab <- tab %>% mutate(exclude_prop=case_when(p_NA > na ~ 1, #exclude markers according to proportion of na +# cross=="F2" & (p_HM1 < homo | p_HM2 < homo | p_HT < hetero) ~ 1, #exclude markers according to proportion of homozygous individuals for F2 cross +# cross=="N2" & (p_HM1 < homo | p_HT < hetero) ~ 1, #exclude markers according to proportion of homozygous and heterozygous individuals for N2 cross +# T ~ 0)) +tab <- tab %>% select(-c(p_HM1,p_HM2,p_HT,p_NA,n_geno)) +return(tab) +} +test_tab <- tab2[1:20,] +tab3 <- mark_prop(test_tab,cross="F2",pval=0.05) mark_prop <- function(tab,cross,homo=NA,hetero=NA,pval=NA,na=0.5){ #calculate total number of individuals genotyped for each marker -tab <- tab %>% mutate(n_geno = tab %>% select(n_HM1,n_HM2,n_HT) %>% rowSums(na.rm=TRUE)) +tab <- tab %>% mutate(n_geno = (n_HM1 + n_HM2 + n_HT)) #calculate proportion of each genotype tab <- tab %>% mutate(p_HM1 = n_HM1/n_geno) tab <- tab %>% mutate(p_HM2 = n_HM2/n_geno) @@ -271,11 +221,13 @@ T ~ exclude_prop } #stop with pval chisq.test if(is.na(pval)==FALSE){ -#block pval result if all missing genotypes -tab <- tab %>% mutate(chi_pval=case_when(p_HM1==0 & p_HM2 == 0 & p_HT == 0 ~ NA, -T ~ 0)) +#stock colnames to join +names <- colnames(tab) +tab <- tab %>% filter(p_NA != 1) %>% rowwise() %>% +mutate(.,chi_pval = tibble(n_HM1,n_HM2,n_HT) %>% +chisq.test(p=c(0.25,0.25,0.5)) %>% .$p.value) %>% +full_join(.,tab,by=names) } -print(tab) # #stop if no value for "homo" for F2 cross # if(cross=="F2" & (is.na(homo)==TRUE | is.na(hetero)==TRUE)){ # stop("Arguments homo and hetero must be specified for F2 crosses") @@ -290,13 +242,15 @@ print(tab) # cross=="F2" & (p_HM1 < homo | p_HM2 < homo | p_HT < hetero) ~ 1, #exclude markers according to proportion of homozygous individuals for F2 cross # cross=="N2" & (p_HM1 < homo | p_HT < hetero) ~ 1, #exclude markers according to proportion of homozygous and heterozygous individuals for N2 cross # T ~ 0)) -# tab <- tab %>% select(-c(p_HM1,p_HM2,p_HT,p_NA,n_geno)) -# return(tab) +tab <- tab %>% select(-c(p_HM1,p_HM2,p_HT,p_NA,n_geno)) +return(tab) } -tab2 <- mark_prop(tab2,cross="F2",pval=0.05) +test_tab <- tab2[1:20,] +tab3 <- mark_prop(test_tab,cross="F2",pval=0.05) +tab3 <- mark_prop(tab2,cross="F2",pval=0.05) mark_prop <- function(tab,cross,homo=NA,hetero=NA,pval=NA,na=0.5){ #calculate total number of individuals genotyped for each marker -tab <- tab %>% mutate(n_geno = tab %>% select(n_HM1,n_HM2,n_HT) %>% rowSums(na.rm=TRUE)) +tab <- tab %>% mutate(n_geno = (n_HM1 + n_HM2 + n_HT)) #calculate proportion of each genotype tab <- tab %>% mutate(p_HM1 = n_HM1/n_geno) tab <- tab %>% mutate(p_HM2 = n_HM2/n_geno) @@ -325,11 +279,15 @@ T ~ exclude_prop } #stop with pval chisq.test if(is.na(pval)==FALSE){ -#block pval result if all missing genotypes -tab <- tab %>% mutate(chi_pval=case_when(p_HM1==0 & p_HM2 == 0 & p_HT == 0 ~ 1, -T ~ 0)) +#stock colnames to join +names <- colnames(tab) +tab <- tab %>% filter(p_NA != 1) %>% rowwise() %>% +mutate(.,chi_pval = tibble(n_HM1,n_HM2,n_HT) %>% +chisq.test(p=c(0.25,0.25,0.5)) %>% .$p.value) %>% +full_join(.,tab,by=names) +tab <- tab %>% mutate(exclude_prop=case_when(chi_pval < pval ~ 1, +T ~ exclude_prop)) } -print(tab) # #stop if no value for "homo" for F2 cross # if(cross=="F2" & (is.na(homo)==TRUE | is.na(hetero)==TRUE)){ # stop("Arguments homo and hetero must be specified for F2 crosses") @@ -344,13 +302,13 @@ print(tab) # cross=="F2" & (p_HM1 < homo | p_HM2 < homo | p_HT < hetero) ~ 1, #exclude markers according to proportion of homozygous individuals for F2 cross # cross=="N2" & (p_HM1 < homo | p_HT < hetero) ~ 1, #exclude markers according to proportion of homozygous and heterozygous individuals for N2 cross # T ~ 0)) -# tab <- tab %>% select(-c(p_HM1,p_HM2,p_HT,p_NA,n_geno)) -# return(tab) +tab <- tab %>% select(-c(p_HM1,p_HM2,p_HT,p_NA,n_geno)) +return(tab) } -tab2 <- mark_prop(tab2,cross="F2",pval=0.05) +tab3 <- mark_prop(tab2,cross="F2",pval=0.05) mark_prop <- function(tab,cross,homo=NA,hetero=NA,pval=NA,na=0.5){ #calculate total number of individuals genotyped for each marker -tab <- tab %>% mutate(n_geno = tab %>% select(n_HM1,n_HM2,n_HT) %>% rowSums(na.rm=TRUE)) +tab <- tab %>% mutate(n_geno = (n_HM1 + n_HM2 + n_HT)) #calculate proportion of each genotype tab <- tab %>% mutate(p_HM1 = n_HM1/n_geno) tab <- tab %>% mutate(p_HM2 = n_HM2/n_geno) @@ -379,11 +337,15 @@ T ~ exclude_prop } #stop with pval chisq.test if(is.na(pval)==FALSE){ -#block pval result if all missing genotypes -tab <- tab %>% mutate(chi_pval=case_when(p_NA==1 ~ 1, -T ~ 0)) +#stock colnames to join +names <- colnames(tab) +tab <- tab %>% filter(p_NA != 1) %>% rowwise() %>% +mutate(.,chi_pval = tibble(n_HM1,n_HM2,n_HT) %>% +chisq.test(p=c(0.25,0.25,0.5)) %>% .$p.value) %>% +full_join(.,tab,by=names) +tab <- tab %>% mutate(exclude_prop=case_when(chi_pval < pval ~ 1, +T ~ exclude_prop)) } -print(tab) # #stop if no value for "homo" for F2 cross # if(cross=="F2" & (is.na(homo)==TRUE | is.na(hetero)==TRUE)){ # stop("Arguments homo and hetero must be specified for F2 crosses") @@ -398,13 +360,13 @@ print(tab) # cross=="F2" & (p_HM1 < homo | p_HM2 < homo | p_HT < hetero) ~ 1, #exclude markers according to proportion of homozygous individuals for F2 cross # cross=="N2" & (p_HM1 < homo | p_HT < hetero) ~ 1, #exclude markers according to proportion of homozygous and heterozygous individuals for N2 cross # T ~ 0)) -# tab <- tab %>% select(-c(p_HM1,p_HM2,p_HT,p_NA,n_geno)) -# return(tab) +tab <- tab %>% select(-c(p_HM1,p_HM2,p_HT,p_NA,n_geno,chi_pval)) +return(tab) } -tab2 <- mark_prop(tab2,cross="F2",pval=0.05) +tab3 <- mark_prop(tab2,cross="F2",pval=0.05) mark_prop <- function(tab,cross,homo=NA,hetero=NA,pval=NA,na=0.5){ #calculate total number of individuals genotyped for each marker -tab <- tab %>% mutate(n_geno = tab %>% select(n_HM1,n_HM2,n_HT) %>% rowSums(na.rm=TRUE)) +tab <- tab %>% mutate(n_geno = (n_HM1 + n_HM2 + n_HT)) #calculate proportion of each genotype tab <- tab %>% mutate(p_HM1 = n_HM1/n_geno) tab <- tab %>% mutate(p_HM2 = n_HM2/n_geno) @@ -433,32 +395,19 @@ T ~ exclude_prop } #stop with pval chisq.test if(is.na(pval)==FALSE){ -#block pval result if all missing genotypes -tab <- tab %>% mutate(chi_pval=case_when(p_NA==1 ~ NA_integer_, -T ~ 0)) +#stock colnames to join +names <- colnames(tab) +tab <- tab %>% filter(p_NA != 1) %>% rowwise() %>% +mutate(.,chi_pval = tibble(n_HM1,n_HM2,n_HT) %>% +chisq.test(p=c(0.25,0.25,0.5)) %>% .$p.value) %>% +full_join(.,tab,by=names) +tab <- tab %>% mutate(exclude_prop=case_when(chi_pval < pval ~ 1, +T ~ exclude_prop)) } -print(tab) -# #stop if no value for "homo" for F2 cross -# if(cross=="F2" & (is.na(homo)==TRUE | is.na(hetero)==TRUE)){ -# stop("Arguments homo and hetero must be specified for F2 crosses") -# } -# -# #stop if no value for "homo" and "hetero" for N2 cross -# if(cross=="N2" & (is.na(homo)==TRUE | is.na(hetero)==TRUE)){ -# stop("Arguments homo and hetero must be specified for N2 crosses") -# } -# #exclude markers according to proportion of na -# tab <- tab %>% mutate(exclude_prop=case_when(p_NA > na ~ 1, #exclude markers according to proportion of na -# cross=="F2" & (p_HM1 < homo | p_HM2 < homo | p_HT < hetero) ~ 1, #exclude markers according to proportion of homozygous individuals for F2 cross -# cross=="N2" & (p_HM1 < homo | p_HT < hetero) ~ 1, #exclude markers according to proportion of homozygous and heterozygous individuals for N2 cross -# T ~ 0)) -# tab <- tab %>% select(-c(p_HM1,p_HM2,p_HT,p_NA,n_geno)) -# return(tab) -} -tab2 <- mark_prop(tab2,cross="F2",pval=0.05) +T ~ 0)) mark_prop <- function(tab,cross,homo=NA,hetero=NA,pval=NA,na=0.5){ #calculate total number of individuals genotyped for each marker -tab <- tab %>% mutate(n_geno = tab %>% select(n_HM1,n_HM2,n_HT) %>% rowSums(na.rm=TRUE)) +tab <- tab %>% mutate(n_geno = (n_HM1 + n_HM2 + n_HT)) #calculate proportion of each genotype tab <- tab %>% mutate(p_HM1 = n_HM1/n_geno) tab <- tab %>% mutate(p_HM2 = n_HM2/n_geno) @@ -487,26 +436,77 @@ T ~ exclude_prop } #stop with pval chisq.test if(is.na(pval)==FALSE){ -#block pval result if all missing genotypes -tab <- tab %>% mutate(chi_pval=case_when(p_NA==1 ~ NA_real_, -T ~ 0)) -} -print(tab) -# #stop if no value for "homo" for F2 cross -# if(cross=="F2" & (is.na(homo)==TRUE | is.na(hetero)==TRUE)){ -# stop("Arguments homo and hetero must be specified for F2 crosses") -# } -# -# #stop if no value for "homo" and "hetero" for N2 cross -# if(cross=="N2" & (is.na(homo)==TRUE | is.na(hetero)==TRUE)){ -# stop("Arguments homo and hetero must be specified for N2 crosses") -# } -# #exclude markers according to proportion of na -# tab <- tab %>% mutate(exclude_prop=case_when(p_NA > na ~ 1, #exclude markers according to proportion of na -# cross=="F2" & (p_HM1 < homo | p_HM2 < homo | p_HT < hetero) ~ 1, #exclude markers according to proportion of homozygous individuals for F2 cross -# cross=="N2" & (p_HM1 < homo | p_HT < hetero) ~ 1, #exclude markers according to proportion of homozygous and heterozygous individuals for N2 cross -# T ~ 0)) -# tab <- tab %>% select(-c(p_HM1,p_HM2,p_HT,p_NA,n_geno)) -# return(tab) +#stock colnames to join +names <- colnames(tab) +tab <- tab %>% filter(p_NA != 1) %>% rowwise() %>% +mutate(.,chi_pval = tibble(n_HM1,n_HM2,n_HT) %>% +chisq.test(p=c(0.25,0.25,0.5)) %>% .$p.value) %>% +full_join(.,tab,by=names) +tab <- tab %>% mutate(exclude_prop=case_when(chi_pval < pval ~ 1, +T ~ exclude_prop)) +} +tab <- tab %>% select(-c(p_HM1,p_HM2,p_HT,p_NA,n_geno,chi_pval)) +return(tab) } tab2 <- mark_prop(tab2,cross="F2",pval=0.05) +knitr::opts_chunk$set( +collapse = TRUE, +comment = "#>" +) +library(dplyr) +library(stuart) +annot_mini <- read.csv(url("https://raw.githubusercontent.com/kbroman/MUGAarrays/master/UWisc/mini_uwisc_v2.csv")) +data(genos) +summary(genos) +data(phenos) +summary(phenos) +strains <- geno_strains(ref=annot_mini,geno=genos,par1=c("StrainsA_1","StrainsA_2"),par2=c("StrainsB_1","StrainsB_2"),name1="parent1",name2="parent2") +head(strains) +genos <- genos %>% filter(!Sample.ID %in% c("StrainsA_1", "StrainsA_2", "StrainsB_1","StrainsB_2")) +data(stuart_tab) +summary(stuart_tab) +tab2 <- mark_match(stuart_tab,ref=strains) +tab2 %>% filter(exclude_match==1) +tab2 <- mark_poly(tab2) +head(tab2) +tab2 <- mark_prop(tab2,cross="F2",pval=0.05) +devtools::build(path=".",vignettes = FALSE) +devtools::build_vignettes() +devtools::build_vignettes() +devtools::build(path=".",vignettes = FALSE) +devtools::build_vignettes() +devtools::build(path=".",vignettes = FALSE) +devtools::build_vignettes() +library(dplyr) +library(stuart) +knitr::opts_chunk$set( +collapse = TRUE, +comment = "#>" +) +annot_mini <- read.csv(url("https://raw.githubusercontent.com/kbroman/MUGAarrays/master/UWisc/mini_uwisc_v2.csv")) +data(genos) +summary(genos) +data(phenos) +summary(phenos) +strains <- geno_strains(ref=annot_mini,geno=genos,par1=c("StrainsA_1","StrainsA_2"),par2=c("StrainsB_1","StrainsB_2"),name1="parent1",name2="parent2") +head(strains) +genos <- genos %>% filter(!Sample.ID %in% c("StrainsA_1", "StrainsA_2", "StrainsB_1","StrainsB_2")) +data(stuart_tab) +summary(stuart_tab) +tab2 <- mark_match(stuart_tab,ref=strains) +tab2 %>% filter(exclude_match==1) +tab2 <- mark_poly(tab2) +head(tab2) +tab2 <- mark_prop(tab2,cross="F2",homo=0.1,hetero=0.1) +head(tab2) +tab2 <- mark_allele(tab=tab2,ref=strains,par1="parent1",par2="parent2") +tab2 %>% arrange(desc(exclude_allele)) %>% head() +strains %>% filter(marker %in% c("gJAX00038569","gJAX00425031","gUNC12245354","gUNC15530876","gUNC21555204","gUNC21596600")) %>% arrange(marker) %>% select(marker,parent1,parent2) +rqtl_file <- write_rqtl(geno=genos,pheno=phenos,tab=tab2,ref=strains,par1="parent1",par2="parent2",prefix="ind_",pos="cM_cox") +rqtl_file[1:10,1:7] +devtools::build_vignettes() +devtools::build_vignettes() +devtools::build_vignettes() +devtools::build_vignettes() +devtools::build_vignettes() +devtools::build_vignettes() diff --git a/.Rproj.user/9DAE6990/pcs/files-pane.pper b/.Rproj.user/9DAE6990/pcs/files-pane.pper index 62dbe5e1d1674930d70678117198f25a2363ef11..bf0d7fd969d4b2badc7dedcf6ed14f573bc24904 100644 --- a/.Rproj.user/9DAE6990/pcs/files-pane.pper +++ b/.Rproj.user/9DAE6990/pcs/files-pane.pper @@ -1,5 +1,5 @@ { - "path" : "~/stuart_package/stuart", + "path" : "~/Documents/PhD/stuart_R/stuart", "sortOrder" : [ { "ascending" : true, diff --git a/.Rproj.user/9DAE6990/pcs/source-pane.pper b/.Rproj.user/9DAE6990/pcs/source-pane.pper index 70829f67631c05a34ae267bf4377c69a6b3ef1c1..1743e40fec30e357993d33f5cb053bf027524dc8 100644 --- a/.Rproj.user/9DAE6990/pcs/source-pane.pper +++ b/.Rproj.user/9DAE6990/pcs/source-pane.pper @@ -1,3 +1,3 @@ { - "activeTab" : 1 + "activeTab" : 0 } \ No newline at end of file diff --git a/.Rproj.user/9DAE6990/pcs/windowlayoutstate.pper b/.Rproj.user/9DAE6990/pcs/windowlayoutstate.pper index e736cfdcc76ba9af2c1159730dd135fc21d47f23..66f1d5796b2f8b1d7b727cf807e6b0652471bf55 100644 --- a/.Rproj.user/9DAE6990/pcs/windowlayoutstate.pper +++ b/.Rproj.user/9DAE6990/pcs/windowlayoutstate.pper @@ -1,14 +1,14 @@ { "left" : { - "panelheight" : 583, - "splitterpos" : 244, - "topwindowstate" : "MAXIMIZE", - "windowheight" : 621 + "panelheight" : 783, + "splitterpos" : 327, + "topwindowstate" : "NORMAL", + "windowheight" : 821 }, "right" : { - "panelheight" : 1271, - "splitterpos" : 803, + "panelheight" : 783, + "splitterpos" : 494, "topwindowstate" : "NORMAL", - "windowheight" : 1309 + "windowheight" : 821 } } \ No newline at end of file diff --git a/.Rproj.user/9DAE6990/rmd-outputs b/.Rproj.user/9DAE6990/rmd-outputs index 47f8c135bee1edbf9fcc1413f2cf84bcc58a3230..d595b050d2a71160e76989469e87ec8b66d5012b 100644 --- a/.Rproj.user/9DAE6990/rmd-outputs +++ b/.Rproj.user/9DAE6990/rmd-outputs @@ -1,8 +1,8 @@ -/private/var/folders/dn/j71yz2tn5_gdffs8fqxhddrr0000gn/T/Rtmp3VMULh/preview-1ced414f7aab.dir/stuaRt.html +/private/var/folders/dn/j71yz2tn5_gdffs8fqxhddrr0000gn/T/RtmpZZZ4WE/preview-31873a42c16d.dir/stuaRt.html /private/var/folders/dn/j71yz2tn5_gdffs8fqxhddrr0000gn/T/Rtmp3VMULh/preview-1ced48fe920c.dir/stuaRt.html /private/var/folders/dn/j71yz2tn5_gdffs8fqxhddrr0000gn/T/RtmpNme5vw/preview-4c4321234d03.dir/stuaRt.html - +/private/var/folders/dn/j71yz2tn5_gdffs8fqxhddrr0000gn/T/RtmpZZZ4WE/preview-3187564b41ab.dir/stuaRt.html diff --git a/.Rproj.user/9DAE6990/sources/prop/52B275C1 b/.Rproj.user/9DAE6990/sources/prop/52B275C1 index 917ce62cf18035dfb273c1b4502bbff8d5a12d15..abc011a4d2982be91bc54d6419c42079b3161d65 100644 --- a/.Rproj.user/9DAE6990/sources/prop/52B275C1 +++ b/.Rproj.user/9DAE6990/sources/prop/52B275C1 @@ -1,4 +1,4 @@ { - "cursorPosition" : "70,29", - "scrollLine" : "40" + "cursorPosition" : "48,24", + "scrollLine" : "0" } \ No newline at end of file diff --git a/.Rproj.user/9DAE6990/sources/prop/A58355B1 b/.Rproj.user/9DAE6990/sources/prop/A58355B1 index e3932e68f7b632d4dfc394ac6c70fcabd8d4b057..3ff2fc3d70512eb55da72831541cb18cf822c6cf 100644 --- a/.Rproj.user/9DAE6990/sources/prop/A58355B1 +++ b/.Rproj.user/9DAE6990/sources/prop/A58355B1 @@ -1,4 +1,4 @@ { - "cursorPosition" : "9,60", + "cursorPosition" : "2,10", "scrollLine" : "0" } \ No newline at end of file diff --git a/.Rproj.user/9DAE6990/sources/prop/B92E179B b/.Rproj.user/9DAE6990/sources/prop/B92E179B index c8e8fbca6ce0acb14bec3cc73ef8e22088fbe0b7..312c2004e146571197ab1c1525f689422b80c6df 100644 --- a/.Rproj.user/9DAE6990/sources/prop/B92E179B +++ b/.Rproj.user/9DAE6990/sources/prop/B92E179B @@ -1,5 +1,5 @@ { - "cursorPosition" : "114,53", - "last_setup_crc32" : "E69463565bfca283", + "cursorPosition" : "111,376", + "last_setup_crc32" : "", "scrollLine" : "110" } \ No newline at end of file diff --git a/.Rproj.user/9DAE6990/sources/s-E6946356/1656F55 b/.Rproj.user/9DAE6990/sources/s-63A33C8C/1656F55 similarity index 100% rename from .Rproj.user/9DAE6990/sources/s-E6946356/1656F55 rename to .Rproj.user/9DAE6990/sources/s-63A33C8C/1656F55 diff --git a/.Rproj.user/9DAE6990/sources/s-E6946356/1656F55-contents b/.Rproj.user/9DAE6990/sources/s-63A33C8C/1656F55-contents similarity index 100% rename from .Rproj.user/9DAE6990/sources/s-E6946356/1656F55-contents rename to .Rproj.user/9DAE6990/sources/s-63A33C8C/1656F55-contents diff --git a/.Rproj.user/9DAE6990/sources/s-E6946356/42D37312 b/.Rproj.user/9DAE6990/sources/s-63A33C8C/42D37312 similarity index 77% rename from .Rproj.user/9DAE6990/sources/s-E6946356/42D37312 rename to .Rproj.user/9DAE6990/sources/s-63A33C8C/42D37312 index 6a8990c217bfa4d7acba929175c3d4ea22e67a26..ffd7b0c3e7a37aacce40d6ed27c7cf9101c9bbb3 100644 --- a/.Rproj.user/9DAE6990/sources/s-E6946356/42D37312 +++ b/.Rproj.user/9DAE6990/sources/s-63A33C8C/42D37312 @@ -7,13 +7,13 @@ "folds" : "", "hash" : "0", "id" : "42D37312", - "lastKnownWriteTime" : 1623086204, - "last_content_update" : 1623086204670, + "lastKnownWriteTime" : 1623087154, + "last_content_update" : 1623087154974, "path" : "~/Documents/PhD/stuart_R/stuart/R/mark_prop.R", "project_path" : "R/mark_prop.R", "properties" : { - "cursorPosition" : "70,29", - "scrollLine" : "40" + "cursorPosition" : "48,24", + "scrollLine" : "0" }, "read_only" : false, "read_only_alternatives" : [ diff --git a/.Rproj.user/9DAE6990/sources/s-E6946356/42D37312-contents b/.Rproj.user/9DAE6990/sources/s-63A33C8C/42D37312-contents similarity index 100% rename from .Rproj.user/9DAE6990/sources/s-E6946356/42D37312-contents rename to .Rproj.user/9DAE6990/sources/s-63A33C8C/42D37312-contents diff --git a/.Rproj.user/9DAE6990/sources/s-E6946356/45D91D58 b/.Rproj.user/9DAE6990/sources/s-63A33C8C/45D91D58 similarity index 100% rename from .Rproj.user/9DAE6990/sources/s-E6946356/45D91D58 rename to .Rproj.user/9DAE6990/sources/s-63A33C8C/45D91D58 diff --git a/.Rproj.user/9DAE6990/sources/s-E6946356/45D91D58-contents b/.Rproj.user/9DAE6990/sources/s-63A33C8C/45D91D58-contents similarity index 100% rename from .Rproj.user/9DAE6990/sources/s-E6946356/45D91D58-contents rename to .Rproj.user/9DAE6990/sources/s-63A33C8C/45D91D58-contents diff --git a/.Rproj.user/9DAE6990/sources/s-E6946356/65C9B72B b/.Rproj.user/9DAE6990/sources/s-63A33C8C/65C9B72B similarity index 100% rename from .Rproj.user/9DAE6990/sources/s-E6946356/65C9B72B rename to .Rproj.user/9DAE6990/sources/s-63A33C8C/65C9B72B diff --git a/.Rproj.user/9DAE6990/sources/s-E6946356/65C9B72B-contents b/.Rproj.user/9DAE6990/sources/s-63A33C8C/65C9B72B-contents similarity index 100% rename from .Rproj.user/9DAE6990/sources/s-E6946356/65C9B72B-contents rename to .Rproj.user/9DAE6990/sources/s-63A33C8C/65C9B72B-contents diff --git a/.Rproj.user/9DAE6990/sources/s-E6946356/6DCC955A b/.Rproj.user/9DAE6990/sources/s-63A33C8C/6DCC955A similarity index 100% rename from .Rproj.user/9DAE6990/sources/s-E6946356/6DCC955A rename to .Rproj.user/9DAE6990/sources/s-63A33C8C/6DCC955A diff --git a/.Rproj.user/9DAE6990/sources/s-E6946356/6DCC955A-contents b/.Rproj.user/9DAE6990/sources/s-63A33C8C/6DCC955A-contents similarity index 100% rename from .Rproj.user/9DAE6990/sources/s-E6946356/6DCC955A-contents rename to .Rproj.user/9DAE6990/sources/s-63A33C8C/6DCC955A-contents diff --git a/.Rproj.user/9DAE6990/sources/s-E6946356/76AC3EC b/.Rproj.user/9DAE6990/sources/s-63A33C8C/76AC3EC similarity index 100% rename from .Rproj.user/9DAE6990/sources/s-E6946356/76AC3EC rename to .Rproj.user/9DAE6990/sources/s-63A33C8C/76AC3EC diff --git a/.Rproj.user/9DAE6990/sources/s-E6946356/76AC3EC-contents b/.Rproj.user/9DAE6990/sources/s-63A33C8C/76AC3EC-contents similarity index 100% rename from .Rproj.user/9DAE6990/sources/s-E6946356/76AC3EC-contents rename to .Rproj.user/9DAE6990/sources/s-63A33C8C/76AC3EC-contents diff --git a/.Rproj.user/9DAE6990/sources/s-E6946356/96AB3736 b/.Rproj.user/9DAE6990/sources/s-63A33C8C/96AB3736 similarity index 76% rename from .Rproj.user/9DAE6990/sources/s-E6946356/96AB3736 rename to .Rproj.user/9DAE6990/sources/s-63A33C8C/96AB3736 index 20375c2156562ab6ee1a79dc405f1c648a6b20b6..6b7249eb681110aa1c8b2d29586400bfec33c7a3 100644 --- a/.Rproj.user/9DAE6990/sources/s-E6946356/96AB3736 +++ b/.Rproj.user/9DAE6990/sources/s-63A33C8C/96AB3736 @@ -7,13 +7,13 @@ "folds" : "", "hash" : "0", "id" : "96AB3736", - "lastKnownWriteTime" : 1623085896, - "last_content_update" : 1623085896412, + "lastKnownWriteTime" : 1623691906, + "last_content_update" : 1623691906918, "path" : "~/Documents/PhD/stuart_R/stuart/vignettes/stuaRt.Rmd", "project_path" : "vignettes/stuaRt.Rmd", "properties" : { - "cursorPosition" : "114,53", - "last_setup_crc32" : "E69463565bfca283", + "cursorPosition" : "111,376", + "last_setup_crc32" : "", "scrollLine" : "110" }, "read_only" : false, diff --git a/.Rproj.user/9DAE6990/sources/s-E6946356/96AB3736-contents b/.Rproj.user/9DAE6990/sources/s-63A33C8C/96AB3736-contents similarity index 96% rename from .Rproj.user/9DAE6990/sources/s-E6946356/96AB3736-contents rename to .Rproj.user/9DAE6990/sources/s-63A33C8C/96AB3736-contents index e73872a8f734ba8177b36fc84e013586614d4848..0359797b0e482cb2609d087403374f6b007ed5bc 100644 --- a/.Rproj.user/9DAE6990/sources/s-E6946356/96AB3736-contents +++ b/.Rproj.user/9DAE6990/sources/s-63A33C8C/96AB3736-contents @@ -109,7 +109,7 @@ tab2 <- mark_poly(tab2) head(tab2) ``` -The `mark_prop()` function can be used to filter markers depending on the proportion of each genotype. Here, we have a F2 so we can use the "homo" argument in order to filter depending on the proportion of both homozygous genotype. If we have a N2, we can filter with the proportion of homozygous individuals with the "homo" argument and of heterozygous individuals with the hetero" argument. Moreover, this function allows to filter marker depending on the proportion on non genotyped animals. By defaults, markers for which more than 50% of individuals were not genotyped. +The `mark_prop()` function can be used to filter markers depending on the proportion of each genotype. Here, we have a F2 so we can use the "homo" argument in order to filter depending on the proportion of both homozygous genotype. If we have a N2, we can filter with the proportion of homozygous individuals with the "homo" argument and of heterozygous individuals with the "hetero" argument. Moreover, this function allows to filter marker depending on the proportion on non genotyped animals. By defaults, markers for which more than 50% of individuals were not genotyped. ```{r mark_prop ex} tab2 <- mark_prop(tab2,cross="F2",homo=0.1,hetero=0.1) diff --git a/.Rproj.user/9DAE6990/sources/s-E6946356/A53AF86 b/.Rproj.user/9DAE6990/sources/s-63A33C8C/A53AF86 similarity index 100% rename from .Rproj.user/9DAE6990/sources/s-E6946356/A53AF86 rename to .Rproj.user/9DAE6990/sources/s-63A33C8C/A53AF86 diff --git a/.Rproj.user/9DAE6990/sources/s-E6946356/A53AF86-contents b/.Rproj.user/9DAE6990/sources/s-63A33C8C/A53AF86-contents similarity index 100% rename from .Rproj.user/9DAE6990/sources/s-E6946356/A53AF86-contents rename to .Rproj.user/9DAE6990/sources/s-63A33C8C/A53AF86-contents diff --git a/.Rproj.user/9DAE6990/sources/s-E6946356/A6A5703A b/.Rproj.user/9DAE6990/sources/s-63A33C8C/A6A5703A similarity index 100% rename from .Rproj.user/9DAE6990/sources/s-E6946356/A6A5703A rename to .Rproj.user/9DAE6990/sources/s-63A33C8C/A6A5703A diff --git a/.Rproj.user/9DAE6990/sources/s-E6946356/A6A5703A-contents b/.Rproj.user/9DAE6990/sources/s-63A33C8C/A6A5703A-contents similarity index 100% rename from .Rproj.user/9DAE6990/sources/s-E6946356/A6A5703A-contents rename to .Rproj.user/9DAE6990/sources/s-63A33C8C/A6A5703A-contents diff --git a/.Rproj.user/9DAE6990/sources/s-E6946356/B86C81D8 b/.Rproj.user/9DAE6990/sources/s-63A33C8C/B86C81D8 similarity index 100% rename from .Rproj.user/9DAE6990/sources/s-E6946356/B86C81D8 rename to .Rproj.user/9DAE6990/sources/s-63A33C8C/B86C81D8 diff --git a/.Rproj.user/9DAE6990/sources/s-E6946356/B86C81D8-contents b/.Rproj.user/9DAE6990/sources/s-63A33C8C/B86C81D8-contents similarity index 100% rename from .Rproj.user/9DAE6990/sources/s-E6946356/B86C81D8-contents rename to .Rproj.user/9DAE6990/sources/s-63A33C8C/B86C81D8-contents diff --git a/.Rproj.user/9DAE6990/sources/s-E6946356/C5228C18 b/.Rproj.user/9DAE6990/sources/s-63A33C8C/C5228C18 similarity index 100% rename from .Rproj.user/9DAE6990/sources/s-E6946356/C5228C18 rename to .Rproj.user/9DAE6990/sources/s-63A33C8C/C5228C18 diff --git a/.Rproj.user/9DAE6990/sources/s-E6946356/C5228C18-contents b/.Rproj.user/9DAE6990/sources/s-63A33C8C/C5228C18-contents similarity index 100% rename from .Rproj.user/9DAE6990/sources/s-E6946356/C5228C18-contents rename to .Rproj.user/9DAE6990/sources/s-63A33C8C/C5228C18-contents diff --git a/.Rproj.user/9DAE6990/sources/s-E6946356/C81C94E6 b/.Rproj.user/9DAE6990/sources/s-63A33C8C/C81C94E6 similarity index 81% rename from .Rproj.user/9DAE6990/sources/s-E6946356/C81C94E6 rename to .Rproj.user/9DAE6990/sources/s-63A33C8C/C81C94E6 index 7e8b493d559ba8b7760a8dff8d6de4e3510fd8bc..bbb6df0f3d270aae8568627f03e3dafedb916e9e 100644 --- a/.Rproj.user/9DAE6990/sources/s-E6946356/C81C94E6 +++ b/.Rproj.user/9DAE6990/sources/s-63A33C8C/C81C94E6 @@ -7,12 +7,12 @@ "folds" : "", "hash" : "0", "id" : "C81C94E6", - "lastKnownWriteTime" : 1622623114, - "last_content_update" : 1622623114332, + "lastKnownWriteTime" : 1623690569, + "last_content_update" : 1623690569021, "path" : "~/Documents/PhD/stuart_R/stuart/DESCRIPTION", "project_path" : "DESCRIPTION", "properties" : { - "cursorPosition" : "9,60", + "cursorPosition" : "2,10", "scrollLine" : "0" }, "read_only" : false, diff --git a/.Rproj.user/9DAE6990/sources/s-E6946356/C81C94E6-contents b/.Rproj.user/9DAE6990/sources/s-63A33C8C/C81C94E6-contents similarity index 97% rename from .Rproj.user/9DAE6990/sources/s-E6946356/C81C94E6-contents rename to .Rproj.user/9DAE6990/sources/s-63A33C8C/C81C94E6-contents index 37b9a2c63b4974de1d3d348b67d0d3c80e79be81..911e98e77fb0cf49335cbfd32c13ed959635aace 100644 --- a/.Rproj.user/9DAE6990/sources/s-E6946356/C81C94E6-contents +++ b/.Rproj.user/9DAE6990/sources/s-63A33C8C/C81C94E6-contents @@ -1,6 +1,6 @@ Package: stuart Title: stuart -Version: 0.1.0 +Version: 1.0.0 Authors@R: person(given = "Marie", family = "Bourdon", diff --git a/.Rproj.user/9DAE6990/sources/s-E6946356/lock_file b/.Rproj.user/9DAE6990/sources/s-63A33C8C/lock_file similarity index 100% rename from .Rproj.user/9DAE6990/sources/s-E6946356/lock_file rename to .Rproj.user/9DAE6990/sources/s-63A33C8C/lock_file diff --git a/.Rproj.user/9DAE6990/sources/s-E6946356/B72D9362-contents b/.Rproj.user/9DAE6990/sources/s-E6946356/B72D9362-contents deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/.Rproj.user/9DAE6990/viewer-cache/C830EC37.Rdata b/.Rproj.user/9DAE6990/viewer-cache/C830EC37.Rdata new file mode 100644 index 0000000000000000000000000000000000000000..a94eb56685bd115b80071c91a8870e313bda7387 Binary files /dev/null and b/.Rproj.user/9DAE6990/viewer-cache/C830EC37.Rdata differ diff --git a/.Rproj.user/9DAE6990/viewer-cache/FFFA47E6.Rdata b/.Rproj.user/9DAE6990/viewer-cache/FFFA47E6.Rdata new file mode 100644 index 0000000000000000000000000000000000000000..e47c6ec85abe4e72c99b2a1d561603a9faa76d34 Binary files /dev/null and b/.Rproj.user/9DAE6990/viewer-cache/FFFA47E6.Rdata differ diff --git a/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/9DAE6990E3DC937A/chunks.json b/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/9DAE6990E3DC937A/chunks.json new file mode 100644 index 0000000000000000000000000000000000000000..93244d6d228956f362c92c72b489998013de4fe4 --- /dev/null +++ b/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/9DAE6990E3DC937A/chunks.json @@ -0,0 +1 @@ +{"chunk_definitions":[{"chunk_id":"culdjhv7njxmo","chunk_label":"unnamed-chunk-1","document_id":"96AB3736","expansion_state":0,"options":{"engine":"r","include":false,"label":"unnamed-chunk-1"},"row":15,"row_count":1,"visible":true},{"chunk_id":"csetup_chunk","chunk_label":"setup","document_id":"96AB3736","expansion_state":0,"options":{"engine":"r","include":false,"label":"setup"},"row":31,"row_count":1,"visible":true}],"doc_write_time":1623691782} \ No newline at end of file diff --git a/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/c0s26bf1pu5ys/000002.csv b/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/c0s26bf1pu5ys/000002.csv deleted file mode 100644 index 552541c9101539e4d3a9276789ad222fa4f83729..0000000000000000000000000000000000000000 --- a/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/c0s26bf1pu5ys/000002.csv +++ /dev/null @@ -1,192 +0,0 @@ -"0","data(genos)" -"0","summary(genos)" -"1","" -"1"," SNP.Name " -"1"," Sample.ID " -"1"," Allele1...Forward " -"1"," Allele2...Forward " -"1"," -" -"1"," Length:2002493 " -"1"," Length:2002493 " -"1"," Length:2002493 " -"1"," Length:2002493 " -"1"," -" -"1"," Class :character " -"1"," Class :character " -"1"," Class :character " -"1"," Class :character " -"1"," -" -"1"," Mode :character " -"1"," Mode :character " -"1"," Mode :character " -"1"," Mode :character " -"1"," -" -"1"," " -"1"," " -"1"," " -"1"," " -"1"," -" -"1"," " -"1"," " -"1"," " -"1"," " -"1"," -" -"1"," " -"1"," " -"1"," " -"1"," " -"1"," -" -"1"," " -"1"," " -"1"," " -"1"," " -"1"," -" -"1","" -"1"," X " -"1"," Y " -"1"," GC.Score " -"1"," Theta " -"1"," -" -"1"," Min. : 0.0000 " -"1"," Min. : 0.0000 " -"1"," Min. :0.0000 " -"1"," Min. :0.0000 " -"1"," -" -"1"," 1st Qu.: 0.0260 " -"1"," 1st Qu.: 0.0480 " -"1"," 1st Qu.:0.6747 " -"1"," 1st Qu.:0.0420 " -"1"," -" -"1"," Median : 0.1750 " -"1"," Median : 0.5010 " -"1"," Median :0.8550 " -"1"," Median :0.6620 " -"1"," -" -"1"," Mean : 0.5716 " -"1"," Mean : 0.6564 " -"1"," Mean :0.7276 " -"1"," Mean :0.5606 " -"1"," -" -"1"," 3rd Qu.: 0.8560 " -"1"," 3rd Qu.: 1.0470 " -"1"," 3rd Qu.:0.9245 " -"1"," 3rd Qu.:0.9800 " -"1"," -" -"1"," Max. :25.1610 " -"1"," Max. :20.7940 " -"1"," Max. :0.9889 " -"1"," Max. :1.0000 " -"1"," -" -"1"," NA's :87 " -"1"," NA's :87 " -"1"," NA's :326 " -"1"," NA's :413 " -"1"," -" -"1","" -"1"," X.Raw " -"1"," Y.Raw " -"1"," R " -"1"," -" -"1"," Min. : 0 " -"1"," Min. : 0 " -"1"," Min. : 0.000 " -"1"," -" -"1"," 1st Qu.: 546 " -"1"," 1st Qu.: 678 " -"1"," 1st Qu.: 0.605 " -"1"," -" -"1"," Median : 1611 " -"1"," Median : 3908 " -"1"," Median : 1.027 " -"1"," -" -"1"," Mean : 5265 " -"1"," Mean : 5578 " -"1"," Mean : 1.228 " -"1"," -" -"1"," 3rd Qu.: 7924 " -"1"," 3rd Qu.: 9232 " -"1"," 3rd Qu.: 1.553 " -"1"," -" -"1"," Max. :49906 " -"1"," Max. :43935 " -"1"," Max. :26.041 " -"1"," -" -"1"," " -"1"," " -"1"," NA's :413 " -"1"," -" -"0","data(phenos)" -"0","summary(phenos)" -"1","" -"1"," Ind " -"1"," Sex " -"1"," Age " -"1"," Pheno " -"1"," -" -"1"," 201 : 1 " -"1"," Length:176 " -"1"," Min. :5.000 " -"1"," Min. : 8.609 " -"1"," -" -"1"," 202 : 1 " -"1"," Class :character " -"1"," 1st Qu.:7.000 " -"1"," 1st Qu.:10.420 " -"1"," -" -"1"," 203 : 1 " -"1"," Mode :character " -"1"," Median :7.000 " -"1"," Median :10.628 " -"1"," -" -"1"," 204 : 1 " -"1"," " -"1"," Mean :7.176 " -"1"," Mean :10.526 " -"1"," -" -"1"," 205 : 1 " -"1"," " -"1"," 3rd Qu.:8.000 " -"1"," 3rd Qu.:10.793 " -"1"," -" -"1"," 206 : 1 " -"1"," " -"1"," Max. :9.000 " -"1"," Max. :11.147 " -"1"," -" -"1"," (Other):170 " -"1"," " -"1"," " -"1"," " -"1"," -" diff --git a/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/c4gkr1xb8o1a9/000006.csv b/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/c4gkr1xb8o1a9/000006.csv deleted file mode 100644 index a472dbbdde0cc5e442424a891bd6c344e74bf76d..0000000000000000000000000000000000000000 --- a/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/c4gkr1xb8o1a9/000006.csv +++ /dev/null @@ -1,2 +0,0 @@ -"0","tab2 <- mark_poly(tab2)" -"0","head(tab2)" diff --git a/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/c4gkr1xb8o1a9/000007.metadata b/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/c4gkr1xb8o1a9/000007.metadata deleted file mode 100644 index 0c1ed96e6119c430ceb61ff486f6009cdc3ed72b..0000000000000000000000000000000000000000 --- a/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/c4gkr1xb8o1a9/000007.metadata +++ /dev/null @@ -1 +0,0 @@ -{"classes":["tbl_df","tbl","data.frame"],"ncol":9,"nrow":6} \ No newline at end of file diff --git a/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/c4gkr1xb8o1a9/000007.rdf b/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/c4gkr1xb8o1a9/000007.rdf deleted file mode 100644 index 8093fc277d049c71627b60e309e5ccbd9f89d352..0000000000000000000000000000000000000000 Binary files a/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/c4gkr1xb8o1a9/000007.rdf and /dev/null differ diff --git a/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/ccbr8kr5rmfiz/000002.csv b/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/ccbr8kr5rmfiz/000002.csv deleted file mode 100644 index ae32996095ddd4a5634e65cea490a3045c0e740b..0000000000000000000000000000000000000000 --- a/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/ccbr8kr5rmfiz/000002.csv +++ /dev/null @@ -1 +0,0 @@ -"0","genos <- genos %>% filter(!Sample.ID %in% c(""StrainsA_1"", ""StrainsA_2"", ""StrainsB_1"",""StrainsB_2""))" diff --git a/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/ceekbogybpgbx/000002.csv b/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/ceekbogybpgbx/000002.csv deleted file mode 100644 index d9110ec2caa244f4e474991b0f945dfd7042c547..0000000000000000000000000000000000000000 --- a/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/ceekbogybpgbx/000002.csv +++ /dev/null @@ -1,81 +0,0 @@ -"0","data(stuart_tab)" -"0","summary(stuart_tab)" -"1","" -"1"," marker " -"1"," allele_1 " -"1"," allele_2 " -"1"," n_HM1 " -"1"," -" -"1"," Length:11125 " -"1"," Length:11125 " -"1"," Length:11125 " -"1"," Min. : 0.0 " -"1"," -" -"1"," Class :character " -"1"," Class :character " -"1"," Class :character " -"1"," 1st Qu.: 44.0 " -"1"," -" -"1"," Mode :character " -"1"," Mode :character " -"1"," Mode :character " -"1"," Median :174.0 " -"1"," -" -"1"," " -"1"," " -"1"," " -"1"," Mean :123.9 " -"1"," -" -"1"," " -"1"," " -"1"," " -"1"," 3rd Qu.:176.0 " -"1"," -" -"1"," " -"1"," " -"1"," " -"1"," Max. :176.0 " -"1"," -" -"1","" -"1"," n_HM2 " -"1"," n_HT " -"1"," n_NA " -"1"," -" -"1"," Min. : 0.00 " -"1"," Min. : 0.00 " -"1"," Min. : 0.00 " -"1"," -" -"1"," 1st Qu.: 0.00 " -"1"," 1st Qu.: 0.00 " -"1"," 1st Qu.: 0.00 " -"1"," -" -"1"," Median : 0.00 " -"1"," Median : 0.00 " -"1"," Median : 1.00 " -"1"," -" -"1"," Mean : 19.92 " -"1"," Mean : 19.24 " -"1"," Mean : 12.91 " -"1"," -" -"1"," 3rd Qu.: 34.00 " -"1"," 3rd Qu.: 5.00 " -"1"," 3rd Qu.: 5.00 " -"1"," -" -"1"," Max. :175.00 " -"1"," Max. :176.00 " -"1"," Max. :176.00 " -"1"," -" diff --git a/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/cgfik6q17v45t/000006.csv b/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/cgfik6q17v45t/000006.csv deleted file mode 100644 index 449e890eb8ddef10a3c44f22143460cfc327cd3a..0000000000000000000000000000000000000000 --- a/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/cgfik6q17v45t/000006.csv +++ /dev/null @@ -1,4 +0,0 @@ -"0","tab2 <- mark_match(stuart_tab,ref=strains)" -"0","" -"0","" -"0","tab2 %>% filter(exclude_match==1)" diff --git a/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/cgfik6q17v45t/000007.metadata b/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/cgfik6q17v45t/000007.metadata deleted file mode 100644 index 39d63b148f62d47607d952ba297b70c258ce94a5..0000000000000000000000000000000000000000 --- a/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/cgfik6q17v45t/000007.metadata +++ /dev/null @@ -1 +0,0 @@ -{"classes":["tbl_df","tbl","data.frame"],"ncol":8,"nrow":0} \ No newline at end of file diff --git a/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/cgfik6q17v45t/000007.rdf b/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/cgfik6q17v45t/000007.rdf deleted file mode 100644 index 87d57a3b8ec997203b9935c7a363f8e531e8fa82..0000000000000000000000000000000000000000 Binary files a/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/cgfik6q17v45t/000007.rdf and /dev/null differ diff --git a/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/chunks.json b/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/chunks.json index 49caf2049d6ca5e813dae2a5c56e8e5c8613efde..93244d6d228956f362c92c72b489998013de4fe4 100644 --- a/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/chunks.json +++ b/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/chunks.json @@ -1 +1 @@ -{"chunk_definitions":[{"chunk_id":"culdjhv7njxmo","chunk_label":"unnamed-chunk-1","document_id":"96AB3736","expansion_state":0,"options":{"engine":"r","include":false,"label":"unnamed-chunk-3"},"row":15,"row_count":1,"visible":true},{"chunk_id":"csetup_chunk","chunk_label":"setup","document_id":"96AB3736","expansion_state":0,"options":{"engine":"r","include":false,"label":"setup"},"row":31,"row_count":1,"visible":true},{"chunk_id":"cvrfzlkmsnd5m","chunk_label":"annot","document_id":"96AB3736","expansion_state":0,"options":{"engine":"r","label":"annot"},"row":45,"row_count":1,"visible":true},{"chunk_id":"c0s26bf1pu5ys","chunk_label":"load","document_id":"96AB3736","expansion_state":0,"options":{"engine":"r","label":"load"},"row":60,"row_count":1,"visible":true},{"chunk_id":"cxuyx1brxodqv","chunk_label":"strains","document_id":"96AB3736","expansion_state":0,"options":{"engine":"r","label":"strains"},"row":73,"row_count":1,"visible":true},{"chunk_id":"ccbr8kr5rmfiz","chunk_label":"no_parent","document_id":"96AB3736","expansion_state":0,"options":{"engine":"r","label":"no_parent"},"row":78,"row_count":1,"visible":true},{"chunk_id":"ceekbogybpgbx","chunk_label":"tab_mark","document_id":"96AB3736","expansion_state":0,"options":{"engine":"r","label":"tab_mark"},"row":91,"row_count":1,"visible":true},{"chunk_id":"cgfik6q17v45t","chunk_label":"mark_match","document_id":"96AB3736","expansion_state":0,"options":{"engine":"r","label":"mark_match"},"row":100,"row_count":1,"visible":true},{"chunk_id":"c4gkr1xb8o1a9","chunk_label":"mark_poly ex","document_id":"96AB3736","expansion_state":0,"options":{"engine":"r","label":"mark_poly ex"},"row":109,"row_count":1,"visible":true},{"chunk_id":"cp87d27x07m61","chunk_label":"mark_prop ex","document_id":"96AB3736","expansion_state":0,"options":{"engine":"r","label":"mark_prop ex"},"row":116,"row_count":1,"visible":true}],"default_chunk_options":{},"doc_write_time":1623085296,"working_dir":null} \ No newline at end of file +{"chunk_definitions":[{"chunk_id":"culdjhv7njxmo","chunk_label":"unnamed-chunk-1","document_id":"96AB3736","expansion_state":0,"options":{"engine":"r","include":false,"label":"unnamed-chunk-1"},"row":15,"row_count":1,"visible":true},{"chunk_id":"csetup_chunk","chunk_label":"setup","document_id":"96AB3736","expansion_state":0,"options":{"engine":"r","include":false,"label":"setup"},"row":31,"row_count":1,"visible":true}],"doc_write_time":1623691782} \ No newline at end of file diff --git a/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/cp87d27x07m61/000022.csv b/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/cp87d27x07m61/000022.csv deleted file mode 100644 index 6b65c967c8eda7edc62d44dfa96c4ecc82427890..0000000000000000000000000000000000000000 --- a/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/cp87d27x07m61/000022.csv +++ /dev/null @@ -1,35 +0,0 @@ -"0","tab2 <- mark_prop(tab2,cross=""F2"",pval=0.05) -" -"2","Chi-squared approximation may be incorrect" -"2","Chi-squared approximation may be incorrect" -"2","Chi-squared approximation may be incorrect" -"2","Chi-squared approximation may be incorrect" -"2","Chi-squared approximation may be incorrect" -"2","Chi-squared approximation may be incorrect" -"2","Chi-squared approximation may be incorrect" -"2","Chi-squared approximation may be incorrect" -"2","Chi-squared approximation may be incorrect" -"2","Chi-squared approximation may be incorrect" -"2","Chi-squared approximation may be incorrect" -"2","Chi-squared approximation may be incorrect" -"2","Chi-squared approximation may be incorrect" -"2","Chi-squared approximation may be incorrect" -"2","Chi-squared approximation may be incorrect" -"2","Chi-squared approximation may be incorrect" -"2","Chi-squared approximation may be incorrect" -"2","Chi-squared approximation may be incorrect" -"2","Chi-squared approximation may be incorrect" -"2","Chi-squared approximation may be incorrect" -"2","Chi-squared approximation may be incorrect" -"2","Chi-squared approximation may be incorrect" -"2","Chi-squared approximation may be incorrect" -"2","Chi-squared approximation may be incorrect" -"2","Chi-squared approximation may be incorrect" -"2","Chi-squared approximation may be incorrect" -"2","Chi-squared approximation may be incorrect" -"2","Chi-squared approximation may be incorrect" -"2","Chi-squared approximation may be incorrect" -"2","Chi-squared approximation may be incorrect" -"2","Chi-squared approximation may be incorrect" -"2","Chi-squared approximation may be incorrect" -"2","Chi-squared approximation may be incorrect" diff --git a/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/csetup_chunk/000002.csv b/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/csetup_chunk/000002.csv index 1edd6be33ee4bd156324047e37e4fa25158aa4fd..1ef951207dd446f19eef7d86d5c04fabdac7504d 100644 --- a/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/csetup_chunk/000002.csv +++ b/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/csetup_chunk/000002.csv @@ -1,2 +1,16 @@ "0","library(dplyr)" +"2"," +Attachement du package : ‘dplyr’ + +" +"2","The following objects are masked from ‘package:stats’: + + filter, lag + +" +"2","The following objects are masked from ‘package:base’: + + intersect, setdiff, setequal, union + +" "0","library(stuart)" diff --git a/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/cvrfzlkmsnd5m/000002.csv b/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/cvrfzlkmsnd5m/000002.csv deleted file mode 100644 index d60d661c6e52cccece20691efd360d25d764c5b0..0000000000000000000000000000000000000000 --- a/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/cvrfzlkmsnd5m/000002.csv +++ /dev/null @@ -1 +0,0 @@ -"0","annot_mini <- read.csv(url(""https://raw.githubusercontent.com/kbroman/MUGAarrays/master/UWisc/mini_uwisc_v2.csv""))" diff --git a/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/cxuyx1brxodqv/000006.csv b/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/cxuyx1brxodqv/000006.csv deleted file mode 100644 index f9373193d6b3c12fbfd69c2af9e7982cc0b6f748..0000000000000000000000000000000000000000 --- a/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/cxuyx1brxodqv/000006.csv +++ /dev/null @@ -1,2 +0,0 @@ -"0","strains <- geno_strains(ref=annot_mini,geno=genos,par1=c(""StrainsA_1"",""StrainsA_2""),par2=c(""StrainsB_1"",""StrainsB_2""),name1=""parent1"",name2=""parent2"")" -"0","head(strains)" diff --git a/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/cxuyx1brxodqv/000007.metadata b/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/cxuyx1brxodqv/000007.metadata deleted file mode 100644 index 785c904bbfba004ed6ad492f617f7efaefd05edd..0000000000000000000000000000000000000000 --- a/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/cxuyx1brxodqv/000007.metadata +++ /dev/null @@ -1 +0,0 @@ -{"classes":["data.frame"],"ncol":14,"nrow":6} \ No newline at end of file diff --git a/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/cxuyx1brxodqv/000007.rdf b/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/cxuyx1brxodqv/000007.rdf deleted file mode 100644 index 3555bbc2181017323842a4e7d7a51c3bbfdfed00..0000000000000000000000000000000000000000 Binary files a/.Rproj.user/shared/notebooks/C3675061-stuaRt/1/s/cxuyx1brxodqv/000007.rdf and /dev/null differ diff --git a/DESCRIPTION b/DESCRIPTION index 37b9a2c63b4974de1d3d348b67d0d3c80e79be81..911e98e77fb0cf49335cbfd32c13ed959635aace 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: stuart Title: stuart -Version: 0.1.0 +Version: 1.0.0 Authors@R: person(given = "Marie", family = "Bourdon", diff --git a/stuart_0.1.0.pdf b/stuart_0.1.0.pdf deleted file mode 100644 index d491cf6b1adcae0e1263384dac12110650ad862c..0000000000000000000000000000000000000000 Binary files a/stuart_0.1.0.pdf and /dev/null differ diff --git a/stuart_1.0.0.pdf b/stuart_1.0.0.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d5c0dc7e08fd43905d9bbf83133afb2dcf72ca46 Binary files /dev/null and b/stuart_1.0.0.pdf differ diff --git a/stuart_0.1.0.tar.gz b/stuart_1.0.0.tar.gz similarity index 93% rename from stuart_0.1.0.tar.gz rename to stuart_1.0.0.tar.gz index 06e3b0185bd7480ddf8d5698201ecfffad9732e5..cf42723acb6e9bebdf0f34e0ea947450bbe23ded 100644 Binary files a/stuart_0.1.0.tar.gz and b/stuart_1.0.0.tar.gz differ diff --git a/vignettes/stuaRt.Rmd b/vignettes/stuaRt.Rmd index e73872a8f734ba8177b36fc84e013586614d4848..0359797b0e482cb2609d087403374f6b007ed5bc 100755 --- a/vignettes/stuaRt.Rmd +++ b/vignettes/stuaRt.Rmd @@ -109,7 +109,7 @@ tab2 <- mark_poly(tab2) head(tab2) ``` -The `mark_prop()` function can be used to filter markers depending on the proportion of each genotype. Here, we have a F2 so we can use the "homo" argument in order to filter depending on the proportion of both homozygous genotype. If we have a N2, we can filter with the proportion of homozygous individuals with the "homo" argument and of heterozygous individuals with the hetero" argument. Moreover, this function allows to filter marker depending on the proportion on non genotyped animals. By defaults, markers for which more than 50% of individuals were not genotyped. +The `mark_prop()` function can be used to filter markers depending on the proportion of each genotype. Here, we have a F2 so we can use the "homo" argument in order to filter depending on the proportion of both homozygous genotype. If we have a N2, we can filter with the proportion of homozygous individuals with the "homo" argument and of heterozygous individuals with the "hetero" argument. Moreover, this function allows to filter marker depending on the proportion on non genotyped animals. By defaults, markers for which more than 50% of individuals were not genotyped. ```{r mark_prop ex} tab2 <- mark_prop(tab2,cross="F2",homo=0.1,hetero=0.1)