Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mouselab
stuart
Commits
2ffd299b
Commit
2ffd299b
authored
Jun 02, 2021
by
Marie Bourdon
Browse files
add manual
parent
fc18feef
Changes
62
Expand all
Hide whitespace changes
Inline
Side-by-side
.Rhistory
0 → 100644
View file @
2ffd299b
This diff is collapsed.
Click to expand it.
.Rproj.user/9DAE6990/pcs/source-pane.pper
View file @
2ffd299b
{
"activeTab" :
0
"activeTab" :
2
}
\ No newline at end of file
.Rproj.user/9DAE6990/sources/prop/3A328548
0 → 100644
View file @
2ffd299b
{
}
\ No newline at end of file
.Rproj.user/9DAE6990/sources/prop/5B8691C7
View file @
2ffd299b
{
"cursorPosition" : "
100,50
",
"scrollLine" : "
96
"
"cursorPosition" : "
48,32
",
"scrollLine" : "
33
"
}
\ No newline at end of file
.Rproj.user/9DAE6990/sources/prop/AE613167
0 → 100644
View file @
2ffd299b
{
}
\ No newline at end of file
.Rproj.user/9DAE6990/sources/prop/BEB7232
0 → 100644
View file @
2ffd299b
{
"cursorPosition" : "9,60",
"scrollLine" : "0"
}
\ No newline at end of file
.Rproj.user/9DAE6990/sources/prop/D602FFE4
View file @
2ffd299b
{
"cursorPosition" : "
128,16
",
"last_setup_crc32" : "3
1136BFE
5bfca283",
"scrollLine" : "
123
"
"cursorPosition" : "
44,0
",
"last_setup_crc32" : "3
9B546A6
5bfca283",
"scrollLine" : "
44
"
}
\ No newline at end of file
.Rproj.user/9DAE6990/sources/prop/INDEX
View file @
2ffd299b
~%2Fstuart_package%2Fstuart%2FDESCRIPTION="BEB7232"
~%2Fstuart_package%2Fstuart%2FNAMESPACE="AE613167"
~%2Fstuart_package%2Fstuart%2FR%2Fmark_poly.R="3A328548"
~%2Fstuart_package%2Fstuart%2FR%2Fwrite_rqtl.R="5B8691C7"
~%2Fstuart_package%2Fstuart%2Fvignettes%2FstuaRt.R="EBD625D2"
~%2Fstuart_package%2Fstuart%2Fvignettes%2FstuaRt.Rmd="D602FFE4"
.Rproj.user/9DAE6990/sources/s-31136BFE/32FAC663-contents
deleted
100644 → 0
View file @
fc18feef
## ---- include = FALSE---------------------------------------------------------
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
## ----setup--------------------------------------------------------------------
library(dplyr)
library(stuart)
## ----annot--------------------------------------------------------------------
annot_mini <- read.csv(url("https://raw.githubusercontent.com/kbroman/MUGAarrays/master/UWisc/mini_uwisc_v2.csv"))
## ----load---------------------------------------------------------------------
data(genos)
summary(genos)
data(phenos)
summary(phenos)
## ----strains------------------------------------------------------------------
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)
## ----no_parent----------------------------------------------------------------
genos <- genos %>% filter(!Sample.ID %in% c("StrainsA_1", "StrainsA_2", "StrainsB_1","StrainsB_2"))
## ----tab_mark-----------------------------------------------------------------
data(stuart_tab)
summary(stuart_tab)
## ----mark_match---------------------------------------------------------------
tab2 <- mark_match(stuart_tab,ref=strains)
tab2 %>% filter(exclude_match==1)
## ----mark_poly ex-------------------------------------------------------------
tab2 <- mark_poly(tab2)
head(tab2)
## ----mark_prop ex-------------------------------------------------------------
tab2 <- mark_prop(tab2,cross="F2",homo=0.1,hetero=0.1)
head(tab2)
## ----mark_allele--------------------------------------------------------------
tab2 <- mark_allele(tab=tab2,ref=strains,par1="parent1",par2="parent2")
tab2 %>% arrange(desc(exclude_allele)) %>% head()
## ----mark_allele-strains------------------------------------------------------
strains %>% filter(marker %in% c("gJAX00038569","gJAX00425031","gUNC12245354","gUNC15530876","gUNC21555204","gUNC21596600")) %>% arrange(marker) %>% select(marker,parent1,parent2)
.Rproj.user/9DAE6990/sources/s-3
1136BFE
/45D91D58
→
.Rproj.user/9DAE6990/sources/s-3
9B546A6
/45D91D58
View file @
2ffd299b
...
...
@@ -5,20 +5,20 @@
"dirty" : false,
"encoding" : "UTF-8",
"folds" : "",
"hash" : "
0
",
"hash" : "
3120719904
",
"id" : "45D91D58",
"lastKnownWriteTime" : 1622
539449
,
"last_content_update" : 1622
539449402
,
"lastKnownWriteTime" : 1622
621980
,
"last_content_update" : 1622
621980790
,
"path" : "~/stuart_package/stuart/R/write_rqtl.R",
"project_path" : "R/write_rqtl.R",
"properties" : {
"cursorPosition" : "
100,50
",
"scrollLine" : "
96
"
"cursorPosition" : "
48,32
",
"scrollLine" : "
33
"
},
"read_only" : false,
"read_only_alternatives" : [
],
"relative_order" :
1
,
"relative_order" :
5
,
"source_on_save" : false,
"source_window" : "",
"type" : "r_source"
...
...
.Rproj.user/9DAE6990/sources/s-3
1136BFE
/45D91D58-contents
→
.Rproj.user/9DAE6990/sources/s-3
9B546A6
/45D91D58-contents
View file @
2ffd299b
...
...
@@ -48,7 +48,7 @@ write_rqtl <- function(geno,pheno,tab,ref,par1,par2,prefix,pos,path=NA){
#keep parental lines genotypes
colnames(ref) <- make.names(colnames(ref))
ref <- ref %>% select(marker,chr,
bp_mm10,
!!sym(pos),!!sym(par1),!!sym(par2))
ref <- ref %>% select(marker,chr,!!sym(pos),!!sym(par1),!!sym(par2))
#merge genotypes with parents
geno <- left_join(geno,ref,by=c("SNP.Name"="marker"))
...
...
@@ -92,12 +92,12 @@ write_rqtl <- function(geno,pheno,tab,ref,par1,par2,prefix,pos,path=NA){
#keep positions of markers
markers <- geno %>% select(SNP.Name,chr,
bp_mm10,
!!sym(pos)) %>% distinct()
markers <- markers %>% arrange(chr,
bp_mm10
)
markers <- geno %>% select(SNP.Name,chr,!!sym(pos)) %>% distinct()
markers <- markers %>% arrange(chr,
!!sym(pos)
)
#keep only interesting columns in geno file
geno <- geno %>% arrange(chr,
bp_mm10
)
geno <- geno %>% arrange(chr,
!!sym(pos)
)
geno <- geno %>% select(SNP.Name,Sample.ID,Geno)
#remove prefix
...
...
.Rproj.user/9DAE6990/sources/s-3
1136BFE
/47AFB64
→
.Rproj.user/9DAE6990/sources/s-3
9B546A6
/47AFB64
View file @
2ffd299b
...
...
@@ -26,7 +26,7 @@
"read_only" : false,
"read_only_alternatives" : [
],
"relative_order" :
5
,
"relative_order" :
6
,
"source_on_save" : false,
"source_window" : "",
"type" : "r_dataframe"
...
...
.Rproj.user/9DAE6990/sources/s-3
1136BFE
/47AFB64-contents
→
.Rproj.user/9DAE6990/sources/s-3
9B546A6
/47AFB64-contents
View file @
2ffd299b
File moved
.Rproj.user/9DAE6990/sources/s-3
1136BFE
/4A9D04E
→
.Rproj.user/9DAE6990/sources/s-3
9B546A6
/4A9D04E
View file @
2ffd299b
...
...
@@ -12,21 +12,21 @@
"path" : null,
"project_path" : null,
"properties" : {
"cacheKey" : "
2EEA0644
",
"cacheKey" : "
F7A5FD33
",
"caption" : "strains",
"contentUrl" : "grid_resource/gridviewer.html?env=&obj=strains&cache_key=
2EEA0644
",
"displayedObservations" : 11125,
"contentUrl" : "grid_resource/gridviewer.html?env=&obj=strains&cache_key=
F7A5FD33
",
"displayedObservations" :
"
11125
"
,
"environment" : "",
"expression" : "strains",
"object" : "strains",
"preview" :
0
,
"totalObservations" : 11125,
"variables" : 14
"preview" :
"0"
,
"totalObservations" :
"
11125
"
,
"variables" :
"
14
"
},
"read_only" : false,
"read_only_alternatives" : [
],
"relative_order" :
6
,
"relative_order" :
3
,
"source_on_save" : false,
"source_window" : "",
"type" : "r_dataframe"
...
...
.Rproj.user/9DAE6990/sources/s-3
1136BFE
/4A9D04E-contents
→
.Rproj.user/9DAE6990/sources/s-3
9B546A6
/4A9D04E-contents
View file @
2ffd299b
File moved
.Rproj.user/9DAE6990/sources/s-3
1136BFE
/806AAC34
→
.Rproj.user/9DAE6990/sources/s-3
9B546A6
/806AAC34
View file @
2ffd299b
...
...
@@ -26,7 +26,7 @@
"read_only" : false,
"read_only_alternatives" : [
],
"relative_order" :
3
,
"relative_order" :
4
,
"source_on_save" : false,
"source_window" : "",
"type" : "r_dataframe"
...
...
.Rproj.user/9DAE6990/sources/s-3
1136BFE
/806AAC34-contents
→
.Rproj.user/9DAE6990/sources/s-3
9B546A6
/806AAC34-contents
View file @
2ffd299b
File moved
.Rproj.user/9DAE6990/sources/s-3
1136BFE
/96AB3736
→
.Rproj.user/9DAE6990/sources/s-3
9B546A6
/96AB3736
View file @
2ffd299b
...
...
@@ -7,19 +7,19 @@
"folds" : "",
"hash" : "0",
"id" : "96AB3736",
"lastKnownWriteTime" : 1622
538645
,
"last_content_update" : 1622
53864500
4,
"lastKnownWriteTime" : 1622
624631
,
"last_content_update" : 1622
62463169
4,
"path" : "~/stuart_package/stuart/vignettes/stuaRt.Rmd",
"project_path" : "vignettes/stuaRt.Rmd",
"properties" : {
"cursorPosition" : "
128,16
",
"last_setup_crc32" : "3
1136BFE
5bfca283",
"scrollLine" : "
123
"
"cursorPosition" : "
44,0
",
"last_setup_crc32" : "3
9B546A6
5bfca283",
"scrollLine" : "
44
"
},
"read_only" : false,
"read_only_alternatives" : [
],
"relative_order" :
2
,
"relative_order" :
1
,
"source_on_save" : false,
"source_window" : "",
"type" : "r_markdown"
...
...
.Rproj.user/9DAE6990/sources/s-3
1136BFE
/96AB3736-contents
→
.Rproj.user/9DAE6990/sources/s-3
9B546A6
/96AB3736-contents
View file @
2ffd299b
File moved
.Rproj.user/9DAE6990/sources/s-39B546A6/9E3EC0FD
0 → 100644
View file @
2ffd299b
{
"collab_server" : "",
"contents" : "",
"created" : 1622622953119.000,
"dirty" : false,
"encoding" : "UTF-8",
"folds" : "",
"hash" : "2767839831",
"id" : "9E3EC0FD",
"lastKnownWriteTime" : 1622539469,
"last_content_update" : 1622539469,
"path" : "~/stuart_package/stuart/NAMESPACE",
"project_path" : "NAMESPACE",
"properties" : {
},
"read_only" : true,
"read_only_alternatives" : [
],
"relative_order" : 8,
"source_on_save" : false,
"source_window" : "",
"type" : "r_namespace"
}
\ No newline at end of file
Prev
1
2
3
4
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment