From 716a13935c8a4b998862f4e4e6e33a1ecde409cb Mon Sep 17 00:00:00 2001 From: Marie Bourdon <mariefbourdon@gmail.com> Date: Mon, 7 Jun 2021 12:28:58 +0200 Subject: [PATCH] add modif to do --- .Rproj.user/9DAE6990/pcs/source-pane.pper | 2 +- .Rproj.user/9DAE6990/rmd-outputs | 3 +- .../sources/{s-39B546A6 => per/t}/1656F55 | 4 +- .../{s-39B546A6 => per/t}/1656F55-contents | 0 .../sources/{s-39B546A6 => per/t}/42D37312 | 10 +- .../{s-39B546A6 => per/t}/42D37312-contents | 1 + .../sources/{s-39B546A6 => per/t}/45D91D58 | 4 +- .../{s-39B546A6 => per/t}/45D91D58-contents | 0 .../sources/{s-39B546A6 => per/t}/65C9B72B | 4 +- .../{s-39B546A6 => per/t}/65C9B72B-contents | 0 .../sources/{s-39B546A6 => per/t}/76AC3EC | 8 +- .../{s-39B546A6 => per/t}/76AC3EC-contents | 0 .../sources/{s-39B546A6 => per/t}/96AB3736 | 10 +- .../{s-39B546A6 => per/t}/96AB3736-contents | 0 .../sources/{s-39B546A6 => per/t}/A6A5703A | 2 +- .../{s-39B546A6 => per/t}/A6A5703A-contents | 0 .../sources/{s-39B546A6 => per/t}/B86C81D8 | 4 +- .../{s-39B546A6 => per/t}/B86C81D8-contents | 0 .../sources/{s-39B546A6 => per/t}/C5228C18 | 4 +- .../{s-39B546A6 => per/t}/C5228C18-contents | 0 .../sources/{s-39B546A6 => per/t}/C81C94E6 | 2 +- .../{s-39B546A6 => per/t}/C81C94E6-contents | 0 .Rproj.user/9DAE6990/sources/prop/430FE7D7 | 4 + .Rproj.user/9DAE6990/sources/prop/524B281F | 4 + .Rproj.user/9DAE6990/sources/prop/52B275C1 | 4 + .Rproj.user/9DAE6990/sources/prop/58D83345 | 4 + .Rproj.user/9DAE6990/sources/prop/A58355B1 | 4 + .Rproj.user/9DAE6990/sources/prop/B873B132 | 4 + .Rproj.user/9DAE6990/sources/prop/B92E179B | 5 + .Rproj.user/9DAE6990/sources/prop/C4894908 | 5 + .Rproj.user/9DAE6990/sources/prop/DB7C2433 | 4 + .Rproj.user/9DAE6990/sources/prop/E7505D7B | 4 + .Rproj.user/9DAE6990/sources/prop/INDEX | 10 ++ .../sources/s-39B546A6/17AE345-contents | 0 .../sources/s-39B546A6/47AFB64-contents | 0 .../sources/s-39B546A6/4A9D04E-contents | 0 .../sources/s-39B546A6/6B5DE0D4-contents | 0 .../sources/s-39B546A6/7E4482C6-contents | 8 - .../sources/s-39B546A6/806AAC34-contents | 0 .../sources/s-39B546A6/81311FDE-contents | 137 ------------------ .../sources/s-39B546A6/8DB3123E-contents | 0 .../sources/s-39B546A6/907DF1D3-contents | 55 ------- .../sources/s-39B546A6/9E3EC0FD-contents | 13 -- .../sources/s-39B546A6/C2CE7FEA-contents | 0 .../sources/s-39B546A6/C6286151-contents | 56 ------- .../sources/s-39B546A6/D49EE59C-contents | 0 .../sources/s-39B546A6/E7584E4F-contents | 0 .../9DAE6990/sources/s-39B546A6/lock_file | 0 .Rproj.user/shared/notebooks/paths | 7 +- R/mark_prop.R | 1 + 50 files changed, 84 insertions(+), 303 deletions(-) rename .Rproj.user/9DAE6990/sources/{s-39B546A6 => per/t}/1656F55 (85%) rename .Rproj.user/9DAE6990/sources/{s-39B546A6 => per/t}/1656F55-contents (100%) rename .Rproj.user/9DAE6990/sources/{s-39B546A6 => per/t}/42D37312 (67%) rename .Rproj.user/9DAE6990/sources/{s-39B546A6 => per/t}/42D37312-contents (98%) rename .Rproj.user/9DAE6990/sources/{s-39B546A6 => per/t}/45D91D58 (86%) rename .Rproj.user/9DAE6990/sources/{s-39B546A6 => per/t}/45D91D58-contents (100%) rename .Rproj.user/9DAE6990/sources/{s-39B546A6 => per/t}/65C9B72B (86%) rename .Rproj.user/9DAE6990/sources/{s-39B546A6 => per/t}/65C9B72B-contents (100%) rename .Rproj.user/9DAE6990/sources/{s-39B546A6 => per/t}/76AC3EC (73%) rename .Rproj.user/9DAE6990/sources/{s-39B546A6 => per/t}/76AC3EC-contents (100%) rename .Rproj.user/9DAE6990/sources/{s-39B546A6 => per/t}/96AB3736 (68%) rename .Rproj.user/9DAE6990/sources/{s-39B546A6 => per/t}/96AB3736-contents (100%) rename .Rproj.user/9DAE6990/sources/{s-39B546A6 => per/t}/A6A5703A (89%) rename .Rproj.user/9DAE6990/sources/{s-39B546A6 => per/t}/A6A5703A-contents (100%) rename .Rproj.user/9DAE6990/sources/{s-39B546A6 => per/t}/B86C81D8 (85%) rename .Rproj.user/9DAE6990/sources/{s-39B546A6 => per/t}/B86C81D8-contents (100%) rename .Rproj.user/9DAE6990/sources/{s-39B546A6 => per/t}/C5228C18 (86%) rename .Rproj.user/9DAE6990/sources/{s-39B546A6 => per/t}/C5228C18-contents (100%) rename .Rproj.user/9DAE6990/sources/{s-39B546A6 => per/t}/C81C94E6 (90%) rename .Rproj.user/9DAE6990/sources/{s-39B546A6 => per/t}/C81C94E6-contents (100%) create mode 100644 .Rproj.user/9DAE6990/sources/prop/430FE7D7 create mode 100644 .Rproj.user/9DAE6990/sources/prop/524B281F create mode 100644 .Rproj.user/9DAE6990/sources/prop/52B275C1 create mode 100644 .Rproj.user/9DAE6990/sources/prop/58D83345 create mode 100644 .Rproj.user/9DAE6990/sources/prop/A58355B1 create mode 100644 .Rproj.user/9DAE6990/sources/prop/B873B132 create mode 100644 .Rproj.user/9DAE6990/sources/prop/B92E179B create mode 100644 .Rproj.user/9DAE6990/sources/prop/C4894908 create mode 100644 .Rproj.user/9DAE6990/sources/prop/DB7C2433 create mode 100644 .Rproj.user/9DAE6990/sources/prop/E7505D7B delete mode 100644 .Rproj.user/9DAE6990/sources/s-39B546A6/17AE345-contents delete mode 100644 .Rproj.user/9DAE6990/sources/s-39B546A6/47AFB64-contents delete mode 100644 .Rproj.user/9DAE6990/sources/s-39B546A6/4A9D04E-contents delete mode 100644 .Rproj.user/9DAE6990/sources/s-39B546A6/6B5DE0D4-contents delete mode 100644 .Rproj.user/9DAE6990/sources/s-39B546A6/7E4482C6-contents delete mode 100644 .Rproj.user/9DAE6990/sources/s-39B546A6/806AAC34-contents delete mode 100644 .Rproj.user/9DAE6990/sources/s-39B546A6/81311FDE-contents delete mode 100644 .Rproj.user/9DAE6990/sources/s-39B546A6/8DB3123E-contents delete mode 100644 .Rproj.user/9DAE6990/sources/s-39B546A6/907DF1D3-contents delete mode 100644 .Rproj.user/9DAE6990/sources/s-39B546A6/9E3EC0FD-contents delete mode 100644 .Rproj.user/9DAE6990/sources/s-39B546A6/C2CE7FEA-contents delete mode 100644 .Rproj.user/9DAE6990/sources/s-39B546A6/C6286151-contents delete mode 100644 .Rproj.user/9DAE6990/sources/s-39B546A6/D49EE59C-contents delete mode 100644 .Rproj.user/9DAE6990/sources/s-39B546A6/E7584E4F-contents delete mode 100644 .Rproj.user/9DAE6990/sources/s-39B546A6/lock_file diff --git a/.Rproj.user/9DAE6990/pcs/source-pane.pper b/.Rproj.user/9DAE6990/pcs/source-pane.pper index 1743e40..d3d70fa 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 dd18ecc..47f8c13 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 7aaecc2..8e20769 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 583c1f7..bb16ed6 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 a0827e8..8af6e84 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 f68fb4c..e376a74 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 51dacef..c988561 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 19b279e..34ddaca 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 ff216ba..84a57ef 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 f1dd731..e498a6c 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 66bd8e5..b6a9d87 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 57f6d66..b8720f3 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 bd85e7a..b1b9d06 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 0000000..0fd9f58 --- /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 0000000..5ba20d4 --- /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 0000000..f177a1d --- /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 0000000..a3b2e9f --- /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 0000000..e3932e6 --- /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 0000000..2198080 --- /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 0000000..99225b8 --- /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 0000000..53d792b --- /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 0000000..4c06759 --- /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 0000000..a563871 --- /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 16f9888..eb9f95a 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 e69de29..0000000 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 e69de29..0000000 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 e69de29..0000000 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 e69de29..0000000 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 fd50eb0..0000000 --- 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 e69de29..0000000 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 612c27d..0000000 --- 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 e69de29..0000000 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 d4104d0..0000000 --- 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 902e043..0000000 --- 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 e69de29..0000000 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 0035346..0000000 --- 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 e69de29..0000000 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 e69de29..0000000 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 e69de29..0000000 diff --git a/.Rproj.user/shared/notebooks/paths b/.Rproj.user/shared/notebooks/paths index 7779f20..f483eb7 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 a0827e8..8af6e84 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)) -- GitLab