Commit 94899005 authored by mariefbourdon's avatar mariefbourdon
Browse files

modify vignette with X chromosome explanations

parent 4802601c
{
"path" : "~/Documents/PhD/stuart_package/stuart/R",
"path" : "~/Documents/PhD/stuart_package/stuart/vignettes",
"sortOrder" : [
{
"ascending" : true,
......
{
"activeTab" : 2
"activeTab" : 0
}
\ No newline at end of file
{
"left" : {
"panelheight" : 1402,
"splitterpos" : 366,
"panelheight" : 632,
"splitterpos" : 164,
"topwindowstate" : "NORMAL",
"windowheight" : 1440
"windowheight" : 670
},
"right" : {
"panelheight" : 1402,
"splitterpos" : 882,
"panelheight" : 632,
"splitterpos" : 397,
"topwindowstate" : "NORMAL",
"windowheight" : 1440
"windowheight" : 670
}
}
\ No newline at end of file
/private/var/folders/dn/j71yz2tn5_gdffs8fqxhddrr0000gn/T/RtmpbddlPL/preview-1b515493e142.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
......
......@@ -10,4 +10,4 @@
/Users/mariebourdon/Documents/PhD/stuart_package/stuart/man/mark_prop.Rd="893B273D"
/Users/mariebourdon/Documents/PhD/stuart_package/stuart/vignettes/stuaRt.Rmd="DA6206CB"
/Users/mariebourdon/Documents/PhD/stuart_package/stuart/vignettes/stuart.Rmd="54D793B9"
/Volumes/@Mouselab/Zika/F2/F2_B6.CC001/QUGA/QUGA.Rmd="7EACFFBF"
/Volumes/@Mouselab/Zika/Backcross/Geno/BC_01.71_stuart.Rmd="E9F16055"
......@@ -5,3 +5,4 @@ Meta
/Meta/
.Rhistory
.Rhistory
inst/doc
......@@ -147,13 +147,21 @@ head(tab2) %>% print.data.frame()
### mark_prop
The `mark_prop()` function can be used to filter markers depending on the proportion of each genotype. Here, we have a F2 and we use `homo=0.1, hetero=0.1` so the function will exclude all markers with less than 10% of each genotype. For chromosome X, we use the `homo=0.1, hetero=0.1`
The `mark_prop()` function can be used to filter markers depending on the proportion of each genotype. Here, we have a F2 and we use `homo=0.1, hetero=0.1` so the function will exclude all markers with less than 10% of each genotype. For chromosome X, we use the `homo1X`, `homo2X` and `heteroX` arguments. The expected proportion of each genotype for markers on X chromosome depend on the directions of the cross performed in order to obtain F1 individuals.
For example, in an F2 between a strain A (a/a for all loci) and B (b/b for all loci), if we cross a female A (i.e. a/a for markers on X chromosome) with a male B (i.e. b/Y for markers on X chromosome), we obtain F1 females with a/b genotype and F1 males with a/Y for markers on X chromosome. Crossed together, they give birth to F2 females that can be either be a/a or a/b for X chromosome markers.
On the other hand, if we cross a female B (i.e. b/b for markers on X chromosome) with a male A (i.e. a/Y for markers on X chromosome), we still obtain F1 females with a/b genotype but F1 males are b/Y for these markers. The obtained F2 females can be either a/b or b/b for X chromosome markers.
This example shows that depending on the directions of the crosses, genotypic proportions for markers on X chromosome can vary. In some cases, it is possible that a genotype cannot be present in the second generation individuals. You must determine these expected genotypic proportions. Moreover, it is possible that all second generation individuals were not obtained thanks to crosses with the same direction; in such cases, it can be quite complex to estimate the expected genotypic proportions.
However, it is still important to clean markers on X chromosome. The `homo1X`, `homo2X` and `heteroX` arguments are vectors of 2 numbers which are the lower and upper limits of the estimated genotypic proportion (`homo1X` for the homozygosity for the allele of parent 1, `homo2X` for the homozygosity for the allele of parent 2 and `heteroX` for the heterozygosity). As we saw previously, estimate these limits can be quite tough. Thus, if all genotypes are possible, we recommand to use the minimal limits `c(0.1,1)` for the 3 argumetns in order to eliminate most of the unwanted markers.
```{r mark_prop_ex_homo}
tab2 <- mark_prop(tab2,cross="F2",homo=0.1,hetero=0.1,homo1X=c(0.1,1),homo2X=c(0.1,1),heteroX=c(0.1,1))
head(tab2) %>% print.data.frame()
```
We could also use the `pval` argument which allows to exclude markers by performing a Chi2 test comparing observed distribution with Mendelian proportions. By using `pval=0.5` we would exclude all markers with a Chi2 p-value inferior to 0.05. However, for some markers, Chi2 approximation may be incorrect.
We could also use the `pval` argument which allows to exclude autosomal markers by performing a Chi2 test comparing observed distribution with Mendelian proportions. By using `pval=0.5` we would exclude all markers with a Chi2 p-value inferior to 0.05. However, for some markers, Chi2 approximation may be incorrect.
```{r mark_prop_ex_pval,warning=FALSE}
mark_prop(tab2,cross="F2",pval=0.05,homo1X=c(0.1,1),homo2X=c(0.1,1),heteroX=c(0.1,1)) %>% head() %>% print.data.frame()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment