Commit 5d0a519c authored by mariefbourdon's avatar mariefbourdon
Browse files

modifs mark_estmap for first/last groups

parent 90b4fadf
{
"TabSet1" : 1,
"TabSet1" : 0,
"TabSet2" : 0,
"TabZoom" : {
}
......
build-last-errors="[]"
build-last-errors-base-dir="~/Documents/PhD/stuart_package/stuart/"
build-last-outputs="[{\"output\":\"==> R CMD INSTALL --no-multiarch --with-keep.source stuart\\n\\n\",\"type\":0},{\"output\":\"* installing to library ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library’\\n\",\"type\":1},{\"output\":\"* installing *source* package ‘stuart’ ...\\n\",\"type\":1},{\"output\":\"\",\"type\":1},{\"output\":\"** using staged installation\\n\",\"type\":1},{\"output\":\"\",\"type\":1},{\"output\":\"** R\\n\",\"type\":1},{\"output\":\"\",\"type\":1},{\"output\":\"** data\\n\",\"type\":1},{\"output\":\"\",\"type\":1},{\"output\":\"*** moving datasets to lazyload DB\\n\",\"type\":1},{\"output\":\"\",\"type\":1},{\"output\":\"** inst\\n\",\"type\":1},{\"output\":\"\",\"type\":1},{\"output\":\"** byte-compile and prepare package for lazy loading\\n\",\"type\":1},{\"output\":\"\",\"type\":1},{\"output\":\"** help\\n\",\"type\":1},{\"output\":\"\",\"type\":1},{\"output\":\"*** installing help indices\\n\",\"type\":1},{\"output\":\"\",\"type\":1},{\"output\":\"** building package indices\\n\",\"type\":1},{\"output\":\"\",\"type\":1},{\"output\":\"** installing vignettes\\n\",\"type\":1},{\"output\":\"** testing if installed package can be loaded from temporary location\\n\",\"type\":1},{\"output\":\"\",\"type\":1},{\"output\":\"** testing if installed package can be loaded from final location\\n\",\"type\":1},{\"output\":\"\",\"type\":1},{\"output\":\"** testing if installed package keeps a record of temporary installation path\\n\",\"type\":1},{\"output\":\"* DONE (stuart)\\n\",\"type\":1},{\"output\":\"\",\"type\":1}]"
build-last-outputs="[{\"output\":\"==> R CMD INSTALL --no-multiarch --with-keep.source stuart\\n\\n\",\"type\":0},{\"output\":\"* installing to library ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library’\\n\",\"type\":1},{\"output\":\"\",\"type\":1},{\"output\":\"* installing *source* package ‘stuart’ ...\\n\",\"type\":1},{\"output\":\"\",\"type\":1},{\"output\":\"** using staged installation\\n\",\"type\":1},{\"output\":\"\",\"type\":1},{\"output\":\"** R\\n\",\"type\":1},{\"output\":\"** data\\n\",\"type\":1},{\"output\":\"\",\"type\":1},{\"output\":\"*** moving datasets to lazyload DB\\n\",\"type\":1},{\"output\":\"\",\"type\":1},{\"output\":\"** inst\\n\",\"type\":1},{\"output\":\"\",\"type\":1},{\"output\":\"** byte-compile and prepare package for lazy loading\\n\",\"type\":1},{\"output\":\"\",\"type\":1},{\"output\":\"** help\\n\",\"type\":1},{\"output\":\"\",\"type\":1},{\"output\":\"*** installing help indices\\n\",\"type\":1},{\"output\":\"\",\"type\":1},{\"output\":\"** building package indices\\n\",\"type\":1},{\"output\":\"\",\"type\":1},{\"output\":\"** installing vignettes\\n\",\"type\":1},{\"output\":\"** testing if installed package can be loaded from temporary location\\n\",\"type\":1},{\"output\":\"\",\"type\":1},{\"output\":\"** testing if installed package can be loaded from final location\\n\",\"type\":1},{\"output\":\"\",\"type\":1},{\"output\":\"** testing if installed package keeps a record of temporary installation path\\n\",\"type\":1},{\"output\":\"* DONE (stuart)\\n\",\"type\":1},{\"output\":\"\",\"type\":1}]"
compile_pdf_state="{\"errors\":[],\"output\":\"\",\"running\":false,\"tab_visible\":false,\"target_file\":\"\"}"
files.monitored-path=""
find-in-files-state="{\"handle\":\"\",\"input\":\"\",\"path\":\"\",\"regex\":true,\"results\":{\"file\":[],\"line\":[],\"lineValue\":[],\"matchOff\":[],\"matchOn\":[]},\"running\":false}"
imageDirtyState="0"
imageDirtyState="1"
saveActionState="0"
/Users/mariebourdon/Documents/PhD/stuart_package/stuart/DESCRIPTION="5140B408"
/Users/mariebourdon/Documents/PhD/stuart_package/stuart/R/geno_strains.R="EBA82473"
/Users/mariebourdon/Documents/PhD/stuart_package/stuart/R/mark_allele.R="A0A182D3"
/Users/mariebourdon/Documents/PhD/stuart_package/stuart/R/mark_estmap.R="57E1825F"
/Users/mariebourdon/Documents/PhD/stuart_package/stuart/R/mark_match.R="FFA1BE52"
/Users/mariebourdon/Documents/PhD/stuart_package/stuart/R/mark_prop.R="30FA9E8C"
/Users/mariebourdon/Documents/PhD/stuart_package/stuart/R/tab_mark.R="F0B2417"
/Users/mariebourdon/Documents/PhD/stuart_package/stuart/R/write_rqtl.R="F07CE16C"
......
......@@ -87,12 +87,17 @@ mark_estmap <- function(tab,map,annot,d=20,r=10,n=5){
T ~ group))
new_pos <- match("new",tab_chr$group)
g <- g+1
}
tab_chr <- tab_chr %>% tidyr::fill(group)
tab_chr <- tab_chr %>% mutate(group=as.numeric(group)) %>% select(-row)
summa <- tab_chr %>% group_by(group) %>% summarise(n=n())
gremove <- summa %>% filter(n<10) %>% select(group) %>% pull()
summa <- tab_chr %>% group_by(group) %>% summarise(N=n())
summa <- summa %>% mutate(n_bef=lag(N,default=9))
summa <- summa %>% mutate(n_af=lead(N,default=9))
summa <- summa %>% mutate(excl=case_when(N<n ~ 1,
T ~ 0))
summa <- summa %>% mutate(ex_bef=lag(excl,default=9))
summa <- summa %>% mutate(ex_af=lead(excl,default=9))
gremove <- summa %>% filter(excl==1 & ((ex_bef!=1 & ex_af!=1) | (ex_bef!=9 & ex_af!=9))) %>% select(group) %>% pull()
mark_remove <- bind_rows(mark_remove,tab_chr %>% filter(group %in% gremove))
}
......
No preview for this file type
......@@ -361,7 +361,7 @@ plotmap_after <- ~plotMap(cross_after,newmap_after,shift=TRUE,main="After stuart
```{r after_estmap}
#filter with mark_estmap
tab2 <- mark_estmap(tab2,newmap_after)
tab2 <- mark_estmap(tab2,newmap_after,annot_mini)
# create rqtl csv file
write_rqtl(geno=genos,pheno=phenos,tab=tab2,ref=strains,par1="parent1",par2="parent2",prefix="ind_",pos="cM_cox",path="files/cluster2/cross_after.csv")
......
--Read the following data:
176 individuals
2236 markers
2235 markers
4 phenotypes
--Cross type: f2
This diff is collapsed.
% latex table generated in R 4.0.4 by xtable 1.8-4 package
% Mon Jan 3 17:04:48 2022
% Tue Jan 4 10:53:15 2022
\begin{table}[ht]
\centering
\begin{tabular}{lllllrrr}
......
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