diff --git a/.Rproj.user/9DAE6990/pcs/source-pane.pper b/.Rproj.user/9DAE6990/pcs/source-pane.pper index 1743e40fec30e357993d33f5cb053bf027524dc8..d3d70fa0c6a708df53d33b21eeb319f4067fd72c 100644 --- a/.Rproj.user/9DAE6990/pcs/source-pane.pper +++ b/.Rproj.user/9DAE6990/pcs/source-pane.pper @@ -1,3 +1,3 @@ { - "activeTab" : 0 + "activeTab" : 6 } \ No newline at end of file diff --git a/.Rproj.user/9DAE6990/rmd-outputs b/.Rproj.user/9DAE6990/rmd-outputs index dd18eccd1a62da6163f019b613c98281f6147ebc..47f8c135bee1edbf9fcc1413f2cf84bcc58a3230 100644 --- a/.Rproj.user/9DAE6990/rmd-outputs +++ b/.Rproj.user/9DAE6990/rmd-outputs @@ -1,7 +1,8 @@ /private/var/folders/dn/j71yz2tn5_gdffs8fqxhddrr0000gn/T/Rtmp3VMULh/preview-1ced414f7aab.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 + + diff --git a/.Rproj.user/9DAE6990/sources/s-39B546A6/1656F55 b/.Rproj.user/9DAE6990/sources/per/t/1656F55 similarity index 85% rename from .Rproj.user/9DAE6990/sources/s-39B546A6/1656F55 rename to .Rproj.user/9DAE6990/sources/per/t/1656F55 index 7aaecc2f4049a5605d0b04da4901da8698b401ce..8e20769b46ded0096db9088d18fbd11f6512ba2f 100644 --- a/.Rproj.user/9DAE6990/sources/s-39B546A6/1656F55 +++ b/.Rproj.user/9DAE6990/sources/per/t/1656F55 @@ -9,11 +9,11 @@ "id" : "1656F55", "lastKnownWriteTime" : 1622640147, "last_content_update" : 1622640147, - "path" : "~/stuart_package/stuart/R/geno_strains.R", + "path" : "~/Documents/PhD/stuart_R/stuart/R/geno_strains.R", "project_path" : "R/geno_strains.R", "properties" : { "cursorPosition" : "22,39", - "scrollLine" : "7" + "scrollLine" : "0" }, "read_only" : false, "read_only_alternatives" : [ diff --git a/.Rproj.user/9DAE6990/sources/s-39B546A6/1656F55-contents b/.Rproj.user/9DAE6990/sources/per/t/1656F55-contents similarity index 100% rename from .Rproj.user/9DAE6990/sources/s-39B546A6/1656F55-contents rename to .Rproj.user/9DAE6990/sources/per/t/1656F55-contents diff --git a/.Rproj.user/9DAE6990/sources/s-39B546A6/42D37312 b/.Rproj.user/9DAE6990/sources/per/t/42D37312 similarity index 67% rename from .Rproj.user/9DAE6990/sources/s-39B546A6/42D37312 rename to .Rproj.user/9DAE6990/sources/per/t/42D37312 index 583c1f70b07438033c80b8e1b996e4db2d8d5b17..bb16ed6ca5de8f82cddf1b4533c015b6b4dba764 100644 --- a/.Rproj.user/9DAE6990/sources/s-39B546A6/42D37312 +++ b/.Rproj.user/9DAE6990/sources/per/t/42D37312 @@ -5,14 +5,14 @@ "dirty" : false, "encoding" : "UTF-8", "folds" : "", - "hash" : "0", + "hash" : "3094972460", "id" : "42D37312", - "lastKnownWriteTime" : 1622465534, - "last_content_update" : 1622465534, - "path" : "~/stuart_package/stuart/R/mark_prop.R", + "lastKnownWriteTime" : 1623061718, + "last_content_update" : 1623061718577, + "path" : "~/Documents/PhD/stuart_R/stuart/R/mark_prop.R", "project_path" : "R/mark_prop.R", "properties" : { - "cursorPosition" : "2,104", + "cursorPosition" : "16,28", "scrollLine" : "0" }, "read_only" : false, diff --git a/.Rproj.user/9DAE6990/sources/s-39B546A6/42D37312-contents b/.Rproj.user/9DAE6990/sources/per/t/42D37312-contents similarity index 98% rename from .Rproj.user/9DAE6990/sources/s-39B546A6/42D37312-contents rename to .Rproj.user/9DAE6990/sources/per/t/42D37312-contents index a0827e8c27b02c9d65a6cc3af34cf595f50a5840..8af6e843dc7d88ac3724cf1c46fde5ba9b43f416 100644 --- a/.Rproj.user/9DAE6990/sources/s-39B546A6/42D37312-contents +++ b/.Rproj.user/9DAE6990/sources/per/t/42D37312-contents @@ -14,6 +14,7 @@ #### mark_prop #### ## excludes markers depending on proportions of homo/hetorozygous +## to modify with chisq.test mark_prop <- function(tab,cross,homo=NA,hetero=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)) diff --git a/.Rproj.user/9DAE6990/sources/s-39B546A6/45D91D58 b/.Rproj.user/9DAE6990/sources/per/t/45D91D58 similarity index 86% rename from .Rproj.user/9DAE6990/sources/s-39B546A6/45D91D58 rename to .Rproj.user/9DAE6990/sources/per/t/45D91D58 index f68fb4c1e8cf5d5be740afb5ed88aef0a4f0d0a3..e376a74239619faa1a9de99cde17e4c3da434ba2 100644 --- a/.Rproj.user/9DAE6990/sources/s-39B546A6/45D91D58 +++ b/.Rproj.user/9DAE6990/sources/per/t/45D91D58 @@ -9,11 +9,11 @@ "id" : "45D91D58", "lastKnownWriteTime" : 1622648301, "last_content_update" : 1622648301329, - "path" : "~/stuart_package/stuart/R/write_rqtl.R", + "path" : "~/Documents/PhD/stuart_R/stuart/R/write_rqtl.R", "project_path" : "R/write_rqtl.R", "properties" : { "cursorPosition" : "84,18", - "scrollLine" : "94" + "scrollLine" : "0" }, "read_only" : false, "read_only_alternatives" : [ diff --git a/.Rproj.user/9DAE6990/sources/s-39B546A6/45D91D58-contents b/.Rproj.user/9DAE6990/sources/per/t/45D91D58-contents similarity index 100% rename from .Rproj.user/9DAE6990/sources/s-39B546A6/45D91D58-contents rename to .Rproj.user/9DAE6990/sources/per/t/45D91D58-contents diff --git a/.Rproj.user/9DAE6990/sources/s-39B546A6/65C9B72B b/.Rproj.user/9DAE6990/sources/per/t/65C9B72B similarity index 86% rename from .Rproj.user/9DAE6990/sources/s-39B546A6/65C9B72B rename to .Rproj.user/9DAE6990/sources/per/t/65C9B72B index 51dacef1135242c12e552e8bc12afea49f8f3133..c988561e5f7a57087211e903b001889271f0e1b5 100644 --- a/.Rproj.user/9DAE6990/sources/s-39B546A6/65C9B72B +++ b/.Rproj.user/9DAE6990/sources/per/t/65C9B72B @@ -9,11 +9,11 @@ "id" : "65C9B72B", "lastKnownWriteTime" : 1622642120, "last_content_update" : 1622642120783, - "path" : "~/stuart_package/stuart/R/tab_mark.R", + "path" : "~/Documents/PhD/stuart_R/stuart/R/tab_mark.R", "project_path" : "R/tab_mark.R", "properties" : { "cursorPosition" : "43,27", - "scrollLine" : "29", + "scrollLine" : "0", "source_window_id" : "" }, "read_only" : false, diff --git a/.Rproj.user/9DAE6990/sources/s-39B546A6/65C9B72B-contents b/.Rproj.user/9DAE6990/sources/per/t/65C9B72B-contents similarity index 100% rename from .Rproj.user/9DAE6990/sources/s-39B546A6/65C9B72B-contents rename to .Rproj.user/9DAE6990/sources/per/t/65C9B72B-contents diff --git a/.Rproj.user/9DAE6990/sources/s-39B546A6/76AC3EC b/.Rproj.user/9DAE6990/sources/per/t/76AC3EC similarity index 73% rename from .Rproj.user/9DAE6990/sources/s-39B546A6/76AC3EC rename to .Rproj.user/9DAE6990/sources/per/t/76AC3EC index 19b279e0190cba636ccbe66aa8dcf40ccca650c5..34ddaca5ed5997074aa902eed3a9da1114031382 100644 --- a/.Rproj.user/9DAE6990/sources/s-39B546A6/76AC3EC +++ b/.Rproj.user/9DAE6990/sources/per/t/76AC3EC @@ -5,11 +5,11 @@ "dirty" : false, "encoding" : "UTF-8", "folds" : "", - "hash" : "0", + "hash" : "143869640", "id" : "76AC3EC", - "lastKnownWriteTime" : 1622644628, - "last_content_update" : 1622644628349, - "path" : "~/stuart_package/stuart/R/mark_match.R", + "lastKnownWriteTime" : 1623060553, + "last_content_update" : 1623060553, + "path" : "~/Documents/PhD/stuart_R/stuart/R/mark_match.R", "project_path" : "R/mark_match.R", "properties" : { "cursorPosition" : "20,46", diff --git a/.Rproj.user/9DAE6990/sources/s-39B546A6/76AC3EC-contents b/.Rproj.user/9DAE6990/sources/per/t/76AC3EC-contents similarity index 100% rename from .Rproj.user/9DAE6990/sources/s-39B546A6/76AC3EC-contents rename to .Rproj.user/9DAE6990/sources/per/t/76AC3EC-contents diff --git a/.Rproj.user/9DAE6990/sources/s-39B546A6/96AB3736 b/.Rproj.user/9DAE6990/sources/per/t/96AB3736 similarity index 68% rename from .Rproj.user/9DAE6990/sources/s-39B546A6/96AB3736 rename to .Rproj.user/9DAE6990/sources/per/t/96AB3736 index ff216ba631ada3582dc5f0c3069563828d2cae4a..84a57ef4e687342e71e997f9e8af97bc78a8e07c 100644 --- a/.Rproj.user/9DAE6990/sources/s-39B546A6/96AB3736 +++ b/.Rproj.user/9DAE6990/sources/per/t/96AB3736 @@ -7,14 +7,14 @@ "folds" : "", "hash" : "2014255563", "id" : "96AB3736", - "lastKnownWriteTime" : 1622648726, - "last_content_update" : 1622648726992, - "path" : "~/stuart_package/stuart/vignettes/stuaRt.Rmd", + "lastKnownWriteTime" : 1623060592, + "last_content_update" : 1623060592, + "path" : "~/Documents/PhD/stuart_R/stuart/vignettes/stuaRt.Rmd", "project_path" : "vignettes/stuaRt.Rmd", "properties" : { "cursorPosition" : "135,15", - "last_setup_crc32" : "39B546A65bfca283", - "scrollLine" : "130" + "last_setup_crc32" : "", + "scrollLine" : "111" }, "read_only" : false, "read_only_alternatives" : [ diff --git a/.Rproj.user/9DAE6990/sources/s-39B546A6/96AB3736-contents b/.Rproj.user/9DAE6990/sources/per/t/96AB3736-contents similarity index 100% rename from .Rproj.user/9DAE6990/sources/s-39B546A6/96AB3736-contents rename to .Rproj.user/9DAE6990/sources/per/t/96AB3736-contents diff --git a/.Rproj.user/9DAE6990/sources/s-39B546A6/A6A5703A b/.Rproj.user/9DAE6990/sources/per/t/A6A5703A similarity index 89% rename from .Rproj.user/9DAE6990/sources/s-39B546A6/A6A5703A rename to .Rproj.user/9DAE6990/sources/per/t/A6A5703A index f1dd731e6dca27456679b529e0b091df748a97ca..e498a6cf136ca26ccf4887243c193d65fc23b154 100644 --- a/.Rproj.user/9DAE6990/sources/s-39B546A6/A6A5703A +++ b/.Rproj.user/9DAE6990/sources/per/t/A6A5703A @@ -9,7 +9,7 @@ "id" : "A6A5703A", "lastKnownWriteTime" : 1622641746, "last_content_update" : 1622641746302, - "path" : "~/stuart_package/stuart/R/stuart_tab-data.R", + "path" : "~/Documents/PhD/stuart_R/stuart/R/stuart_tab-data.R", "project_path" : "R/stuart_tab-data.R", "properties" : { "cursorPosition" : "8,12", diff --git a/.Rproj.user/9DAE6990/sources/s-39B546A6/A6A5703A-contents b/.Rproj.user/9DAE6990/sources/per/t/A6A5703A-contents similarity index 100% rename from .Rproj.user/9DAE6990/sources/s-39B546A6/A6A5703A-contents rename to .Rproj.user/9DAE6990/sources/per/t/A6A5703A-contents diff --git a/.Rproj.user/9DAE6990/sources/s-39B546A6/B86C81D8 b/.Rproj.user/9DAE6990/sources/per/t/B86C81D8 similarity index 85% rename from .Rproj.user/9DAE6990/sources/s-39B546A6/B86C81D8 rename to .Rproj.user/9DAE6990/sources/per/t/B86C81D8 index 66bd8e587e07c451e45a10606ba2cf11b8bd1fa6..b6a9d87a051e2d8d3ec63945fa4811444bec9447 100644 --- a/.Rproj.user/9DAE6990/sources/s-39B546A6/B86C81D8 +++ b/.Rproj.user/9DAE6990/sources/per/t/B86C81D8 @@ -5,11 +5,11 @@ "dirty" : false, "encoding" : "UTF-8", "folds" : "", - "hash" : "0", + "hash" : "4129306061", "id" : "B86C81D8", "lastKnownWriteTime" : 1622646597, "last_content_update" : 1622646597951, - "path" : "~/stuart_package/stuart/R/mark_allele.R", + "path" : "~/Documents/PhD/stuart_R/stuart/R/mark_allele.R", "project_path" : "R/mark_allele.R", "properties" : { "cursorPosition" : "23,55", diff --git a/.Rproj.user/9DAE6990/sources/s-39B546A6/B86C81D8-contents b/.Rproj.user/9DAE6990/sources/per/t/B86C81D8-contents similarity index 100% rename from .Rproj.user/9DAE6990/sources/s-39B546A6/B86C81D8-contents rename to .Rproj.user/9DAE6990/sources/per/t/B86C81D8-contents diff --git a/.Rproj.user/9DAE6990/sources/s-39B546A6/C5228C18 b/.Rproj.user/9DAE6990/sources/per/t/C5228C18 similarity index 86% rename from .Rproj.user/9DAE6990/sources/s-39B546A6/C5228C18 rename to .Rproj.user/9DAE6990/sources/per/t/C5228C18 index 57f6d66cd07d3b881fe3dcc18d07bd201c027b9d..b8720f38836d77837dc46bbbfa77028c6803354d 100644 --- a/.Rproj.user/9DAE6990/sources/s-39B546A6/C5228C18 +++ b/.Rproj.user/9DAE6990/sources/per/t/C5228C18 @@ -5,11 +5,11 @@ "dirty" : false, "encoding" : "UTF-8", "folds" : "", - "hash" : "0", + "hash" : "1417555270", "id" : "C5228C18", "lastKnownWriteTime" : 1622645200, "last_content_update" : 1622645200474, - "path" : "~/stuart_package/stuart/R/mark_poly.R", + "path" : "~/Documents/PhD/stuart_R/stuart/R/mark_poly.R", "project_path" : "R/mark_poly.R", "properties" : { "cursorPosition" : "9,51", diff --git a/.Rproj.user/9DAE6990/sources/s-39B546A6/C5228C18-contents b/.Rproj.user/9DAE6990/sources/per/t/C5228C18-contents similarity index 100% rename from .Rproj.user/9DAE6990/sources/s-39B546A6/C5228C18-contents rename to .Rproj.user/9DAE6990/sources/per/t/C5228C18-contents diff --git a/.Rproj.user/9DAE6990/sources/s-39B546A6/C81C94E6 b/.Rproj.user/9DAE6990/sources/per/t/C81C94E6 similarity index 90% rename from .Rproj.user/9DAE6990/sources/s-39B546A6/C81C94E6 rename to .Rproj.user/9DAE6990/sources/per/t/C81C94E6 index bd85e7ad7d4b50c442dac33ba1e74b7ccfc79637..b1b9d06ed6d1b4eaf5db74d57876e6219b523984 100644 --- a/.Rproj.user/9DAE6990/sources/s-39B546A6/C81C94E6 +++ b/.Rproj.user/9DAE6990/sources/per/t/C81C94E6 @@ -9,7 +9,7 @@ "id" : "C81C94E6", "lastKnownWriteTime" : 1622623114, "last_content_update" : 1622623114332, - "path" : "~/stuart_package/stuart/DESCRIPTION", + "path" : "~/Documents/PhD/stuart_R/stuart/DESCRIPTION", "project_path" : "DESCRIPTION", "properties" : { "cursorPosition" : "9,60", diff --git a/.Rproj.user/9DAE6990/sources/s-39B546A6/C81C94E6-contents b/.Rproj.user/9DAE6990/sources/per/t/C81C94E6-contents similarity index 100% rename from .Rproj.user/9DAE6990/sources/s-39B546A6/C81C94E6-contents rename to .Rproj.user/9DAE6990/sources/per/t/C81C94E6-contents diff --git a/.Rproj.user/9DAE6990/sources/prop/430FE7D7 b/.Rproj.user/9DAE6990/sources/prop/430FE7D7 new file mode 100644 index 0000000000000000000000000000000000000000..0fd9f58658412cf4ad4c0c78d2c06d1ee4fbea4f --- /dev/null +++ b/.Rproj.user/9DAE6990/sources/prop/430FE7D7 @@ -0,0 +1,4 @@ +{ + "cursorPosition" : "22,39", + "scrollLine" : "0" +} \ No newline at end of file diff --git a/.Rproj.user/9DAE6990/sources/prop/524B281F b/.Rproj.user/9DAE6990/sources/prop/524B281F new file mode 100644 index 0000000000000000000000000000000000000000..5ba20d4665c8e92b885b11b7eb579f858494350a --- /dev/null +++ b/.Rproj.user/9DAE6990/sources/prop/524B281F @@ -0,0 +1,4 @@ +{ + "cursorPosition" : "8,12", + "scrollLine" : "0" +} \ No newline at end of file diff --git a/.Rproj.user/9DAE6990/sources/prop/52B275C1 b/.Rproj.user/9DAE6990/sources/prop/52B275C1 new file mode 100644 index 0000000000000000000000000000000000000000..f177a1d2af80e33d41780a33402e0ec073a515d1 --- /dev/null +++ b/.Rproj.user/9DAE6990/sources/prop/52B275C1 @@ -0,0 +1,4 @@ +{ + "cursorPosition" : "16,28", + "scrollLine" : "0" +} \ No newline at end of file diff --git a/.Rproj.user/9DAE6990/sources/prop/58D83345 b/.Rproj.user/9DAE6990/sources/prop/58D83345 new file mode 100644 index 0000000000000000000000000000000000000000..a3b2e9f1972ab5f437c3782dab851521fe0d6f46 --- /dev/null +++ b/.Rproj.user/9DAE6990/sources/prop/58D83345 @@ -0,0 +1,4 @@ +{ + "cursorPosition" : "23,55", + "scrollLine" : "0" +} \ No newline at end of file diff --git a/.Rproj.user/9DAE6990/sources/prop/A58355B1 b/.Rproj.user/9DAE6990/sources/prop/A58355B1 new file mode 100644 index 0000000000000000000000000000000000000000..e3932e68f7b632d4dfc394ac6c70fcabd8d4b057 --- /dev/null +++ b/.Rproj.user/9DAE6990/sources/prop/A58355B1 @@ -0,0 +1,4 @@ +{ + "cursorPosition" : "9,60", + "scrollLine" : "0" +} \ No newline at end of file diff --git a/.Rproj.user/9DAE6990/sources/prop/B873B132 b/.Rproj.user/9DAE6990/sources/prop/B873B132 new file mode 100644 index 0000000000000000000000000000000000000000..2198080175fa1f9c9ff15b09b67f56c813936b4a --- /dev/null +++ b/.Rproj.user/9DAE6990/sources/prop/B873B132 @@ -0,0 +1,4 @@ +{ + "cursorPosition" : "84,18", + "scrollLine" : "0" +} \ No newline at end of file diff --git a/.Rproj.user/9DAE6990/sources/prop/B92E179B b/.Rproj.user/9DAE6990/sources/prop/B92E179B new file mode 100644 index 0000000000000000000000000000000000000000..99225b88f2b3d69bec4e54ea84c112b5e16f3ea5 --- /dev/null +++ b/.Rproj.user/9DAE6990/sources/prop/B92E179B @@ -0,0 +1,5 @@ +{ + "cursorPosition" : "135,15", + "last_setup_crc32" : "", + "scrollLine" : "111" +} \ No newline at end of file diff --git a/.Rproj.user/9DAE6990/sources/prop/C4894908 b/.Rproj.user/9DAE6990/sources/prop/C4894908 new file mode 100644 index 0000000000000000000000000000000000000000..53d792be15289109171d4000dea0dfbe4d3b4623 --- /dev/null +++ b/.Rproj.user/9DAE6990/sources/prop/C4894908 @@ -0,0 +1,5 @@ +{ + "cursorPosition" : "43,27", + "scrollLine" : "0", + "source_window_id" : "" +} \ No newline at end of file diff --git a/.Rproj.user/9DAE6990/sources/prop/DB7C2433 b/.Rproj.user/9DAE6990/sources/prop/DB7C2433 new file mode 100644 index 0000000000000000000000000000000000000000..4c067597f326f93a2178a77bfffe89df9d1ceed1 --- /dev/null +++ b/.Rproj.user/9DAE6990/sources/prop/DB7C2433 @@ -0,0 +1,4 @@ +{ + "cursorPosition" : "20,46", + "scrollLine" : "0" +} \ No newline at end of file diff --git a/.Rproj.user/9DAE6990/sources/prop/E7505D7B b/.Rproj.user/9DAE6990/sources/prop/E7505D7B new file mode 100644 index 0000000000000000000000000000000000000000..a5638714b0481f1423ea85365c8af64243a71277 --- /dev/null +++ b/.Rproj.user/9DAE6990/sources/prop/E7505D7B @@ -0,0 +1,4 @@ +{ + "cursorPosition" : "9,51", + "scrollLine" : "0" +} \ No newline at end of file diff --git a/.Rproj.user/9DAE6990/sources/prop/INDEX b/.Rproj.user/9DAE6990/sources/prop/INDEX index 16f98885be4bba0b41bed600c49af1738abd995d..eb9f95ac9ea85eec475733598ad68958be13be45 100644 --- a/.Rproj.user/9DAE6990/sources/prop/INDEX +++ b/.Rproj.user/9DAE6990/sources/prop/INDEX @@ -1,3 +1,13 @@ +~%2FDocuments%2FPhD%2Fstuart_R%2Fstuart%2FDESCRIPTION="A58355B1" +~%2FDocuments%2FPhD%2Fstuart_R%2Fstuart%2FR%2Fgeno_strains.R="430FE7D7" +~%2FDocuments%2FPhD%2Fstuart_R%2Fstuart%2FR%2Fmark_allele.R="58D83345" +~%2FDocuments%2FPhD%2Fstuart_R%2Fstuart%2FR%2Fmark_match.R="DB7C2433" +~%2FDocuments%2FPhD%2Fstuart_R%2Fstuart%2FR%2Fmark_poly.R="E7505D7B" +~%2FDocuments%2FPhD%2Fstuart_R%2Fstuart%2FR%2Fmark_prop.R="52B275C1" +~%2FDocuments%2FPhD%2Fstuart_R%2Fstuart%2FR%2Fstuart_tab-data.R="524B281F" +~%2FDocuments%2FPhD%2Fstuart_R%2Fstuart%2FR%2Ftab_mark.R="C4894908" +~%2FDocuments%2FPhD%2Fstuart_R%2Fstuart%2FR%2Fwrite_rqtl.R="B873B132" +~%2FDocuments%2FPhD%2Fstuart_R%2Fstuart%2Fvignettes%2FstuaRt.Rmd="B92E179B" ~%2Fstuart_package%2Fstuart%2FDESCRIPTION="BEB7232" ~%2Fstuart_package%2Fstuart%2FNAMESPACE="AE613167" ~%2Fstuart_package%2Fstuart%2FR%2Fgeno_strains.R="8F7B714A" diff --git a/.Rproj.user/9DAE6990/sources/s-39B546A6/17AE345-contents b/.Rproj.user/9DAE6990/sources/s-39B546A6/17AE345-contents deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/.Rproj.user/9DAE6990/sources/s-39B546A6/47AFB64-contents b/.Rproj.user/9DAE6990/sources/s-39B546A6/47AFB64-contents deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/.Rproj.user/9DAE6990/sources/s-39B546A6/4A9D04E-contents b/.Rproj.user/9DAE6990/sources/s-39B546A6/4A9D04E-contents deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/.Rproj.user/9DAE6990/sources/s-39B546A6/6B5DE0D4-contents b/.Rproj.user/9DAE6990/sources/s-39B546A6/6B5DE0D4-contents deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/.Rproj.user/9DAE6990/sources/s-39B546A6/7E4482C6-contents b/.Rproj.user/9DAE6990/sources/s-39B546A6/7E4482C6-contents deleted file mode 100644 index fd50eb0ea6a1188c1f619aa7510b6b276c9c2895..0000000000000000000000000000000000000000 --- a/.Rproj.user/9DAE6990/sources/s-39B546A6/7E4482C6-contents +++ /dev/null @@ -1,8 +0,0 @@ -#' Data frame with miniMUGA genotyping of F2 individuals and parental strains -#' -#' A dataset containing the genotypes of 176 F2 individuals -#' -#' @format A data frame with 2002493 observations of 11 variables - - -"genos" diff --git a/.Rproj.user/9DAE6990/sources/s-39B546A6/806AAC34-contents b/.Rproj.user/9DAE6990/sources/s-39B546A6/806AAC34-contents deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/.Rproj.user/9DAE6990/sources/s-39B546A6/81311FDE-contents b/.Rproj.user/9DAE6990/sources/s-39B546A6/81311FDE-contents deleted file mode 100644 index 612c27db930cb54d481e09a9a7ab5efd4912420f..0000000000000000000000000000000000000000 --- a/.Rproj.user/9DAE6990/sources/s-39B546A6/81311FDE-contents +++ /dev/null @@ -1,137 +0,0 @@ -#' @title Create of the summary table for all markers from the genotype data frame -#' -#' @description This function creates a table with all the markers that were genotyped in the array, the alleles for these markers, the number of homozygous and heterozygous animals, as well as the number of non genotyped animals. -#' @param geno data frame with the genotyping results for your cross -#' -#' @import dplyr -#' @import tidyr -#' -#' @export -#' - -#### tab_mark function #### -## create table with markers and counts -tab_mark <- function(geno){ - #create geno column in geno df - geno <- geno %>% unite(Geno,c("Allele1...Forward","Allele2...Forward"),sep="",remove=FALSE) - - #recode genotypes to have all heterozygous encoded the same way (ex: only "AT", no "TA") - geno <- geno %>% mutate(Geno=recode(Geno, - "TA" = "AT", - "GA" = "AG", - "CA" = "AC", - "GT" = "TG", - "CT" = "TC", - "GC" = "CG")) - - - #create df with counts for each genotype - df_count <- tibble(SNP.Name = as.character(unique(geno$SNP.Name)), - Allele_1 = NA, - Allele_2 = NA, - n_HM1 = NA, - n_HM2 = NA, - n_HT = NA, - n_NA = NA) - - - ## loop to count genotype - for(i in df_count$SNP.Name){ - #extract alleles for each marker - Alleles <- geno %>% filter(SNP.Name==i) %>% - select(c(SNP.Name,Sample.ID,Geno,Allele1...Forward,Allele2...Forward)) %>% - pivot_longer(c(Allele1...Forward,Allele2...Forward),names_to="Allele_name",values_to="Allele") %>% - distinct(Allele) %>% filter(Allele != "-") - Alleles <- as.factor(paste(Alleles$Allele)) - - #sort alleles - Alleles <- factor(Alleles,levels=c("A","T","C","G")) - Alleles <- sort(Alleles) - - #add alleles and counts, only for markers with alleles (not markers with no genotyped ind) - if(all(rapportools::is.empty(Alleles))==FALSE){ - - #add alleles to df_count - df_count <- df_count %>% mutate(Allele_1 = ifelse(SNP.Name == i, - paste(Alleles[1]), Allele_1)) - - - - #count for homozygous for allele 1 - n1 <- geno %>% filter(SNP.Name==i) %>% - filter(Geno == paste(Alleles[1],Alleles[1],sep="")) %>% - summarise(n=n()) - - - #add count for homozygous for allele 1 to df_count - df_count <- df_count %>% mutate(n_HM1 = ifelse(SNP.Name == i, - n1$n, n_HM1)) - - - } - - #if marker not polymorphic - if(is.na(Alleles[2])==TRUE){ - #NA as Allele_2 - df_count <- df_count %>% mutate(Allele_2 = ifelse(SNP.Name == i, - NA, Allele_2)) - - #NA as n_HM2 - df_count <- df_count %>% mutate(n_HM2 = ifelse(SNP.Name == i, - NA, n_HM2)) - - #NA as n_HT - df_count <- df_count %>% mutate(n_HT = ifelse(SNP.Name == i, - NA, n_HT)) - } else { - #add alleles to df_count - df_count <- df_count %>% mutate(Allele_2 = ifelse(SNP.Name == i, - paste(Alleles[2]), Allele_2)) - - - #count for homozygous for allele 2 - n2 <- geno %>% filter(SNP.Name==i) %>% - filter(Geno == paste(Alleles[2],Alleles[2],sep="")) %>% - summarise(n=n()) - - #add count for homozygous for allele 1 to df_count - df_count <- df_count %>% mutate(n_HM2 = ifelse(SNP.Name == i, - n2$n, n_HM2)) - - - #count for heterozygous - n3 <- geno %>% filter(SNP.Name==i) %>% - filter(Geno == paste(Alleles[1],Alleles[2],sep="")) %>% - summarise(n=n()) - - - #add count for homozygous for allele 1 to df_count - df_count <- df_count %>% mutate(n_HT = ifelse(SNP.Name == i, - n3$n, n_HT)) - - - } - - #count for NA - n4 <- geno %>% filter(SNP.Name==i) %>% - filter(Geno == "--" | - Geno == paste(Alleles[1],"-",sep="") | Geno == paste(Alleles[2],"-",sep="") | - Geno == paste("-",Alleles[1],sep="") | Geno == paste("-",Alleles[2],sep="")) %>% - summarise(n=n()) - - #add count for NA to df_count - df_count <- df_count %>% mutate(n_NA = ifelse(SNP.Name == i, - n4$n, n_NA)) - } - #change class of counts as numeric : - df_count$n_HM1 <- df_count$n_HM1 %>% as.numeric() - df_count$n_HM2 <- df_count$n_HM2 %>% as.numeric() - df_count$n_HT <- df_count$n_HT %>% as.numeric() - df_count$n_NA <- df_count$n_NA %>% as.numeric() - - #add 0 for null counts - df_count <- df_count %>% mutate_at(.vars=vars(n_HM1,n_HM2,n_HT,n_NA),~replace(., is.na(.), 0)) - - #return - return(df_count) -} diff --git a/.Rproj.user/9DAE6990/sources/s-39B546A6/8DB3123E-contents b/.Rproj.user/9DAE6990/sources/s-39B546A6/8DB3123E-contents deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/.Rproj.user/9DAE6990/sources/s-39B546A6/907DF1D3-contents b/.Rproj.user/9DAE6990/sources/s-39B546A6/907DF1D3-contents deleted file mode 100644 index d4104d0f3af4780745e4939ce649d7e90e8c995e..0000000000000000000000000000000000000000 --- a/.Rproj.user/9DAE6990/sources/s-39B546A6/907DF1D3-contents +++ /dev/null @@ -1,55 +0,0 @@ -#' @title Create haplotype for a new mouse strain into a reference dataframe -#' -#' @description This functions adds columns for parental strains used in the cross in the annotation data frame, from the genotype data frame in which one or several animal of the parental strains were genotyped. -#' If several animals of one strain were genotyped, a consensus is created from these animals. -#' The consensus is created as follow : if the indivuals carry the same allele, this allele is kept, otherwise, the allele is noted as "N". If individuals show residual heterozygosity, it is encoded as "H". -#' @param ref data frame with the reference genotypes of mouse lines -#' @param geno data frame with the genotyping results for your cross from miniMUGA array -#' @param par1 first parental strain used in the cross, the name must be written as in the geno data frame -#' @param par2 second parental strain used in the cross, the name must be written as in the geno data frame -#' @param name1 name of the first parental strain to use as the column name in the ref data frame -#' @param name2 name of the second parental strain to use as the column name in the ref data frame -#' -#' @import dplyr -#' @import tidyr -#' -#' @export -#' -geno_strains <- function(ref,geno,par1,par2,name1,name2){ - #rename df columns - geno <- geno %>% rename("marker"=1, - "id"=2, - "allele_1"=3, - "allele_2"=4) - - - #recode genotypes from 2 alleles to 1 - geno <- geno %>% mutate_all(as.character) - geno <- geno %>% filter(id %in% c(par1,par2)) - geno <- geno %>% mutate(Geno=case_when(allele_1 == "-" | allele_2 == "-" ~ "N", - allele_1 == allele_2 ~ allele_1, - allele_1 %in% c("A","T","G","C") & allele_2 %in% c("A","T","G","C") ~ "H")) - - geno <- geno %>% select(marker,id,Geno) %>% pivot_wider(names_from = id, values_from = Geno) - - - #create consensus - if(length(par1)!=1){ - geno <- geno %>% mutate(parent1 = ifelse(!!sym(par1[1])==!!sym(par1[2]),!!sym(par1[1]),"N")) - } else { - geno <- geno %>% rename(parent1=!!sym(par1[1])) - } - - if(length(par2)!=1){ - geno <- geno %>% mutate(parent2 = ifelse(!!sym(par2[1])==!!sym(par2[2]),!!sym(par2[1]),"N")) - } else { - geno <- geno %>% rename(parent2=!!sym(par2[1])) - } - - geno <- geno %>% select(marker,parent1,parent2) - colnames(geno) <- c("marker",name1,name2) - - #merge with ref file - ref <- full_join(ref,geno,by=c("marker"="marker")) - return(ref) -} diff --git a/.Rproj.user/9DAE6990/sources/s-39B546A6/9E3EC0FD-contents b/.Rproj.user/9DAE6990/sources/s-39B546A6/9E3EC0FD-contents deleted file mode 100644 index 902e04361e27306cd36fac0de688e5a6ab80da2c..0000000000000000000000000000000000000000 --- a/.Rproj.user/9DAE6990/sources/s-39B546A6/9E3EC0FD-contents +++ /dev/null @@ -1,13 +0,0 @@ -# Generated by roxygen2: do not edit by hand - -export(geno_strains) -export(mark_allele) -export(mark_match) -export(mark_poly) -export(mark_prop) -export(tab_mark) -export(write_rqtl) -import(dplyr) -import(stringr) -import(tidyr) -import(utils) diff --git a/.Rproj.user/9DAE6990/sources/s-39B546A6/C2CE7FEA-contents b/.Rproj.user/9DAE6990/sources/s-39B546A6/C2CE7FEA-contents deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/.Rproj.user/9DAE6990/sources/s-39B546A6/C6286151-contents b/.Rproj.user/9DAE6990/sources/s-39B546A6/C6286151-contents deleted file mode 100644 index 0035346d6c1f1b76d77d1af4868a3329f2545064..0000000000000000000000000000000000000000 --- a/.Rproj.user/9DAE6990/sources/s-39B546A6/C6286151-contents +++ /dev/null @@ -1,56 +0,0 @@ -## ---- 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) - -## ----write_qtl---------------------------------------------------------------- -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] - diff --git a/.Rproj.user/9DAE6990/sources/s-39B546A6/D49EE59C-contents b/.Rproj.user/9DAE6990/sources/s-39B546A6/D49EE59C-contents deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/.Rproj.user/9DAE6990/sources/s-39B546A6/E7584E4F-contents b/.Rproj.user/9DAE6990/sources/s-39B546A6/E7584E4F-contents deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/.Rproj.user/9DAE6990/sources/s-39B546A6/lock_file b/.Rproj.user/9DAE6990/sources/s-39B546A6/lock_file deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/.Rproj.user/shared/notebooks/paths b/.Rproj.user/shared/notebooks/paths index 7779f200af63a93c07e730a2f2b07fa1992b2f1b..f483eb75abcdd04b22b3d1914633421f51c4345f 100644 --- a/.Rproj.user/shared/notebooks/paths +++ b/.Rproj.user/shared/notebooks/paths @@ -1,6 +1 @@ -/Users/mariebourdon/stuart_package/stuart/NAMESPACE="6A276B5" -/Users/mariebourdon/stuart_package/stuart/R/geno_strains.R="1F9B28F5" -/Users/mariebourdon/stuart_package/stuart/R/genos-data.R="9943E26B" -/Users/mariebourdon/stuart_package/stuart/R/tab_mark.R="DEC9867F" -/Users/mariebourdon/stuart_package/stuart/doc/stuaRt.R="E6241391" -/Users/mariebourdon/stuart_package/stuart/vignettes/stuaRt.Rmd="4D49CCFD" +/Users/mariebourdon/Documents/PhD/stuart_R/stuart/vignettes/stuaRt.Rmd="C3675061" diff --git a/R/mark_prop.R b/R/mark_prop.R index a0827e8c27b02c9d65a6cc3af34cf595f50a5840..8af6e843dc7d88ac3724cf1c46fde5ba9b43f416 100755 --- a/R/mark_prop.R +++ b/R/mark_prop.R @@ -14,6 +14,7 @@ #### mark_prop #### ## excludes markers depending on proportions of homo/hetorozygous +## to modify with chisq.test mark_prop <- function(tab,cross,homo=NA,hetero=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))