From b042310a489c2c0b180109ece075a0cd081ec74c Mon Sep 17 00:00:00 2001 From: LouisLeNezet Date: Sat, 5 Oct 2024 17:47:42 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20LouisLeN?= =?UTF-8?q?ezet/Pedixplorer@5999af7116cecfca6131cc3c29ba1f22d6b7e923=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgdown.yml | 2 +- reference/check_columns.html | 2 +- search.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgdown.yml b/pkgdown.yml index a5426bf..ee048d3 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -7,7 +7,7 @@ articles: pedigree_object: pedigree_object.html pedigree_plot: pedigree_plot.html Pedixplorer: Pedixplorer.html -last_built: 2024-10-05T17:39Z +last_built: 2024-10-05T17:46Z urls: reference: https://louislenezet.github.io/Pedixplorer/reference article: https://louislenezet.github.io/Pedixplorer/articles diff --git a/reference/check_columns.html b/reference/check_columns.html index a4bfa95..a647fcc 100644 --- a/reference/check_columns.html +++ b/reference/check_columns.html @@ -302,7 +302,7 @@

Examples#> } #> value #> } -#> <bytecode: 0x5609b2b4c750> +#> <bytecode: 0x5606544eb750> #> <environment: namespace:base> df <- data.frame( ColN1 = c(1, 2), ColN2 = 4, diff --git a/search.json b/search.json index d3f2e8c..8df1197 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Pedixplorer tutorial","text":"document tutorial Pedixplorer package, examples creating Pedigree objects kinship matrices Pedigree utilities. Pedixplorer package updated version Kinship2 package, featuring change maintainer repository CRAN Bioconductor continued development support. contains routines handle family data Pedigree object. initial purpose create correlation structures describe family relationships kinship identity--descent, can used model family data mixed effects models, coxme function. also includes tools Pedigree drawing filtering focused producing compact layouts without intervention. Recent additions include utilities trim Pedigree object various criteria, kinship X chromosome. Supplementary vignettes available explain: Pedigree object vignette(\"pedigree_object\", package = \"Pedixplorer\") alignment algorithm used create Pedigree structure vignette(\"pedigree_alignment\", package = \"Pedixplorer\") kinship algorithm vignette(\"pedigree_kinship\", package = \"Pedixplorer\") plotting algorithm used plot Pedigree vignette(\"pedigree_plot\", package = \"Pedixplorer\")","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"installation","dir":"Articles","previous_headings":"","what":"Installation","title":"Pedixplorer tutorial","text":"Pedixplorer package available Bioconductor can installed following command: package can loaded following command:","code":"if (!requireNamespace(\"BiocManager\", quietly = TRUE)) { install.packages(\"BiocManager\") } BiocManager::install(\"Pedixplorer\") library(Pedixplorer)"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"the-pedigree-s4-object","dir":"Articles","previous_headings":"","what":"The Pedigree S4 object","title":"Pedixplorer tutorial","text":"Pedigree object list dataframes describe family structure. contains following components: ped: Ped object Pedigree information help(Ped). rel: Rel object relationship information help(Rel). scales: Scales object 2 dataframe filling borders informations plot help(Scales). hints: Hints objects 2 slots indicating horder spouse organise Pedigree structure help(Hints).","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"example-data","dir":"Articles","previous_headings":"Basic Usage","what":"Example Data","title":"Pedixplorer tutorial","text":"Two datasets provided within Pedixplorer package: + minnbreast: 17 families breast cancer study + sampleped: two sample pedigrees, 41 14 subjects vignette uses two pedigrees sampleped. information datasets, see help(minnbreast) help(sampleped).","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"pedigree","dir":"Articles","previous_headings":"Basic Usage","what":"Pedigree","title":"Pedixplorer tutorial","text":"First, load sampleped look values dataset, create Pedigree object using Pedigree() function. function automaticaly detect necessary columns dataframe. necessary can modify columns names cols_ren. create Pedigree object, multiple families, dataframe just need family column ped_df dataframe. case, famid column pasted id individuals separated underscore create unique id individual Pedigree object. information Pedigree() function, see help(Pedigree). Pedigree object can subset individual pedigrees family id. Pedigree object print, summary plot method, show . print method prints Ped Rel object pedigree. summary method prints short summary pedigree. Finally plot method displays pedigree. can add title legend plot following command: # Pedigree Shiny application shiny application available create, interact plot pedigrees. launch application, use following command: use simple: first need import dataset select columns use. can select affection informations colors associated . different families present dataset, can select one plot. plot displayed, can filter pedigree selecting informatives subjects keep relatives. pedigree splited multiple families, can select plot. Finally plot displayed can make interactive download resulting image.","code":"data(\"sampleped\") print(sampleped[1:10, ]) ## famid id dadid momid sex affection avail num ## 1 1 101 1 0 0 2 ## 2 1 102 2 1 0 3 ## 3 1 103 135 136 1 1 0 2 ## 4 1 104 2 0 0 4 ## 5 1 105 1 NA 0 6 ## 6 1 106 2 NA 0 1 ## 7 1 107 1 1 0 NA ## 8 1 108 2 0 0 0 ## 9 1 109 101 102 2 0 1 3 ## 10 1 110 103 104 1 1 1 2 ped <- Pedigree(sampleped[c(3, 4, 10, 35, 36), ]) print(ped) ## Pedigree object with: ## Ped object with 5 individuals and 13 metadata columns: ## id dadid momid sex famid steril status avail ## col_class ## 1_103 1_103 1_135 1_136 male 1 FALSE ## 1_104 1_104 female 1 FALSE ## 1_110 1_110 1_103 1_104 male 1 TRUE ## 1_135 1_135 male 1 FALSE ## 1_136 1_136 female 1 FALSE ## affected useful kin isinf num_child_tot num_child_dir num_child_ind | ## col_class ## 1_103 TRUE 1 1 0 ## 1_104 FALSE 1 1 0 ## 1_110 TRUE 0 0 0 ## 1_135 1 1 0 ## 1_136 1 1 0 ## family indId fatherId motherId gender affection available ## col_class ## 1_103 1 103 135 136 1 1 0 ## 1_104 1 104 2 0 0 ## 1_110 1 110 103 104 1 1 1 ## 1_135 1 135 1 0 ## 1_136 1 136 2 0 ## num error sterilisation vitalStatus affection_mods avail_mods ## col_class ## 1_103 2 1 0 ## 1_104 4 0 0 ## 1_110 2 1 1 ## 1_135 5 NA 0 ## 1_136 6 NA 0 ## Rel object with 0 relationshipswith 0 MZ twin, 0 DZ twin, 0 UZ twin, 0 Spouse: ## id1 id2 code famid ## ped <- Pedigree(sampleped) print(famid(ped(ped))) ## [1] \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" ## [25] \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"2\" \"2\" \"2\" \"2\" \"2\" \"2\" \"2\" ## [49] \"2\" \"2\" \"2\" \"2\" \"2\" \"2\" \"2\" ped1 <- ped[famid(ped(ped)) == \"1\"] summary(ped1) ## Pedigree object with ## [1] \"Ped object with 41 individuals and 13 metadata columns\" ## [1] \"Rel object with 0 relationshipswith 0 MZ twin, 0 DZ twin, 0 UZ twin, 0 Spouse\" plot(ped1) plot(ped1, title = \"Pedigree 1\", legend = TRUE, leg_loc = c(5, 15, 4.5, 5)) if (interactive()) { ped_shiny() }"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"fixing-pedigree-issues","dir":"Articles","previous_headings":"","what":"Fixing Pedigree Issues","title":"Pedixplorer tutorial","text":"“break” pedigree, can manipulate sex value match parent value (example, change 203 male female, even though 203 father). , first subset datped2, locate id column, match specific id (case, 203). Within id 203, locate sex column. Assign subset incorrect value 2 (female) change original/correct value 1 (male). break pedigree, can delete subjects seem irrelevant pedigree (example, delete 209 married-father). , subset datped2 use -() function locate delete specified subject (case, 209). Reassign code datped22 drop specified subject entirely. error occurs Pedigree() function notices id 203 coded male (1) father. correct , simply employ fix_parents() function adjust sex value match either momid dadid. fix_parents() also add back deleted subjects, fixing Pedigree. fix straightforward (changing one sex value based either mother father), fix_parents() resolve issue. issue complicated, say 203 coded father mother, fix_parents() know one correct therefore issue resolved.","code":"datped2 <- sampleped[sampleped$famid == 2, ] datped2[datped2$id %in% 203, \"sex\"] <- 2 datped2 <- datped2[-which(datped2$id %in% 209), ] tryout <- try({ ped2 <- Pedigree(datped2) }) ## Error in validObject(.Object) : ## invalid class \"Ped\" object: dadid values '2_209' should be in '2_201', '2_202', '2_203', '2_204', '2_205'... fixped2 <- with(datped2, fix_parents(id, dadid, momid, sex)) fixped2 ## id momid dadid sex famid ## 1 201 1 1 ## 2 202 2 1 ## 3 203 1 1 ## 4 204 202 201 2 1 ## 5 205 202 201 1 1 ## 6 206 202 201 2 1 ## 7 207 202 201 2 1 ## 8 208 202 201 2 1 ## 9 210 204 203 1 1 ## 10 211 204 203 1 1 ## 11 212 208 209 2 1 ## 12 213 208 209 1 1 ## 13 214 208 209 1 1 ## 14 209 1 1 ped2 <- Pedigree(fixped2) plot(ped2)"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"kinship","dir":"Articles","previous_headings":"","what":"Kinship","title":"Pedixplorer tutorial","text":"common use pedigrees make matrix kinship coefficients can used mixed effect models. kinship coefficient probability randomly selected allele two people given locus identical descent (IBD), assuming founder alleles independent. example, two alleles per autosomal marker, sampling two alleles replacement DNA p=0.50 probability getting allele twice.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"kinship-for-pedigree-object","dir":"Articles","previous_headings":"Kinship","what":"Kinship for Pedigree object","title":"Pedixplorer tutorial","text":"use kinship() calculate kinship matrix ped2. result special symmetrix matrix class Matrix R package, stored efficiently avoid repeating elements. family 2, see row column names match id figure , see kinship coefficient 0.50, siblings 0.25 (e.g. 204-205), pedigree marry-ins share alleles IBD children coefficient 0.25 (e.g. 203-210). plot can used verify kinship coefficients.","code":"kin2 <- kinship(ped2) kin2[1:9, 1:9] ## 9 x 9 sparse Matrix of class \"dsCMatrix\" ## 1_201 1_202 1_203 1_204 1_205 1_206 1_207 1_208 1_209 ## 1_201 0.50 . . 0.25 0.25 0.25 0.25 0.25 . ## 1_202 . 0.50 . 0.25 0.25 0.25 0.25 0.25 . ## 1_203 . . 0.5 . . . . . . ## 1_204 0.25 0.25 . 0.50 0.25 0.25 0.25 0.25 . ## 1_205 0.25 0.25 . 0.25 0.50 0.25 0.25 0.25 . ## 1_206 0.25 0.25 . 0.25 0.25 0.50 0.25 0.25 . ## 1_207 0.25 0.25 . 0.25 0.25 0.25 0.50 0.25 . ## 1_208 0.25 0.25 . 0.25 0.25 0.25 0.25 0.50 . ## 1_209 . . . . . . . . 0.5"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"kinship-for-pedigree-with-multiple-families","dir":"Articles","previous_headings":"Kinship","what":"Kinship for Pedigree with multiple families","title":"Pedixplorer tutorial","text":"kinship() function also works Pedigree object multiple families. show create kinship matrix, show snapshot two families, row columns names ids subject.","code":"ped <- Pedigree(sampleped) kin_all <- kinship(ped) kin_all[1:9, 1:9] ## 9 x 9 sparse Matrix of class \"dsCMatrix\" ## 1_101 1_102 1_103 1_104 1_105 1_106 1_107 1_108 1_109 ## 1_101 0.50 . . . . . . . 0.25 ## 1_102 . 0.50 . . . . . . 0.25 ## 1_103 . . 0.5 . . . . . . ## 1_104 . . . 0.5 . . . . . ## 1_105 . . . . 0.5 . . . . ## 1_106 . . . . . 0.5 . . . ## 1_107 . . . . . . 0.5 . . ## 1_108 . . . . . . . 0.5 . ## 1_109 0.25 0.25 . . . . . . 0.50 kin_all[40:43, 40:43] ## 4 x 4 sparse Matrix of class \"dsCMatrix\" ## 1_140 1_141 2_201 2_202 ## 1_140 0.50 0.25 . . ## 1_141 0.25 0.50 . . ## 2_201 . . 0.5 . ## 2_202 . . . 0.5 kin_all[42:46, 42:46] ## 5 x 5 sparse Matrix of class \"dsCMatrix\" ## 2_201 2_202 2_203 2_204 2_205 ## 2_201 0.50 . . 0.25 0.25 ## 2_202 . 0.50 . 0.25 0.25 ## 2_203 . . 0.5 . . ## 2_204 0.25 0.25 . 0.50 0.25 ## 2_205 0.25 0.25 . 0.25 0.50"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"kinship-for-twins-in-pedigree-with-multiple-families","dir":"Articles","previous_headings":"Kinship","what":"Kinship for twins in Pedigree with multiple families","title":"Pedixplorer tutorial","text":"Specifying twin relationships Pedigree multiple families object complicated fact user must specify family id id1 id2 belong. show relation matrix requires family id last column, column names done , make plotting kinship matrices show monozygotic twins correctly. show specify monozygosity subjects 206 207 ped2, subjects 125 126 ped1. check looking kinship matrix pairs, correctly 0.5. Note subject 113 ped1 marry-without children Pedigree. Subject 113 Pedigree size 1 kin_all matrix index 41. later show handle marry-ins plotting.","code":"data(\"relped\") relped ## famid id1 id2 code ## 1 1 140 141 1 ## 2 1 139 140 2 ## 3 1 121 123 2 ## 4 1 129 126 4 ## 5 1 130 133 3 ## 6 2 210 211 1 ## 7 2 208 204 2 ## 8 2 212 213 3 ped <- Pedigree(sampleped, relped) kin_all <- kinship(ped) kin_all[24:27, 24:27] ## 4 x 4 sparse Matrix of class \"dsCMatrix\" ## 1_124 1_125 1_126 1_127 ## 1_124 0.5000 0.0625 0.0625 0.0625 ## 1_125 0.0625 0.5000 0.2500 0.1250 ## 1_126 0.0625 0.2500 0.5000 0.1250 ## 1_127 0.0625 0.1250 0.1250 0.5000 kin_all[46:50, 46:50] ## 5 x 5 sparse Matrix of class \"dsCMatrix\" ## 2_205 2_206 2_207 2_208 2_209 ## 2_205 0.50 0.25 0.25 0.25 . ## 2_206 0.25 0.50 0.25 0.25 . ## 2_207 0.25 0.25 0.50 0.25 . ## 2_208 0.25 0.25 0.25 0.50 . ## 2_209 . . . . 0.5"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"optional-pedigree-informations","dir":"Articles","previous_headings":"","what":"Optional Pedigree Informations","title":"Pedixplorer tutorial","text":"use ped2 sampleped sequentially add optional information Pedigree object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"status","dir":"Articles","previous_headings":"Optional Pedigree Informations","what":"Status","title":"Pedixplorer tutorial","text":"example shows specify status indicator, vital status. sampleped data include indicator, create one indicate first generation ped2, subjects 1 2, deceased. status indicator used cross individuals Pedigree plot.","code":"df2 <- sampleped[sampleped$famid == 2, ] names(df2) ## [1] \"famid\" \"id\" \"dadid\" \"momid\" \"sex\" \"affection\" \"avail\" \"num\" df2$status <- c(1, 1, rep(0, 12)) ped2 <- Pedigree(df2) summary(status(ped(ped2))) ## Mode FALSE TRUE ## logical 12 2 plot(ped2)"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"labels","dir":"Articles","previous_headings":"Optional Pedigree Informations","what":"Labels","title":"Pedixplorer tutorial","text":"show use label argument plot method add additional information subject. example , add names existing plot adding new column elementMetadata Ped object Pedigree. space permits, lines characters per line can made using {/em } character indicate new line.","code":"mcols(ped2)$Names <- c( \"John\\nDalton\", \"Linda\", \"Jack\", \"Rachel\", \"Joe\", \"Deb\", \"Lucy\", \"Ken\", \"Barb\", \"Mike\", \"Matt\", \"Mindy\", \"Mark\", \"Marie\\nCurie\" ) plot(ped2, label = \"Names\")"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"affected-indicators","dir":"Articles","previous_headings":"Optional Pedigree Informations","what":"Affected Indicators","title":"Pedixplorer tutorial","text":"show specify affected status single indicator multiple indicators. First, use affected indicator sampleped, contains 0/1 indicators NA missing, let indicate blue eyes. Next, create vector indicator baldness. add second filling scale plot generate_colors(add_to_scale = TRUE). plot shapes subject therefore divided two equal parts shaded differently indicate two affected indicators.","code":"mcols(ped2)$bald <- as.factor(c(0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1)) ped2 <- generate_colors(ped2, col_aff = \"bald\", add_to_scale = TRUE) plot(ped2, legend = TRUE)"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"special-relationships","dir":"Articles","previous_headings":"Optional Pedigree Informations","what":"Special Relationships","title":"Pedixplorer tutorial","text":"Special pedigree relationships can specified matrix relation argument. 4 relationships can specified numeric codes: 1 = Monozygotic twins 2 = Dizygotic twins 3 = twins unknown zygosity 4 = Spouse spouse relationship can indicate marry-couple children together.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"twins","dir":"Articles","previous_headings":"Optional Pedigree Informations > Special Relationships","what":"Twins","title":"Pedixplorer tutorial","text":", use relationship dataset. can specify code column individuals monozygotic ‘1’, dizygotic ‘2’ unknown-zygosity ‘3’ twins. twin relationships represented diverging lines single point. monozygotic twins additional line connecting diverging lines, twins unknown zygosity question mark.","code":"## create twin relationships data(\"relped\") rel(ped2) <- Rel(relped[relped$famid == 2, ]) plot(ped2)"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"inbreeding","dir":"Articles","previous_headings":"Optional Pedigree Informations > Special Relationships","what":"Inbreeding","title":"Pedixplorer tutorial","text":"Another special relationship inbreeding. Inbreeding founders implies founders’ parents related (maternal paternal genes descended single ancestral gene). One thing can add people pedigree show inbreeding. show pair founders (subjects 201 202) inbred, must show parents siblings. , create subjects 197 198 parents 201 also create subjects 199 200 parents 202. make subjects 198 199 siblings, give parents, creating subjects 195 196. results subjects 201 202 first cousins, therefore inbred.","code":"indid <- 195:202 dadid <- c(NA, NA, NA, 196, 196, NA, 197, 199) momid <- c(NA, NA, NA, 195, 195, NA, 198, 200) sex <- c(2, 1, 1, 2, 1, 2, 1, 2) ped3 <- data.frame( id = indid, dadid = dadid, momid = momid, sex = sex ) ped4df <- rbind.data.frame(df2[-c(1, 2), 2:5], ped3) ped4 <- Pedigree(ped4df) plot(ped4)"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"marry-ins","dir":"Articles","previous_headings":"Optional Pedigree Informations > Special Relationships","what":"Marry-ins","title":"Pedixplorer tutorial","text":"Spouse child can also specified rel_df argument setting code value Spouse 4. use ped2 earlier add new spouse relationship individuals 212 211 get following plot.","code":"## create twin relationships rel_df2 <- data.frame( id1 = \"211\", id2 = \"212\", code = 4, famid = \"2\" ) new_rel <- c(rel(ped2), with(rel_df2, Rel(id1, id2, code, famid))) rel(ped2) <- upd_famid(new_rel) plot(ped2)"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"pedigree-plot-details","dir":"Articles","previous_headings":"","what":"Pedigree Plot Details","title":"Pedixplorer tutorial","text":"plot method attempts adhere many standards pedigree plotting, presented Bennet et al. 2008. show tricks pedigree plotting, use ped1 sampleped, 41 subjects 4 generations, including generation double first cousins. first marriage 114, remarried subject 113 without children . specify marriage relation argument, plot method excludes subject 113 plot. basic plot ped1 shown figure .","code":"df1 <- sampleped[sampleped$famid == 1, ] relate1 <- data.frame( id1 = 113, id2 = 114, code = 4, famid = 1 ) ped1 <- Pedigree(df1, relate1) plot(ped1)"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"align-by-input-order","dir":"Articles","previous_headings":"Pedigree Plot Details","what":"Align by Input Order","title":"Pedixplorer tutorial","text":"plot method decent job aligning subjects given order subjects Pedigree object made, sometimes make two copies subject. change order subjects creating Pedigree, can help plot method reduce need duplicate subjects, Figure~ longer subject 110 duplicated.","code":"df1reord <- df1[c(35:41, 1:34), ] ped1reord <- Pedigree(df1reord, relate1) plot(ped1reord)"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"plot-colors-and-scales","dir":"Articles","previous_headings":"Pedigree Plot Details","what":"Plot colors and scales","title":"Pedixplorer tutorial","text":"Pedigree object contains Scales object can modified change colors patterns used plot. make easy user modify function generate_colors() available. function generate color palette filling bordering plot. function transform given column dataframe factor generate color palette level factor. user can modify colors patterns used filling bordering plot. can follow:","code":"scales(ped1) ## An object of class \"Scales\" ## Slot \"fill\": ## order column_values column_mods mods labels affected fill density angle ## 1 1 affection affection_mods 0 Healthy <= to 0.5 FALSE white NA NA ## 2 1 affection affection_mods 1 Affected > to 0.5 TRUE red NA NA ## 3 1 affection affection_mods NA NA grey NA NA ## ## Slot \"border\": ## column_values column_mods mods labels border ## 1 avail avail_mods NA NA grey ## 2 avail avail_mods 1 Available green ## 3 avail avail_mods 0 Non Available black ped1 <- generate_colors( ped1, col_aff = \"num\", add_to_scale = TRUE, is_num = TRUE, keep_full_scale = TRUE, breaks = 2, colors_aff = c(\"blue\", \"green\"), colors_unaff = c(\"yellow\", \"brown\"), threshold = 3, sup_thres_aff = FALSE ) plot(ped1) # To modify a given scale you can do as follow fill(ped1) ## order column_values column_mods mods labels affected fill density ## 1 1 affection affection_mods 0 Healthy <= to 0.5 FALSE white NA ## 2 1 affection affection_mods 1 Affected > to 0.5 TRUE red NA ## 3 1 affection affection_mods NA NA grey NA ## 4 2 num num_mods 1 Affected < to 3 : (1,2] TRUE #0000FF NA ## 5 2 num num_mods 2 Affected < to 3 : [-0.002,1] TRUE #00FF00 NA ## 6 2 num num_mods 3 Healthy >= to 3 : (4.5,6] FALSE #FFFF00 NA ## 7 2 num num_mods 4 Healthy >= to 3 : [3,4.5] FALSE #A52A2A NA ## 8 2 num num_mods NA NA : NA NA grey NA ## angle ## 1 NA ## 2 NA ## 3 NA ## 4 NA ## 5 NA ## 6 NA ## 7 NA ## 8 NA fill(ped1)$fill[4] <- \"#970b6d\" fill(ped1)$density[5] <- 30 fill(ped1)$angle[5] <- 45 border(ped1)$border <- c(\"red\", \"black\", \"orange\") plot(ped1, legend = TRUE, leg_loc = c(7, 18, 1, 1.5))"},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"ped-as-a-data-frame","dir":"Articles","previous_headings":"Pedigree Utility Functions","what":"Ped as a data.frame","title":"Pedixplorer tutorial","text":"main features Pedigree object vectors element subject. sometimes useful extract vectors Pedigree object data.frame basic information can used construct new Pedigree object. possible .data.frame() method, shown .","code":"dfped2 <- as.data.frame(ped(ped2)) dfped2"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"subsetting-and-trimming","dir":"Articles","previous_headings":"Pedigree Utility Functions","what":"Subsetting and Trimming","title":"Pedixplorer tutorial","text":"Pedigrees large size can bottleneck programs run calculations . Pedixplorer package contains routines identify subjects remove. show subject (e.g. subject 210) can removed ped2, Pedigree object changed verifying relation dataframe longer twin relationship subjects 210 211, indicated id1 id2. steps also works id subjects . provide subset(), trims subjects Pedigree id argument. example removing subject 110, done , trim Pedigree vector subject ids. check trimming looking id vector relation matrix.","code":"ped2_rm210 <- ped2[-10] rel(ped2_rm210) ## Rel object with 0 relationshipswith 0 MZ twin, 0 DZ twin, 0 UZ twin, 0 Spouse: ## id1 id2 code famid ## rel(ped2) ## Rel object with 4 relationshipswith 1 MZ twin, 1 DZ twin, 1 UZ twin, 1 Spouse: ## id1 id2 code famid ## ## 1 2_210 2_211 MZ twin 2 ## 2 2_204 2_208 DZ twin 2 ## 3 2_212 2_213 UZ twin 2 ## 4 2_211 2_212 Spouse 2 ped2_trim210 <- subset(ped2, \"2_210\", keep = FALSE) id(ped(ped2_trim210)) ## [1] \"2_201\" \"2_202\" \"2_203\" \"2_204\" \"2_205\" \"2_206\" \"2_207\" \"2_208\" \"2_209\" \"2_211\" \"2_212\" \"2_213\" ## [13] \"2_214\" rel(ped2_trim210) ## Rel object with 3 relationshipswith 0 MZ twin, 1 DZ twin, 1 UZ twin, 1 Spouse: ## id1 id2 code famid ## ## 1 2_204 2_208 DZ twin 2 ## 2 2_212 2_213 UZ twin 2 ## 3 2_211 2_212 Spouse 2 ped2_trim_more <- subset(ped2_trim210, c(\"2_212\", \"2_214\"), keep = FALSE) id(ped(ped2_trim_more)) ## [1] \"2_201\" \"2_202\" \"2_203\" \"2_204\" \"2_205\" \"2_206\" \"2_207\" \"2_208\" \"2_209\" \"2_211\" \"2_213\" rel(ped2_trim_more) ## Rel object with 1 relationshipwith 0 MZ twin, 1 DZ twin, 0 UZ twin, 0 Spouse: ## id1 id2 code famid ## ## 1 2_204 2_208 DZ twin 2"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"shrinking","dir":"Articles","previous_headings":"","what":"Shrinking","title":"Pedixplorer tutorial","text":"additional function Pedixplorer shrink(), shrinks Pedigree specified bit size maintaining maximal amount information genetic linkage association studies. Using indicator availability affected status, removes subjects order: + unavailable available descendants + available parents + available missing affected status + available unaffected + available affected show shrink Pedigree 1 bit size 30, happens bit size removing unavailable subjects. show extract shrunken Pedigree object shrink result, plot . Now shrink Pedigree 1 bit size 25, requires removing subjects informative. tie multiple subjects remove, method randomly chooses one . seed setting, method removes subjects 140 141.","code":"set.seed(200) shrink1_b30 <- shrink(ped1, max_bits = 30) print(shrink1_b30[c(2:8)]) ## $id_trim ## [1] \"1_101\" \"1_102\" \"1_107\" \"1_108\" \"1_111\" \"1_113\" \"1_121\" \"1_122\" \"1_123\" \"1_131\" \"1_132\" \"1_134\" ## [13] \"1_139\" ## ## $id_lst ## $id_lst$unavail ## [1] \"1_101\" \"1_102\" \"1_107\" \"1_108\" \"1_111\" \"1_113\" \"1_121\" \"1_122\" \"1_123\" \"1_131\" \"1_132\" \"1_134\" ## [13] \"1_139\" ## ## ## $bit_size ## [1] 46 29 ## ## $avail ## [1] FALSE FALSE FALSE FALSE TRUE TRUE FALSE FALSE FALSE TRUE FALSE TRUE TRUE FALSE TRUE TRUE ## [17] TRUE TRUE TRUE TRUE TRUE TRUE FALSE FALSE FALSE FALSE TRUE TRUE ## ## $pedSizeOriginal ## [1] 41 ## ## $pedSizeIntermed ## [1] 28 ## ## $pedSizeFinal ## [1] 28 plot(shrink1_b30$pedObj) set.seed(10) shrink1_b25 <- shrink(ped1, max_bits = 25) print(shrink1_b25[c(2:8)]) ## $id_trim ## ## \"1_101\" \"1_102\" \"1_107\" \"1_108\" \"1_111\" \"1_113\" \"1_121\" \"1_122\" \"1_123\" \"1_131\" \"1_132\" \"1_134\" ## id ## \"1_139\" \"1_124\" \"1_130\" \"1_125\" ## ## $id_lst ## $id_lst$unavail ## [1] \"1_101\" \"1_102\" \"1_107\" \"1_108\" \"1_111\" \"1_113\" \"1_121\" \"1_122\" \"1_123\" \"1_131\" \"1_132\" \"1_134\" ## [13] \"1_139\" ## ## $id_lst$affect ## id ## \"1_124\" \"1_130\" \"1_125\" ## ## ## $bit_size ## [1] 46 29 28 26 24 ## ## $avail ## [1] FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE TRUE FALSE TRUE TRUE FALSE TRUE TRUE TRUE ## [17] TRUE TRUE FALSE FALSE FALSE FALSE TRUE TRUE ## ## $pedSizeOriginal ## [1] 41 ## ## $pedSizeIntermed ## [1] 28 ## ## $pedSizeFinal ## [1] 24 plot(shrink1_b25$pedObj)"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"select-unrelateds","dir":"Articles","previous_headings":"","what":"Select Unrelateds","title":"Pedixplorer tutorial","text":"section briefly show use unrelated find set maximum number unrelated available subjects Pedigree. input required Pedigree object vector indicating availability. Pedigrees numerous sets subjects satisfy maximum number unrelateds, method randomly chooses set. show two sets subject ids selected routine discuss . can easily verify sets selected unrelated referring Figure~ see subjects 203 206 unrelated everyone else Pedigree except children. Furthermore, see df2 two, subject 203 available. Therefore, set unrelateds available must include subject 203 one subjects: 201, 204, 206, 207, 212, 214, indicated kinship matrix Pedigree 2 subset availability status 1.","code":"ped2 <- Pedigree(df2) set.seed(10) set1 <- unrelated(ped2) set1 ## [1] \"2_203\" \"2_206\" set2 <- unrelated(ped2) set2 ## [1] \"2_203\" \"2_214\" kin2 <- kinship(ped2) is_avail <- id(ped(ped2))[avail(ped(ped2))] kin2 ## 14 x 14 sparse Matrix of class \"dsCMatrix\" ## [[ suppressing 14 column names '2_201', '2_202', '2_203' ... ]] ## ## 2_201 0.500 . . 0.250 0.250 0.250 0.250 0.250 . 0.1250 0.1250 0.1250 0.1250 0.1250 ## 2_202 . 0.500 . 0.250 0.250 0.250 0.250 0.250 . 0.1250 0.1250 0.1250 0.1250 0.1250 ## 2_203 . . 0.50 . . . . . . 0.2500 0.2500 . . . ## 2_204 0.250 0.250 . 0.500 0.250 0.250 0.250 0.250 . 0.2500 0.2500 0.1250 0.1250 0.1250 ## 2_205 0.250 0.250 . 0.250 0.500 0.250 0.250 0.250 . 0.1250 0.1250 0.1250 0.1250 0.1250 ## 2_206 0.250 0.250 . 0.250 0.250 0.500 0.250 0.250 . 0.1250 0.1250 0.1250 0.1250 0.1250 ## 2_207 0.250 0.250 . 0.250 0.250 0.250 0.500 0.250 . 0.1250 0.1250 0.1250 0.1250 0.1250 ## 2_208 0.250 0.250 . 0.250 0.250 0.250 0.250 0.500 . 0.1250 0.1250 0.2500 0.2500 0.2500 ## 2_209 . . . . . . . . 0.50 . . 0.2500 0.2500 0.2500 ## 2_210 0.125 0.125 0.25 0.250 0.125 0.125 0.125 0.125 . 0.5000 0.2500 0.0625 0.0625 0.0625 ## 2_211 0.125 0.125 0.25 0.250 0.125 0.125 0.125 0.125 . 0.2500 0.5000 0.0625 0.0625 0.0625 ## 2_212 0.125 0.125 . 0.125 0.125 0.125 0.125 0.250 0.25 0.0625 0.0625 0.5000 0.2500 0.2500 ## 2_213 0.125 0.125 . 0.125 0.125 0.125 0.125 0.250 0.25 0.0625 0.0625 0.2500 0.5000 0.2500 ## 2_214 0.125 0.125 . 0.125 0.125 0.125 0.125 0.250 0.25 0.0625 0.0625 0.2500 0.2500 0.5000 kin2[is_avail, is_avail] ## 8 x 8 sparse Matrix of class \"dsCMatrix\" ## 2_201 2_203 2_204 2_206 2_207 2_211 2_212 2_214 ## 2_201 0.500 . 0.250 0.250 0.250 0.1250 0.1250 0.1250 ## 2_203 . 0.50 . . . 0.2500 . . ## 2_204 0.250 . 0.500 0.250 0.250 0.2500 0.1250 0.1250 ## 2_206 0.250 . 0.250 0.500 0.250 0.1250 0.1250 0.1250 ## 2_207 0.250 . 0.250 0.250 0.500 0.1250 0.1250 0.1250 ## 2_211 0.125 0.25 0.250 0.125 0.125 0.5000 0.0625 0.0625 ## 2_212 0.125 . 0.125 0.125 0.125 0.0625 0.5000 0.2500 ## 2_214 0.125 . 0.125 0.125 0.125 0.0625 0.2500 0.5000"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"session-information","dir":"Articles","previous_headings":"","what":"Session information","title":"Pedixplorer tutorial","text":"","code":"sessionInfo() ## R version 4.4.1 (2024-06-14) ## Platform: x86_64-pc-linux-gnu ## Running under: Ubuntu 22.04.4 LTS ## ## Matrix products: default ## BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 ## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0 ## ## locale: ## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 ## [4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 ## [7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C ## [10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C ## ## time zone: UTC ## tzcode source: system (glibc) ## ## attached base packages: ## [1] stats graphics grDevices utils datasets methods base ## ## other attached packages: ## [1] Pedixplorer_1.1.4 BiocStyle_2.32.1 ## ## loaded via a namespace (and not attached): ## [1] gtable_0.3.5 xfun_0.48 bslib_0.8.0 ggplot2_3.5.1 ## [5] htmlwidgets_1.6.4 lattice_0.22-6 quadprog_1.5-8 vctrs_0.6.5 ## [9] tools_4.4.1 generics_0.1.3 stats4_4.4.1 tibble_3.2.1 ## [13] fansi_1.0.6 highr_0.11 pkgconfig_2.0.3 Matrix_1.7-0 ## [17] data.table_1.16.0 desc_1.4.3 S4Vectors_0.42.1 readxl_1.4.3 ## [21] lifecycle_1.0.4 stringr_1.5.1 compiler_4.4.1 shinytoastr_2.2.0 ## [25] textshaping_0.4.0 munsell_0.5.1 httpuv_1.6.15 shinyWidgets_0.8.7 ## [29] htmltools_0.5.8.1 sass_0.4.9 yaml_2.3.10 lazyeval_0.2.2 ## [33] plotly_4.10.4 later_1.3.2 pillar_1.9.0 pkgdown_2.1.1 ## [37] jquerylib_0.1.4 tidyr_1.3.1 DT_0.33 cachem_1.1.0 ## [41] mime_0.12 tidyselect_1.2.1 digest_0.6.37 stringi_1.8.4 ## [45] colourpicker_1.3.0 dplyr_1.1.4 purrr_1.0.2 bookdown_0.40 ## [49] fastmap_1.2.0 grid_4.4.1 colorspace_2.1-1 cli_3.6.3 ## [53] magrittr_2.0.3 utf8_1.2.4 withr_3.0.1 scales_1.3.0 ## [57] promises_1.3.0 rmarkdown_2.28 httr_1.4.7 gridExtra_2.3 ## [61] cellranger_1.1.0 ragg_1.3.3 shiny_1.9.1 evaluate_1.0.0 ## [65] knitr_1.48 miniUI_0.1.1.1 viridisLite_0.4.2 rlang_1.1.4 ## [69] Rcpp_1.0.13 xtable_1.8-4 glue_1.8.0 BiocManager_1.30.25 ## [73] BiocGenerics_0.50.0 jsonlite_1.8.9 R6_2.5.1 plyr_1.8.9 ## [77] systemfonts_1.1.0 fs_1.6.4"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"pedigree-alignment","dir":"Articles","previous_headings":"","what":"Pedigree alignment","title":"Pedigree alignment details","text":"aligned Pedigree object contains Pedigree along set information allows pretty plotting. information consists two parts: set vertical horizontal plotting coordinates along identifier subject plotted position, list connections made parent/child, spouse/spouse, twin/twin. Creating aligment turned one difficult parts project, area significant work done. routines section completely ignore id component Pedigree; everyone indexed solely row number object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"hints","dir":"Articles","previous_headings":"","what":"Hints","title":"Pedigree alignment details","text":"first part work hints list Pedigree. consists 3 parts: left right order founders processed. order siblings listed within family. selected spouse pairs, left/right, two anchor, .e., determine marriage plotted. default starting values simple: founders processed order appear data set, children appear order found data set, husbands left wives, marriage plotted leftmost spouse. simple example want bend rules two families marry, Pedigrees extend wedded pair. joint Pedigree pair appear right-child left hand family, left-child right hand family. respect founders, assume family three lineages marriage 1 2, another 2 3. joint Pedigree sets 1, 2, 3 left right. hints consist list two components. vector numbers length Pedigree, used order female founders order siblings within family. subjects part either value can arbitrary. 3 column matrix spouse pairs, row indicates left-hand member pair, right-hand member, two anchor, .e., directly connected parent. Double triple marriages can start get interesting.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"auto_hint","dir":"Articles","previous_headings":"","what":"Auto_hint","title":"Pedigree alignment details","text":"routine used create initial hints list. part general intention make routine pretty good drawings automatically. basic algorithm trial error. Start simplest possible hints (user input accepted) Call align see works Fix spouses next . fix top level mixes everything , fixes one level time. routine makes attempt reorder founders. just smart enough figure . first thing done check twins. increase complexity, since twins need move together. rel(ped, \"code\") object factor, first turn numeric. create 3 vectors: twinrel matrix containing pairs twins relation, subset incoming rel dataframe. twinset vector identifies twins, 0 anyone part multiple-birth set, unique id member set. use minimum row number members set id. twinord starting order vector set; mostly makes sure ties (knows user may used starting values.) recent addition carry forward packaged align kindepth align.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"shift-in-auto_hint","dir":"Articles","previous_headings":"Auto_hint","what":"Shift in auto_hint","title":"Pedigree alignment details","text":"Next internal function rearranges someone leftmost rightmost /siblings. real complication twins. one moves move . need keep monozygotics together within band triplets. Algorithm : person moved part twinset, first move twins left end (right case may ), move monozygotes left, move subject left.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"init-auto_hint","dir":"Articles","previous_headings":"Auto_hint","what":"Init auto_hint","title":"Pedigree alignment details","text":"Now, get ordering Pedigree use starting point. numbers start 1 level. need final prettify step, hence align = FALSE. hints structure entered, retain non-zero entries, otherwise people put order data set. allow hints input order vector. twins reordered.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"fixup-auto_hint","dir":"Articles","previous_headings":"Auto_hint","what":"Fixup auto_hint","title":"Pedigree alignment details","text":"result coming back align() set vectors matrices: n vector, number entries per level nid matrix, one row per level, numeric id subject plotted spouse integer matrix, one row per level, subject directly right spouse (1), double marriage (2), neither (0). fam matrix, link upward parents, 0 link. Now, walk levels one one. candidate subject one appears twice level, /parents somewhere else spouse. Move person spouse ends sibships add marriage hint. figure shows simple case. input data set subjects ordered 1–11, left panel result without hints processes subjects order encountered. return values align subject 9 shown twice. first recognized spouse subject 4, second child 6–7. basic logic Find subject listed multiple times line (assume male). means multiple connections, usually one parents spouse tied parents. (spouse marry-placed alongside duplication.) position 2 associated siblings, rearrange put subject 2 right. associated spouse location, put spouse right siblings. Repeat work position 8, moving targets left. either position, associated spouse add marriage. ends marriage anchored, .e., connected family, either end may listed anchor output; follow suggestion duporder routine. one , usually better anchor , marriage processed align family . (least think .) logic works 9 times 10, least human pedigrees. ’ll look complex cases looking duporder (order duplicates) function, returns matrix columns 1 2 pair duplicates, 3 direction. Note following code idlist refers row numbers subject Pedigree, label ped(ped, \"id\").","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"duporder","dir":"Articles","previous_headings":"Auto_hint","what":"duporder","title":"Pedigree alignment details","text":"case shown figure duporder function return single row array values (2, 6, 1), first two positions duplicated subject. anchor 2 since copy connected parents direction TRUE, since spouse left anchor point. id 9, sibs 8, 9, 10, shift function create position hints 2,1,3, cause listed order 9, 8, 10. value spouse 3 (third position row), subjects 3, 4, 5 reordered, finally line (4,9,1) added sptemp matrix. particular case final element 1 2, since connected parents. figure shows complex case several arcs. upper left double marry-. anchor variable code (2,2) since copies anchored spouse. left right sets sibs reordered (even though left one need ), two lines added sptemp matrix: (5,11,1) (11,9,2). upper right pair overlapping arcs. final tree want put sibling 28 right 29 since allow one node join, process subjects lexical order code first shift 28 right later shift 29. duporder function tries order duplicates matrix closest ones processed last. definition close based first whether families touch, second actual distance. third column matrix hints whether marriage plotted left (1) right (2) position pair. goal spread apart families cousins; example children 28/31 plotted 21/22 grandparents, 29/32 25/26 grandparents. logic column ad hoc: put children near edges.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"find-spouse-and-find-sibs","dir":"Articles","previous_headings":"Auto_hint","what":"Find-spouse and find-sibs","title":"Pedigree alignment details","text":"Finally, two helper routines. Finding spouse can interesting – suppose listing Shirley, Fred, Carl, line first three marked spouse = TRUE – means married 3 us. First find string rpos lpos marriage block; 99% time length 2 course. find person block opposite sex, check connected. routine called left-right position alignment arrays returns position. findsibs function starts position returns position well, much simpler findspouse.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"fixup2","dir":"Articles","previous_headings":"Auto_hint","what":"Fixup2","title":"Pedigree alignment details","text":"point common situation shown figure. variable anchor (2,1) showing left hand copy subject 9 connected anchored spouse right hand copy anchored. proper addition spouselist (4, 9, dpairs), last hint dpairs routine parents one follow drawing entire Pedigree. (drawing Pedigree child can reached multiple founders, want find child .) double marry-found figure, subject 11, leads value (2,2) [anchor] variable. proper addition sptemp matrix case two rows, (5, 11, 1) indicating 5 plotted left 11 5-11 marriage, first partner anchor, second row (11, 9, 2). cause common spouse plotted middle. Multiple marriages can lead unanchored subjects. left hand portion figure two double marriages, one left one right anchor values (0,2) (2,0), respectively. add two marriages return list ensure print correct left-right order; 14-4 one correct default easier output line check sex orders. left panel figure shows case subject 11 marries Pedigree also second spouse. anchor variable case (2, 0); first instance 11 spouse tied tree , second instance upward connections. top row, subject 6 values (0, 0) since neither connection upward parent. right hand panel subject 2 anchor variable (0,1).","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"align","dir":"Articles","previous_headings":"","what":"Align","title":"Pedigree alignment details","text":"top level routine alignment 5 arguments ped Pedigree. case multiple families loop family separately. packed allow branches tree overlap? FALSE drawing much easier, final drawing can take huge amount space. width minimum width packed Pedigree. affects small pedigrees, since minimum possible width Pedigree largest number individiuals one generations. align final step alignment done? tries center children parents, degree possible. hints object. normally blank auto_hint invoked. result coming back align set vectors matrices: n vector, number entries per level nid matrix, one row per level, numeric id subject plotted pos horizontal position plotting spouse integer matrix, one row per level, subject directly right spouse (1), double marriage (2), neither (0). fam matrix, link upward parents, 0 link.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"setup1--align","dir":"Articles","previous_headings":"Align","what":"Setup1 -align","title":"Pedigree alignment details","text":"Start setup. Throughout routine row number used subject id (ignoring actual id label). Check everyone either two parents none (singleton confuses us). Verify hints correct. relation data frame, present, factor, convert numeric. Husband index (4 = 4th person Pedigree structure) Wife index Plot order: 1 = husband left, 2 = wife left Anchor: 1 = left member, 2 = right member, 0 = yet determined routine proceeds spousal pair can encountered multiple times; take list ``connected’’ member added Pedigree marriage gets added twice. detect duplicates spouselist need create unique (temporary) spouse-pair id using simple hash. importing data auto_hint, routine’s spouse matrix column 1 = subject plotted left, 2 = subject plotted right. spouselist array column 1 = husband, 2 = wife. Hence clumsy looking ifelse . auto_hint format congenial users, might modify output, spouselist format easier code.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"align-founders","dir":"Articles","previous_headings":"Align","what":"Align-founders","title":"Pedigree alignment details","text":"align routine alignment using 3 co-routines: alignped1 called single subject, returns subtree founded subject, though tree alignped2 called set sibs, calls alignped1 alignped3 multiple times create joint Pedigree alignped3 given two side side plotting structures, merge single one Call alignped1 sequentially founder pair merge results. founder pair married pair, neither father.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"align-finish","dir":"Articles","previous_headings":"Align","what":"Align-finish","title":"Pedigree alignment details","text":"Now finish . 4 tasks : convenience lower level routines kept spouse nid arrays single object – unpack spouse array 1 position indicates subject +1 joined marriage. two common ancestor change 2, indicates double line used plot. Add twins data output. final alignment","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"finish-align2","dir":"Articles","previous_headings":"Align > Align-finish","what":"Finish align(2)","title":"Pedigree alignment details","text":"twins array shape spouse nid arrays: one row per level giving data subjects plotted row. case 0 = nothing 1 = sib right monzygotic twin, 2 = sib right dizygote, 3 = sib right twin, unknown zyogosity.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"finish-align3","dir":"Articles","previous_headings":"Align > Align-finish","what":"Finish align(3)","title":"Pedigree alignment details","text":"point Pedigree arranged, positions row going 1 (number subjects row). (packed Pedigree, usual case). everything pushed left margin pretty, now fix . Note alignped4 wants T/F spouse matrix: care degree relationship spouse.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"alignped1","dir":"Articles","previous_headings":"","what":"alignped1","title":"Pedigree alignment details","text":"first three co-routines. called single subject, returns subtree founded said subject, though tree. go Pedigree, . Input arguments nid numeric id subject question dad points row father, 0=father Pedigree mom points row mother level plotting depth subject horder orders kids within sibship packed true, everything slid left col 1 = Pedigree index husband col 2 = Pedigree index wife col 3 = 1 : plot husband left, 2 = wife left col 4 = 1 : left member rooted , 2 = right member, 0 = either return argument set matrices described section align, along spouselist matrix. latter marriages removed processed.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"alignped1---part1","dir":"Articles","previous_headings":"alignped1","what":"alignped1 - part1","title":"Pedigree alignment details","text":"routine nid array consists final nid array + 1/2 final spouse array. basic algorithm simple. Find spouses x anchor subject. none return trivial tree consisting x alone. marriage set, call alignped2 children add result. Note spouselist matrix contain spouse pairs yet processed. logic anchoring slightly tricky. First, row 4 spouselist matrix 0, anchor first opportunity, .e. now.. Also note spouselist[,3] == spouselist[,4] husband anchor (just write possibilities).","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"alignped1---part2","dir":"Articles","previous_headings":"alignped1","what":"alignped1 - part2","title":"Pedigree alignment details","text":"Create set 3 return structures, matrices (1 + nspouse) columns. children routines widen result.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"alignped1---part3","dir":"Articles","previous_headings":"alignped1","what":"alignped1 - part3","title":"Pedigree alignment details","text":"Now list spouses dealt correponding columns spouselist matrix. Create two complimentary lists lspouse rspouse denote plotted left right. someone lots spouses try split evenly. number spouses odd, men right left, women right. hints spouselist matrix override. put undecided marriages closest x, add predetermined ones left right. majority marriages undetermined singletons, nleft 1 female (put husband left) 0 male. one bug found plotting canine data, lspouse initially empty length(rspouse)> 1. caused nleft>length(indx). fix let indx indexed beyond length, fix JPS 5/2013.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"alignped1---part4","dir":"Articles","previous_headings":"alignped1 > alignped1 - part3","what":"alignped1 - part4","title":"Pedigree alignment details","text":"spouses Pedigree, now look . spouse get list children. call alignped2 generate tree mark connection parent. multiple marriages children need join trees.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"alignped1---part5","dir":"Articles","previous_headings":"alignped1 > alignped1 - part3","what":"alignped1 - part5","title":"Pedigree alignment details","text":"finish need splice together tree made kids, data lev+1 , data . 3 cases. first easiest children found. second, common, tree wider tree , case add data level onto . third narrower, instance child.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"alignped2","dir":"Articles","previous_headings":"","what":"alignped2","title":"Pedigree alignment details","text":"routine takes collection siblings, grows tree , appends side side single tree. input arguments alignped1 exception x vector. routine nothing spouselist matrix, needs pass tree back since one routines called alignped2 might change matrix. code one non-obvious special case. Suppose two sibs marry. first sib processed alignped1 partners (children) added rval structure . second sib processed come back 1 element tree (marriage longer spouselist), added onto rval. rule thus add 1 element tree whose value (must x[]) already rval structure level. (Curt Olswold. find families?)","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"alignped3","dir":"Articles","previous_headings":"","what":"alignped3","title":"Pedigree alignment details","text":"third alignment co-routine merges two pedigree trees side side single object. primary special case rightmost person left tree leftmost person right tree; need plot two copies person side side. (initializing output structures worry - harm column bigger finally needed.) Beyond work simple bookkeeping.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"alignped3---slide","dir":"Articles","previous_headings":"alignped3","what":"alignped3 - slide","title":"Pedigree alignment details","text":"unpacked case, traditional way draw Pedigree can assume paper infinitely wide, parents centered children. case think two trees merged solid blocks. input left margin 0. Compute far slide right tree.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"alignped3---merge","dir":"Articles","previous_headings":"alignped3","what":"alignped3 - merge","title":"Pedigree alignment details","text":"Now merge two trees. Start top level work . n2 = 0, nothing Set proper parent id. one two copies attached fam = 0, max(fam, fam2) preserves correct one. packed, set position. Choose one connected parent, midway double marriage. packed = TRUE determine amount slide row. space last element left Pedigree, less overlap. Move everything Fix children level, right hand Pedigree, point correct parental position.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"alignped4","dir":"Articles","previous_headings":"","what":"alignped4","title":"Pedigree alignment details","text":"alignped4 routine final step alignment. attempts line children parents put spouses siblings “close” , extent possible within constraints page width. routine used intricate complex set, realized task cast constrained quadradic optimization. current code necessary setup calls quadprog function. one point investigated using one simpler least-squares routines \\beta constrained non-negative. However problem can translated form number constraints less number parameters, true problem. two important parameters function. One user specified maximum width. smallest possible width maximum number subjects line, user suggestion low increased 1+ amount (give just little wiggle room). vector 2 alignment parameters b. set siblings x parents p_1 p_2 alignment penalty (1/k^)\\sum{=1}{k} (x_i - (p_1 + p_2)^2 k number siblings set. Using fact \\sum(x_i-c)^2 = \\sum(x_i-\\mu)^2 + k(c-\\mu)^2, =1 moving sibship k sibs one unit left right optimal incur cost moving one 1 two sibs place. =0 large sibships harder move small ones, default value =1.5 slightly easier move small ones. rationale default long parents somewhere first last siblings result looks fairly good, flexible spacing large family. tethering sibs single spot tend kept close . alignment penalty spouses b(x_1 - x_2)^2, tends keep together. size b controls relative importance sib-parent spouse-spouse closeness.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"alignped4---part1","dir":"Articles","previous_headings":"alignped4","what":"alignped4 - part1","title":"Pedigree alignment details","text":"start adding penalties. total number parameters alignment problem (hand quadprog) set sum(n) positions. work array myid keeps track parameter number position easy find. one extra penalty added end. penalty amount final positions shifted constant, penalty matrix positive definite; solve.QP like . add tiny amount leftward pull widest line.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"alignped4-part2","dir":"Articles","previous_headings":"alignped4","what":"alignped4: part2","title":"Pedigree alignment details","text":"Next come constraints. k subjects line k+1 constraints line. first point must \\ge 0, subesquent one must least 1 unit right, final point must \\le max width.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"session-information","dir":"Articles","previous_headings":"","what":"Session information","title":"Pedigree alignment details","text":"","code":"sessionInfo() ## R version 4.4.1 (2024-06-14) ## Platform: x86_64-pc-linux-gnu ## Running under: Ubuntu 22.04.4 LTS ## ## Matrix products: default ## BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 ## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0 ## ## locale: ## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C ## [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 ## [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 ## [7] LC_PAPER=en_US.UTF-8 LC_NAME=C ## [9] LC_ADDRESS=C LC_TELEPHONE=C ## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C ## ## time zone: UTC ## tzcode source: system (glibc) ## ## attached base packages: ## [1] stats graphics grDevices utils datasets methods base ## ## other attached packages: ## [1] Pedixplorer_1.1.4 BiocStyle_2.32.1 ## ## loaded via a namespace (and not attached): ## [1] gtable_0.3.5 xfun_0.48 bslib_0.8.0 ## [4] ggplot2_3.5.1 htmlwidgets_1.6.4 lattice_0.22-6 ## [7] quadprog_1.5-8 vctrs_0.6.5 tools_4.4.1 ## [10] generics_0.1.3 stats4_4.4.1 tibble_3.2.1 ## [13] fansi_1.0.6 highr_0.11 pkgconfig_2.0.3 ## [16] Matrix_1.7-0 data.table_1.16.0 desc_1.4.3 ## [19] S4Vectors_0.42.1 readxl_1.4.3 lifecycle_1.0.4 ## [22] stringr_1.5.1 compiler_4.4.1 shinytoastr_2.2.0 ## [25] textshaping_0.4.0 munsell_0.5.1 httpuv_1.6.15 ## [28] shinyWidgets_0.8.7 htmltools_0.5.8.1 sass_0.4.9 ## [31] yaml_2.3.10 lazyeval_0.2.2 plotly_4.10.4 ## [34] later_1.3.2 pillar_1.9.0 pkgdown_2.1.1 ## [37] jquerylib_0.1.4 tidyr_1.3.1 DT_0.33 ## [40] cachem_1.1.0 mime_0.12 tidyselect_1.2.1 ## [43] digest_0.6.37 stringi_1.8.4 colourpicker_1.3.0 ## [46] dplyr_1.1.4 purrr_1.0.2 bookdown_0.40 ## [49] fastmap_1.2.0 grid_4.4.1 colorspace_2.1-1 ## [52] cli_3.6.3 magrittr_2.0.3 utf8_1.2.4 ## [55] withr_3.0.1 scales_1.3.0 promises_1.3.0 ## [58] rmarkdown_2.28 httr_1.4.7 gridExtra_2.3 ## [61] cellranger_1.1.0 ragg_1.3.3 shiny_1.9.1 ## [64] evaluate_1.0.0 knitr_1.48 miniUI_0.1.1.1 ## [67] viridisLite_0.4.2 rlang_1.1.4 Rcpp_1.0.13 ## [70] xtable_1.8-4 glue_1.8.0 BiocManager_1.30.25 ## [73] BiocGenerics_0.50.0 jsonlite_1.8.9 R6_2.5.1 ## [76] plyr_1.8.9 systemfonts_1.1.0 fs_1.6.4"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_kinship.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Pedigree kinship() details","text":"kinship matrix foundational random effects models family data. n subjects n \\times n matrix whose , j elements contains expected fraction alleles identical descent sampled one subject another subject j. Note diagonal elements matrix 0.5 1: randomly sample twice subject (replacement) get two copies gene inherited father 1/4 time, maternal copy twice (1/4) one 1/2 time. formal definition K(,) = 1/4 + 1/4 + 1/2 K(m,f) m f father mother subject . algorithm used found K Lange, Mathematical Statistical Methods Genetic Analysis, Springer 1997, page 71–72. key idea recursive algorithm K(,j) condition gene selection first index . Let m() f() indices mother father subject g allele randomly sampled subject , may either maternal paternal origin. \\begin{align} K(,j) &= P(\\mbox{$g$ maternal}) * K(m(), j) + P(\\mbox{$g$ paternal}) * K(f(), j) \\label{recur0} \\\\ &= 1/2 K(m(), j) + 1/2 K(f(), j) \\label{recur1} \\\\ K(,) &= 1/2(1 + K(m(), f())) \\label{self} \\end{align} key step equation K(,j) g maternal origin, random selection two maternal genes, IBD state respect subject j random selection m() random selection j. precisely definition K(m(), j). recursion work K(,) since select maternal gene second choice j use different maternal gene. recurrence algorithm work properly need compute values K parent calculations children. Pedigree founders (parents) assumed unassociated, subjects \\begin{align*} K(,) &= 1/2 \\\\ K(,j) &= 0 \\ ; \\ne j \\end{align*} final formula slightly different X chromosome. Equation K(,j) still holds, males probability selected X chromosome maternal 1, male recurrence formula becomes K(,j) = K(m(),j). females unchanged. males K(,) = 1 X chromosome. order already-defined terms right hand side recurrence formula element, subjects need processed following order Generation 0 (founders) K(,j) generation 1 j generation 0. K(,j) j generation 1 K(,j) generation 2 j generation 0 1 K(,j) j generation 2. … kindepth routine assigns plotting depth subject way parents always children. depth need compuations formula K(,j) twice. first time get relationship subject prior generations correct, second correctly compute values subjects level. computations within stage list can vectorized, stages. Let indx index rows generation currently processed, say generation g. add correct computations matrix one row time; calculations depend prior rows exception ,element. approach leads loop containing operations single rows/columns. one point use vectorized version. looks like snippet first line computes values horizontal stripe matrix. correct columns generations Normalisation","what":"Errors present after the normalisation process","title":"Pedigree object","text":"error detected normalisation process, normalised dataframe gave back user errors column added describing encountered problems.","code":"rel_wrong <- rel_df rel_wrong$code[2] <- \"A\" df <- Pedigree(sampleped, rel_wrong) ## Warning in .local(obj, ...): The relationship informations are not valid. Here ## is the normalised relationship informations with the identified problems print(df) ## id1 id2 code famid error ## 1 1_110 1_112 MZ twin 1 ## 2 2_204 2_205 2 CodeNotRecognise"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_object.html","id":"validation","dir":"Articles","previous_headings":"Pedigree Constructor","what":"Validation","title":"Pedigree object","text":"Now data Pedigree object creation ready, given new Pedigree object, trigerring validation process. validation step check many errors : necessary columns present duplicated id momid dadid present id sex column contain “male”, “female”, “unknown” “terminated” values steril, status, available, affected contains 0, 1 NA values Father males Mother females Twins parents MZ twins sex Hints object valid ids contained Ped object …","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_object.html","id":"pedigree-class","dir":"Articles","previous_headings":"","what":"Pedigree Class","title":"Pedigree object","text":"validation S4 object generated. new concept make possible easily setup methods new type object. controls parameters also precise. Pedigree object contains 4 slots, contains different S4 object containing specific type information used Pedigree construction. id identifiers individuals dadid identifiers fathers momid identifiers mothers sex gender individuals id1 identifiers 1st individuals id2 identifiers 2nd individuals code factor describing type relationship (“MZ twin”, “DZ twin”, “UZ twin”, “Spouse”) fill dataframe describing modalities columns correspond affected individuals. Plotting information colour, angle density also provided border dataframe describing modalities columns use plot border plot elements. horder numeric vector ordering individuals plotting spouse matrix spouses information object: help(Ped) help(Rel) help(Scales) help(Hints)","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_object.html","id":"pedigree-accessors","dir":"Articles","previous_headings":"","what":"Pedigree accessors","title":"Pedigree object","text":"Pedigree object now S4 class, made available number accessors. can used getter setter modify value correponding slot object","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_object.html","id":"for-the-pedigree-object","dir":"Articles","previous_headings":"Pedigree accessors","what":"For the Pedigree object","title":"Pedigree object","text":"Get/Set slots : ped(), rel(), scales(), hints() Wrapper Ped object: mcols() Wrapper Scales object: fill(), border() Wrapper Hints object: horder(), spouse()","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_object.html","id":"for-the-ped-object","dir":"Articles","previous_headings":"Pedigree accessors","what":"For the Ped object","title":"Pedigree object","text":"Given input: id(), dadid(), momid(), famid(), sex() infos used : affected(), avail(), status() Computed : isinf(), kin(), useful() Metadata : mcols()","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_object.html","id":"for-the-rel-object","dir":"Articles","previous_headings":"Pedigree accessors","what":"For the Rel object","title":"Pedigree object","text":"id1(), id2(), code(), famid()","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_object.html","id":"for-the-scales-object","dir":"Articles","previous_headings":"Pedigree accessors","what":"For the Scales object","title":"Pedigree object","text":"fill(), border()","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_object.html","id":"for-the-hints-object","dir":"Articles","previous_headings":"Pedigree accessors","what":"For the Hints object","title":"Pedigree object","text":"horder(), spouse()","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_object.html","id":"focus-on-mcols","dir":"Articles","previous_headings":"Pedigree accessors","what":"Focus on mcols()","title":"Pedigree object","text":"mcols() accessors one use add informations individuals.","code":"ped <- Pedigree(sampleped) mcols(ped)[8:12] ## DataFrame with 55 rows and 5 columns ## num error sterilisation vitalStatus affection_mods ## ## 1 2 NA NA NA 0 ## 2 3 NA NA NA 1 ## 3 2 NA NA NA 1 ## 4 4 NA NA NA 0 ## 5 6 NA NA NA NA ## ... ... ... ... ... ... ## 51 2 NA NA NA 0 ## 52 1 NA NA NA 0 ## 53 3 NA NA NA 0 ## 54 2 NA NA NA 0 ## 55 0 NA NA NA 1 ## Add new columns as a threshold if identifiers of individuals superior ## to a given threshold for example mcols(ped)$idth <- ifelse(as.numeric(mcols(ped)$indId) < 200, \"A\", \"B\") mcols(ped)$idth ## [1] \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" ## [20] \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" ## [39] \"A\" \"A\" \"A\" \"B\" \"B\" \"B\" \"B\" \"B\" \"B\" \"B\" \"B\" \"B\" \"B\" \"B\" \"B\" \"B\" \"B\""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_object.html","id":"pedigree-methods","dir":"Articles","previous_headings":"","what":"Pedigree methods","title":"Pedigree object","text":"new S4 object comes multiple methods ease use : plot() summary() print() show() .list() [ shrink() generate_colors() is_informative() kindepth() kinship() make_famid() upd_famid() num_child() unrelated() useful_inds()","code":"## We can change the family name based on an other column ped <- upd_famid(ped, mcols(ped)$idth) ## We can substract a given family ped_a <- ped[famid(ped(ped)) == \"A\"] ## Plot it plot(ped_a, cex = 0.5) ## Do a summary summary(ped_a) ## Pedigree object with ## [1] \"Ped object with 41 individuals and 14 metadata columns\" ## [1] \"Rel object with 0 relationshipswith 0 MZ twin, 0 DZ twin, 0 UZ twin, 0 Spouse\" ## Coerce it to a list as.list(ped_a)[[1]][1:3] ## $id ## [1] \"A_101\" \"A_102\" \"A_103\" \"A_104\" \"A_105\" \"A_106\" \"A_107\" \"A_108\" \"A_109\" ## [10] \"A_110\" \"A_111\" \"A_112\" \"A_113\" \"A_114\" \"A_115\" \"A_116\" \"A_117\" \"A_118\" ## [19] \"A_119\" \"A_120\" \"A_121\" \"A_122\" \"A_123\" \"A_124\" \"A_125\" \"A_126\" \"A_127\" ## [28] \"A_128\" \"A_129\" \"A_130\" \"A_131\" \"A_132\" \"A_133\" \"A_134\" \"A_135\" \"A_136\" ## [37] \"A_137\" \"A_138\" \"A_139\" \"A_140\" \"A_141\" ## ## $dadid ## [1] NA NA \"A_135\" NA NA NA NA NA \"A_101\" ## [10] \"A_103\" \"A_103\" \"A_103\" NA \"A_103\" \"A_105\" \"A_105\" NA \"A_105\" ## [19] \"A_105\" \"A_107\" \"A_110\" \"A_110\" \"A_110\" \"A_110\" \"A_112\" \"A_112\" \"A_114\" ## [28] \"A_114\" \"A_117\" \"A_119\" \"A_119\" \"A_119\" \"A_119\" \"A_119\" NA NA ## [37] NA \"A_135\" \"A_137\" \"A_137\" \"A_137\" ## ## $momid ## [1] NA NA \"A_136\" NA NA NA NA NA \"A_102\" ## [10] \"A_104\" \"A_104\" \"A_104\" NA \"A_104\" \"A_106\" \"A_106\" NA \"A_106\" ## [19] \"A_106\" \"A_108\" \"A_109\" \"A_109\" \"A_109\" \"A_109\" \"A_118\" \"A_118\" \"A_115\" ## [28] \"A_115\" \"A_116\" \"A_120\" \"A_120\" \"A_120\" \"A_120\" \"A_120\" NA NA ## [37] NA \"A_136\" \"A_138\" \"A_138\" \"A_138\" ## Shrink it to keep only the necessary information lst1_s <- shrink(ped_a, max_bits = 10) plot(lst1_s$pedObj, cex = 0.5) ## Compute the kinship individuals matrix kinship(ped_a)[1:10, 1:10] ## 10 x 10 sparse Matrix of class \"dsCMatrix\" ## [[ suppressing 10 column names 'A_101', 'A_102', 'A_103' ... ]] ## ## A_101 0.50 . . . . . . . 0.25 . ## A_102 . 0.50 . . . . . . 0.25 . ## A_103 . . 0.50 . . . . . . 0.25 ## A_104 . . . 0.50 . . . . . 0.25 ## A_105 . . . . 0.5 . . . . . ## A_106 . . . . . 0.5 . . . . ## A_107 . . . . . . 0.5 . . . ## A_108 . . . . . . . 0.5 . . ## A_109 0.25 0.25 . . . . . . 0.50 . ## A_110 . . 0.25 0.25 . . . . . 0.50 ## Get the useful individuals ped_a <- useful_inds(ped_a, informative = \"AvAf\") as.data.frame(ped(ped_a))[\"useful\"][1:10, ] ## [1] TRUE TRUE TRUE TRUE TRUE TRUE FALSE FALSE TRUE TRUE"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_object.html","id":"session-information","dir":"Articles","previous_headings":"","what":"Session information","title":"Pedigree object","text":"","code":"sessionInfo() ## R version 4.4.1 (2024-06-14) ## Platform: x86_64-pc-linux-gnu ## Running under: Ubuntu 22.04.4 LTS ## ## Matrix products: default ## BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 ## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0 ## ## locale: ## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C ## [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 ## [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 ## [7] LC_PAPER=en_US.UTF-8 LC_NAME=C ## [9] LC_ADDRESS=C LC_TELEPHONE=C ## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C ## ## time zone: UTC ## tzcode source: system (glibc) ## ## attached base packages: ## [1] stats graphics grDevices utils datasets methods base ## ## other attached packages: ## [1] Pedixplorer_1.1.4 BiocStyle_2.32.1 ## ## loaded via a namespace (and not attached): ## [1] gtable_0.3.5 xfun_0.48 bslib_0.8.0 ## [4] ggplot2_3.5.1 htmlwidgets_1.6.4 lattice_0.22-6 ## [7] quadprog_1.5-8 vctrs_0.6.5 tools_4.4.1 ## [10] generics_0.1.3 stats4_4.4.1 tibble_3.2.1 ## [13] fansi_1.0.6 highr_0.11 pkgconfig_2.0.3 ## [16] Matrix_1.7-0 data.table_1.16.0 desc_1.4.3 ## [19] S4Vectors_0.42.1 readxl_1.4.3 lifecycle_1.0.4 ## [22] stringr_1.5.1 compiler_4.4.1 shinytoastr_2.2.0 ## [25] textshaping_0.4.0 munsell_0.5.1 httpuv_1.6.15 ## [28] shinyWidgets_0.8.7 htmltools_0.5.8.1 sass_0.4.9 ## [31] yaml_2.3.10 lazyeval_0.2.2 plotly_4.10.4 ## [34] later_1.3.2 pillar_1.9.0 pkgdown_2.1.1 ## [37] jquerylib_0.1.4 tidyr_1.3.1 DT_0.33 ## [40] cachem_1.1.0 mime_0.12 tidyselect_1.2.1 ## [43] digest_0.6.37 stringi_1.8.4 colourpicker_1.3.0 ## [46] dplyr_1.1.4 purrr_1.0.2 bookdown_0.40 ## [49] fastmap_1.2.0 grid_4.4.1 colorspace_2.1-1 ## [52] cli_3.6.3 magrittr_2.0.3 utf8_1.2.4 ## [55] withr_3.0.1 scales_1.3.0 promises_1.3.0 ## [58] rmarkdown_2.28 httr_1.4.7 gridExtra_2.3 ## [61] cellranger_1.1.0 ragg_1.3.3 shiny_1.9.1 ## [64] evaluate_1.0.0 knitr_1.48 miniUI_0.1.1.1 ## [67] viridisLite_0.4.2 rlang_1.1.4 Rcpp_1.0.13 ## [70] xtable_1.8-4 glue_1.8.0 BiocManager_1.30.25 ## [73] BiocGenerics_0.50.0 jsonlite_1.8.9 R6_2.5.1 ## [76] plyr_1.8.9 systemfonts_1.1.0 fs_1.6.4"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_plot.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Pedigree plotting details","text":"plotting function Pedigrees 5 tasks Gather information check data. important step call align. Set plot region size symbols. program wants plot circles squares, needs understand geometry paper, Pedigree size, text size get right shape size symbols. Set plot add symbols subject Add connecting lines spouses, children parents Create invisible return value containing locations. Another task, yet completely understood, certainly implemented, might break plot across multiple pages.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_plot.html","id":"setup","dir":"Articles","previous_headings":"","what":"Setup","title":"Pedigree plotting details","text":"new version plotting Pedigree function works two step. ped_to_plotdf() create dataframe Pedigree given containing necessary information plot elements Pedigree: “polygons”, “text”, “segments”, “arcs” plot_from_df() use given dataframe plot element given advantage two step method, plotting can parralelised, element can customised user necessary additional elements can also added plot just adding new row. multiple families present Pedigree object, one dataframe per family produced first one plotted. informations two functions, see help page. help(ped_to_plotdf) help(plot_fromdf)","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_plot.html","id":"sizing","dir":"Articles","previous_headings":"","what":"Sizing","title":"Pedigree plotting details","text":"Now need set sizes. align() get maximum width depth. one plotted row row returned matrices. number columns matrices max width Pedigree, unused positions shorter rows, can identifed nid value 0. Horizontal locations point go 0 xmax, subjects least 1 unit apart; large number exactly one unit part. locations top center plotted symbol.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_plot.html","id":"set-the-graphical-parameters","dir":"Articles","previous_headings":"Sizing","what":"Set the graphical parameters","title":"Pedigree plotting details","text":"like make boxes 2.5 characters wide, matches labels, 0.9 units wide .5 units high. also want vertical room labels. done set_plot_area() function. least 1/2 stemp2 space stemp2 space . stemp3 variable height labels: users may use multi-line ones. constraints (box height + label height) \\times maxlev \\le height : boxes labels fit vertically (box height) \\times (maxlev + (maxlev-1)/2) \\le height : least 1/2 box space row boxes (box width) \\le stemp1 inches (box width) \\le 0.8 unit user coordinates, otherwise appear touch User coordinates go min(xrange)- 1/2 box width max(xrange) + 1/2 box width. box square (inches) first 3 easy. fourth comes play packed pedigrees. Assume box maximum size .8 units, .e., minimal spacing . xmin -.45 xmax + .45 covers plot region, scaling user coordinates inches (.8 + xmax-xmin) box .8 \\times (figure width) / (.8 + xmax-xmin). transformation user units inches horizontally depends box size, since need allow 1/2 box left right. Vertically range 1 nrow spans tops symbols, figure region height less (height text last row + 1 box); remember coordinates point top center box. want row 1 plot top, done appropriate setting usr parameter.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_plot.html","id":"subsetting-and-sub-region","dir":"Articles","previous_headings":"Sizing","what":"Subsetting and Sub-Region","title":"Pedigree plotting details","text":"section still experimental might change. Also, original documentation TM Therneau, within sizing section . Sometimes Pedigree large fit comfortably one page. subregion argument allows one plot portion Pedigree based plot region. Along tools select portions Pedigree based relatedness, descendents particular marriage, gives tool addressing . breaks original goal completely automatic plots, users keep asking . argument subregion = c(min x, max x, min depth, max depth), works editing away portions plist object returned align. First decide lines keep. take subjects away line, update spouses twins, fix parentage line .","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_plot.html","id":"ped_to_plotdf","dir":"Articles","previous_headings":"","what":"ped_to_plotdf()","title":"Pedigree plotting details","text":"first function create dataframe necessary plotting information Pedigree object. steps : Add boxes (depend affection sex) marks. Add status crossing present. Add id text labels Add connections, one one, beginning spouses. Add connections children parents. Add lines/arcs connect multiple instances subject.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_plot.html","id":"details-on-the-polygon-filling-and-border","dir":"Articles","previous_headings":"ped_to_plotdf()","what":"Details on the polygon filling and border","title":"Pedigree plotting details","text":"polygon named based shape (“square”, “circle”,“diamond”, “triangle”), total number division whole shape, position division plot. number division depend number affection register fill slot scale slot Pedigree. filling depend color given corresponding modality individual, border polygon.","code":"library(Pedixplorer) types <- c( \"square_1_1\", # Whole square \"circle_2_1\", # Semi circle first division \"diamond_3_2\", # Third of diamond second division \"triangle_4_3\" # Fourth of triangle third division ) df <- plot_df <- data.frame( x0 = c(1, 3, 5, 7), y0 = 1, type = types, fill = c(\"red\", \"blue\", \"green\", \"yellow\"), border = \"black\", angle = c(NA, 90, 0, 45), density = c(NA, 10, 20, 40) ) plot_fromdf(df, usr = c(0, 8, 0, 2))"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_plot.html","id":"details-on-connecting-children-to-parents-","dir":"Articles","previous_headings":"ped_to_plotdf()","what":"Details on connecting children to parents.","title":"Pedigree plotting details","text":"First lines child, trivial except twins, triplets, etc. draw horizontal bar across siblings finally connector parent. twins, vertical lines angled towards common point, variable called target . horizontal part easier things family family. plist$twins variable 1/2/3 twin right, 0 otherwise.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_plot.html","id":"details-on-arcs-","dir":"Articles","previous_headings":"ped_to_plotdf()","what":"Details on arcs.","title":"Pedigree plotting details","text":"last set lines dotted arcs connect mulitiple instances subject line. instances may may line. arrcconect function draws quadratic arc locations (x1, y1) (x2, y2) whose height 1/2 unit straight line connection.","code":""},{"path":[]},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_plot.html","id":"symbols","dir":"Articles","previous_headings":"plot_fromdf() > Polygons drawing","what":"Symbols","title":"Pedigree plotting details","text":"four sumbols corresponding four sex codes: square = male, circle = female, diamond= unknown, triangle = terminated. shaded according value(s) affected status subject, filling uses standard arguments polygon() function. complexity multiple affected status given, case symbol divided sections, clockwise starting lower left. asked Beth (original author) particular reason start 6 o-clock, now established history. first part code create collection polygons make symbol. used . collection kept list four elements square, circle, diamond triangle. turn list max(fill(ped, \"order\")) elements, turn list x y coordinates.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_plot.html","id":"circfun","dir":"Articles","previous_headings":"plot_fromdf() > Polygons drawing","what":"Circfun","title":"Pedigree plotting details","text":"circle function quite simple. number segments arbitrary, 50 seems enough make eye happy. draw ray 0 edge, portion arc. polygon function connect back center.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_plot.html","id":"polyfun","dir":"Articles","previous_headings":"plot_fromdf() > Polygons drawing","what":"Polyfun","title":"Pedigree plotting details","text":"Now interesting one — dividing polygon ‘’pie slices’’. computing can’t use usual y= + bx formula line, doesn’t work vertical ones (like sides square). Instead use alternate formulation terms dummy variable z. \\begin{eqnarray*} x &=& + bz \\\\ y &=& c + dz \\\\ \\end{eqnarray*} Furthermore, choose constants , b, c, d side polygon correspond 0 \\le z \\le 1. intersection particular ray angle theta particular side satisfy \\begin{eqnarray} theta &=& y/x = \\frac{+ bz}{c+dz} \\nonumber \\\\ z &=& \\frac{\\theta -c}{b - d\\theta} \\\\ \\end{eqnarray} Equation z lead division zero ray origin intersect side, e.g., vertical divider parallel sides square symbol. solutions want 0 \\le z \\le 1 ‘’forward’’’ part ray. latter true inner product x \\cos(\\theta) + y \\sin(\\theta) >0. Exactly one polygon sides satisfy conditions.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_plot.html","id":"final-output","dir":"Articles","previous_headings":"","what":"Final output","title":"Pedigree plotting details","text":"Pedigree plotted new frame added current device. ggplot_gen = TRUE, ggplot object create informations available invisible object given back plot_fromdf()","code":"Notes: Remind the user of subjects who did not get plotted; these are ususally subjects who are married in but without children. Unless the Pedigree contains spousal information the routine does not know who is the spouse. Then restore the plot parameters. This would only not be done if someone wants to further annotate the plot."},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_plot.html","id":"session-information","dir":"Articles","previous_headings":"","what":"Session information","title":"Pedigree plotting details","text":"","code":"sessionInfo() ## R version 4.4.1 (2024-06-14) ## Platform: x86_64-pc-linux-gnu ## Running under: Ubuntu 22.04.4 LTS ## ## Matrix products: default ## BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 ## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0 ## ## locale: ## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C ## [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 ## [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 ## [7] LC_PAPER=en_US.UTF-8 LC_NAME=C ## [9] LC_ADDRESS=C LC_TELEPHONE=C ## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C ## ## time zone: UTC ## tzcode source: system (glibc) ## ## attached base packages: ## [1] stats graphics grDevices utils datasets methods base ## ## other attached packages: ## [1] Pedixplorer_1.1.4 BiocStyle_2.32.1 ## ## loaded via a namespace (and not attached): ## [1] gtable_0.3.5 xfun_0.48 bslib_0.8.0 ## [4] ggplot2_3.5.1 htmlwidgets_1.6.4 lattice_0.22-6 ## [7] quadprog_1.5-8 vctrs_0.6.5 tools_4.4.1 ## [10] generics_0.1.3 stats4_4.4.1 tibble_3.2.1 ## [13] fansi_1.0.6 highr_0.11 pkgconfig_2.0.3 ## [16] Matrix_1.7-0 data.table_1.16.0 desc_1.4.3 ## [19] S4Vectors_0.42.1 readxl_1.4.3 lifecycle_1.0.4 ## [22] stringr_1.5.1 compiler_4.4.1 shinytoastr_2.2.0 ## [25] textshaping_0.4.0 munsell_0.5.1 httpuv_1.6.15 ## [28] shinyWidgets_0.8.7 htmltools_0.5.8.1 sass_0.4.9 ## [31] yaml_2.3.10 lazyeval_0.2.2 plotly_4.10.4 ## [34] later_1.3.2 pillar_1.9.0 pkgdown_2.1.1 ## [37] jquerylib_0.1.4 tidyr_1.3.1 DT_0.33 ## [40] cachem_1.1.0 mime_0.12 tidyselect_1.2.1 ## [43] digest_0.6.37 stringi_1.8.4 colourpicker_1.3.0 ## [46] dplyr_1.1.4 purrr_1.0.2 bookdown_0.40 ## [49] fastmap_1.2.0 grid_4.4.1 colorspace_2.1-1 ## [52] cli_3.6.3 magrittr_2.0.3 utf8_1.2.4 ## [55] scales_1.3.0 promises_1.3.0 rmarkdown_2.28 ## [58] httr_1.4.7 gridExtra_2.3 cellranger_1.1.0 ## [61] ragg_1.3.3 shiny_1.9.1 evaluate_1.0.0 ## [64] knitr_1.48 miniUI_0.1.1.1 viridisLite_0.4.2 ## [67] rlang_1.1.4 Rcpp_1.0.13 xtable_1.8-4 ## [70] glue_1.8.0 BiocManager_1.30.25 BiocGenerics_0.50.0 ## [73] jsonlite_1.8.9 R6_2.5.1 plyr_1.8.9 ## [76] systemfonts_1.1.0 fs_1.6.4"},{"path":"https://louislenezet.github.io/Pedixplorer/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Louis Le Nézet. Author, maintainer, contributor. Jason Sinnwell. Author. Terry Therneau. Author. Daniel Schaid. Contributor. Elizabeth Atkinson. Contributor.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Le Nézet L, Sinnwell J, Therneau T (2024). Pedixplorer: Pedigree Functions. R package version 1.1.4, https://louislenezet.github.io/Pedixplorer/.","code":"@Manual{, title = {Pedixplorer: Pedigree Functions}, author = {Louis {Le Nézet} and Jason Sinnwell and Terry Therneau}, year = {2024}, note = {R package version 1.1.4}, url = {https://louislenezet.github.io/Pedixplorer/}, }"},{"path":"https://louislenezet.github.io/Pedixplorer/index.html","id":"pedixplorer-a-bioconductor-package-to-create-filter-and-draw-pedigree","dir":"","previous_headings":"","what":"Pedixplorer - A BioConductor R package for pedigree creation, filtering and drawing","title":"Pedixplorer - A BioConductor R package for pedigree creation, filtering and drawing","text":"Try today Pedixplorer shiny app easily use package.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/index.html","id":"from-github","dir":"","previous_headings":"Installation through R","what":"From Github","title":"Pedixplorer - A BioConductor R package for pedigree creation, filtering and drawing","text":"","code":"if (!require(\"remotes\", quietly = TRUE)) install.packages(\"remotes\") remotes::install_github(\"louislenezet/Pedixplorer\", build_vignettes=TRUE )"},{"path":"https://louislenezet.github.io/Pedixplorer/index.html","id":"from-bioconductor","dir":"","previous_headings":"Installation through R","what":"From Bioconductor","title":"Pedixplorer - A BioConductor R package for pedigree creation, filtering and drawing","text":"","code":"if (!require(\"BiocManager\", quietly = TRUE)) install.packages(\"BiocManager\") BiocManager::install(\"Pedixplorer\")"},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/index.html","id":"the-pedigree-function","dir":"","previous_headings":"Main functions","what":"The Pedigree() Function","title":"Pedixplorer - A BioConductor R package for pedigree creation, filtering and drawing","text":"Pedigree() function creates S4 class Pedigree object. core slot Pedigree object ped slot built row per person, linked father id mother id. relationships can specified, affection status can matrix multiple categories rel slot. informations affection availability stored respectively scales$fill scales$border slots therefore used fill color border elements Pedigree graph.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/index.html","id":"the-generate_colors-function","dir":"","previous_headings":"Main functions","what":"The generate_colors() Function","title":"Pedixplorer - A BioConductor R package for pedigree creation, filtering and drawing","text":"generate_colors() function generates color palette affection status. function used Pedigree() function generate scales$fill scales$border slots. user can also use function generate color palette specific affection status added Pedigree object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/index.html","id":"the-plotpedigree-method","dir":"","previous_headings":"Main functions","what":"The plot.Pedigree() Method","title":"Pedixplorer - A BioConductor R package for pedigree creation, filtering and drawing","text":"plot.Pedigree() method Pedigree object plots “family tree”, relatives generation row, affection statuses divided plot symbol person. function designed two steps: First Pedigree object converted data frame elements needed plot Pedigree (.e. boxes, lines, text, etc.). done ped_to_plotdf() function. data frame plotted using plot_fromdf() function.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/index.html","id":"the-kinship-funtion","dir":"","previous_headings":"Main functions","what":"The kinship() Funtion","title":"Pedixplorer - A BioConductor R package for pedigree creation, filtering and drawing","text":"kinship() function creates kinship matrix Pedigree object. coded dyplotype organisms, handling relationships can specified Pedigree object, including inbreeding, monozygotic twins, etc. recent addition handling kinship matrix X Y chromosomes.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/index.html","id":"other-notable-functions","dir":"","previous_headings":"Main functions","what":"Other Notable Functions","title":"Pedixplorer - A BioConductor R package for pedigree creation, filtering and drawing","text":"shrink() shrink Pedigree given size, keeping informative individuals single affection variable. fix_parents() add parents children mother dad listed already included. also fix sex status parent mis-specified. useful use creating Pedigree object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/index.html","id":"diagrams","dir":"","previous_headings":"","what":"Diagrams","title":"Pedixplorer - A BioConductor R package for pedigree creation, filtering and drawing","text":"diagrams show main functions package related.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/index.html","id":"details","dir":"","previous_headings":"Diagrams","what":"Details","title":"Pedixplorer - A BioConductor R package for pedigree creation, filtering and drawing","text":"details different parts diagram.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/index.html","id":"documentation-and-news","dir":"","previous_headings":"","what":"Documentation and News","title":"Pedixplorer - A BioConductor R package for pedigree creation, filtering and drawing","text":"view documentation start R enter:","code":"library(Pedixplorer) help(package=\"Pedixplorer\") # Or to view the vignettes browseVignettes(\"Pedixplorer\") # Or to see the news utils::news(package=\"Pedixplorer\")"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Hints-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Hints object — Hints-class","title":"Hints object — Hints-class","text":"hints used specify order individuals pedigree specify order spouses.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Hints-class.html","id":"constructor-","dir":"Reference","previous_headings":"","what":"Constructor :","title":"Hints object — Hints-class","text":"either need provide horder spouse dedicated parameters (together separately), inside list.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Hints-class.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Hints object — Hints-class","text":"","code":"Hints(horder, spouse) # S4 method for class 'list,missing_OR_NULL' Hints(horder, spouse) # S4 method for class 'numeric,data.frame' Hints(horder, spouse) # S4 method for class 'numeric,missing_OR_NULL' Hints(horder, spouse)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Hints-class.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Hints object — Hints-class","text":"horder named numeric vector one element per subject Pedigree. determines relative horizontal order subjects within sibship, well relative order processing founder couples. (latter, female founders ordered though sisters). names vector individual identifiers. spouse data.frame one row per hinted marriage, usually marriages pedigree need added hint, instance reverse plot order husband/wife pair. row contains id left spouse (.e. idl), id right hand spouse (.e. idr), anchor (.e : anchor : 1 = left, 2 = right, 0 = either). Children preferentially appear parents anchored spouse.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Hints-class.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Hints object — Hints-class","text":"Hints object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Hints-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Hints object — Hints-class","text":"horder numeric named vector one element per subject Pedigree. determines relative horizontal order subjects within sibship, well relative order processing founder couples. (latter, female founders ordered though sisters). spouse data.frame one row per hinted marriage, usually marriages Pedigree need added hint, instance reverse plot order husband/wife pair. row contains identifiers left spouse, right hand spouse, anchor (.e : 1 = left, 2 = right, 0 = either).","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Hints-class.html","id":"accessors","dir":"Reference","previous_headings":"","what":"Accessors","title":"Hints object — Hints-class","text":"horder(x) : Get horder vector horder(x) <- value : Set horder vector spouse(x) : Get spouse data.frame spouse(x) <- value : Set spouse data.frame","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Hints-class.html","id":"generics","dir":"Reference","previous_headings":"","what":"Generics","title":"Hints object — Hints-class","text":".list(x): Convert Hints object list subset(x, , keep = TRUE): Subset Hints object based individuals identifiers given. : vector individuals identifiers keep. keep : logical value indicating individuals kept deleted.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Hints-class.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Hints object — Hints-class","text":"","code":"Hints( list( horder = c(\"1\" = 1, \"2\" = 2, \"3\" = 3), spouse = data.frame( idl = c(\"1\", \"2\"), idr = c(\"2\", \"3\"), anchor = c(1, 2) ) ) ) #> An object of class \"Hints\" #> Slot \"horder\": #> 1 2 3 #> 1 2 3 #> #> Slot \"spouse\": #> [1] idl idr anchor #> <0 rows> (or 0-length row.names) #> Hints( horder = c(\"1\" = 1, \"2\" = 2, \"3\" = 3), spouse = data.frame( idl = c(\"1\", \"2\"), idr = c(\"2\", \"3\"), anchor = c(1, 2) ) ) #> An object of class \"Hints\" #> Slot \"horder\": #> 1 2 3 #> 1 2 3 #> #> Slot \"spouse\": #> idl idr anchor #> 1 1 2 left #> 2 2 3 right #> Hints( horder = c(\"1\" = 1, \"2\" = 2, \"3\" = 3) ) #> An object of class \"Hints\" #> Slot \"horder\": #> 1 2 3 #> 1 2 3 #> #> Slot \"spouse\": #> [1] idl idr anchor #> <0 rows> (or 0-length row.names) #>"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Ped-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Ped object — Ped-class","title":"Ped object — Ped-class","text":"S4 class represent identity informations individuals pedigree.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Ped-class.html","id":"constructor-","dir":"Reference","previous_headings":"","what":"Constructor :","title":"Ped object — Ped-class","text":"either need provide vector size slot data.frame corresponding columns. metadata correspond columns correspond Ped slots.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Ped-class.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ped object — Ped-class","text":"","code":"# S4 method for class 'data.frame' Ped(obj, cols_used_init = FALSE, cols_used_del = FALSE) # S4 method for class 'character_OR_integer' Ped( obj, sex, dadid, momid, famid = NA, steril = NA, status = NA, avail = NA, affected = NA, missid = NA_character_, useful = NA, isinf = NA, kin = NA_real_ )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Ped-class.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ped object — Ped-class","text":"obj character vector id individuals data.frame informations corresponding columns. cols_used_init Boolean defining columns used initialised NA. cols_used_del Boolean defining columns used deleted. sex character, factor numeric vector corresponding gender individuals. transformed ordered factor following levels: male < female < unknown < terminated following values recognized: character() factor() : \"f\", \"m\", \"woman\", \"man\", \"male\", \"female\", \"unknown\", \"terminated\" numeric() : 1 = \"male\", 2 = \"female\", 3 = \"unknown\", 4 = \"terminated\" dadid vector containing subject, identifiers biologicals fathers. momid vector containing subject, identifiers biologicals mothers. famid character vector family identifiers individuals. provide, aggregated individuals identifiers separated underscore. steril logical vector sterilisation status individuals (.e. FALSE = sterilised, TRUE = sterilised, NA = unknown). status logical vector affection status individuals (.e. FALSE = alive, TRUE = dead, NA = unknown). avail logical vector availability status individuals (.e. FALSE = available, TRUE = available, NA = unknown). affected logical vector affection status individuals (.e. FALSE = unaffected, TRUE = affected, NA = unknown). missid character vector missing values identifiers. id, dadid momid corresponding values set NA_character_. useful logical vector usefulness status individuals (.e. FALSE = useful, TRUE = useful). isinf logical vector indicating individual informative (.e. FALSE = informative, TRUE = informative). kin numeric vector minimal kinship value individuals informative individuals.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Ped-class.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Ped object — Ped-class","text":"Ped object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Ped-class.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Ped object — Ped-class","text":"minimal needed informations id, dadid, momid sex. slots used store recognized informations. Additional columns can added Ped object stored elementMetadata slot Ped object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Ped-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Ped object — Ped-class","text":"id character vector id individuals. dadid character vector id father individuals. momid character vector id mother individuals. sex ordered factor vector sex individuals (.e. male < female < unknown < terminated). famid character vector family identifiers individuals (optional). steril logical vector sterilisation status individuals (.e. FALSE = sterilised, TRUE = sterilised, NA = unknown). status logical vector affection status individuals (.e. FALSE = alive, TRUE = dead, NA = unknown). avail logical vector availability status individuals (.e. FALSE = available, TRUE = available, NA = unknown). affected logical vector affection status individuals (.e. FALSE = affected, TRUE = affected, NA = unknown). useful logical vector usefulness status individuals (.e. FALSE = useful, TRUE = useful). isinf logical vector indicating individual informative (.e. FALSE = informative, TRUE = informative). kin numeric vector minimal kinship value individuals useful individuals. num_child_tot numeric vector total number children individuals. num_child_dir numeric vector number children individuals. num_child_ind numeric vector number children individuals. elementMetadata DataFrame additional metadata columns Ped object. metadata Meta informations pedigree.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Ped-class.html","id":"accessors","dir":"Reference","previous_headings":"","what":"Accessors","title":"Ped object — Ped-class","text":"following accessors, x parameters Ped object. getters return vector length x values corresponding slot. getter, setter name, use slot(x) <- value. value parameter vector length x, except mcols() accessors value list data.frame elements length x. id(x) : Individuals identifiers dadid(x) : Individuals' father identifiers momid(x) : Individuals' mother identifiers famid(x) : Individuals' family identifiers sex(x) : Individuals' gender affected(x) : Individuals' affection status avail(x) : Individuals' availability status status(x) : Individuals' death status isinf(x) : Individuals' informativeness status kin(x) : Individuals' kinship distance informative individuals useful(x) : Individuals' usefullness status mcols(x) : Individuals' metadata","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Ped-class.html","id":"generics","dir":"Reference","previous_headings":"","what":"Generics","title":"Ped object — Ped-class","text":"summary(x): Compute summary Ped object show(x): Convert Ped object data.frame print summary. .list(x): Convert Ped object list metadata columns end. .data.frame(x): Convert Ped object data.frame metadata columns end. subset(x, , del_parents = FALSE, keep = TRUE): Subset Ped object based individuals identifiers given. : vector individuals identifiers keep. del_parents : value indicating parents individuals deleted. keep : logical value indicating individuals kept deleted.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Ped-class.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ped object — Ped-class","text":"","code":"data(sampleped) Ped(sampleped) #> Ped object with 55 individuals and 2 metadata columns: #> id dadid momid sex famid steril #> col_class #> 101 101 male 1 #> 102 102 female 1 #> 103 103 135 136 male 1 #> 104 104 female 1 #> 105 105 male 1 #> ... ... ... ... ... ... ... #> 210 210 203 204 male 2 #> 211 211 203 204 male 2 #> 212 212 209 208 female 2 #> 213 213 209 208 male 2 #> 214 214 209 208 male 2 #> status avail affected useful kin isinf #> col_class #> 101 FALSE #> 102 FALSE #> 103 FALSE #> 104 FALSE #> 105 FALSE #> ... ... ... ... ... ... ... #> 210 FALSE #> 211 TRUE #> 212 TRUE #> 213 FALSE #> 214 TRUE #> num_child_tot num_child_dir num_child_ind | affection num #> col_class #> 101 1 1 0 0 2 #> 102 1 1 0 1 3 #> 103 4 4 0 1 2 #> 104 4 4 0 0 4 #> 105 4 4 0 6 #> ... ... ... ... ... ... #> 210 0 0 0 0 2 #> 211 0 0 0 0 1 #> 212 0 0 0 0 3 #> 213 0 0 0 0 2 #> 214 0 0 0 1 0 Ped( obj = c(\"1\", \"2\", \"3\", \"4\", \"5\", \"6\"), dadid = c(\"4\", \"4\", \"6\", \"0\", \"0\", \"0\"), momid = c(\"5\", \"5\", \"5\", \"0\", \"0\", \"0\"), sex = c(1, 2, 3, 1, 2, 1), missid = \"0\" ) #> Ped object with 6 individuals and 0 metadata columns: #> id dadid momid sex famid steril #> col_class #> 1 1 4 5 male #> 2 2 4 5 female #> 3 3 6 5 unknown #> 4 4 male #> 5 5 female #> 6 6 male #> status avail affected useful kin isinf #> col_class #> 1 #> 2 #> 3 #> 4 #> 5 #> 6 #> num_child_tot num_child_dir num_child_ind #> col_class #> 1 0 0 0 #> 2 0 0 0 #> 3 0 0 0 #> 4 3 2 1 #> 5 3 3 0 #> 6 3 1 2"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Pedigree-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Pedigree object — Pedigree-class","title":"Pedigree object — Pedigree-class","text":"pedigree ensemble individuals linked family tree. Pedigree object store informations individuals special relationships . also permit store informations needed plot pedigree (.e. scales hints).","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Pedigree-class.html","id":"constructor-","dir":"Reference","previous_headings":"","what":"Constructor :","title":"Pedigree object — Pedigree-class","text":"Main constructor package. constructor help create Pedigree object different data.frame set vectors. errors found data, function return data.frame errors Ped object Rel object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Pedigree-class.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Pedigree object — Pedigree-class","text":"","code":"Pedigree(obj, ...) # S4 method for class 'character_OR_integer' Pedigree( obj, dadid, momid, sex, famid = NA, avail = NULL, affected = NULL, status = NULL, steril = NULL, rel_df = NULL, missid = NA_character_, col_aff = \"affection\", normalize = TRUE, ... ) # S4 method for class 'data.frame' Pedigree( obj = data.frame(indId = character(), fatherId = character(), motherId = character(), gender = numeric(), family = character(), available = numeric(), vitalStatus = numeric(), affection = numeric(), sterilisation = numeric()), rel_df = data.frame(id1 = character(), id2 = character(), code = numeric(), famid = character()), cols_ren_ped = list(indId = \"id\", fatherId = \"dadid\", motherId = \"momid\", family = \"famid\", gender = \"sex\", sterilisation = \"steril\", affection = \"affected\", available = \"avail\", vitalStatus = \"status\"), cols_ren_rel = list(id1 = \"indId1\", id2 = \"indId2\", famid = \"family\"), hints = list(horder = NULL, spouse = NULL), normalize = TRUE, missid = NA_character_, col_aff = \"affection\", na_strings = c(\"NA\", \"N/A\", \"None\", \"none\", \"null\", \"NULL\"), ... )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Pedigree-class.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Pedigree object — Pedigree-class","text":"obj vector individuals identifiers data.frame individuals informations. See Ped() informations. ... Arguments passed generate_colors dadid vector containing subject, identifiers biologicals fathers. momid vector containing subject, identifiers biologicals mothers. sex character, factor numeric vector corresponding gender individuals. transformed ordered factor following levels: male < female < unknown < terminated following values recognized: character() factor() : \"f\", \"m\", \"woman\", \"man\", \"male\", \"female\", \"unknown\", \"terminated\" numeric() : 1 = \"male\", 2 = \"female\", 3 = \"unknown\", 4 = \"terminated\" famid character vector family identifiers individuals. provide, aggregated individuals identifiers separated underscore. avail logical vector availability status individuals (.e. FALSE = available, TRUE = available, NA = unknown). affected logical vector affection status individuals (.e. FALSE = unaffected, TRUE = affected, NA = unknown). Can also data.frame length obj. matrix, converted data.frame columns named col_aff argument. status logical vector affection status individuals (.e. FALSE = alive, TRUE = dead, NA = unknown). steril logical vector sterilisation status individuals (.e. FALSE = sterilised, TRUE = sterilised, NA = unknown). rel_df data.frame special relationships individuals. See Rel() informations. minimum columns required id1, id2 code. famid column can also used specify family individuals. matrix given, columns needs ordered id1, id2, code famid. code values : 1 = Monozygotic twin 2 = Dizygotic twin 3 = twin unknown zygosity 4 = Spouse value relation code recognized function one defined rel_code_to_factor() function. missid character vector missing values identifiers. id, dadid momid corresponding values set NA_character_. col_aff character vector name column used affection status. normalize logical know data normalised. cols_ren_ped named list columns rename pedigree dataframe. useful want use dataframe different column names. names list new column names values old column names. default values used normalize = TRUE. cols_ren_rel named list columns rename relationship matrix. useful want use dataframe different column names. names list new column names values old column names. hints Hints object named list containing horder spouse. na_strings Vector strings considered NA values.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Pedigree-class.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Pedigree object — Pedigree-class","text":"Pedigree object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Pedigree-class.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Pedigree object — Pedigree-class","text":"normalization set TRUE, data standardized using function norm_ped() norm_rel(). data.frame given, columns names needed depend normalization selected . normalization selected, columns names needed follow columns names needed parenthesis: indID: individual identifier (id) fatherId: identifier biological father (dadid) motherId: identifier biological mother (momid) gender: sex individual (sex) family: family identifier individual (famid) sterilisation: sterilisation status individual (steril) available: availability status individual (avail) vitalStatus: death status individual (status) affection: affection status individual (affected) ...: columns stored elementMetadata slot minimum columns required : indID / id fatherId / dadid motherId / momid gender / sex family / famid column can also used specify family individuals merge indId / id field separated underscore. columns sterilisation, available, vitalStatus, affection transformed vect_to_binary() function normalisation selected. use normalisation, columns checked 0 1. affected data.frame, col_aff overwritten column names data.frame.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Pedigree-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Pedigree object — Pedigree-class","text":"ped Ped object identity informations. See Ped() informations. rel Rel object special relationships. See Rel() informations. scales Scales object filling bordering colors used plot. See Scales() informations. hints Hints object ordering individuals plot. See Hints() informations.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Pedigree-class.html","id":"accessors","dir":"Reference","previous_headings":"","what":"Accessors","title":"Pedigree object — Pedigree-class","text":"ped(x, slot) : Get value specific slot Ped object ped(x) : Get Ped object ped(x, slot) <- value : Set value specific slot Ped object Wrapper slot(ped(x)) <- value ped(x) <- value : Set Ped object mcols(x) : Get metadata Pedigree object. function wrapper around mcols(ped(x)). mcols(x) <- value : Set metadata Pedigree object. function wrapper around mcols(ped(x)) <- value. rel(x, slot) : Get value specific slot Rel object rel(x) : Get Rel object rel(x, slot) <- value : Set value specific slot Rel object Wrapper slot(rel(x)) <- value rel(x) <- value : Set Rel object scales(x) : Get Scales object scales(x) <- value : Set Scales object fill(x) : Get fill data.frame Scales object. Wrapper fill(scales(x)) fill(x) <- value : Set fill data.frame Scales object. Wrapper fill(scales(x)) <- value border(x) : Get border data.frame Scales object. Wrapper border(scales(x)) border(x) <- value : Set border data.frame Scales object. Wrapper border(scales(x)) <- value hints(x) : Get Hints object hints(x) <- value : Set Hints object horder(x) : Get horder vector Hints object. Wrapper horder(hints(x)) horder(x) <- value : Set horder vector Hints object. Wrapper horder(hints(x)) <- value spouse(x) : Get spouse data.frame Hints object. Wrapper spouse(hints(x)). spouse(x) <- value : Set spouse data.frame Hints object. Wrapper spouse(hints(x)) <- value.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Pedigree-class.html","id":"generics","dir":"Reference","previous_headings":"","what":"Generics","title":"Pedigree object — Pedigree-class","text":"length(x): Get length Pedigree object. Wrapper length(ped(x)). show(x): Print information Ped Rel object inside Pedigree object. summary(x): Compute summary Ped Rel object inside Pedigree object. .list(x): Convert Pedigree object list subset(x, , keep = TRUE): Subset Pedigree object based individuals identifiers given. : vector individuals identifiers keep. del_parents : logical value indicating parents individuals deleted. keep : logical value indicating individuals kept deleted. x[, del_parents, keep]: Subset Pedigree object based individuals identifiers given.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Pedigree-class.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Pedigree object — Pedigree-class","text":"","code":"Pedigree( obj = c(\"1\", \"2\", \"3\", \"4\", \"5\", \"6\"), dadid = c(\"4\", \"4\", \"6\", \"0\", \"0\", \"0\"), momid = c(\"5\", \"5\", \"5\", \"0\", \"0\", \"0\"), sex = c(1, 2, 3, 1, 2, 1), avail = c(0, 1, 0, 1, 0, 1), affected = matrix(c( 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1 ), ncol = 2), col_aff = c(\"aff1\", \"aff2\"), missid = \"0\", rel_df = matrix(c( \"1\", \"2\", 2 ), ncol = 3, byrow = TRUE), ) #> Pedigree object with: #> Ped object with 6 individuals and 15 metadata columns: #> id dadid momid sex famid steril #> col_class #> 1 1 4 5 male #> 2 2 4 5 female #> 3 3 6 5 unknown #> 4 4 male #> 5 5 female #> 6 6 male #> status avail affected useful kin isinf #> col_class #> 1 FALSE TRUE #> 2 TRUE TRUE #> 3 FALSE TRUE #> 4 TRUE TRUE #> 5 FALSE TRUE #> 6 TRUE TRUE #> num_child_tot num_child_dir num_child_ind | family indId #> col_class #> 1 0 0 0 0 1 #> 2 0 0 0 0 2 #> 3 0 0 0 0 3 #> 4 3 2 1 0 4 #> 5 3 3 0 0 5 #> 6 3 1 2 0 6 #> fatherId motherId gender V1 V2 #> col_class #> 1 4 5 1 0 1 #> 2 4 5 2 1 1 #> 3 6 5 3 0 1 #> 4 0 0 1 1 1 #> 5 0 0 2 0 1 #> 6 0 0 1 1 1 #> available error sterilisation vitalStatus affection #> col_class #> 1 0 #> 2 1 #> 3 0 #> 4 1 #> 5 0 #> 6 1 #> V1_mods avail_mods V2_mods #> col_class #> 1 0 0 1 #> 2 1 1 1 #> 3 0 0 1 #> 4 1 1 1 #> 5 0 0 1 #> 6 1 1 1 #> Rel object with 1 relationshipwith 0 MZ twin, 1 DZ twin, 0 UZ twin, 0 Spouse: #> id1 id2 code famid #> #> 1 1 2 DZ twin data(sampleped) Pedigree(sampleped) #> Pedigree object with: #> Ped object with 55 individuals and 13 metadata columns: #> id dadid momid sex famid steril #> col_class #> 1_101 1_101 male 1 #> 1_102 1_102 female 1 #> 1_103 1_103 1_135 1_136 male 1 #> 1_104 1_104 female 1 #> 1_105 1_105 male 1 #> ... ... ... ... ... ... ... #> 2_210 2_210 2_203 2_204 male 2 #> 2_211 2_211 2_203 2_204 male 2 #> 2_212 2_212 2_209 2_208 female 2 #> 2_213 2_213 2_209 2_208 male 2 #> 2_214 2_214 2_209 2_208 male 2 #> status avail affected useful kin isinf #> col_class #> 1_101 FALSE FALSE #> 1_102 FALSE TRUE #> 1_103 FALSE TRUE #> 1_104 FALSE FALSE #> 1_105 FALSE #> ... ... ... ... ... ... ... #> 2_210 FALSE FALSE #> 2_211 TRUE FALSE #> 2_212 TRUE FALSE #> 2_213 FALSE FALSE #> 2_214 TRUE TRUE #> num_child_tot num_child_dir num_child_ind | family indId #> col_class #> 1_101 1 1 0 1 101 #> 1_102 1 1 0 1 102 #> 1_103 4 4 0 1 103 #> 1_104 4 4 0 1 104 #> 1_105 4 4 0 1 105 #> ... ... ... ... ... ... #> 2_210 0 0 0 2 210 #> 2_211 0 0 0 2 211 #> 2_212 0 0 0 2 212 #> 2_213 0 0 0 2 213 #> 2_214 0 0 0 2 214 #> fatherId motherId gender affection available #> col_class #> 1_101 1 0 0 #> 1_102 2 1 0 #> 1_103 135 136 1 1 0 #> 1_104 2 0 0 #> 1_105 1 0 #> ... ... ... ... ... ... #> 2_210 203 204 1 0 0 #> 2_211 203 204 1 0 1 #> 2_212 209 208 2 0 1 #> 2_213 209 208 1 0 0 #> 2_214 209 208 1 1 1 #> num error sterilisation vitalStatus affection_mods #> col_class #> 1_101 2 0 #> 1_102 3 1 #> 1_103 2 1 #> 1_104 4 0 #> 1_105 6 NA #> ... ... ... ... ... ... #> 2_210 2 0 #> 2_211 1 0 #> 2_212 3 0 #> 2_213 2 0 #> 2_214 0 1 #> avail_mods #> col_class #> 1_101 0 #> 1_102 0 #> 1_103 0 #> 1_104 0 #> 1_105 0 #> ... ... #> 2_210 0 #> 2_211 1 #> 2_212 1 #> 2_213 0 #> 2_214 1 #> Rel object with 0 relationshipswith 0 MZ twin, 0 DZ twin, 0 UZ twin, 0 Spouse: #> id1 id2 code famid #> "},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Pedixplorer_package.html","id":null,"dir":"Reference","previous_headings":"","what":"The Pedixplorer package for pedigree data — Pedixplorer-package","title":"The Pedixplorer package for pedigree data — Pedixplorer-package","text":"Pedixplorer package pedigree data updated package kinship2 package. kinship2 package originally written Terry Therneau Jason Sinnwell. Pedixplorer package fork kinship2 package additional functionality bug fixes.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Pedixplorer_package.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"The Pedixplorer package for pedigree data — Pedixplorer-package","text":"package download, NEWS, README available CRAN: Kinship2 previous version package.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Pedixplorer_package.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"The Pedixplorer package for pedigree data — Pedixplorer-package","text":"listed widely used functions available arsenal: Pedigree(): Contstructor Pedigree class, given identifiers, sex, affection status(es), special relationships kinship(): Calculates kinship matrix, probability allele sampled two individuals via IBD. plot() : Method transform Pedigree object graphical plot. Allows extra information included id plot symbol. method use plot_fromdf() function transform Pedigree object data frame graphical elements, done legend ped_to_legdf() function. done, data frames plotted plot_fromdf() function. shrink(): Shrink Pedigree specific bit size, removing non-informative members first. bit_size(): Approximate output SAS's PROC FREQ procedure using /list option TABLE statement.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Pedixplorer_package.html","id":"data","dir":"Reference","previous_headings":"","what":"Data","title":"The Pedixplorer package for pedigree data — Pedixplorer-package","text":"sampleped(): Pedigree example data sets two pedigrees minnbreast(): Larger cohort pedigrees MN breast cancer study","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Pedixplorer_package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"The Pedixplorer package for pedigree data — Pedixplorer-package","text":"Maintainer: Louis Le Nézet louislenezet@gmail.com (ORCID) [contributor] Authors: Jason Sinnwell sinnwell.jason@mayo.edu Terry Therneau contributors: Daniel Schaid [contributor] Elizabeth Atkinson [contributor]","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Pedixplorer_package.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"The Pedixplorer package for pedigree data — Pedixplorer-package","text":"","code":"library(Pedixplorer)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Rel-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Rel object — Rel-class","title":"Rel object — Rel-class","text":"S4 class represent special relationships Pedigree.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Rel-class.html","id":"constructor-","dir":"Reference","previous_headings":"","what":"Constructor :","title":"Rel object — Rel-class","text":"either need provide vector size slot data.frame corresponding columns.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Rel-class.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Rel object — Rel-class","text":"","code":"# S4 method for class 'data.frame' Rel(obj) # S4 method for class 'character_OR_integer' Rel(obj, id2, code, famid = NA_character_)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Rel-class.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rel object — Rel-class","text":"obj character vector id first individuals pairs data.frame informations corresponding columns. id2 character vector id second individuals pairs code character, factor numeric vector corresponding relation code individuals: MZ twin = Monozygotic twin DZ twin = Dizygotic twin UZ twin = twin unknown zygosity Spouse = Spouse following values recognized: character() factor() : \"MZ twin\", \"DZ twin\", \"UZ twin\", \"Spouse\" without space words. case important. numeric() : 1 = \"MZ twin\", 2 = \"DZ twin\", 3 = \"UZ twin\", 4 = \"Spouse\" famid character vector family identifiers individuals. provide, aggregated individuals identifiers separated underscore.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Rel-class.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Rel object — Rel-class","text":"Rel object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Rel-class.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Rel object — Rel-class","text":"Rel object list special relationships individuals pedigree. used create Pedigree object. minimal needed informations id1, id2 code. famid provided, individuals id aggregated famid character ensure uniqueness id.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Rel-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Rel object — Rel-class","text":"id1 character vector id first individual. id2 character vector id second individual. code ordered factor vector code special relationship. (.e. MZ twin < DZ twin < UZ twin < Spouse). famid character vector famid individuals.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Rel-class.html","id":"accessors","dir":"Reference","previous_headings":"","what":"Accessors","title":"Rel object — Rel-class","text":"following accessors, x parameters Rel object. getters return vector length x values corresponding slot. code(x) : Relationships' code id1(x) : Relationships' first individuals' identifier id2(x) : Relationships' second individuals' identifier famid(x) : Relationships' individuals' family identifier famid(x) <- value : Set relationships' individuals' family identifier value : character integer vector length x family identifiers","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Rel-class.html","id":"generics","dir":"Reference","previous_headings":"","what":"Generics","title":"Rel object — Rel-class","text":"summary(x): Compute summary Rel object show(x): Convert Rel object data.frame print summary. .list(x): Convert Rel object list .data.frame(x): Convert Rel object data.frame subset(x, , keep = TRUE): Subset Rel object based individuals identifiers given. : vector individuals identifiers keep. keep : logical value indicating individuals kept deleted.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Rel-class.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Rel object — Rel-class","text":"","code":"rel_df <- data.frame( id1 = c(\"1\", \"2\", \"3\"), id2 = c(\"2\", \"3\", \"4\"), code = c(1, 2, 3) ) Rel(rel_df) #> Rel object with 3 relationshipswith 1 MZ twin, 1 DZ twin, 1 UZ twin, 0 Spouse: #> id1 id2 code famid #> #> 1 1 2 MZ twin #> 2 2 3 DZ twin #> 3 3 4 UZ twin Rel( obj = c(\"1\", \"2\", \"3\"), id2 = c(\"2\", \"3\", \"4\"), code = c(1, 2, 3) ) #> Rel object with 3 relationshipswith 1 MZ twin, 1 DZ twin, 1 UZ twin, 0 Spouse: #> id1 id2 code famid #> #> 1 1 2 MZ twin #> 2 2 3 DZ twin #> 3 3 4 UZ twin "},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Scales-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Scales object — Scales-class","title":"Scales object — Scales-class","text":"Scales object list two data.frame. first one used represent affection status individuals therefore filling individuals pedigree plot. second one used represent availability status individuals therefore border color individuals pedigree plot.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Scales-class.html","id":"constructor-","dir":"Reference","previous_headings":"","what":"Constructor :","title":"Scales object — Scales-class","text":"need provide fill border dedicated parameters. However usually done using generate_colors() function Pedigree object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Scales-class.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scales object — Scales-class","text":"","code":"Scales(fill, border) # S4 method for class 'data.frame,data.frame' Scales(fill, border)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Scales-class.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scales object — Scales-class","text":"fill data.frame informations affection status. columns needed : 'order': order affection used 'column_values': name column containing raw values Ped object 'column_mods': name column containing mods transformed values Ped object 'mods': different mods 'labels': corresponding labels mods 'affected': logical value indicating mod correspond affected individuals 'fill': color use mods 'density': density shading 'angle': angle shading border data.frame informations availability status. columns needed : 'column_values': name column containing raw values Ped object 'column_mods': name column containing mods transformed values Ped object 'mods': different mods 'labels': corresponding labels mods 'border': color use mods","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Scales-class.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Scales object — Scales-class","text":"Scales object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Scales-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Scales object — Scales-class","text":"fill data.frame informations affection status. columns needed : 'order': order affection used 'column_values': name column containing raw values Ped object 'column_mods': name column containing mods transformed values Ped object 'mods': different mods 'labels': corresponding labels mods 'affected': logical value indicating mod correspond affected individuals 'fill': color use mods 'density': density shading 'angle': angle shading border data.frame informations availability status. columns needed : 'column_values': name column containing raw values Ped object 'column_mods': name column containing mods transformed values Ped object 'mods': different mods 'labels': corresponding labels mods 'border': color use mods","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Scales-class.html","id":"accessors","dir":"Reference","previous_headings":"","what":"Accessors","title":"Scales object — Scales-class","text":"fill(x) : Get fill data.frame fill(x) <- value : Set fill data.frame border(x) : Get border data.frame border(x) <- value : Set border data.frame Scales object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Scales-class.html","id":"generics","dir":"Reference","previous_headings":"","what":"Generics","title":"Scales object — Scales-class","text":".list(x): Convert Scales object list","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Scales-class.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Scales object — Scales-class","text":"","code":"Scales( fill = data.frame( order = 1, column_values = \"affected\", column_mods = \"affected_mods\", mods = c(0, 1), labels = c(\"unaffected\", \"affected\"), affected = c(FALSE, TRUE), fill = c(\"white\", \"red\"), density = c(NA, 20), angle = c(NA, 45) ), border = data.frame( column_values = \"avail\", column_mods = \"avail_mods\", mods = c(0, 1), labels = c(\"not available\", \"available\"), border = c(\"black\", \"blue\") ) ) #> An object of class \"Scales\" #> Slot \"fill\": #> order column_values column_mods mods labels affected fill density #> 1 1 affected affected_mods 0 unaffected FALSE white NA #> 2 1 affected affected_mods 1 affected TRUE red 20 #> angle #> 1 NA #> 2 45 #> #> Slot \"border\": #> column_values column_mods mods labels border #> 1 avail avail_mods 0 not available black #> 2 avail avail_mods 1 available blue #>"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/align.html","id":null,"dir":"Reference","previous_headings":"","what":"Align a Pedigree object — align","title":"Align a Pedigree object — align","text":"Given Pedigree, function creates helper matrices describe layout plot Pedigree.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/align.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Align a Pedigree object — align","text":"","code":"# S4 method for class 'Pedigree' align( obj, packed = TRUE, width = 10, align = TRUE, hints = NULL, missid = \"NA_character_\", align_parents = TRUE, force = FALSE, precision = 2 )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/align.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Align a Pedigree object — align","text":"obj Pedigree object packed Pedigree compressed. (.e. allow diagonal lines connecting parents children order smaller overall width plot.) width packed output, minimum width plot, inches. align packed Pedigree, align children parents TRUE, extent possible given page width, align left margin FALSE. argument can two element vector, giving alignment parameters, logical value. TRUE, default c(1.5, 2), numeric routine alignped4() called. hints Hints object named list containing horder spouse. NULL Hints stored obj used. missid character vector missing values identifiers. id, dadid momid corresponding values set NA_character_. align_parents align_parents = TRUE, go one step try make parents child depth. (always possible). helps drawing program lining pedigrees 'join middle' via marriage. force force = TRUE, function return depth minus min(depth) depth reach state founders possible. precision number decimal places round solution .","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/align.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Align a Pedigree object — align","text":"list components n: vector giving number subjects horizonal level plot nid: matrix one row level, giving numeric id subject plotted. (value 17 means 17th subject Pedigree). pos: matrix giving horizontal position plot point fam: matrix giving family id plot point. value 3 mean two subjects positions 3 4, row , subject's parents. spouse: matrix values 0 = spouse 1 = subject plotted immediate right spouse 2 = subject plotted immediate right inbred spouse twins: Optional matrix present Pedigree contains twins : 0 = twin 1 = sibling right monozygotic twin 2 = sibling right dizygotic twin 3 = sibling right twin unknown zygosity","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/align.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Align a Pedigree object — align","text":"internal routine, used almost exclusively ped_to_plotdf(). subservient functions auto_hint(), alignped1(), alignped2(), alignped3(), alignped4() contain bulk computation. hints missing auto_hint() routine called supply initial guess. multiple families present obj Pedigree, routine called family, results combined list returned. information can read associated vignette: vignette(\"pedigree_alignment\").","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/align.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Align a Pedigree object — align","text":"","code":"data(sampleped) ped <- Pedigree(sampleped) align(ped) #> $`1` #> $`1`$n #> [1] 2 10 16 14 #> #> $`1`$nid #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] #> [1,] 35 36 0 0 0 0 0 0 0 0 0 0 0 0 #> [2,] 1 2 3 4 37 38 5 6 7 8 0 0 0 0 #> [3,] 9 10 11 12 14 39 40 41 14 15 12 18 17 16 #> [4,] 21 22 23 24 27 28 25 26 29 30 31 32 33 34 #> [,15] [,16] #> [1,] 0 0 #> [2,] 0 0 #> [3,] 19 20 #> [4,] 0 0 #> #> $`1`$pos #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] #> [1,] 3.8 4.8 0.0 0.0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 #> [2,] 0.0 1.0 2.8 3.8 4.80 5.80 11.25 12.25 14.01 15.01 0.00 0.00 0.00 #> [3,] 0.0 1.0 2.0 3.0 4.00 5.00 6.00 7.00 8.00 9.00 10.00 11.00 12.00 #> [4,] 0.0 1.0 2.0 3.0 6.01 7.01 8.01 9.01 10.01 11.01 12.01 13.01 14.01 #> [,14] [,15] [,16] #> [1,] 0.00 0 0 #> [2,] 0.00 0 0 #> [3,] 13.00 14 15 #> [4,] 15.01 0 0 #> #> $`1`$fam #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] #> [1,] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [2,] 0 0 1 0 0 1 0 0 0 0 0 0 0 0 #> [3,] 1 3 3 3 3 5 5 5 0 7 0 7 0 7 #> [4,] 1 1 1 1 9 9 11 11 13 15 15 15 15 15 #> [,15] [,16] #> [1,] 0 0 #> [2,] 0 0 #> [3,] 7 9 #> [4,] 0 0 #> #> $`1`$spouse #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] #> [1,] 1 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [2,] 1 0 1 0 1 0 1 0 1 0 0 0 0 0 #> [3,] 1 0 0 0 0 0 0 0 1 0 1 0 1 0 #> [4,] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [,15] [,16] #> [1,] 0 0 #> [2,] 0 0 #> [3,] 1 0 #> [4,] 0 0 #> #> #> $`2` #> $`2`$n #> [1] 2 7 5 #> #> $`2`$nid #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 1 2 0 0 0 0 0 #> [2,] 3 4 5 6 7 9 8 #> [3,] 10 11 12 13 14 0 0 #> #> $`2`$pos #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 2.7 3.7 0.0 0.0 0.0 0 0 #> [2,] 0.0 1.0 2.0 3.0 4.0 5 6 #> [3,] 0.0 1.0 4.5 5.5 6.5 0 0 #> #> $`2`$fam #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 0 0 0 0 0 0 0 #> [2,] 0 1 1 1 1 0 1 #> [3,] 1 1 6 6 6 0 0 #> #> $`2`$spouse #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 1 0 0 0 0 0 0 #> [2,] 1 0 0 0 0 1 0 #> [3,] 0 0 0 0 0 0 0 #> #>"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped1.html","id":null,"dir":"Reference","previous_headings":"","what":"Alignment first routine — alignped1","title":"Alignment first routine — alignped1","text":"First alignment routine create subtree founded single subject though tree.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped1.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Alignment first routine — alignped1","text":"","code":"alignped1(idx, dadx, momx, level, horder, packed, spouselist)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped1.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Alignment first routine — alignped1","text":"idx Indexes subjects dadx Indexes fathers momx Indexes mothers level Vector level subject horder named numeric vector one element per subject Pedigree. determines relative horizontal order subjects within sibship, well relative order processing founder couples. (latter, female founders ordered though sisters). names vector individual identifiers. packed Pedigree compressed. (.e. allow diagonal lines connecting parents children order smaller overall width plot.) spouselist Matrix spouses 4 columns: 1: husband index 2: wife index 3: husband anchor 4: wife anchor","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped1.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Alignment first routine — alignped1","text":"list containing elements plot Pedigree. contains set matrices along spouselist matrix. latter marriages removed processed. n : vector giving number subjects horizonal level plot nid : matrix one row level, giving numeric id subject plotted. (value 17 means 17th subject Pedigree). pos : matrix giving horizontal position plot point fam : matrix giving family id plot point. value 3 mean two subjects positions 3 4, row , subject's parents. spouselist : Spouse matrix anchors informations","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped1.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Alignment first routine — alignped1","text":"routine nid array consists final nid array + 1/2 final spouse array. Note spouselist matrix contain spouse pairs yet processed. logic anchoring slightly tricky.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped1.html","id":"-anchoring-","dir":"Reference","previous_headings":"","what":"1. Anchoring:","title":"Alignment first routine — alignped1","text":"First, col 4 spouselist matrix 0, anchor first opportunity. Also note spouselist[, 3] == spouselist[, 4] husband anchor (just write possibilities).","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped1.html","id":"-return-values-initialization-","dir":"Reference","previous_headings":"","what":"2. Return values initialization:","title":"Alignment first routine — alignped1","text":"Create set 3 return structures, matrices 1 + nspouse columns. children routines widen result.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped1.html","id":"-create-lspouse-and-rspouse-","dir":"Reference","previous_headings":"","what":"3. Create lspouse and rspouse:","title":"Alignment first routine — alignped1","text":"two complimentary lists denote spouses plotted left right. someone lots spouses try split evenly. number spouses odd, men right left, women right. hints spouselist matrix override. put undecided marriages closest idx, add predetermined ones left right. majority marriages undetermined singletons, nleft 1 female (put husband left) 0 male. one bug found plotting canine data, lspouse initially empty length(rspouse) > 1. caused nleft > length(indx). fix let indx indexed beyond length, fix JPS 5/2013.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped1.html","id":"-list-the-children-","dir":"Reference","previous_headings":"","what":"4. List the children:","title":"Alignment first routine — alignped1","text":"spouse get list children. call alignped2() generate tree mark connection parent. multiple marriages children need join trees.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped1.html","id":"-splice-the-tree-","dir":"Reference","previous_headings":"","what":"5. Splice the tree:","title":"Alignment first routine — alignped1","text":"finish need splice together tree made kids, data lev + 1 , data . 3 cases: children found. tree wider tree , case add data level onto . tree narrower, instance child.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped1.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Alignment first routine — alignped1","text":"","code":"data(sampleped) ped <- Pedigree(sampleped) align(ped) #> $`1` #> $`1`$n #> [1] 2 10 16 14 #> #> $`1`$nid #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] #> [1,] 35 36 0 0 0 0 0 0 0 0 0 0 0 0 #> [2,] 1 2 3 4 37 38 5 6 7 8 0 0 0 0 #> [3,] 9 10 11 12 14 39 40 41 14 15 12 18 17 16 #> [4,] 21 22 23 24 27 28 25 26 29 30 31 32 33 34 #> [,15] [,16] #> [1,] 0 0 #> [2,] 0 0 #> [3,] 19 20 #> [4,] 0 0 #> #> $`1`$pos #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] #> [1,] 3.8 4.8 0.0 0.0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 #> [2,] 0.0 1.0 2.8 3.8 4.80 5.80 11.25 12.25 14.01 15.01 0.00 0.00 0.00 #> [3,] 0.0 1.0 2.0 3.0 4.00 5.00 6.00 7.00 8.00 9.00 10.00 11.00 12.00 #> [4,] 0.0 1.0 2.0 3.0 6.01 7.01 8.01 9.01 10.01 11.01 12.01 13.01 14.01 #> [,14] [,15] [,16] #> [1,] 0.00 0 0 #> [2,] 0.00 0 0 #> [3,] 13.00 14 15 #> [4,] 15.01 0 0 #> #> $`1`$fam #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] #> [1,] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [2,] 0 0 1 0 0 1 0 0 0 0 0 0 0 0 #> [3,] 1 3 3 3 3 5 5 5 0 7 0 7 0 7 #> [4,] 1 1 1 1 9 9 11 11 13 15 15 15 15 15 #> [,15] [,16] #> [1,] 0 0 #> [2,] 0 0 #> [3,] 7 9 #> [4,] 0 0 #> #> $`1`$spouse #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] #> [1,] 1 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [2,] 1 0 1 0 1 0 1 0 1 0 0 0 0 0 #> [3,] 1 0 0 0 0 0 0 0 1 0 1 0 1 0 #> [4,] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [,15] [,16] #> [1,] 0 0 #> [2,] 0 0 #> [3,] 1 0 #> [4,] 0 0 #> #> #> $`2` #> $`2`$n #> [1] 2 7 5 #> #> $`2`$nid #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 1 2 0 0 0 0 0 #> [2,] 3 4 5 6 7 9 8 #> [3,] 10 11 12 13 14 0 0 #> #> $`2`$pos #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 2.7 3.7 0.0 0.0 0.0 0 0 #> [2,] 0.0 1.0 2.0 3.0 4.0 5 6 #> [3,] 0.0 1.0 4.5 5.5 6.5 0 0 #> #> $`2`$fam #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 0 0 0 0 0 0 0 #> [2,] 0 1 1 1 1 0 1 #> [3,] 1 1 6 6 6 0 0 #> #> $`2`$spouse #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 1 0 0 0 0 0 0 #> [2,] 1 0 0 0 0 1 0 #> [3,] 0 0 0 0 0 0 0 #> #>"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped2.html","id":null,"dir":"Reference","previous_headings":"","what":"Alignment second routine — alignped2","title":"Alignment second routine — alignped2","text":"Second four co-routines takes collection siblings, grows tree , appends side side single tree.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Alignment second routine — alignped2","text":"","code":"alignped2(idx, dadx, momx, level, horder, packed, spouselist)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Alignment second routine — alignped2","text":"idx Indexes subjects dadx Indexes fathers momx Indexes mothers level Vector level subject horder named numeric vector one element per subject Pedigree. determines relative horizontal order subjects within sibship, well relative order processing founder couples. (latter, female founders ordered though sisters). names vector individual identifiers. packed Pedigree compressed. (.e. allow diagonal lines connecting parents children order smaller overall width plot.) spouselist Matrix spouses 4 columns: 1: husband index 2: wife index 3: husband anchor 4: wife anchor","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Alignment second routine — alignped2","text":"list containing elements plot Pedigree. contains set matrices along spouselist matrix. latter marriages removed processed. n : vector giving number subjects horizonal level plot nid : matrix one row level, giving numeric id subject plotted. (value 17 means 17th subject Pedigree). pos : matrix giving horizontal position plot point fam : matrix giving family id plot point. value 3 mean two subjects positions 3 4, row , subject's parents. spouselist : Spouse matrix anchors informations","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped2.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Alignment second routine — alignped2","text":"input arguments alignped1() exception idx vector. routine nothing spouselist matrix, needs pass tree back since one routines called alignped2() might change matrix. code one non-obvious special case. Suppose two sibs marry. first sib processed alignped1 partners (children) added rval structure . second sib processed come back 1 element tree (marriage longer spouselist), added onto rval. rule thus add 1 element tree whose value (must idx[] already rval structure level.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Alignment second routine — alignped2","text":"","code":"data(sampleped) ped <- Pedigree(sampleped) align(ped) #> $`1` #> $`1`$n #> [1] 2 10 16 14 #> #> $`1`$nid #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] #> [1,] 35 36 0 0 0 0 0 0 0 0 0 0 0 0 #> [2,] 1 2 3 4 37 38 5 6 7 8 0 0 0 0 #> [3,] 9 10 11 12 14 39 40 41 14 15 12 18 17 16 #> [4,] 21 22 23 24 27 28 25 26 29 30 31 32 33 34 #> [,15] [,16] #> [1,] 0 0 #> [2,] 0 0 #> [3,] 19 20 #> [4,] 0 0 #> #> $`1`$pos #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] #> [1,] 3.8 4.8 0.0 0.0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 #> [2,] 0.0 1.0 2.8 3.8 4.80 5.80 11.25 12.25 14.01 15.01 0.00 0.00 0.00 #> [3,] 0.0 1.0 2.0 3.0 4.00 5.00 6.00 7.00 8.00 9.00 10.00 11.00 12.00 #> [4,] 0.0 1.0 2.0 3.0 6.01 7.01 8.01 9.01 10.01 11.01 12.01 13.01 14.01 #> [,14] [,15] [,16] #> [1,] 0.00 0 0 #> [2,] 0.00 0 0 #> [3,] 13.00 14 15 #> [4,] 15.01 0 0 #> #> $`1`$fam #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] #> [1,] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [2,] 0 0 1 0 0 1 0 0 0 0 0 0 0 0 #> [3,] 1 3 3 3 3 5 5 5 0 7 0 7 0 7 #> [4,] 1 1 1 1 9 9 11 11 13 15 15 15 15 15 #> [,15] [,16] #> [1,] 0 0 #> [2,] 0 0 #> [3,] 7 9 #> [4,] 0 0 #> #> $`1`$spouse #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] #> [1,] 1 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [2,] 1 0 1 0 1 0 1 0 1 0 0 0 0 0 #> [3,] 1 0 0 0 0 0 0 0 1 0 1 0 1 0 #> [4,] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [,15] [,16] #> [1,] 0 0 #> [2,] 0 0 #> [3,] 1 0 #> [4,] 0 0 #> #> #> $`2` #> $`2`$n #> [1] 2 7 5 #> #> $`2`$nid #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 1 2 0 0 0 0 0 #> [2,] 3 4 5 6 7 9 8 #> [3,] 10 11 12 13 14 0 0 #> #> $`2`$pos #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 2.7 3.7 0.0 0.0 0.0 0 0 #> [2,] 0.0 1.0 2.0 3.0 4.0 5 6 #> [3,] 0.0 1.0 4.5 5.5 6.5 0 0 #> #> $`2`$fam #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 0 0 0 0 0 0 0 #> [2,] 0 1 1 1 1 0 1 #> [3,] 1 1 6 6 6 0 0 #> #> $`2`$spouse #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 1 0 0 0 0 0 0 #> [2,] 1 0 0 0 0 1 0 #> [3,] 0 0 0 0 0 0 0 #> #>"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped3.html","id":null,"dir":"Reference","previous_headings":"","what":"Alignment third routine — alignped3","title":"Alignment third routine — alignped3","text":"Third four co-routines merges two pedigree trees side side single object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped3.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Alignment third routine — alignped3","text":"","code":"alignped3(alt1, alt2, packed, space = 1)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped3.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Alignment third routine — alignped3","text":"alt1 Alignment first tree alt2 Alignment second tree packed Pedigree compressed. (.e. allow diagonal lines connecting parents children order smaller overall width plot.) space Space two subjects","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped3.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Alignment third routine — alignped3","text":"list containing elements plot Pedigree. contains set matrices along spouselist matrix. latter marriages removed processed. n : vector giving number subjects horizonal level plot nid : matrix one row level, giving numeric id subject plotted. (value 17 means 17th subject Pedigree). pos : matrix giving horizontal position plot point fam : matrix giving family id plot point. value 3 mean two subjects positions 3 4, row , subject's parents. spouselist : Spouse matrix anchors informations","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped3.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Alignment third routine — alignped3","text":"primary special case rightmost person left tree leftmost person right tree; need plot two copies person side side. (initializing output structures worry , harm column bigger finally needed.) Beyond work simple book keeping.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped3.html","id":"-slide-","dir":"Reference","previous_headings":"","what":"1. Slide:","title":"Alignment third routine — alignped3","text":"unpacked case, traditional way draw Pedigree can assume paper infinitely wide, parents centered children. case think two trees merged solid blocks. input left margin 0. Compute far slide right tree.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped3.html","id":"-merge-","dir":"Reference","previous_headings":"","what":"2. Merge:","title":"Alignment third routine — alignped3","text":"Now merge two trees. Start top level work .","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped3.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Alignment third routine — alignped3","text":"","code":"data(sampleped) ped <- Pedigree(sampleped) align(ped) #> $`1` #> $`1`$n #> [1] 2 10 16 14 #> #> $`1`$nid #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] #> [1,] 35 36 0 0 0 0 0 0 0 0 0 0 0 0 #> [2,] 1 2 3 4 37 38 5 6 7 8 0 0 0 0 #> [3,] 9 10 11 12 14 39 40 41 14 15 12 18 17 16 #> [4,] 21 22 23 24 27 28 25 26 29 30 31 32 33 34 #> [,15] [,16] #> [1,] 0 0 #> [2,] 0 0 #> [3,] 19 20 #> [4,] 0 0 #> #> $`1`$pos #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] #> [1,] 3.8 4.8 0.0 0.0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 #> [2,] 0.0 1.0 2.8 3.8 4.80 5.80 11.25 12.25 14.01 15.01 0.00 0.00 0.00 #> [3,] 0.0 1.0 2.0 3.0 4.00 5.00 6.00 7.00 8.00 9.00 10.00 11.00 12.00 #> [4,] 0.0 1.0 2.0 3.0 6.01 7.01 8.01 9.01 10.01 11.01 12.01 13.01 14.01 #> [,14] [,15] [,16] #> [1,] 0.00 0 0 #> [2,] 0.00 0 0 #> [3,] 13.00 14 15 #> [4,] 15.01 0 0 #> #> $`1`$fam #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] #> [1,] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [2,] 0 0 1 0 0 1 0 0 0 0 0 0 0 0 #> [3,] 1 3 3 3 3 5 5 5 0 7 0 7 0 7 #> [4,] 1 1 1 1 9 9 11 11 13 15 15 15 15 15 #> [,15] [,16] #> [1,] 0 0 #> [2,] 0 0 #> [3,] 7 9 #> [4,] 0 0 #> #> $`1`$spouse #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] #> [1,] 1 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [2,] 1 0 1 0 1 0 1 0 1 0 0 0 0 0 #> [3,] 1 0 0 0 0 0 0 0 1 0 1 0 1 0 #> [4,] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [,15] [,16] #> [1,] 0 0 #> [2,] 0 0 #> [3,] 1 0 #> [4,] 0 0 #> #> #> $`2` #> $`2`$n #> [1] 2 7 5 #> #> $`2`$nid #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 1 2 0 0 0 0 0 #> [2,] 3 4 5 6 7 9 8 #> [3,] 10 11 12 13 14 0 0 #> #> $`2`$pos #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 2.7 3.7 0.0 0.0 0.0 0 0 #> [2,] 0.0 1.0 2.0 3.0 4.0 5 6 #> [3,] 0.0 1.0 4.5 5.5 6.5 0 0 #> #> $`2`$fam #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 0 0 0 0 0 0 0 #> [2,] 0 1 1 1 1 0 1 #> [3,] 1 1 6 6 6 0 0 #> #> $`2`$spouse #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 1 0 0 0 0 0 0 #> [2,] 1 0 0 0 0 1 0 #> [3,] 0 0 0 0 0 0 0 #> #>"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped4.html","id":null,"dir":"Reference","previous_headings":"","what":"Alignment fourth routine — alignped4","title":"Alignment fourth routine — alignped4","text":"Last routines attempts line children parents put spouses siblings \"close\" , extent possible within constraints page width.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped4.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Alignment fourth routine — alignped4","text":"","code":"alignped4(rval, spouse, level, width, align, precision = 2)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped4.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Alignment fourth routine — alignped4","text":"rval list components n, nid, pos, fam. spouse boolean matrix one row per level representing subject spouse . level Vector level subject width packed output, minimum width plot, inches. align packed Pedigree, align children parents TRUE, extent possible given page width, align left margin FALSE. argument can two element vector, giving alignment parameters, logical value. TRUE, default c(1.5, 2), numeric routine alignped4() called. precision number decimal places round solution .","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped4.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Alignment fourth routine — alignped4","text":"updated position matrix","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped4.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Alignment fourth routine — alignped4","text":"alignped4() routine final step alignment. current code necessary setup calls quadprog::solve.QP() function. two important parameters function: maximum width specified. smallest possible width maximum number subjects line. user suggestion low increased amount plus one (give just little wiggle room). align vector 2 alignment parameters b. set siblings x parents p_1 p_2 alignment penalty : $$(1/k^)\\sum_{=1}^{k} (x_i - (p_1 + p_2)/2)^2$$ k number siblings set. Using fact = 1 : $$\\sum(x_i-c)^2 = \\sum(x_i-\\mu)^2 + k(c-\\mu)^2$$ moving sibship k sibs one unit left right optimal incur cost moving one 1 two sibs place. = 0 large sibships harder move small ones. default value = 1.5, slightly easier move small ones. rationale default long parents somewhere first last siblings result looks fairly good, flexible spacing large family. tethering sibs single spot tend kept close . alignment penalty spouses \\(b(x_1 - x_2)^2\\), tends keep together. size b controls relative importance sib-parent spouse-spouse closeness. start adding penalties. total number parameters alignment problem (hand quadprog) set sum(n) positions. work array myid keeps track parameter number position easy find. one extra penalty added end. penalty amount final positions shifted constant, penalty matrix positive definite; solve.QP() like . add tiny amount leftward pull widest line. k subjects line k+1 constraints line. first point must \\(\\ge 0\\), subsequent one must least 1 unit right, final point must \\(\\le\\) max width.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped4.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Alignment fourth routine — alignped4","text":"","code":"data(sampleped) ped <- Pedigree(sampleped) align(ped) #> $`1` #> $`1`$n #> [1] 2 10 16 14 #> #> $`1`$nid #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] #> [1,] 35 36 0 0 0 0 0 0 0 0 0 0 0 0 #> [2,] 1 2 3 4 37 38 5 6 7 8 0 0 0 0 #> [3,] 9 10 11 12 14 39 40 41 14 15 12 18 17 16 #> [4,] 21 22 23 24 27 28 25 26 29 30 31 32 33 34 #> [,15] [,16] #> [1,] 0 0 #> [2,] 0 0 #> [3,] 19 20 #> [4,] 0 0 #> #> $`1`$pos #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] #> [1,] 3.8 4.8 0.0 0.0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 #> [2,] 0.0 1.0 2.8 3.8 4.80 5.80 11.25 12.25 14.01 15.01 0.00 0.00 0.00 #> [3,] 0.0 1.0 2.0 3.0 4.00 5.00 6.00 7.00 8.00 9.00 10.00 11.00 12.00 #> [4,] 0.0 1.0 2.0 3.0 6.01 7.01 8.01 9.01 10.01 11.01 12.01 13.01 14.01 #> [,14] [,15] [,16] #> [1,] 0.00 0 0 #> [2,] 0.00 0 0 #> [3,] 13.00 14 15 #> [4,] 15.01 0 0 #> #> $`1`$fam #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] #> [1,] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [2,] 0 0 1 0 0 1 0 0 0 0 0 0 0 0 #> [3,] 1 3 3 3 3 5 5 5 0 7 0 7 0 7 #> [4,] 1 1 1 1 9 9 11 11 13 15 15 15 15 15 #> [,15] [,16] #> [1,] 0 0 #> [2,] 0 0 #> [3,] 7 9 #> [4,] 0 0 #> #> $`1`$spouse #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] #> [1,] 1 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [2,] 1 0 1 0 1 0 1 0 1 0 0 0 0 0 #> [3,] 1 0 0 0 0 0 0 0 1 0 1 0 1 0 #> [4,] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [,15] [,16] #> [1,] 0 0 #> [2,] 0 0 #> [3,] 1 0 #> [4,] 0 0 #> #> #> $`2` #> $`2`$n #> [1] 2 7 5 #> #> $`2`$nid #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 1 2 0 0 0 0 0 #> [2,] 3 4 5 6 7 9 8 #> [3,] 10 11 12 13 14 0 0 #> #> $`2`$pos #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 2.7 3.7 0.0 0.0 0.0 0 0 #> [2,] 0.0 1.0 2.0 3.0 4.0 5 6 #> [3,] 0.0 1.0 4.5 5.5 6.5 0 0 #> #> $`2`$fam #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 0 0 0 0 0 0 0 #> [2,] 0 1 1 1 1 0 1 #> [3,] 1 1 6 6 6 0 0 #> #> $`2`$spouse #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 1 0 0 0 0 0 0 #> [2,] 1 0 0 0 0 1 0 #> [3,] 0 0 0 0 0 0 0 #> #>"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ancestors.html","id":null,"dir":"Reference","previous_headings":"","what":"Ancestors indexes of a subject — ancestors","title":"Ancestors indexes of a subject — ancestors","text":"Given index one multiple individual(s), function iterate mom dad indexes list ancestors said individual(s). function use align() function identify spouse pairs common ancestor therefore need connected double line (.e. inbred).","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ancestors.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ancestors indexes of a subject — ancestors","text":"","code":"ancestors(idx, momx, dadx)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ancestors.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ancestors indexes of a subject — ancestors","text":"idx Indexes subjects momx Indexes mothers dadx Indexes fathers","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ancestors.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Ancestors indexes of a subject — ancestors","text":"vector ancestor indexes","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ancestors.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ancestors indexes of a subject — ancestors","text":"","code":"ancestors(c(1), c(3, 4, 5, 6), c(7, 8, 9, 10)) #> [1] 3 5 7 9 ancestors(c(1, 2), c(3, 4, 5, 6), c(7, 8, 9, 10)) #> [1] 3 4 5 6 7 8 9 10"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/anchor_to_factor.html","id":null,"dir":"Reference","previous_headings":"","what":"Anchor variable to ordered factor — anchor_to_factor","title":"Anchor variable to ordered factor — anchor_to_factor","text":"Anchor variable ordered factor","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/anchor_to_factor.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Anchor variable to ordered factor — anchor_to_factor","text":"","code":"anchor_to_factor(anchor)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/anchor_to_factor.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Anchor variable to ordered factor — anchor_to_factor","text":"anchor character, factor numeric vector corresponding anchor individuals. following values recognized: character() factor() : \"0\", \"1\", \"2\", \"left\", \"right\", \"either\" numeric() : 1 = \"left\", 2 = \"right\", 0 = \"either\"","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/anchor_to_factor.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Anchor variable to ordered factor — anchor_to_factor","text":"ordered factor vector containing transformed variable \"either\" < \"left\" < \"right\"","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/anchor_to_factor.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Anchor variable to ordered factor — anchor_to_factor","text":"","code":"anchor_to_factor(c(1, 2, 0, \"left\", \"right\", \"either\")) #> [1] left right either left right either #> Levels: left < right < either"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/auto_hint.html","id":null,"dir":"Reference","previous_headings":"","what":"Initial hint for a Pedigree alignment — auto_hint","title":"Initial hint for a Pedigree alignment — auto_hint","text":"Compute initial guess alignment Pedigree","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/auto_hint.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Initial hint for a Pedigree alignment — auto_hint","text":"","code":"# S4 method for class 'Pedigree' auto_hint(obj, hints = NULL, packed = TRUE, align = FALSE, reset = FALSE)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/auto_hint.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Initial hint for a Pedigree alignment — auto_hint","text":"obj Pedigree object hints Hints object named list containing horder spouse. NULL Hints stored obj used. packed Pedigree compressed. (.e. allow diagonal lines connecting parents children order smaller overall width plot.) align packed Pedigree, align children parents TRUE, extent possible given page width, align left margin FALSE. argument can two element vector, giving alignment parameters, logical value. TRUE, default c(1.5, 2), numeric routine alignped4() called. reset TRUE, even Ped object Hints, reset initial values.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/auto_hint.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Initial hint for a Pedigree alignment — auto_hint","text":"initial Hints object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/auto_hint.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Initial hint for a Pedigree alignment — auto_hint","text":"Pedigree structure can contain Hints object helps reorder Pedigree (e.g. left--right order children within family) plot minimal distortion. routine used create initial version hints. can modified desired. routine normally called user. moves children within families, marriages \"edge\" set children, closest spouse. pedigrees single connection two families simple-minded approach works surprisingly well. complex structures hand-tuning hints may required. auto_hint() called vector numbers hints argument, values founder females used order founder families left right across plot. values within sibship used preliminary order siblings within family; may changed move one edge match spouse. actual values vector important, order.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/auto_hint.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Initial hint for a Pedigree alignment — auto_hint","text":"","code":"data(sampleped) ped <- Pedigree(sampleped[sampleped$famid == 1, ]) auto_hint(ped) #> An object of class \"Hints\" #> Slot \"horder\": #> 1_101 1_102 1_103 1_104 1_105 1_106 1_107 1_108 1_109 1_110 1_111 1_112 1_113 #> 1 2 3 4 5 6 7 8 1 1 2 3 1 #> 1_114 1_115 1_116 1_117 1_118 1_119 1_120 1_121 1_122 1_123 1_124 1_125 1_126 #> 4 1 3 9 2 4 10 1 2 3 4 5 6 #> 1_127 1_128 1_129 1_130 1_131 1_132 1_133 1_134 1_135 1_136 1_137 1_138 1_139 #> 7 8 9 10 11 12 13 14 2 3 10 11 11 #> 1_140 1_141 #> 12 13 #> #> Slot \"spouse\": #> idl idr anchor #> 1 1_112 1_118 right #> 2 1_114 1_115 right #> 3 1_109 1_110 left #>"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/best_hint.html","id":null,"dir":"Reference","previous_headings":"","what":"Best hint for a Pedigree alignment — best_hint","title":"Best hint for a Pedigree alignment — best_hint","text":"computer time cheap, use routine get best Pedigree alignment. routine try possible founder orders, return one least stress.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/best_hint.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Best hint for a Pedigree alignment — best_hint","text":"","code":"# S4 method for class 'Pedigree' best_hint(obj, wt = c(1000, 10, 1), tolerance = 0)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/best_hint.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Best hint for a Pedigree alignment — best_hint","text":"obj Pedigree object wt vector three weights three error measures. Default c(1000, 10, 1). number duplicate individuals plot sum absolute values differences positions duplicate individuals sum absolute values differences center children parents. tolerance maximum stress level accept. Default 0","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/best_hint.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Best hint for a Pedigree alignment — best_hint","text":"best Hints object permutations","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/best_hint.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Best hint for a Pedigree alignment — best_hint","text":"auto_hint() routine rearrange sibling order, founder order. calls auto_hint() every possible founder order, finds plot least \"stress\". stress computed weighted sum three error measures: nbArcs number duplicate individuals plot lgArcs sum absolute values differences positions duplicate individuals lgParentsChilds sum absolute values differences center children parents $$stress = wt[1] * nbArcs + wt[2] * lgArcs + wt[3] * lgParentsChilds $$ search, plot found stress level less tolerance, search terminated.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/best_hint.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Best hint for a Pedigree alignment — best_hint","text":"","code":"data(sampleped) ped <- Pedigree(sampleped[sampleped$famid == 1,]) best_hint(ped) #> An object of class \"Hints\" #> Slot \"horder\": #> 1_101 1_102 1_103 1_104 1_105 1_106 1_107 1_108 1_109 1_110 1_111 1_112 1_113 #> 1 1 3 4 5 3 7 4 9 1 2 3 13 #> 1_114 1_115 1_116 1_117 1_118 1_119 1_120 1_121 1_122 1_123 1_124 1_125 1_126 #> 4 1 3 17 2 4 20 21 22 23 24 25 26 #> 1_127 1_128 1_129 1_130 1_131 1_132 1_133 1_134 1_135 1_136 1_137 1_138 1_139 #> 27 28 29 30 31 32 33 34 35 2 37 38 39 #> 1_140 1_141 #> 40 41 #> #> Slot \"spouse\": #> idl idr anchor #> 1 1_112 1_118 right #> 2 1_114 1_115 right #> 3 1_109 1_110 left #>"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/bit_size.html","id":null,"dir":"Reference","previous_headings":"","what":"Bit size of a Pedigree — bit_size","title":"Bit size of a Pedigree — bit_size","text":"Utility function used shrink() function calculate bit size Pedigree.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/bit_size.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Bit size of a Pedigree — bit_size","text":"","code":"# S4 method for class 'character_OR_integer' bit_size(obj, momid, missid = NA_character_) # S4 method for class 'Pedigree' bit_size(obj) # S4 method for class 'Ped' bit_size(obj)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/bit_size.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Bit size of a Pedigree — bit_size","text":"obj Ped Pedigree object vector fathers identifiers momid vector containing subject, identifiers biologicals mothers. missid character vector missing values identifiers. id, dadid momid corresponding values set NA_character_.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/bit_size.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Bit size of a Pedigree — bit_size","text":"list following components: bit_size bit size Pedigree nFounder number founders Pedigree nNonFounder number non founders Pedigree","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/bit_size.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Bit size of a Pedigree — bit_size","text":"bit size Pedigree defined : $$ 2 \\times NbNonFounders - NbFounders $$ NbNonFounders number non founders Pedigree (.e. individuals identified parents) NbFounders number founders Pedigree (.e. individuals without identified parents).","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/bit_size.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Bit size of a Pedigree — bit_size","text":"","code":"data(sampleped) ped <- Pedigree(sampleped) bit_size(ped) #> $bit_size #> [1] 62 #> #> $nFounder #> [1] 16 #> #> $nNonFounder #> [1] 39 #>"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_columns.html","id":null,"dir":"Reference","previous_headings":"","what":"Check columns presence in a dataframe — check_columns","title":"Check columns presence in a dataframe — check_columns","text":"Check presence / absence columns names depending need","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_columns.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check columns presence in a dataframe — check_columns","text":"","code":"check_columns( df, cols_needed = NULL, cols_used = NULL, cols_to_use = NULL, others_cols = FALSE, cols_used_init = FALSE, cols_to_use_init = FALSE, cols_used_del = FALSE, verbose = FALSE )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_columns.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check columns presence in a dataframe — check_columns","text":"df dataframe use cols_needed vector columns needed cols_used vector columns used script overwritten. cols_to_use vector optional columns authorized. others_cols Boolean defining non defined columns allowed. cols_used_init Boolean defining columns used initialised NA. cols_to_use_init Boolean defining optional columns initialised NA. cols_used_del Boolean defining columns used deleted. verbose message prompted user","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_columns.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check columns presence in a dataframe — check_columns","text":"Dataframe column allowed column correctly initialised.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_columns.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Check columns presence in a dataframe — check_columns","text":"3 types columns checked: cols_needed : columns need present missing error prompted script stop cols_used : columns used script overwritten NA. cols_to_use : columns optional recognise present. last two types columns can initialised NA needed.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_columns.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check columns presence in a dataframe — check_columns","text":"","code":"data.frame #> function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE, #> fix.empty.names = TRUE, stringsAsFactors = FALSE) #> { #> data.row.names <- if (check.rows && is.null(row.names)) #> function(current, new, i) { #> if (is.character(current)) #> new <- as.character(new) #> if (is.character(new)) #> current <- as.character(current) #> if (anyDuplicated(new)) #> return(current) #> if (is.null(current)) #> return(new) #> if (all(current == new) || all(current == \"\")) #> return(new) #> stop(gettextf(\"mismatch of row names in arguments of 'data.frame', item %d\", #> i), domain = NA) #> } #> else function(current, new, i) { #> current %||% if (anyDuplicated(new)) { #> warning(gettextf(\"some row.names duplicated: %s --> row.names NOT used\", #> paste(which(duplicated(new)), collapse = \",\")), #> domain = NA) #> current #> } #> else new #> } #> object <- as.list(substitute(list(...)))[-1L] #> mirn <- missing(row.names) #> mrn <- is.null(row.names) #> x <- list(...) #> n <- length(x) #> if (n < 1L) { #> if (!mrn) { #> if (is.object(row.names) || !is.integer(row.names)) #> row.names <- as.character(row.names) #> if (anyNA(row.names)) #> stop(\"row names contain missing values\") #> if (anyDuplicated(row.names)) #> stop(gettextf(\"duplicate row.names: %s\", paste(unique(row.names[duplicated(row.names)]), #> collapse = \", \")), domain = NA) #> } #> else row.names <- integer() #> return(structure(list(), names = character(), row.names = row.names, #> class = \"data.frame\")) #> } #> vnames <- names(x) #> if (length(vnames) != n) #> vnames <- character(n) #> no.vn <- !nzchar(vnames) #> vlist <- vnames <- as.list(vnames) #> nrows <- ncols <- integer(n) #> for (i in seq_len(n)) { #> xi <- if (is.character(x[[i]]) || is.list(x[[i]])) #> as.data.frame(x[[i]], optional = TRUE, stringsAsFactors = stringsAsFactors) #> else as.data.frame(x[[i]], optional = TRUE) #> nrows[i] <- .row_names_info(xi) #> ncols[i] <- length(xi) #> namesi <- names(xi) #> if (ncols[i] > 1L) { #> if (length(namesi) == 0L) #> namesi <- seq_len(ncols[i]) #> vnames[[i]] <- if (no.vn[i]) #> namesi #> else paste(vnames[[i]], namesi, sep = \".\") #> } #> else if (length(namesi)) { #> vnames[[i]] <- namesi #> } #> else if (fix.empty.names && no.vn[[i]]) { #> tmpname <- deparse(object[[i]], nlines = 1L)[1L] #> if (startsWith(tmpname, \"I(\") && endsWith(tmpname, #> \")\")) { #> ntmpn <- nchar(tmpname, \"c\") #> tmpname <- substr(tmpname, 3L, ntmpn - 1L) #> } #> vnames[[i]] <- tmpname #> } #> if (mirn && nrows[i] > 0L) { #> rowsi <- attr(xi, \"row.names\") #> if (any(nzchar(rowsi))) #> row.names <- data.row.names(row.names, rowsi, #> i) #> } #> nrows[i] <- abs(nrows[i]) #> vlist[[i]] <- xi #> } #> nr <- max(nrows) #> for (i in seq_len(n)[nrows < nr]) { #> xi <- vlist[[i]] #> if (nrows[i] > 0L && (nr%%nrows[i] == 0L)) { #> xi <- unclass(xi) #> fixed <- TRUE #> for (j in seq_along(xi)) { #> xi1 <- xi[[j]] #> if (is.vector(xi1) || is.factor(xi1)) #> xi[[j]] <- rep(xi1, length.out = nr) #> else if (is.character(xi1) && inherits(xi1, \"AsIs\")) #> xi[[j]] <- structure(rep(xi1, length.out = nr), #> class = class(xi1)) #> else if (inherits(xi1, \"Date\") || inherits(xi1, #> \"POSIXct\")) #> xi[[j]] <- rep(xi1, length.out = nr) #> else { #> fixed <- FALSE #> break #> } #> } #> if (fixed) { #> vlist[[i]] <- xi #> next #> } #> } #> stop(gettextf(\"arguments imply differing number of rows: %s\", #> paste(unique(nrows), collapse = \", \")), domain = NA) #> } #> value <- unlist(vlist, recursive = FALSE, use.names = FALSE) #> vnames <- as.character(unlist(vnames[ncols > 0L])) #> if (fix.empty.names && any(noname <- !nzchar(vnames))) #> vnames[noname] <- paste0(\"Var.\", seq_along(vnames))[noname] #> if (check.names) { #> if (fix.empty.names) #> vnames <- make.names(vnames, unique = TRUE) #> else { #> nz <- nzchar(vnames) #> vnames[nz] <- make.names(vnames[nz], unique = TRUE) #> } #> } #> names(value) <- vnames #> if (!mrn) { #> if (length(row.names) == 1L && nr != 1L) { #> if (is.character(row.names)) #> row.names <- match(row.names, vnames, 0L) #> if (length(row.names) != 1L || row.names < 1L || #> row.names > length(vnames)) #> stop(\"'row.names' should specify one of the variables\") #> i <- row.names #> row.names <- value[[i]] #> value <- value[-i] #> } #> else if (!is.null(row.names) && length(row.names) != #> nr) #> stop(\"row names supplied are of the wrong length\") #> } #> else if (!is.null(row.names) && length(row.names) != nr) { #> warning(\"row names were found from a short variable and have been discarded\") #> row.names <- NULL #> } #> class(value) <- \"data.frame\" #> if (is.null(row.names)) #> attr(value, \"row.names\") <- .set_row_names(nr) #> else { #> if (is.object(row.names) || !is.integer(row.names)) #> row.names <- as.character(row.names) #> if (anyNA(row.names)) #> stop(\"row names contain missing values\") #> if (anyDuplicated(row.names)) #> stop(gettextf(\"duplicate row.names: %s\", paste(unique(row.names[duplicated(row.names)]), #> collapse = \", \")), domain = NA) #> row.names(value) <- row.names #> } #> value #> } #> #> df <- data.frame( ColN1 = c(1, 2), ColN2 = 4, ColU1 = 'B', ColU2 = '1', ColTU1 = 'A', ColTU2 = 3, ColNR1 = 4, ColNR2 = 5 ) tryCatch( check_columns( df, c('ColN1', 'ColN2'), c('ColU1', 'ColU2'), c('ColTU1', 'ColTU2') ), error = function(e) print(e)) #> "},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_num_na.html","id":null,"dir":"Reference","previous_headings":"","what":"Is numeric or NA — check_num_na","title":"Is numeric or NA — check_num_na","text":"Check variable given numeric NA","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_num_na.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is numeric or NA — check_num_na","text":"","code":"check_num_na(var, na_as_num = TRUE)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_num_na.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is numeric or NA — check_num_na","text":"var Vector value test na_as_num Boolean defining NA string considered numerical values","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_num_na.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is numeric or NA — check_num_na","text":"vector boolean size var","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_num_na.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Is numeric or NA — check_num_na","text":"Check values var numeric NA case na_as_num set TRUE.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_slot_fd.html","id":null,"dir":"Reference","previous_headings":"","what":"Check if the fields are present in an object slot — check_slot_fd","title":"Check if the fields are present in an object slot — check_slot_fd","text":"Check fields present object slot","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_slot_fd.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if the fields are present in an object slot — check_slot_fd","text":"","code":"check_slot_fd(obj, slot = NULL, fields = character())"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_slot_fd.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if the fields are present in an object slot — check_slot_fd","text":"obj object. slot slot object. fields character vector fields check.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_slot_fd.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check if the fields are present in an object slot — check_slot_fd","text":"character vector errors .","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_values.html","id":null,"dir":"Reference","previous_headings":"","what":"Check values in a slot — check_values","title":"Check values in a slot — check_values","text":"Check values slot vector values.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_values.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check values in a slot — check_values","text":"","code":"check_values(val, ref, name = NULL, present = TRUE)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_values.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check values in a slot — check_values","text":"val vector values check. ref vector reference values. name character vector name values check. present logical value indicating values present ","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_values.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check values in a slot — check_values","text":"character vector errors .","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/circfun.html","id":null,"dir":"Reference","previous_headings":"","what":"Circular element — circfun","title":"Circular element — circfun","text":"Create list x y coordinates circle given number slices.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/circfun.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Circular element — circfun","text":"","code":"circfun(nslice, n = 50)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/circfun.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Circular element — circfun","text":"nslice Number slices circle n Total number points circle","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/circfun.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Circular element — circfun","text":"list x y coordinates per slice.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/circfun.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Circular element — circfun","text":"","code":"circfun(1) #> [[1]] #> [[1]]$x #> [1] 0.000000e+00 3.061617e-17 -6.393858e-02 -1.268273e-01 -1.876335e-01 #> [6] -2.453588e-01 -2.990553e-01 -3.478413e-01 -3.909157e-01 -4.275714e-01 #> [11] -4.572063e-01 -4.793339e-01 -4.935909e-01 -4.997431e-01 -4.976896e-01 #> [16] -4.874640e-01 -4.692342e-01 -4.432997e-01 -4.100861e-01 -3.701390e-01 #> [21] -3.241142e-01 -2.727675e-01 -2.169419e-01 -1.575541e-01 -9.557931e-02 #> [26] -3.203511e-02 3.203511e-02 9.557931e-02 1.575541e-01 2.169419e-01 #> [31] 2.727675e-01 3.241142e-01 3.701390e-01 4.100861e-01 4.432997e-01 #> [36] 4.692342e-01 4.874640e-01 4.976896e-01 4.997431e-01 4.935909e-01 #> [41] 4.793339e-01 4.572063e-01 4.275714e-01 3.909157e-01 3.478413e-01 #> [46] 2.990553e-01 2.453588e-01 1.876335e-01 1.268273e-01 6.393858e-02 #> [51] 1.530808e-16 #> #> [[1]]$y #> [1] 0.500000000 0.000000000 0.004104993 0.016352568 0.036541621 0.064340648 #> [7] 0.099293189 0.140825325 0.188255099 0.240803716 0.297608328 0.357736207 #> [13] 0.420200052 0.483974211 0.548011513 0.611260467 0.672682527 0.731269145 #> [19] 0.786058330 0.836150445 0.880722979 0.919044052 0.950484434 0.974527874 #> [25] 0.990779578 0.998972696 0.998972696 0.990779578 0.974527874 0.950484434 #> [31] 0.919044052 0.880722979 0.836150445 0.786058330 0.731269145 0.672682527 #> [37] 0.611260467 0.548011513 0.483974211 0.420200052 0.357736207 0.297608328 #> [43] 0.240803716 0.188255099 0.140825325 0.099293189 0.064340648 0.036541621 #> [49] 0.016352568 0.004104993 0.000000000 #> #> circfun(1, 10) #> [[1]] #> [[1]]$x #> [1] 0.000000e+00 3.061617e-17 -3.213938e-01 -4.924039e-01 -4.330127e-01 #> [6] -1.710101e-01 1.710101e-01 4.330127e-01 4.924039e-01 3.213938e-01 #> [11] 1.530808e-16 #> #> [[1]]$y #> [1] 0.5000000 0.0000000 0.1169778 0.4131759 0.7500000 0.9698463 0.9698463 #> [8] 0.7500000 0.4131759 0.1169778 0.0000000 #> #> circfun(4, 50) #> [[1]] #> [[1]]$x #> [1] 0.000000e+00 3.061617e-17 -6.526310e-02 -1.294095e-01 -1.913417e-01 #> [6] -2.500000e-01 -3.043807e-01 -3.535534e-01 -3.966767e-01 -4.330127e-01 #> [11] -4.619398e-01 -4.829629e-01 -4.957224e-01 -5.000000e-01 #> #> [[1]]$y #> [1] 0.500000000 0.000000000 0.004277569 0.017037087 0.038060234 0.066987298 #> [7] 0.103323330 0.146446609 0.195619285 0.250000000 0.308658284 0.370590477 #> [13] 0.434736904 0.500000000 #> #> #> [[2]] #> [[2]]$x #> [1] 0.000000e+00 -5.000000e-01 -4.957224e-01 -4.829629e-01 -4.619398e-01 #> [6] -4.330127e-01 -3.966767e-01 -3.535534e-01 -3.043807e-01 -2.500000e-01 #> [11] -1.913417e-01 -1.294095e-01 -6.526310e-02 -9.184851e-17 #> #> [[2]]$y #> [1] 0.5000000 0.5000000 0.5652631 0.6294095 0.6913417 0.7500000 0.8043807 #> [8] 0.8535534 0.8966767 0.9330127 0.9619398 0.9829629 0.9957224 1.0000000 #> #> #> [[3]] #> [[3]]$x #> [1] 0.000000e+00 -9.184851e-17 6.526310e-02 1.294095e-01 1.913417e-01 #> [6] 2.500000e-01 3.043807e-01 3.535534e-01 3.966767e-01 4.330127e-01 #> [11] 4.619398e-01 4.829629e-01 4.957224e-01 5.000000e-01 #> #> [[3]]$y #> [1] 0.5000000 1.0000000 0.9957224 0.9829629 0.9619398 0.9330127 0.8966767 #> [8] 0.8535534 0.8043807 0.7500000 0.6913417 0.6294095 0.5652631 0.5000000 #> #> #> [[4]] #> [[4]]$x #> [1] 0.000000e+00 5.000000e-01 4.957224e-01 4.829629e-01 4.619398e-01 #> [6] 4.330127e-01 3.966767e-01 3.535534e-01 3.043807e-01 2.500000e-01 #> [11] 1.913417e-01 1.294095e-01 6.526310e-02 1.530808e-16 #> #> [[4]]$y #> [1] 0.500000000 0.500000000 0.434736904 0.370590477 0.308658284 0.250000000 #> [7] 0.195619285 0.146446609 0.103323330 0.066987298 0.038060234 0.017037087 #> [13] 0.004277569 0.000000000 #> #>"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/color_picker.html","id":null,"dir":"Reference","previous_headings":"","what":"Shiny modules to select colours — color_picker_ui","title":"Shiny modules to select colours — color_picker_ui","text":"function allows select different colours array variables.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/color_picker.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shiny modules to select colours — color_picker_ui","text":"","code":"color_picker_ui(id) color_picker_server(id, colors = NULL) color_picker_demo()"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/color_picker.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shiny modules to select colours — color_picker_ui","text":"id string identify module. colors list variables default colours.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/color_picker.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Shiny modules to select colours — color_picker_ui","text":"reactive list selected colours.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/color_picker.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Shiny modules to select colours — color_picker_ui","text":"","code":"if (interactive()) { color_picker_demo() }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/data_col_sel.html","id":null,"dir":"Reference","previous_headings":"","what":"Shiny modules to select columns from a dataframe — data_col_sel_ui","title":"Shiny modules to select columns from a dataframe — data_col_sel_ui","text":"function allows select columns dataframe rename names cols_needed cols_supl. generate Shiny module can used Shiny app. function composed two parts: UI server. UI called function data_col_sel_ui() server function data_col_sel_server().","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/data_col_sel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shiny modules to select columns from a dataframe — data_col_sel_ui","text":"","code":"data_col_sel_ui(id) data_col_sel_server( id, df, cols_needed, cols_supl, title, na_omit = TRUE, others_cols = TRUE ) data_col_sel_demo()"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/data_col_sel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shiny modules to select columns from a dataframe — data_col_sel_ui","text":"id string identify module. df reactive dataframe. cols_needed character vector mandatory columns. cols_supl character vector optional columns. title string display selectInput. na_omit boolean allow selection NA. others_cols boolean authorize columns present output datatable.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/data_col_sel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Shiny modules to select columns from a dataframe — data_col_sel_ui","text":"reactive dataframe selected columns renamed names cols_needed cols_supl.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/data_col_sel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Shiny modules to select columns from a dataframe — data_col_sel_ui","text":"","code":"if (interactive()) { data_col_sel_demo() }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/data_download.html","id":null,"dir":"Reference","previous_headings":"","what":"Shiny modules to download a dataframe — data_download_ui","title":"Shiny modules to download a dataframe — data_download_ui","text":"function allows download dataframe csv file. generate Shiny module can used Shiny app. function composed two parts: UI server. UI called function data_download_ui() server function data_download_server().","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/data_download.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shiny modules to download a dataframe — data_download_ui","text":"","code":"data_download_ui(id) data_download_server( id, df, filename, label = NULL, helper = TRUE, title = \"Data download\" ) data_download_demo()"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/data_download.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shiny modules to download a dataframe — data_download_ui","text":"id string identify module. df reactive dataframe. filename string name file. label string display download button. helper boolean display helper message.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/data_download.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Shiny modules to download a dataframe — data_download_ui","text":"shiny module export dataframe.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/data_download.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Shiny modules to download a dataframe — data_download_ui","text":"","code":"if (interactive()) { data_download_demo() }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/data_import.html","id":null,"dir":"Reference","previous_headings":"","what":"Shiny modules to import data files — data_import_ui","title":"Shiny modules to import data files — data_import_ui","text":"module allow import multiple type data. file type currently supported csv, txt, xls, xslx, rda tab. server dynamically create selection input multiple dataframe present file selected. module composed two parts: UI server. UI called function data_import_ui() server function data_import_server(). Different options available user import data.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/data_import.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shiny modules to import data files — data_import_ui","text":"","code":"data_import_ui(id) data_import_server( id, label = \"Select data file\", dftest = datasets::mtcars, max_request_size = 30 ) data_import_demo(options = list())"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/data_import.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shiny modules to import data files — data_import_ui","text":"id string. label string use prompt user dftest dataframe test function max_request_size number define maximum size file can uploaded.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/data_import.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Shiny modules to import data files — data_import_ui","text":"reactive dataframe selected user.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/data_import.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Shiny modules to import data files — data_import_ui","text":"","code":"if (interactive()) { data_import_demo() }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/descendants.html","id":null,"dir":"Reference","previous_headings":"","what":"Descendants of individuals — descendants","title":"Descendants of individuals — descendants","text":"Find descendants particular list individuals given Pedigree object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/descendants.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Descendants of individuals — descendants","text":"","code":"# S4 method for class 'character_OR_integer,character_OR_integer' descendants(idlist, obj, dadid, momid) # S4 method for class 'character_OR_integer,Pedigree' descendants(idlist, obj) # S4 method for class 'character_OR_integer,Ped' descendants(idlist, obj)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/descendants.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Descendants of individuals — descendants","text":"idlist List individuals identifiers considered obj Ped Pedigree object vector individuals identifiers. dadid vector containing subject, identifiers biologicals fathers. momid vector containing subject, identifiers biologicals mothers.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/descendants.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Descendants of individuals — descendants","text":"Vector descendants individuals idlist. list ordered.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/descendants.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Descendants of individuals — descendants","text":"","code":"data(\"sampleped\") ped <- Pedigree(sampleped) descendants(c(\"1_101\", \"2_208\"), ped) #> [1] \"1_109\" \"2_212\" \"2_213\" \"2_214\" \"1_121\" \"1_122\" \"1_123\" \"1_124\""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/draw_arc.html","id":null,"dir":"Reference","previous_headings":"","what":"Draw arcs — draw_arc","title":"Draw arcs — draw_arc","text":"Draw arcs","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/draw_arc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Draw arcs — draw_arc","text":"","code":"draw_arc( x0, y0, x1, y1, p = NULL, ggplot_gen = FALSE, lwd = par(\"lwd\"), lty = 2, col = \"black\" )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/draw_arc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Draw arcs — draw_arc","text":"x0 x coordinate first point y0 y coordinate first point x1 x coordinate second point y1 y coordinate second point p ggplot object ggplot_gen TRUE add segments ggplot object lwd Line width lty Line type col Line color","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/draw_arc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Draw arcs — draw_arc","text":"Plot arcs current device add ggplot object","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/draw_polygon.html","id":null,"dir":"Reference","previous_headings":"","what":"Draw a polygon — draw_polygon","title":"Draw a polygon — draw_polygon","text":"Draw polygon","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/draw_polygon.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Draw a polygon — draw_polygon","text":"","code":"draw_polygon( x, y, p = NULL, ggplot_gen = FALSE, fill = \"grey\", border = \"black\", density = NULL, angle = 45, lwd = par(\"lwd\") )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/draw_polygon.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Draw a polygon — draw_polygon","text":"x x coordinates y y coordinates p ggplot object ggplot_gen TRUE add segments ggplot object fill Fill color border Border color density Density shading angle Angle shading lwd Line width","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/draw_polygon.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Draw a polygon — draw_polygon","text":"Plot polygon current device add ggplot object","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/draw_segment.html","id":null,"dir":"Reference","previous_headings":"","what":"Draw segments — draw_segment","title":"Draw segments — draw_segment","text":"Draw segments","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/draw_segment.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Draw segments — draw_segment","text":"","code":"draw_segment( x0, y0, x1, y1, p = NULL, ggplot_gen = FALSE, col = par(\"fg\"), lwd = par(\"lwd\"), lty = par(\"lty\") )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/draw_segment.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Draw segments — draw_segment","text":"x0 x coordinate first point y0 y coordinate first point x1 x coordinate second point y1 y coordinate second point p ggplot object ggplot_gen TRUE add segments ggplot object col Line color lwd Line width lty Line type","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/draw_segment.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Draw segments — draw_segment","text":"Plot segments current device add ggplot object","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/draw_text.html","id":null,"dir":"Reference","previous_headings":"","what":"Draw texts — draw_text","title":"Draw texts — draw_text","text":"Draw texts","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/draw_text.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Draw texts — draw_text","text":"","code":"draw_text( x, y, label, p = NULL, ggplot_gen = FALSE, cex = 1, col = NULL, adjx = 0, adjy = 0 )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/draw_text.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Draw texts — draw_text","text":"x x coordinates y y coordinates label Text displayed p ggplot object ggplot_gen TRUE add segments ggplot object cex Character expansion text col Text color adjx x adjustment adjy y adjustment","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/draw_text.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Draw texts — draw_text","text":"Plot text current device add ggplot object","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/duporder.html","id":null,"dir":"Reference","previous_headings":"","what":"Find the duplicate pairs of a subject — duporder","title":"Find the duplicate pairs of a subject — duporder","text":"Find duplicate pairs subject","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/duporder.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find the duplicate pairs of a subject — duporder","text":"","code":"duporder(idlist, plist, lev, obj)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/duporder.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find the duplicate pairs of a subject — duporder","text":"idlist List individuals identifiers considered plist alignment structure representing Pedigree layout. See align() details. lev generation level subject obj Pedigree object","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/duporder.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find the duplicate pairs of a subject — duporder","text":"matrix duplicate pairs","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/duporder.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find the duplicate pairs of a subject — duporder","text":"routine used auto_hint(). finds duplicate pairs subject returns order plotted.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/exclude_stray_marryin.html","id":null,"dir":"Reference","previous_headings":"","what":"Exclude stray marry-ins — exclude_stray_marryin","title":"Exclude stray marry-ins — exclude_stray_marryin","text":"Exclude founders parents.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/exclude_stray_marryin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Exclude stray marry-ins — exclude_stray_marryin","text":"","code":"exclude_stray_marryin(id, dadid, momid)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/exclude_stray_marryin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Exclude stray marry-ins — exclude_stray_marryin","text":"id character vector identifiers individuals dadid vector containing subject, identifiers biologicals fathers. momid vector containing subject, identifiers biologicals mothers.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/exclude_stray_marryin.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Exclude stray marry-ins — exclude_stray_marryin","text":"Returns data frame subject identifiers parents. data frame trimmed founders parents.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/exclude_unavail_founders.html","id":null,"dir":"Reference","previous_headings":"","what":"Exclude unavailable founders — exclude_unavail_founders","title":"Exclude unavailable founders — exclude_unavail_founders","text":"Exclude unavailable founders.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/exclude_unavail_founders.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Exclude unavailable founders — exclude_unavail_founders","text":"","code":"exclude_unavail_founders(id, dadid, momid, avail, missid = NA_character_)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/exclude_unavail_founders.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Exclude unavailable founders — exclude_unavail_founders","text":"id character vector identifiers individuals dadid vector containing subject, identifiers biologicals fathers. momid vector containing subject, identifiers biologicals mothers. avail logical vector availability status individuals (.e. FALSE = available, TRUE = available, NA = unknown). missid character vector missing values identifiers. id, dadid momid corresponding values set NA_character_.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/exclude_unavail_founders.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Exclude unavailable founders — exclude_unavail_founders","text":"Returns list following components: n_trimmed Number trimmed individuals id_trimmed Vector IDs trimmed individuals id Vector subject identifiers dadid Vector father identifiers momid Vector mother identifiers","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/family_check.html","id":null,"dir":"Reference","previous_headings":"","what":"Check family — family_check","title":"Check family — family_check","text":"Error check family classification","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/family_check.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check family — family_check","text":"","code":"# S4 method for class 'character_OR_integer' family_check(obj, dadid, momid, famid, newfam) # S4 method for class 'Pedigree' family_check(obj) # S4 method for class 'Ped' family_check(obj)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/family_check.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check family — family_check","text":"obj character vector id individuals data.frame informations corresponding columns. dadid vector containing subject, identifiers biologicals fathers. momid vector containing subject, identifiers biologicals mothers. famid character vector family identifiers individuals. provide, aggregated individuals identifiers separated underscore. newfam result call make_famid(). already computed user, adding argument shortens running time somewhat.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/family_check.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check family — family_check","text":"data frame one row unique family id famid argument one detected Pedigree object. Components output : famid : family id, entered data set n : Number subjects family unrelated : Number appear unrelated anyone else entire Pedigree. usually marry-ins children (Pedigree), problem. split : Number unique 'new' family ids. 0 = one 'family' related anyone else (good) 1 = everythings fine 2 + = family appears set disjoint trees. missing people? join : Number families unique family, actually joined one. 0 hope.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/family_check.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Check family — family_check","text":"Given family id vector, also compute familial grouping first principles using parenting data, compare results. make_famid() function used create de novo family id parentage data, compared family id given data. joins, attribute 'join' attached. matrix family row labels, new-family-id columns, number subjects entries.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/family_check.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check family — family_check","text":"","code":"# use 2 samplepeds data(sampleped) pedAll <- Pedigree(sampleped) ## check them giving separate ped ids fcheck.sep <- family_check(pedAll) fcheck.sep #> famid n unrelated split join #> 1 1 41 1 1 0 #> 2 2 14 0 1 0 ## check assigning them same ped id fcheck.combined <- with(sampleped, family_check(id, dadid, momid, rep(1, nrow(sampleped)))) fcheck.combined #> famid n unrelated split join #> 1 1 55 1 2 0"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/family_infos_table.html","id":null,"dir":"Reference","previous_headings":"","what":"Affection and availability information table — family_infos_table","title":"Affection and availability information table — family_infos_table","text":"function creates table affection availability information individuals pedigree object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/family_infos_table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Affection and availability information table — family_infos_table","text":"","code":"family_infos_table(pedi, col_val = NA)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/family_infos_table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Affection and availability information table — family_infos_table","text":"pedi pedigree object. col_val column name fill slot pedigree object use table.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/family_infos_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Affection and availability information table — family_infos_table","text":"cross table dataframe affection availability information.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/family_infos_table.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Affection and availability information table — family_infos_table","text":"","code":"data(sampleped) pedi <- Pedigree(sampleped) pedi <- generate_colors(pedi, \"num_child_tot\", threshold = 2) Pedixplorer:::family_infos_table(pedi, \"num_child_tot\") #> Affected mods TRUE FALSE NA #> 1 0 Healthy <= to 2 20 21 0 #> 2 1 Affected > to 2 4 10 0 #> 3 NA NA 0 0 0 Pedixplorer:::family_infos_table(pedi, \"affection\") #> Affected mods TRUE FALSE NA #> 1 0 Healthy <= to 0.5 12 12 0 #> 2 1 Affected > to 0.5 12 11 0 #> 3 NA NA 0 8 0"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/family_sel.html","id":null,"dir":"Reference","previous_headings":"","what":"Shiny module to select a family in a pedigree — family_sel_ui","title":"Shiny module to select a family in a pedigree — family_sel_ui","text":"module allows select family pedigree object. function composed two parts: UI server. UI called function family_sel_ui() server function family_sel_server().","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/family_sel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shiny module to select a family in a pedigree — family_sel_ui","text":"","code":"family_sel_ui(id) family_sel_server( id, pedi, fam_var = NULL, fam_sel = NULL, title = \"Family selection\" ) family_sel_demo(fam_var = NULL, fam_sel = NULL, title = \"Family selection\")"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/family_sel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shiny module to select a family in a pedigree — family_sel_ui","text":"id string identify module. pedi reactive pedigree object. fam_var default family variable use family indicator. fam_sel default family select. title title module.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/family_sel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Shiny module to select a family in a pedigree — family_sel_ui","text":"reactive list subselected pedigree object selected family id.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/family_sel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Shiny module to select a family in a pedigree — family_sel_ui","text":"","code":"if (interactive()) { family_sel_demo() }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_avail_affected.html","id":null,"dir":"Reference","previous_headings":"","what":"Find single affected and available individual from a Pedigree — find_avail_affected","title":"Find single affected and available individual from a Pedigree — find_avail_affected","text":"Finds one subject among available non-parents indicated affection status.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_avail_affected.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find single affected and available individual from a Pedigree — find_avail_affected","text":"","code":"# S4 method for class 'Ped' find_avail_affected(obj, avail = NULL, affected = NULL, affstatus = NA) # S4 method for class 'Pedigree' find_avail_affected(obj, avail = NULL, affected = NULL, affstatus = NA)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_avail_affected.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find single affected and available individual from a Pedigree — find_avail_affected","text":"obj Ped Pedigree object. avail logical vector availability status individuals (.e. FALSE = available, TRUE = available, NA = unknown). affected logical vector affection status individuals (.e. FALSE = unaffected, TRUE = affected, NA = unknown). affstatus Affection status search .","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_avail_affected.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find single affected and available individual from a Pedigree — find_avail_affected","text":"list returned following components ped new Ped object newAvail Vector availability status trimmed individuals idTrimmed Vector IDs trimmed individuals isTrimmed logical value indicating whether Ped object trimmed bit_size Bit size trimmed Ped","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_avail_affected.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find single affected and available individual from a Pedigree — find_avail_affected","text":"used within shrink(), function called first affected indicator, affected item Pedigree matrix multiple affected indicators. avail affected null, function use corresponding Ped accessor.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_avail_affected.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find single affected and available individual from a Pedigree — find_avail_affected","text":"","code":"data(sampleped) ped <- Pedigree(sampleped) find_avail_affected(ped, affstatus = 1) #> $ped #> Ped object with 38 individuals and 13 metadata columns: #> id dadid momid sex famid steril #> col_class #> 1_103 1_103 1_135 1_136 male 1 #> 1_104 1_104 female 1 #> 1_105 1_105 male 1 #> 1_106 1_106 female 1 #> 1_109 1_109 female 1 #> ... ... ... ... ... ... ... #> 2_208 2_208 2_201 2_202 female 2 #> 2_209 2_209 male 2 #> 2_211 2_211 2_203 2_204 male 2 #> 2_212 2_212 2_209 2_208 female 2 #> 2_214 2_214 2_209 2_208 male 2 #> status avail affected useful kin isinf #> col_class #> 1_103 FALSE TRUE #> 1_104 FALSE FALSE #> 1_105 FALSE #> 1_106 FALSE #> 1_109 TRUE FALSE #> ... ... ... ... ... ... ... #> 2_208 FALSE FALSE #> 2_209 FALSE FALSE #> 2_211 TRUE FALSE #> 2_212 TRUE FALSE #> 2_214 TRUE TRUE #> num_child_tot num_child_dir num_child_ind | family indId #> col_class #> 1_103 3 3 0 1 103 #> 1_104 3 3 0 1 104 #> 1_105 4 4 0 1 105 #> 1_106 4 4 0 1 106 #> 1_109 0 0 0 1 109 #> ... ... ... ... ... ... #> 2_208 2 2 0 2 208 #> 2_209 2 2 0 2 209 #> 2_211 0 0 0 2 211 #> 2_212 0 0 0 2 212 #> 2_214 0 0 0 2 214 #> fatherId motherId gender affection available #> col_class #> 1_103 135 136 1 1 0 #> 1_104 2 0 0 #> 1_105 1 0 #> 1_106 2 0 #> 1_109 101 102 2 0 1 #> ... ... ... ... ... ... #> 2_208 201 202 2 0 0 #> 2_209 1 0 0 #> 2_211 203 204 1 0 1 #> 2_212 209 208 2 0 1 #> 2_214 209 208 1 1 1 #> num error sterilisation vitalStatus affection_mods #> col_class #> 1_103 2 1 #> 1_104 4 0 #> 1_105 6 NA #> 1_106 1 NA #> 1_109 3 0 #> ... ... ... ... ... ... #> 2_208 1 0 #> 2_209 2 0 #> 2_211 1 0 #> 2_212 3 0 #> 2_214 0 1 #> avail_mods #> col_class #> 1_103 0 #> 1_104 0 #> 1_105 0 #> 1_106 0 #> 1_109 1 #> ... ... #> 2_208 0 #> 2_209 0 #> 2_211 1 #> 2_212 1 #> 2_214 1 #> #> $new_avail #> [1] FALSE FALSE FALSE FALSE TRUE TRUE FALSE FALSE FALSE TRUE FALSE TRUE #> [13] TRUE FALSE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE FALSE FALSE #> [25] FALSE TRUE TRUE TRUE FALSE TRUE TRUE TRUE TRUE FALSE FALSE TRUE #> [37] TRUE TRUE #> #> $id_trimmed #> [1] \"1_124\" #> #> $is_trimmed #> [1] TRUE #> #> $bit_size #> [1] 37 #>"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_avail_noninform.html","id":null,"dir":"Reference","previous_headings":"","what":"Find uninformative but available subject — find_avail_noninform","title":"Find uninformative but available subject — find_avail_noninform","text":"Finds subjects among available non-parents affection equal 0.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_avail_noninform.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find uninformative but available subject — find_avail_noninform","text":"","code":"# S4 method for class 'Ped' find_avail_noninform(obj, avail = NULL, affected = NULL) # S4 method for class 'Pedigree' find_avail_noninform(obj, avail = NULL, affected = NULL)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_avail_noninform.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find uninformative but available subject — find_avail_noninform","text":"obj Ped Pedigree object. avail logical vector availability status individuals (.e. FALSE = available, TRUE = available, NA = unknown). affected logical vector affection status individuals (.e. FALSE = unaffected, TRUE = affected, NA = unknown).","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_avail_noninform.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find uninformative but available subject — find_avail_noninform","text":"Vector subject ids can removed lowest informativeness.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_avail_noninform.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find uninformative but available subject — find_avail_noninform","text":"Identify subjects remove Pedigree available non-informative (unaffected). second step remove subjects shrink() Pedigree meet desired bit size. avail affected null, function use corresponding Ped accessor.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_avail_noninform.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find uninformative but available subject — find_avail_noninform","text":"","code":"data(sampleped) ped <- Pedigree(sampleped) find_avail_noninform(ped) #> [1] \"1_101\" \"1_102\" \"1_107\" \"1_108\" \"1_111\" \"1_113\" \"1_121\" \"1_122\" \"1_123\" #> [10] \"1_131\" \"1_132\" \"1_134\" \"1_139\" \"2_205\" \"2_210\" \"2_213\""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_unavailable.html","id":null,"dir":"Reference","previous_headings":"","what":"Find unavailable subjects in a Pedigree — find_unavailable","title":"Find unavailable subjects in a Pedigree — find_unavailable","text":"Find identifiers subjects Pedigree iteratively, anyone available available descendant successively removing unavailable terminal nodes.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_unavailable.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find unavailable subjects in a Pedigree — find_unavailable","text":"","code":"# S4 method for class 'Ped' find_unavailable(obj, avail = NULL) # S4 method for class 'Pedigree' find_unavailable(obj, avail = NULL)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_unavailable.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find unavailable subjects in a Pedigree — find_unavailable","text":"obj Ped Pedigree object. avail logical vector availability status individuals (.e. FALSE = available, TRUE = available, NA = unknown).","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_unavailable.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find unavailable subjects in a Pedigree — find_unavailable","text":"Returns vector subject ids can removed.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_unavailable.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find unavailable subjects in a Pedigree — find_unavailable","text":"avail null, function use corresponding Ped accessor. Originally written pedTrim Steve Iturria, modified Dan Schaid 2007, now split two separate functions: find_unavailable(), trim() tasks separately. find_unavailable() calls exclude_stray_marryin() find stray available marry-ins isolated trimming unavailable offspring, exclude_unavail_founders(). subject ids character, make sure none characters ids colon (\":\"), special character used concatenate split subjects within utility. trim() functions now replaced subset() function.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_unavailable.html","id":"side-effects","dir":"Reference","previous_headings":"","what":"Side Effects","title":"Find unavailable subjects in a Pedigree — find_unavailable","text":"Relation matrix subsetting trimmed special relations include subjects trim.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_unavailable.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find unavailable subjects in a Pedigree — find_unavailable","text":"","code":"data(sampleped) ped1 <- Pedigree(sampleped[sampleped$famid == \"1\",]) find_unavailable(ped1) #> [1] \"1_101\" \"1_102\" \"1_107\" \"1_108\" \"1_111\" \"1_113\" \"1_121\" \"1_122\" \"1_123\" #> [10] \"1_131\" \"1_132\" \"1_134\" \"1_139\""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/findsibs.html","id":null,"dir":"Reference","previous_headings":"","what":"Find the siblings of a subject — findsibs","title":"Find the siblings of a subject — findsibs","text":"Find siblings subject","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/findsibs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find the siblings of a subject — findsibs","text":"","code":"findsibs(idpos, plist, lev)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/findsibs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find the siblings of a subject — findsibs","text":"idpos position subject plist alignment structure representing Pedigree layout. See align() details. lev generation level subject","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/findsibs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find the siblings of a subject — findsibs","text":"positions siblings","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/findsibs.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find the siblings of a subject — findsibs","text":"routine used auto_hint(). finds siblings subject.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/findspouse.html","id":null,"dir":"Reference","previous_headings":"","what":"Find the spouse of a subject — findspouse","title":"Find the spouse of a subject — findspouse","text":"Find spouse subject","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/findspouse.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find the spouse of a subject — findspouse","text":"","code":"findspouse(idpos, plist, lev, obj)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/findspouse.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find the spouse of a subject — findspouse","text":"idpos position subject plist alignment structure representing Pedigree layout. See align() details. lev generation level subject obj Pedigree object","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/findspouse.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find the spouse of a subject — findspouse","text":"position spouse","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/findspouse.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find the spouse of a subject — findspouse","text":"routine used auto_hint(). finds spouse subject.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/fix_parents.html","id":null,"dir":"Reference","previous_headings":"","what":"Fix parents relationship and gender — fix_parents","title":"Fix parents relationship and gender — fix_parents","text":"Fix sex parents, add parents missing data. Can used dataframe vector different individuals informations.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/fix_parents.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fix parents relationship and gender — fix_parents","text":"","code":"# S4 method for class 'character' fix_parents(obj, dadid, momid, sex, famid = NULL, missid = NA_character_) # S4 method for class 'data.frame' fix_parents(obj, del_parents = NULL, filter = NULL, missid = NA_character_)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/fix_parents.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fix parents relationship and gender — fix_parents","text":"obj data.frame vector individuals identifiers. dataframe given must contain columns id, dadid, momid, sex famid (optional). dadid vector containing subject, identifiers biologicals fathers. momid vector containing subject, identifiers biologicals mothers. sex character, factor numeric vector corresponding gender individuals. transformed ordered factor following levels: male < female < unknown < terminated following values recognized: character() factor() : \"f\", \"m\", \"woman\", \"man\", \"male\", \"female\", \"unknown\", \"terminated\" numeric() : 1 = \"male\", 2 = \"female\", 3 = \"unknown\", 4 = \"terminated\" famid character vector family identifiers individuals. provide, aggregated individuals identifiers separated underscore. missid character vector missing values identifiers. id, dadid momid corresponding values set NA_character_. del_parents Boolean defining missing parents needs deleted fixed. one one parent missing, removed, parents missing, removed. NULL parent removed missing parents added new rows. filter Filtering column containing 0 1 rows kept proceeding.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/fix_parents.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fix parents relationship and gender — fix_parents","text":"data.frame id, dadid, momid, sex columns relationships fixed.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/fix_parents.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fix parents relationship and gender — fix_parents","text":"First look add parents whose ids given momid/dadid. Second, fix sex parents. Last look add second parent children one parent id given. famid vector given family id added ids individuals (id, dadid, momid) separated underscore proceeding.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/fix_parents.html","id":"special-case-for-dataframe","dir":"Reference","previous_headings":"","what":"Special case for dataframe","title":"Fix parents relationship and gender — fix_parents","text":"Check presence parents id id field. presence behaviour depend delete parameter TRUE use fix_parents function merge back fields dataframe set availability O non available parents. FALSE delete id missing parents","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/fix_parents.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Fix parents relationship and gender — fix_parents","text":"Jason Sinnwell","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/fix_parents.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fix parents relationship and gender — fix_parents","text":"","code":"test1char <- data.frame( id = paste('fam', 101:111, sep = ''), sex = c('male', 'female')[c(1, 2, 1, 2, 1, 1, 2, 2, 1, 2, 1)], father = c( 0, 0, 'fam101', 'fam101', 'fam101', 0, 0, 'fam106', 'fam106', 'fam106', 'fam109' ), mother = c( 0, 0, 'fam102', 'fam102', 'fam102', 0, 0, 'fam107', 'fam107', 'fam107', 'fam112' ) ) test1newmom <- with(test1char, fix_parents(id, father, mother, sex, missid = NA_character_ )) Pedigree(test1newmom) #> Warning: The Pedigree informations are not valid. Here is the normalised Pedigree informations with the identified problems #> indId motherId fatherId gender family sex steril status avail id #> 1 fam101 0 0 1 1 male NA NA NA 1_fam101 #> 2 fam102 0 0 2 1 female NA NA NA 1_fam102 #> 3 fam103 fam102 fam101 1 1 male NA NA NA 1_fam103 #> 4 fam104 fam102 fam101 2 1 female NA NA NA 1_fam104 #> 5 fam105 fam102 fam101 1 1 male NA NA NA 1_fam105 #> 6 fam106 0 0 1 1 male NA NA NA 1_fam106 #> 7 fam107 0 0 2 1 female NA NA NA 1_fam107 #> 8 fam108 fam107 fam106 2 1 female NA NA NA 1_fam108 #> 9 fam109 fam107 fam106 1 1 male NA NA NA 1_fam109 #> 10 fam110 fam107 fam106 2 1 female NA NA NA 1_fam110 #> 11 fam111 fam112 fam109 1 1 male NA NA NA 1_fam111 #> 12 0 1 1 female NA NA NA 1_0 #> 13 0 2 female NA NA NA 0 #> 14 fam112 2 1 female NA NA NA 1_fam112 #> dadid momid famid error affected #> 1 1_0 1_0 1 NA #> 2 1_0 1_0 1 NA #> 3 1_fam101 1_fam102 1 NA #> 4 1_fam101 1_fam102 1 NA #> 5 1_fam101 1_fam102 1 NA #> 6 1_0 1_0 1 NA #> 7 1_0 1_0 1 NA #> 8 1_fam106 1_fam107 1 NA #> 9 1_fam106 1_fam107 1 NA #> 10 1_fam106 1_fam107 1 NA #> 11 1_fam109 1_fam112 1 NA #> 12 1 isMotherAndFather_isFatherButNotMale NA #> 13 NA #> 14 1 NA #> available sterilisation vitalStatus affection #> 1 NA NA NA NA #> 2 NA NA NA NA #> 3 NA NA NA NA #> 4 NA NA NA NA #> 5 NA NA NA NA #> 6 NA NA NA NA #> 7 NA NA NA NA #> 8 NA NA NA NA #> 9 NA NA NA NA #> 10 NA NA NA NA #> 11 NA NA NA NA #> 12 NA NA NA NA #> 13 NA NA NA NA #> 14 NA NA NA NA"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_aff_inds.html","id":null,"dir":"Reference","previous_headings":"","what":"Process the affection informations — generate_aff_inds","title":"Process the affection informations — generate_aff_inds","text":"Perform transformation uppon vector given one containing affection status obtain affected binary state.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_aff_inds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Process the affection informations — generate_aff_inds","text":"","code":"generate_aff_inds( values, mods_aff = NULL, threshold = NULL, sup_thres_aff = NULL, is_num = NULL )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_aff_inds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Process the affection informations — generate_aff_inds","text":"values Vector containing values column process. mods_aff Vector modality consider affected case values factor. threshold Numeric value separating affected healthy subject case values numeric. sup_thres_aff Boolean defining affected individual threshold . TRUE, individuals considered affected value values stricly threshold. FALSE, individuals considered affected value stricly threshold. is_num Boolean defining values need considered numeric.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_aff_inds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Process the affection informations — generate_aff_inds","text":"dataframe affected column processed accordingly. different columns : mods: different modalities column labels: labels different modalities affected: column processed TRUE/FALSE values","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_aff_inds.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Process the affection informations — generate_aff_inds","text":"function helps configure binary state character numeric variable.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_aff_inds.html","id":"if-the-variable-is-a-character-or-a-factor-","dir":"Reference","previous_headings":"","what":"If the variable is a character or a factor:","title":"Process the affection informations — generate_aff_inds","text":"case affected state depend modality provided affected status. individuals value corresponding one element vector mods_aff considered affected.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_aff_inds.html","id":"if-the-variable-is-numeric-","dir":"Reference","previous_headings":"","what":"If the variable is numeric:","title":"Process the affection informations — generate_aff_inds","text":"case affected state TRUE value individual threshold sup_thres_aff TRUE FALSE otherwise.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_aff_inds.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Process the affection informations — generate_aff_inds","text":"Louis Le Nézet","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_aff_inds.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Process the affection informations — generate_aff_inds","text":"","code":"generate_aff_inds(c(1, 2, 3, 4, 5), threshold = 3, sup_thres_aff = TRUE) #> mods labels affected #> 1 0 Healthy <= to 3 FALSE #> 2 0 Healthy <= to 3 FALSE #> 3 0 Healthy <= to 3 FALSE #> 4 1 Affected > to 3 TRUE #> 5 1 Affected > to 3 TRUE generate_aff_inds(c(\"A\", \"B\", \"C\", \"A\", \"V\", \"B\"), mods_aff = c(\"A\", \"B\")) #> mods labels affected #> 1 1 Affected are A / B TRUE #> 2 1 Affected are A / B TRUE #> 3 0 Healthy are C / V FALSE #> 4 1 Affected are A / B TRUE #> 5 0 Healthy are C / V FALSE #> 6 1 Affected are A / B TRUE"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_border.html","id":null,"dir":"Reference","previous_headings":"","what":"Process the border colors based on availability — generate_border","title":"Process the border colors based on availability — generate_border","text":"Perform transformation uppon vector given one containing availability status compute border color. vector given transformed using vect_to_binary() function.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_border.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Process the border colors based on availability — generate_border","text":"","code":"generate_border(values, colors_avail = c(\"green\", \"black\"), colors_na = \"grey\")"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_border.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Process the border colors based on availability — generate_border","text":"values vector containing values process available. colors_avail Set 2 colors use box's border individual. first color used available individual (avail == 1) second unavailable individual (avail == 0). colors_na Color use individuals informations.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_border.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Process the border colors based on availability — generate_border","text":"list three elements mods : processed values column numeric factor avail : logical vector indicating individual available sc_bord : dataframe containing description modality scale","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_border.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Process the border colors based on availability — generate_border","text":"","code":"generate_border(c(1, 0, 1, 0, NA, 1, 0, 1, 0, NA)) #> $mods #> [1] 1 0 1 0 NA 1 0 1 0 NA #> #> $avail #> [1] TRUE FALSE TRUE FALSE NA TRUE FALSE TRUE FALSE NA #> #> $sc_bord #> column mods border labels #> 1 avail NA grey NA #> 2 avail 1 green Available #> 3 avail 0 black Non Available #>"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_colors.html","id":null,"dir":"Reference","previous_headings":"","what":"Process the filling and border colors based on affection and availability — generate_colors","title":"Process the filling and border colors based on affection and availability — generate_colors","text":"Perform transformation uppon dataframe given compute colors filling border individuals based affection availability status.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_colors.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Process the filling and border colors based on affection and availability — generate_colors","text":"","code":"# S4 method for class 'character' generate_colors( obj, avail, mods_aff = NULL, is_num = FALSE, keep_full_scale = FALSE, colors_aff = c(\"yellow2\", \"red\"), colors_unaff = c(\"white\", \"steelblue4\"), colors_avail = c(\"green\", \"black\"), colors_na = \"grey\" ) # S4 method for class 'numeric' generate_colors( obj, avail, threshold = 0.5, sup_thres_aff = TRUE, is_num = TRUE, keep_full_scale = FALSE, breaks = 3, colors_aff = c(\"yellow2\", \"red\"), colors_unaff = c(\"white\", \"steelblue4\"), colors_avail = c(\"green\", \"black\"), colors_na = \"grey\" ) # S4 method for class 'Pedigree' generate_colors( obj, col_aff = \"affected\", add_to_scale = TRUE, col_avail = \"avail\", is_num = NULL, mods_aff = NULL, threshold = 0.5, sup_thres_aff = TRUE, keep_full_scale = FALSE, breaks = 3, colors_aff = c(\"yellow2\", \"red\"), colors_unaff = c(\"white\", \"steelblue4\"), colors_avail = c(\"green\", \"black\"), colors_na = \"grey\", reset = TRUE )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_colors.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Process the filling and border colors based on affection and availability — generate_colors","text":"obj Pedigree object vector containing affection status individuals. affection status can numeric character. avail logical vector availability status individuals (.e. FALSE = available, TRUE = available, NA = unknown). mods_aff Vector modality consider affected case values factor. is_num Boolean defining values need considered numeric. keep_full_scale Boolean defining affection values need set scale. values numeric filling scale calculated based values number breaks given. values numeric levels get color colors_aff Set increasing colors use filling affected individuls. colors_unaff Set increasing colors use filling unaffected individuls. colors_avail Set 2 colors use box's border individual. first color used available individual (avail == 1) second unavailable individual (avail == 0). colors_na Color use individuals informations. threshold Numeric value separating affected healthy subject case values numeric. sup_thres_aff Boolean defining affected individual threshold . TRUE, individuals considered affected value values stricly threshold. FALSE, individuals considered affected value stricly threshold. breaks Number breaks use using full scale numeric values. number breaks done values affected individuals unaffected individuals. col_aff character vector name column used affection status. add_to_scale Boolean defining scales need added existing scales need replace existing scales. col_avail character vector name column used availability status. reset TRUE scale specified column reset already present.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_colors.html","id":"when-used-with-a-vector","dir":"Reference","previous_headings":"","what":"When used with a vector","title":"Process the filling and border colors based on affection and availability — generate_colors","text":"list two elements list containing filling colors processed description list containing border colors processed description","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_colors.html","id":"when-used-with-a-pedigree-object","dir":"Reference","previous_headings":"","what":"When used with a Pedigree object","title":"Process the filling and border colors based on affection and availability — generate_colors","text":"Pedigree object affected avail columns processed accordingly well scales slot updated.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_colors.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Process the filling and border colors based on affection and availability — generate_colors","text":"colors set using generate_fill()] generate_border() functions respectively filling border.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_colors.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Process the filling and border colors based on affection and availability — generate_colors","text":"","code":"generate_colors( c(\"A\", \"B\", \"A\", \"B\", NA, \"A\", \"B\", \"A\", \"B\", NA), c(1, 0, 1, 0, NA, 1, 0, 1, 0, NA), mods_aff = \"A\" ) #> $fill #> $fill$mods #> [1] 1 0 1 0 NA 1 0 1 0 NA #> #> $fill$affected #> [1] TRUE FALSE TRUE FALSE NA TRUE FALSE TRUE FALSE NA #> #> $fill$sc_fill #> mods labels affected fill density angle #> 1 1 Affected are A TRUE red NA NA #> 2 0 Healthy are B FALSE white NA NA #> 5 NA NA grey NA NA #> #> #> $bord #> $bord$mods #> [1] 1 0 1 0 NA 1 0 1 0 NA #> #> $bord$avail #> [1] TRUE FALSE TRUE FALSE NA TRUE FALSE TRUE FALSE NA #> #> $bord$sc_bord #> column mods border labels #> 1 avail NA grey NA #> 2 avail 1 green Available #> 3 avail 0 black Non Available #> #> generate_colors( c(10, 0, 5, 7, NA, 6, 2, 1, 3, NA), c(1, 0, 1, 0, NA, 1, 0, 1, 0, NA), threshold = 3, keep_full_scale = TRUE ) #> $fill #> $fill$mods #> [1] 6 1 4 5 NA 4 2 1 3 NA #> #> $fill$affected #> [1] TRUE FALSE TRUE TRUE NA TRUE FALSE FALSE FALSE NA #> #> $fill$sc_fill #> mods labels affected fill density angle #> 1 6 Affected > to 3 : (8.33,10] TRUE #FF0000 NA NA #> 2 1 Healthy <= to 3 : [-0.003,1] FALSE #FFFFFF NA NA #> 3 4 Affected > to 3 : [5,6.67] TRUE #EEEE00 NA NA #> 4 5 Affected > to 3 : (6.67,8.33] TRUE #F67700 NA NA #> 5 NA NA : NA NA grey NA NA #> 7 2 Healthy <= to 3 : (1,2] FALSE #9AB1C4 NA NA #> 9 3 Healthy <= to 3 : (2,3] FALSE #36648B NA NA #> #> #> $bord #> $bord$mods #> [1] 1 0 1 0 NA 1 0 1 0 NA #> #> $bord$avail #> [1] TRUE FALSE TRUE FALSE NA TRUE FALSE TRUE FALSE NA #> #> $bord$sc_bord #> column mods border labels #> 1 avail NA grey NA #> 2 avail 1 green Available #> 3 avail 0 black Non Available #> #> data(\"sampleped\") ped <- Pedigree(sampleped) ped <- generate_colors(ped, \"affected\", add_to_scale=FALSE) scales(ped) #> An object of class \"Scales\" #> Slot \"fill\": #> order column_values column_mods mods labels affected #> 1 1 affected affected_mods 0 Healthy are FALSE / TRUE FALSE #> 2 1 affected affected_mods NA NA #> fill density angle #> 1 white NA NA #> 2 grey NA NA #> #> Slot \"border\": #> column_values column_mods mods labels border #> 1 avail avail_mods NA NA grey #> 2 avail avail_mods 1 Available green #> 3 avail avail_mods 0 Non Available black #>"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_fill.html","id":null,"dir":"Reference","previous_headings":"","what":"Process the filling colors based on affection — generate_fill","title":"Process the filling colors based on affection — generate_fill","text":"Perform transformation uppon column given one containing affection status compute filling color.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_fill.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Process the filling colors based on affection — generate_fill","text":"","code":"generate_fill( values, affected, labels, is_num = NULL, keep_full_scale = FALSE, breaks = 3, colors_aff = c(\"yellow2\", \"red\"), colors_unaff = c(\"white\", \"steelblue4\"), colors_na = \"grey\" )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_fill.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Process the filling colors based on affection — generate_fill","text":"values vector containing values process affection. affected logical vector affection status individuals (.e. FALSE = unaffected, TRUE = affected, NA = unknown). labels vector containing labels use affection. is_num Boolean defining values need considered numeric. keep_full_scale Boolean defining affection values need set scale. values numeric filling scale calculated based values number breaks given. values numeric levels get color breaks Number breaks use using full scale numeric values. number breaks done values affected individuals unaffected individuals. colors_aff Set increasing colors use filling affected individuls. colors_unaff Set increasing colors use filling unaffected individuls. colors_na Color use individuals informations.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_fill.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Process the filling colors based on affection — generate_fill","text":"list three elements mods : processed values column numeric factor affected : logical vector indicating individual affected sc_fill : dataframe containing description modality scale","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_fill.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Process the filling colors based on affection — generate_fill","text":"colors set using grDevices::colorRampPalette() function colors given parameters. colors set follow: keep_full_scale FALSE: affected individuals get first color colors_aff vector unaffected individuals get first color colors_unaff vector. keep_full_scale TRUE: values numeric: levels affected values vector get color colors_aff vector using grDevices::colorRampPalette() done unaffected individuals using colors_unaff. values numeric: mean affected individuals compared mean unaffected individuals colors set color gradient follow direction affection.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_fill.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Process the filling colors based on affection — generate_fill","text":"","code":"aff <- generate_aff_inds(seq_len(5), threshold = 3, sup_thres_aff = TRUE) generate_fill(seq_len(5), aff$affected, aff$labels) #> $mods #> [1] 0 0 0 1 1 #> #> $affected #> [1] FALSE FALSE FALSE TRUE TRUE #> #> $sc_fill #> mods labels affected fill density angle #> 1 0 Healthy <= to 3 FALSE white NA NA #> 4 1 Affected > to 3 TRUE red NA NA #> generate_fill(seq_len(5), aff$affected, aff$labels, keep_full_scale = TRUE) #> $mods #> [1] 1 2 3 4 6 #> #> $affected #> [1] FALSE FALSE FALSE TRUE TRUE #> #> $sc_fill #> mods labels affected fill density angle #> 1 1 Healthy <= to 3 : [0.998,1.67] FALSE #FFFFFF NA NA #> 2 2 Healthy <= to 3 : (1.67,2.33] FALSE #9AB1C4 NA NA #> 3 3 Healthy <= to 3 : (2.33,3] FALSE #36648B NA NA #> 4 4 Affected > to 3 : [4,4.33] TRUE #EEEE00 NA NA #> 5 6 Affected > to 3 : (4.67,5] TRUE #FF0000 NA NA #>"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_dataframe.html","id":null,"dir":"Reference","previous_headings":"","what":"Get dataframe name — get_dataframe","title":"Get dataframe name — get_dataframe","text":"Extract name different dataframe present file","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_dataframe.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get dataframe name — get_dataframe","text":"","code":"get_dataframe(file)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_dataframe.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get dataframe name — get_dataframe","text":"file file path","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_dataframe.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get dataframe name — get_dataframe","text":"vector dataframe name present.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_dataframe.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get dataframe name — get_dataframe","text":"function detect extension file extract necessary different dataframe / sheet names available.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_dataframe.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get dataframe name — get_dataframe","text":"","code":"if (FALSE) { # \\dontrun{ get_dataframe('path/to/my/file.txt') } # }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_famid.html","id":null,"dir":"Reference","previous_headings":"","what":"Get family id — get_famid","title":"Get family id — get_famid","text":"Get family id ftom individuals identifiers.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_famid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get family id — get_famid","text":"","code":"get_famid(obj) # S4 method for class 'character' get_famid(obj)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_famid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get family id — get_famid","text":"obj character vector individual ids","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_famid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get family id — get_famid","text":"character vector family ids","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_famid.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get family id — get_famid","text":"family id first part individual id, separated underscore. individual id contain underscore, family id set NA.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_famid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get family id — get_famid","text":"","code":"get_famid(c(\"A\", \"1_B\", \"C_2\", \"D_\", \"_E\", \"F\")) #> [1] NA \"1\" \"C\" \"D\" NA NA"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_families_table.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarise the families information for a given variable in a data frame — get_families_table","title":"Summarise the families information for a given variable in a data frame — get_families_table","text":"function summarises families information given variable data frame. returns numerous modality family number individuals family.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_families_table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarise the families information for a given variable in a data frame — get_families_table","text":"","code":"get_families_table(df, var)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_families_table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarise the families information for a given variable in a data frame — get_families_table","text":"df data frame var variable summarise","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_families_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summarise the families information for a given variable in a data frame — get_families_table","text":"data frame family information","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_families_table.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summarise the families information for a given variable in a data frame — get_families_table","text":"","code":"df <- data.frame( famid = c(1, 1, 2, 2, 3, 3), health = c(\"A\", \"B\", \"A\", \"A\", \"B\", \"B\") ) get_families_table(df, \"health\") #> # A tibble: 3 × 3 #> famid `Major mod` `Nb Ind` #> #> 1 1 A 2 #> 2 2 A 2 #> 3 3 B 2"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_title.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the title of the family information table — get_title","title":"Get the title of the family information table — get_title","text":"function generates title family information table depending selected family subfamily parameters.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_title.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the title of the family information table — get_title","text":"","code":"get_title( family_sel, subfamily_sel, family_var, mod, inf_selected, kin_max, keep_parents, nb_rows, short_title = FALSE )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_title.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the title of the family information table — get_title","text":"family_sel selected family subfamily_sel selected subfamily family_var selected family variable mod selected affected modality inf_selected selected informative individuals kin_max maximum kinship keep_parents keep parents option nb_rows number individuals short_title boolean generate short title","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_title.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the title of the family information table — get_title","text":"string title","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_title.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the title of the family information table — get_title","text":"","code":"get_title(1, 1, \"health\", \"A\", \"All\", 3, TRUE, 10, FALSE) #> [1] \"Pedigree trimmed of family N*1 sub-family N*1 (N=10) from All individuals.\" get_title(1, 1, \"health\", \"A\", \"All\", 3, TRUE, 10, TRUE) #> [1] \"Ped_F1_K3_T_IAll_SF1\" get_title(1, 1, \"health\", \"A\", \"All\", 3, FALSE, 10, FALSE) #> [1] \"Pedigree of family N*1 sub-family N*1 (N=10) from All individuals.\""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_twin_rel.html","id":null,"dir":"Reference","previous_headings":"","what":"Get twin relationships — get_twin_rel","title":"Get twin relationships — get_twin_rel","text":"Get twin relationships","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_twin_rel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get twin relationships — get_twin_rel","text":"","code":"get_twin_rel(obj)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_twin_rel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get twin relationships — get_twin_rel","text":"obj Pedigree object","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_twin_rel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get twin relationships — get_twin_rel","text":"list containing components twinset set twins twinrel twins relationships twinord order twins","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_twin_rel.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get twin relationships — get_twin_rel","text":"routine function determine twin relationships Pedigree. determine order twins Pedigree. used auto_hint().","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/health_sel.html","id":null,"dir":"Reference","previous_headings":"","what":"Shiny module to select a health variable in a pedigree — health_sel_ui","title":"Shiny module to select a health variable in a pedigree — health_sel_ui","text":"module allows select health variables pedigree object. function composed two parts: UI server. UI called function health_sel_ui() server function health_sel_server().","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/health_sel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shiny module to select a health variable in a pedigree — health_sel_ui","text":"","code":"health_sel_ui(id) health_sel_server( id, pedi, var = NULL, as_num = NULL, mods_aff = NULL, threshold = NULL, sup_threshold = NULL ) health_sel_demo()"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/health_sel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shiny module to select a health variable in a pedigree — health_sel_ui","text":"id string identify module. pedi reactive pedigree object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/health_sel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Shiny module to select a health variable in a pedigree — health_sel_ui","text":"reactive list following informations:actions-box health_var: selected health variable, to_num: boolean know health variable needs considered numeric, mods_aff: character vector affected modalities, threshold: numeric threshold determine affected individuals, sup_threshold: boolean know affected individuals strickly superior threshold.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/health_sel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Shiny module to select a health variable in a pedigree — health_sel_ui","text":"","code":"if (interactive()) { health_sel_demo() }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ibd_matrix.html","id":null,"dir":"Reference","previous_headings":"","what":"IBD matrix — ibd_matrix","title":"IBD matrix — ibd_matrix","text":"Transform identity descent (IBD) matrix data form produced external programs SOLAR compact form used coxme lmekin routines.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ibd_matrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"IBD matrix — ibd_matrix","text":"","code":"ibd_matrix(id1, id2, ibd, idmap, diagonal)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ibd_matrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"IBD matrix — ibd_matrix","text":"id1 character vector id first individuals pairs matrix data frame 3 columns: id1, id2, ibd id2 character vector id second individuals pairs ibd IBD value pair idmap optional 2 column matrix data frame whose first element internal value (found id1 id2, whose second element used dimnames result diagonal optional value diagonal element. present, missing diagonal elements input data set value.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ibd_matrix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"IBD matrix — ibd_matrix","text":"sparse matrix class dsCMatrix. form used kinship matrices.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ibd_matrix.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"IBD matrix — ibd_matrix","text":"IBD matrix set n subjects n n symmetric matrix whose ,j element contains, given genetic location, 0/1 indicator whether 0, 1/2 2/2 alleles j identical descent. Fractional values occur IBD fraction must imputed. diagonal 1. Since large fraction values zero, programs Solar return data set containing non-zero elements. well, Solar renumbered subjects seq_len(n) way families grouped together matrix; separate index file contains mapping new id original one. final matrix labeled original identifiers.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ibd_matrix.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"IBD matrix — ibd_matrix","text":"","code":"df <- data.frame( id1 = c(\"1\", \"2\", \"1\"), id2 = c(\"2\", \"3\", \"4\"), ibd = c(0.5, 0.16, 0.27) ) ibd_matrix(df$id1, df$id2, df$ibd, diagonal = 2) #> 4 x 4 sparse Matrix of class \"dsCMatrix\" #> 1 2 3 4 #> 1 2.00 0.50 . 0.27 #> 2 0.50 2.00 0.16 . #> 3 . 0.16 2.00 . #> 4 0.27 . . 2.00"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/inf_sel.html","id":null,"dir":"Reference","previous_headings":"","what":"Shiny module to select the informative individuals in a pedigree — inf_sel_ui","title":"Shiny module to select the informative individuals in a pedigree — inf_sel_ui","text":"module allows select informative individuals pedigree object. used subset pedigree object function useful_inds(). filtering options available (max kinship keep parents). function composed two parts: UI server. UI called function inf_sel_ui() server function inf_sel_server().","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/inf_sel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shiny module to select the informative individuals in a pedigree — inf_sel_ui","text":"","code":"inf_sel_ui(id) inf_sel_server(id, pedi) inf_sel_demo(pedi)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/inf_sel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shiny module to select the informative individuals in a pedigree — inf_sel_ui","text":"id string identify module. pedi reactive pedigree object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/inf_sel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Shiny module to select the informative individuals in a pedigree — inf_sel_ui","text":"reactive pedigree object subselected informative individuals.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/inf_sel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Shiny module to select the informative individuals in a pedigree — inf_sel_ui","text":"","code":"if (interactive()) { data(\"sampleped\") pedi <- shiny::reactive({ Pedigree(sampleped[sampleped$famid == \"1\", ]) }) inf_sel_demo(pedi) }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_disconnected.html","id":null,"dir":"Reference","previous_headings":"","what":"Are individuals disconnected — is_disconnected","title":"Are individuals disconnected — is_disconnected","text":"Check individuals disconnected.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_disconnected.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Are individuals disconnected — is_disconnected","text":"","code":"is_disconnected(id, dadid, momid)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_disconnected.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Are individuals disconnected — is_disconnected","text":"dadid vector containing subject, identifiers biologicals fathers. momid vector containing subject, identifiers biologicals mothers.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_disconnected.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Are individuals disconnected — is_disconnected","text":"vector boolean size id TRUE individual disconnected FALSE otherwise","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_disconnected.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Are individuals disconnected — is_disconnected","text":"individuals considered disconnected kinship individuals 0.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_disconnected.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Are individuals disconnected — is_disconnected","text":"","code":"is_disconnected( c(\"1\", \"2\", \"3\", \"4\", \"5\"), c(\"3\", \"3\", NA, NA, NA), c(\"4\", \"4\", NA, NA, NA) ) #> 1 2 3 4 5 #> FALSE FALSE FALSE FALSE TRUE"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_founder.html","id":null,"dir":"Reference","previous_headings":"","what":"Are individuals founders — is_founder","title":"Are individuals founders — is_founder","text":"Check individuals founders.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_founder.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Are individuals founders — is_founder","text":"","code":"is_founder(momid, dadid, missid = NA_character_)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_founder.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Are individuals founders — is_founder","text":"momid vector containing subject, identifiers biologicals mothers. dadid vector containing subject, identifiers biologicals fathers. missid character vector missing values identifiers. id, dadid momid corresponding values set NA_character_.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_founder.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Are individuals founders — is_founder","text":"vector boolean size dadid momid TRUE individual parents (.e founder) FALSE otherwise.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_founder.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Are individuals founders — is_founder","text":"","code":"is_founder(c(\"3\", \"3\", NA, NA), c(\"4\", \"4\", NA, NA)) #> [1] FALSE FALSE TRUE TRUE"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_informative.html","id":null,"dir":"Reference","previous_headings":"","what":"Find informative individuals — is_informative","title":"Find informative individuals — is_informative","text":"Select ids informative individuals.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_informative.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find informative individuals — is_informative","text":"","code":"# S4 method for class 'character_OR_integer' is_informative(obj, avail, affected, informative = \"AvAf\") # S4 method for class 'Ped' is_informative(obj, informative = \"AvAf\", reset = FALSE) # S4 method for class 'Pedigree' is_informative(obj, col_aff = NULL, informative = \"AvAf\", reset = FALSE)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_informative.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find informative individuals — is_informative","text":"obj character vector id individuals data.frame informations corresponding columns. avail logical vector availability status individuals (.e. FALSE = available, TRUE = available, NA = unknown). affected logical vector affection status individuals (.e. FALSE = unaffected, TRUE = affected, NA = unknown). informative Informative individuals selection can take 5 values: 'AvAf' (available affected), 'AvOrAf' (available affected), 'Av' (available ), 'Af' (affected ), '' (individuals) numeric/character vector individuals id boolean reset TRUE, isinf slot reset col_aff character vector name column used affection status.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_informative.html","id":"when-obj-is-a-vector","dir":"Reference","previous_headings":"","what":"When obj is a vector","title":"Find informative individuals — is_informative","text":"vector individuals informative identifiers.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_informative.html","id":"when-obj-is-a-pedigree","dir":"Reference","previous_headings":"","what":"When obj is a Pedigree","title":"Find informative individuals — is_informative","text":"Pedigree object isinf slot updated.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_informative.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find informative individuals — is_informative","text":"Depending informative parameter, function extract ids informative individuals. case numeric vector, function return vector. case boolean, function return ids individuals TRUE, NA otherwise. case string, function return ids corresponding informative individuals based avail affected columns.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_informative.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find informative individuals — is_informative","text":"","code":"is_informative(c(\"A\", \"B\", \"C\", \"D\", \"E\"), informative = c(\"A\", \"B\")) #> [1] \"A\" \"B\" is_informative(c(\"A\", \"B\", \"C\", \"D\", \"E\"), informative = c(1, 2)) #> [1] \"A\" \"B\" is_informative(c(\"A\", \"B\", \"C\", \"D\", \"E\"), informative = c(\"A\", \"B\")) #> [1] \"A\" \"B\" is_informative(c(\"A\", \"B\", \"C\", \"D\", \"E\"), avail = c(1, 0, 0, 1, 1), affected = c(0, 1, 0, 1, 1), informative = \"AvAf\") #> [1] \"D\" \"E\" is_informative(c(\"A\", \"B\", \"C\", \"D\", \"E\"), avail = c(1, 0, 0, 1, 1), affected = c(0, 1, 0, 1, 1), informative = \"AvOrAf\") #> [1] \"A\" \"B\" \"D\" \"E\" is_informative(c(\"A\", \"B\", \"C\", \"D\", \"E\"), informative = c(TRUE, FALSE, TRUE, FALSE, TRUE)) #> [1] \"A\" \"C\" \"E\" data(\"sampleped\") ped <- Pedigree(sampleped) ped <- is_informative(ped, col_aff = \"affection_mods\") isinf(ped(ped)) #> [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE #> [13] FALSE FALSE FALSE TRUE FALSE TRUE TRUE FALSE FALSE FALSE FALSE TRUE #> [25] FALSE FALSE TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #> [37] FALSE FALSE FALSE FALSE FALSE TRUE FALSE TRUE FALSE FALSE TRUE TRUE #> [49] FALSE FALSE FALSE FALSE FALSE FALSE TRUE data(\"sampleped\") ped <- Pedigree(sampleped) ped <- is_informative(ped, col_aff = \"affection_mods\") isinf(ped(ped)) #> [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE #> [13] FALSE FALSE FALSE TRUE FALSE TRUE TRUE FALSE FALSE FALSE FALSE TRUE #> [25] FALSE FALSE TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #> [37] FALSE FALSE FALSE FALSE FALSE TRUE FALSE TRUE FALSE FALSE TRUE TRUE #> [49] FALSE FALSE FALSE FALSE FALSE FALSE TRUE"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_parent.html","id":null,"dir":"Reference","previous_headings":"","what":"Are individuals parents — is_parent","title":"Are individuals parents — is_parent","text":"Check individuals parents.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_parent.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Are individuals parents — is_parent","text":"","code":"# S4 method for class 'character_OR_integer' is_parent(obj, dadid, momid, missid = NA_character_) # S4 method for class 'Ped' is_parent(obj, missid = NA_character_)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_parent.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Are individuals parents — is_parent","text":"obj vector subjects identifiers Ped object dadid vector containing subject, identifiers biologicals fathers. momid vector containing subject, identifiers biologicals mothers. missid character vector missing values identifiers. id, dadid momid corresponding values set NA_character_.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_parent.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Are individuals parents — is_parent","text":"vector boolean size obj TRUE individual parent FALSE otherwise","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_parent.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Are individuals parents — is_parent","text":"","code":"is_parent(c(\"1\", \"2\", \"3\", \"4\"), c(\"3\", \"3\", NA, NA), c(\"4\", \"4\", NA, NA)) #> [1] FALSE FALSE TRUE TRUE data(sampleped) ped <- Pedigree(sampleped) is_parent(ped(ped)) #> [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE TRUE #> [13] FALSE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE FALSE FALSE FALSE #> [25] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE TRUE #> [37] TRUE TRUE FALSE FALSE FALSE TRUE TRUE TRUE TRUE FALSE FALSE FALSE #> [49] TRUE TRUE FALSE FALSE FALSE FALSE FALSE"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_hints.html","id":null,"dir":"Reference","previous_headings":"","what":"Check if a Hints object is valid — is_valid_hints","title":"Check if a Hints object is valid — is_valid_hints","text":"Check horder spouse slots valid: horder named numeric vector spouse data.frame three idr, idl, anchor columns idr idl different contains NA idr idl couple unique anchor column right, left either values ids spouse needs names horder vector","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_hints.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if a Hints object is valid — is_valid_hints","text":"","code":"is_valid_hints(object)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_hints.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if a Hints object is valid — is_valid_hints","text":"object Hints object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_hints.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check if a Hints object is valid — is_valid_hints","text":"character vector errors TRUE errors.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_ped.html","id":null,"dir":"Reference","previous_headings":"","what":"Check if a Ped object is valid — is_valid_ped","title":"Check if a Ped object is valid — is_valid_ped","text":"Multiple checks done ","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_ped.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if a Ped object is valid — is_valid_ped","text":"","code":"is_valid_ped(object)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_ped.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if a Ped object is valid — is_valid_ped","text":"object Ped object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_ped.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check if a Ped object is valid — is_valid_ped","text":"character vector errors TRUE errors.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_ped.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Check if a Ped object is valid — is_valid_ped","text":"Check ped ids slots right values Check sex, steril, status, avail affected slots right values Check dad male mom female Check individuals parents none","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_pedigree.html","id":null,"dir":"Reference","previous_headings":"","what":"Check if a Pedigree object is valid — is_valid_pedigree","title":"Check if a Pedigree object is valid — is_valid_pedigree","text":"Multiple checks done ","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_pedigree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if a Pedigree object is valid — is_valid_pedigree","text":"","code":"is_valid_pedigree(object)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_pedigree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if a Pedigree object is valid — is_valid_pedigree","text":"object Ped object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_pedigree.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check if a Pedigree object is valid — is_valid_pedigree","text":"character vector errors TRUE errors.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_pedigree.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Check if a Pedigree object is valid — is_valid_pedigree","text":"Check Rel id Ped object Check twins parents Check MZ twins sex Check columns used scales Ped object Check fill & border modalities Ped object column Check id used Hints object Ped object Check spouse Hints object male / female","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_rel.html","id":null,"dir":"Reference","previous_headings":"","what":"Check if a Rel object is valid — is_valid_rel","title":"Check if a Rel object is valid — is_valid_rel","text":"Multiple checks done ","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_rel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if a Rel object is valid — is_valid_rel","text":"","code":"is_valid_rel(object)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_rel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if a Rel object is valid — is_valid_rel","text":"object Ped object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_rel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check if a Rel object is valid — is_valid_rel","text":"character vector errors TRUE errors.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_rel.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Check if a Rel object is valid — is_valid_rel","text":"Check \"id1\", \"id2\", \"code\", \"famid\" slots exist Check \"code\" slots right values (.e. \"MZ twin\", \"DZ twin\", \"UZ twin\", \"Spouse\") Check \"id1\" different \"id2\" Check \"id1\" smaller \"id2\" Check duplicate relation present","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_scales.html","id":null,"dir":"Reference","previous_headings":"","what":"Check if a Scales object is valid — is_valid_scales","title":"Check if a Scales object is valid — is_valid_scales","text":"Check fill border slots valid: fill slot data.frame \"order\", \"column_values\", \"column_mods\", \"mods\", \"labels\", \"affected\", \"fill\", \"density\", \"angle\" columns. \"affected\" logical. \"density\", \"angle\", \"order\", \"mods\" numeric. \"column_values\", \"column_mods\", \"labels\", \"fill\" character. border slot data.frame \"column_values\", \"column_mods\", \"mods\", \"labels\", \"border\" columns. \"column_values\", \"column_mods\", \"labels\", \"border\" character. \"mods\" numeric.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_scales.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if a Scales object is valid — is_valid_scales","text":"","code":"is_valid_scales(object)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_scales.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if a Scales object is valid — is_valid_scales","text":"object Scales object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_scales.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check if a Scales object is valid — is_valid_scales","text":"character vector errors TRUE errors.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/kindepth.html","id":null,"dir":"Reference","previous_headings":"","what":"Individual's depth in a pedigree — kindepth","title":"Individual's depth in a pedigree — kindepth","text":"Computes depth subject Pedigree.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/kindepth.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Individual's depth in a pedigree — kindepth","text":"","code":"# S4 method for class 'character_OR_integer' kindepth(obj, dadid, momid, align_parents = FALSE, force = FALSE) # S4 method for class 'Pedigree' kindepth(obj, align_parents = FALSE, force = FALSE) # S4 method for class 'Ped' kindepth(obj, align_parents = FALSE, force = FALSE)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/kindepth.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Individual's depth in a pedigree — kindepth","text":"obj character vector id individuals data.frame informations corresponding columns. dadid vector containing subject, identifiers biologicals fathers. momid vector containing subject, identifiers biologicals mothers. align_parents align_parents = TRUE, go one step try make parents child depth. (always possible). helps drawing program lining pedigrees 'join middle' via marriage. force force = TRUE, function return depth minus min(depth) depth reach state founders possible.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/kindepth.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Individual's depth in a pedigree — kindepth","text":"integer vector containing depth subject","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/kindepth.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Individual's depth in a pedigree — kindepth","text":"Mark person depth Pedigree; 0 founder, otherwise : $$depth = 1 + \\max(fatherDepth, motherDepth)$$ case inbred Pedigree perfect alignment may exist.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/kindepth.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Individual's depth in a pedigree — kindepth","text":"Terry Therneau, updated Louis Le Nézet","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/kindepth.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Individual's depth in a pedigree — kindepth","text":"","code":"kindepth( c(\"A\", \"B\", \"C\", \"D\", \"E\"), c(\"C\", \"D\", \"0\", \"0\", \"0\"), c(\"E\", \"E\", \"0\", \"0\", \"0\") ) #> [1] 1 1 0 0 0 data(sampleped) ped1 <- Pedigree(sampleped[sampleped$famid == \"1\",]) kindepth(ped1) #> [1] 0 0 1 0 0 0 0 0 1 2 2 2 0 2 1 1 0 1 1 1 3 3 3 3 3 3 3 3 2 2 2 2 2 2 0 0 0 1 #> [39] 2 2 2"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/kinship.html","id":null,"dir":"Reference","previous_headings":"","what":"Kinship matrix — kinship","title":"Kinship matrix — kinship","text":"Compute kinship matrix set related autosomal subjects. function generic, can accept Pedigree, Ped vector first argument.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/kinship.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Kinship matrix — kinship","text":"","code":"# S4 method for class 'Ped' kinship(obj, chrtype = \"autosome\") # S4 method for class 'character' kinship(obj, dadid, momid, sex, chrtype = \"autosome\") # S4 method for class 'Pedigree' kinship(obj, chrtype = \"autosome\")"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/kinship.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Kinship matrix — kinship","text":"obj Pedigree Ped object vector subject identifiers. chrtype chromosome type. currently supported types 'autosome' 'X' 'x'. dadid vector containing subject, identifiers biologicals fathers. momid vector containing subject, identifiers biologicals mothers. sex character, factor numeric vector corresponding gender individuals. transformed ordered factor following levels: male < female < unknown < terminated following values recognized: character() factor() : \"f\", \"m\", \"woman\", \"man\", \"male\", \"female\", \"unknown\", \"terminated\" numeric() : 1 = \"male\", 2 = \"female\", 3 = \"unknown\", 4 = \"terminated\"","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/kinship.html","id":"when-obj-is-a-vector","dir":"Reference","previous_headings":"","what":"When obj is a vector","title":"Kinship matrix — kinship","text":"matrix kinship coefficients.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/kinship.html","id":"when-obj-is-a-pedigree","dir":"Reference","previous_headings":"","what":"When obj is a Pedigree","title":"Kinship matrix — kinship","text":"matrix kinship coefficients ordered families present Pedigree object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/kinship.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Kinship matrix — kinship","text":"function usually called Pedigree. call Ped vector provided backwards compatibility earlier release library less capable. Note using Ped vector, information twins available function. called Pedigree, routine create block-diagonal-symmetric sparse matrix object class dsCMatrix. Since [, j] value result 0 two unrelated individuals j Matrix utilizes sparse representation, resulting object often orders magnitude smaller ordinary matrix. Two genes G1 G2 identical descent (IBD) physical copies ancestral gene; two genes identical state represent allele. brown eye gene inherited mother IBD ; gene unrelated individual . kinship coefficient two subjects probability randomly selected allele locus IBD . obviously 0 unrelated individuals. autosomal site inbreeding 0.5 individual , .25 mother child, .125 uncle neice, etc. computation based recursive algorithm described Lange, assumes founder alleles independent.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/kinship.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Kinship matrix — kinship","text":"K Lange, Mathematical Statistical Methods Genetic Analysis, Springer-Verlag, New York, 1997.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/kinship.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Kinship matrix — kinship","text":"","code":"kinship(c(\"A\", \"B\", \"C\", \"D\", \"E\"), c(\"C\", \"D\", \"0\", \"0\", \"0\"), c(\"E\", \"E\", \"0\", \"0\", \"0\"), sex = c(1, 2, 1, 2, 1)) #> 5 x 5 sparse Matrix of class \"dsCMatrix\" #> A B C D E #> A 0.500 0.125 0.25 . 0.25 #> B 0.125 0.500 . 0.25 0.25 #> C 0.250 . 0.50 . . #> D . 0.250 . 0.50 . #> E 0.250 0.250 . . 0.50 kinship(c(\"A\", \"B\", \"C\", \"D\", \"E\"), c(\"C\", \"D\", \"0\", \"0\", \"0\"), c(\"E\", \"E\", \"0\", \"0\", \"0\"), sex = c(1, 2, 1, 2, 1), chrtype = \"x\" ) #> 5 x 5 sparse Matrix of class \"dsCMatrix\" #> A B C D E #> A 1.0 0.50 . . 1.0 #> B 0.5 0.50 . 0.25 0.5 #> C . . 1 . . #> D . 0.25 . 0.50 . #> E 1.0 0.50 . . 1.0 data(sampleped) ped <- Pedigree(sampleped) kinship(ped) #> 55 x 55 sparse Matrix of class \"dsCMatrix\" #> [[ suppressing 55 column names ‘1_101’, ‘1_102’, ‘1_103’ ... ]] #> #> 1_101 0.500 . . . . . . . 0.25 . . . #> 1_102 . 0.500 . . . . . . 0.25 . . . #> 1_103 . . 0.500 . . . . . . 0.2500 0.2500 0.2500 #> 1_104 . . . 0.500 . . . . . 0.2500 0.2500 0.2500 #> 1_105 . . . . 0.500 . . . . . . . #> 1_106 . . . . . 0.500 . . . . . . #> 1_107 . . . . . . 0.500 . . . . . #> 1_108 . . . . . . . 0.500 . . . . #> 1_109 0.250 0.250 . . . . . . 0.50 . . . #> 1_110 . . 0.250 0.250 . . . . . 0.5000 0.2500 0.2500 #> 1_111 . . 0.250 0.250 . . . . . 0.2500 0.5000 0.2500 #> 1_112 . . 0.250 0.250 . . . . . 0.2500 0.2500 0.5000 #> 1_113 . . . . . . . . . . . . #> 1_114 . . 0.250 0.250 . . . . . 0.2500 0.2500 0.2500 #> 1_115 . . . . 0.250 0.250 . . . . . . #> 1_116 . . . . 0.250 0.250 . . . . . . #> 1_117 . . . . . . . . . . . . #> 1_118 . . . . 0.250 0.250 . . . . . . #> 1_119 . . . . 0.250 0.250 . . . . . . #> 1_120 . . . . . . 0.250 0.250 . . . . #> 1_121 0.125 0.125 0.125 0.125 . . . . 0.25 0.2500 0.1250 0.1250 #> 1_122 0.125 0.125 0.125 0.125 . . . . 0.25 0.2500 0.1250 0.1250 #> 1_123 0.125 0.125 0.125 0.125 . . . . 0.25 0.2500 0.1250 0.1250 #> 1_124 0.125 0.125 0.125 0.125 . . . . 0.25 0.2500 0.1250 0.1250 #> 1_125 . . 0.125 0.125 0.125 0.125 . . . 0.1250 0.1250 0.2500 #> 1_126 . . 0.125 0.125 0.125 0.125 . . . 0.1250 0.1250 0.2500 #> 1_127 . . 0.125 0.125 0.125 0.125 . . . 0.1250 0.1250 0.1250 #> 1_128 . . 0.125 0.125 0.125 0.125 . . . 0.1250 0.1250 0.1250 #> 1_129 . . . . 0.125 0.125 . . . . . . #> 1_130 . . . . 0.125 0.125 0.125 0.125 . . . . #> 1_131 . . . . 0.125 0.125 0.125 0.125 . . . . #> 1_132 . . . . 0.125 0.125 0.125 0.125 . . . . #> 1_133 . . . . 0.125 0.125 0.125 0.125 . . . . #> 1_134 . . . . 0.125 0.125 0.125 0.125 . . . . #> 1_135 . . 0.250 . . . . . . 0.1250 0.1250 0.1250 #> 1_136 . . 0.250 . . . . . . 0.1250 0.1250 0.1250 #> 1_137 . . . . . . . . . . . . #> 1_138 . . 0.250 . . . . . . 0.1250 0.1250 0.1250 #> 1_139 . . 0.125 . . . . . . 0.0625 0.0625 0.0625 #> 1_140 . . 0.125 . . . . . . 0.0625 0.0625 0.0625 #> 1_141 . . 0.125 . . . . . . 0.0625 0.0625 0.0625 #> 2_201 . . . . . . . . . . . . #> 2_202 . . . . . . . . . . . . #> 2_203 . . . . . . . . . . . . #> 2_204 . . . . . . . . . . . . #> 2_205 . . . . . . . . . . . . #> 2_206 . . . . . . . . . . . . #> 2_207 . . . . . . . . . . . . #> 2_208 . . . . . . . . . . . . #> 2_209 . . . . . . . . . . . . #> 2_210 . . . . . . . . . . . . #> 2_211 . . . . . . . . . . . . #> 2_212 . . . . . . . . . . . . #> 2_213 . . . . . . . . . . . . #> 2_214 . . . . . . . . . . . . #> #> 1_101 . . . . . . . . 0.12500 0.12500 0.12500 #> 1_102 . . . . . . . . 0.12500 0.12500 0.12500 #> 1_103 . 0.2500 . . . . . . 0.12500 0.12500 0.12500 #> 1_104 . 0.2500 . . . . . . 0.12500 0.12500 0.12500 #> 1_105 . . 0.250 0.250 . 0.250 0.250 . . . . #> 1_106 . . 0.250 0.250 . 0.250 0.250 . . . . #> 1_107 . . . . . . . 0.25 . . . #> 1_108 . . . . . . . 0.25 . . . #> 1_109 . . . . . . . . 0.25000 0.25000 0.25000 #> 1_110 . 0.2500 . . . . . . 0.25000 0.25000 0.25000 #> 1_111 . 0.2500 . . . . . . 0.12500 0.12500 0.12500 #> 1_112 . 0.2500 . . . . . . 0.12500 0.12500 0.12500 #> 1_113 0.5 . . . . . . . . . . #> 1_114 . 0.5000 . . . . . . 0.12500 0.12500 0.12500 #> 1_115 . . 0.500 0.250 . 0.250 0.250 . . . . #> 1_116 . . 0.250 0.500 . 0.250 0.250 . . . . #> 1_117 . . . . 0.50 . . . . . . #> 1_118 . . 0.250 0.250 . 0.500 0.250 . . . . #> 1_119 . . 0.250 0.250 . 0.250 0.500 . . . . #> 1_120 . . . . . . . 0.50 . . . #> 1_121 . 0.1250 . . . . . . 0.50000 0.25000 0.25000 #> 1_122 . 0.1250 . . . . . . 0.25000 0.50000 0.25000 #> 1_123 . 0.1250 . . . . . . 0.25000 0.25000 0.50000 #> 1_124 . 0.1250 . . . . . . 0.25000 0.25000 0.25000 #> 1_125 . 0.1250 0.125 0.125 . 0.250 0.125 . 0.06250 0.06250 0.06250 #> 1_126 . 0.1250 0.125 0.125 . 0.250 0.125 . 0.06250 0.06250 0.06250 #> 1_127 . 0.2500 0.250 0.125 . 0.125 0.125 . 0.06250 0.06250 0.06250 #> 1_128 . 0.2500 0.250 0.125 . 0.125 0.125 . 0.06250 0.06250 0.06250 #> 1_129 . . 0.125 0.250 0.25 0.125 0.125 . . . . #> 1_130 . . 0.125 0.125 . 0.125 0.250 0.25 . . . #> 1_131 . . 0.125 0.125 . 0.125 0.250 0.25 . . . #> 1_132 . . 0.125 0.125 . 0.125 0.250 0.25 . . . #> 1_133 . . 0.125 0.125 . 0.125 0.250 0.25 . . . #> 1_134 . . 0.125 0.125 . 0.125 0.250 0.25 . . . #> 1_135 . 0.1250 . . . . . . 0.06250 0.06250 0.06250 #> 1_136 . 0.1250 . . . . . . 0.06250 0.06250 0.06250 #> 1_137 . . . . . . . . . . . #> 1_138 . 0.1250 . . . . . . 0.06250 0.06250 0.06250 #> 1_139 . 0.0625 . . . . . . 0.03125 0.03125 0.03125 #> 1_140 . 0.0625 . . . . . . 0.03125 0.03125 0.03125 #> 1_141 . 0.0625 . . . . . . 0.03125 0.03125 0.03125 #> 2_201 . . . . . . . . . . . #> 2_202 . . . . . . . . . . . #> 2_203 . . . . . . . . . . . #> 2_204 . . . . . . . . . . . #> 2_205 . . . . . . . . . . . #> 2_206 . . . . . . . . . . . #> 2_207 . . . . . . . . . . . #> 2_208 . . . . . . . . . . . #> 2_209 . . . . . . . . . . . #> 2_210 . . . . . . . . . . . #> 2_211 . . . . . . . . . . . #> 2_212 . . . . . . . . . . . #> 2_213 . . . . . . . . . . . #> 2_214 . . . . . . . . . . . #> #> 1_101 0.12500 . . . . . . . . #> 1_102 0.12500 . . . . . . . . #> 1_103 0.12500 0.12500 0.12500 0.12500 0.12500 . . . . #> 1_104 0.12500 0.12500 0.12500 0.12500 0.12500 . . . . #> 1_105 . 0.12500 0.12500 0.12500 0.12500 0.1250 0.1250 0.1250 0.1250 #> 1_106 . 0.12500 0.12500 0.12500 0.12500 0.1250 0.1250 0.1250 0.1250 #> 1_107 . . . . . . 0.1250 0.1250 0.1250 #> 1_108 . . . . . . 0.1250 0.1250 0.1250 #> 1_109 0.25000 . . . . . . . . #> 1_110 0.25000 0.12500 0.12500 0.12500 0.12500 . . . . #> 1_111 0.12500 0.12500 0.12500 0.12500 0.12500 . . . . #> 1_112 0.12500 0.25000 0.25000 0.12500 0.12500 . . . . #> 1_113 . . . . . . . . . #> 1_114 0.12500 0.12500 0.12500 0.25000 0.25000 . . . . #> 1_115 . 0.12500 0.12500 0.25000 0.25000 0.1250 0.1250 0.1250 0.1250 #> 1_116 . 0.12500 0.12500 0.12500 0.12500 0.2500 0.1250 0.1250 0.1250 #> 1_117 . . . . . 0.2500 . . . #> 1_118 . 0.25000 0.25000 0.12500 0.12500 0.1250 0.1250 0.1250 0.1250 #> 1_119 . 0.12500 0.12500 0.12500 0.12500 0.1250 0.2500 0.2500 0.2500 #> 1_120 . . . . . . 0.2500 0.2500 0.2500 #> 1_121 0.25000 0.06250 0.06250 0.06250 0.06250 . . . . #> 1_122 0.25000 0.06250 0.06250 0.06250 0.06250 . . . . #> 1_123 0.25000 0.06250 0.06250 0.06250 0.06250 . . . . #> 1_124 0.50000 0.06250 0.06250 0.06250 0.06250 . . . . #> 1_125 0.06250 0.50000 0.25000 0.12500 0.12500 0.0625 0.0625 0.0625 0.0625 #> 1_126 0.06250 0.25000 0.50000 0.12500 0.12500 0.0625 0.0625 0.0625 0.0625 #> 1_127 0.06250 0.12500 0.12500 0.50000 0.25000 0.0625 0.0625 0.0625 0.0625 #> 1_128 0.06250 0.12500 0.12500 0.25000 0.50000 0.0625 0.0625 0.0625 0.0625 #> 1_129 . 0.06250 0.06250 0.06250 0.06250 0.5000 0.0625 0.0625 0.0625 #> 1_130 . 0.06250 0.06250 0.06250 0.06250 0.0625 0.5000 0.2500 0.2500 #> 1_131 . 0.06250 0.06250 0.06250 0.06250 0.0625 0.2500 0.5000 0.2500 #> 1_132 . 0.06250 0.06250 0.06250 0.06250 0.0625 0.2500 0.2500 0.5000 #> 1_133 . 0.06250 0.06250 0.06250 0.06250 0.0625 0.2500 0.2500 0.2500 #> 1_134 . 0.06250 0.06250 0.06250 0.06250 0.0625 0.2500 0.2500 0.2500 #> 1_135 0.06250 0.06250 0.06250 0.06250 0.06250 . . . . #> 1_136 0.06250 0.06250 0.06250 0.06250 0.06250 . . . . #> 1_137 . . . . . . . . . #> 1_138 0.06250 0.06250 0.06250 0.06250 0.06250 . . . . #> 1_139 0.03125 0.03125 0.03125 0.03125 0.03125 . . . . #> 1_140 0.03125 0.03125 0.03125 0.03125 0.03125 . . . . #> 1_141 0.03125 0.03125 0.03125 0.03125 0.03125 . . . . #> 2_201 . . . . . . . . . #> 2_202 . . . . . . . . . #> 2_203 . . . . . . . . . #> 2_204 . . . . . . . . . #> 2_205 . . . . . . . . . #> 2_206 . . . . . . . . . #> 2_207 . . . . . . . . . #> 2_208 . . . . . . . . . #> 2_209 . . . . . . . . . #> 2_210 . . . . . . . . . #> 2_211 . . . . . . . . . #> 2_212 . . . . . . . . . #> 2_213 . . . . . . . . . #> 2_214 . . . . . . . . . #> #> 1_101 . . . . . . . . . . #> 1_102 . . . . . . . . . . #> 1_103 . . 0.2500 0.2500 . 0.2500 0.12500 0.12500 0.12500 . #> 1_104 . . . . . . . . . . #> 1_105 0.1250 0.1250 . . . . . . . . #> 1_106 0.1250 0.1250 . . . . . . . . #> 1_107 0.1250 0.1250 . . . . . . . . #> 1_108 0.1250 0.1250 . . . . . . . . #> 1_109 . . . . . . . . . . #> 1_110 . . 0.1250 0.1250 . 0.1250 0.06250 0.06250 0.06250 . #> 1_111 . . 0.1250 0.1250 . 0.1250 0.06250 0.06250 0.06250 . #> 1_112 . . 0.1250 0.1250 . 0.1250 0.06250 0.06250 0.06250 . #> 1_113 . . . . . . . . . . #> 1_114 . . 0.1250 0.1250 . 0.1250 0.06250 0.06250 0.06250 . #> 1_115 0.1250 0.1250 . . . . . . . . #> 1_116 0.1250 0.1250 . . . . . . . . #> 1_117 . . . . . . . . . . #> 1_118 0.1250 0.1250 . . . . . . . . #> 1_119 0.2500 0.2500 . . . . . . . . #> 1_120 0.2500 0.2500 . . . . . . . . #> 1_121 . . 0.0625 0.0625 . 0.0625 0.03125 0.03125 0.03125 . #> 1_122 . . 0.0625 0.0625 . 0.0625 0.03125 0.03125 0.03125 . #> 1_123 . . 0.0625 0.0625 . 0.0625 0.03125 0.03125 0.03125 . #> 1_124 . . 0.0625 0.0625 . 0.0625 0.03125 0.03125 0.03125 . #> 1_125 0.0625 0.0625 0.0625 0.0625 . 0.0625 0.03125 0.03125 0.03125 . #> 1_126 0.0625 0.0625 0.0625 0.0625 . 0.0625 0.03125 0.03125 0.03125 . #> 1_127 0.0625 0.0625 0.0625 0.0625 . 0.0625 0.03125 0.03125 0.03125 . #> 1_128 0.0625 0.0625 0.0625 0.0625 . 0.0625 0.03125 0.03125 0.03125 . #> 1_129 0.0625 0.0625 . . . . . . . . #> 1_130 0.2500 0.2500 . . . . . . . . #> 1_131 0.2500 0.2500 . . . . . . . . #> 1_132 0.2500 0.2500 . . . . . . . . #> 1_133 0.5000 0.2500 . . . . . . . . #> 1_134 0.2500 0.5000 . . . . . . . . #> 1_135 . . 0.5000 . . 0.2500 0.12500 0.12500 0.12500 . #> 1_136 . . . 0.5000 . 0.2500 0.12500 0.12500 0.12500 . #> 1_137 . . . . 0.50 . 0.25000 0.25000 0.25000 . #> 1_138 . . 0.2500 0.2500 . 0.5000 0.25000 0.25000 0.25000 . #> 1_139 . . 0.1250 0.1250 0.25 0.2500 0.50000 0.25000 0.25000 . #> 1_140 . . 0.1250 0.1250 0.25 0.2500 0.25000 0.50000 0.25000 . #> 1_141 . . 0.1250 0.1250 0.25 0.2500 0.25000 0.25000 0.50000 . #> 2_201 . . . . . . . . . 0.500 #> 2_202 . . . . . . . . . . #> 2_203 . . . . . . . . . . #> 2_204 . . . . . . . . . 0.250 #> 2_205 . . . . . . . . . 0.250 #> 2_206 . . . . . . . . . 0.250 #> 2_207 . . . . . . . . . 0.250 #> 2_208 . . . . . . . . . 0.250 #> 2_209 . . . . . . . . . . #> 2_210 . . . . . . . . . 0.125 #> 2_211 . . . . . . . . . 0.125 #> 2_212 . . . . . . . . . 0.125 #> 2_213 . . . . . . . . . 0.125 #> 2_214 . . . . . . . . . 0.125 #> #> 1_101 . . . . . . . . . . . . #> 1_102 . . . . . . . . . . . . #> 1_103 . . . . . . . . . . . . #> 1_104 . . . . . . . . . . . . #> 1_105 . . . . . . . . . . . . #> 1_106 . . . . . . . . . . . . #> 1_107 . . . . . . . . . . . . #> 1_108 . . . . . . . . . . . . #> 1_109 . . . . . . . . . . . . #> 1_110 . . . . . . . . . . . . #> 1_111 . . . . . . . . . . . . #> 1_112 . . . . . . . . . . . . #> 1_113 . . . . . . . . . . . . #> 1_114 . . . . . . . . . . . . #> 1_115 . . . . . . . . . . . . #> 1_116 . . . . . . . . . . . . #> 1_117 . . . . . . . . . . . . #> 1_118 . . . . . . . . . . . . #> 1_119 . . . . . . . . . . . . #> 1_120 . . . . . . . . . . . . #> 1_121 . . . . . . . . . . . . #> 1_122 . . . . . . . . . . . . #> 1_123 . . . . . . . . . . . . #> 1_124 . . . . . . . . . . . . #> 1_125 . . . . . . . . . . . . #> 1_126 . . . . . . . . . . . . #> 1_127 . . . . . . . . . . . . #> 1_128 . . . . . . . . . . . . #> 1_129 . . . . . . . . . . . . #> 1_130 . . . . . . . . . . . . #> 1_131 . . . . . . . . . . . . #> 1_132 . . . . . . . . . . . . #> 1_133 . . . . . . . . . . . . #> 1_134 . . . . . . . . . . . . #> 1_135 . . . . . . . . . . . . #> 1_136 . . . . . . . . . . . . #> 1_137 . . . . . . . . . . . . #> 1_138 . . . . . . . . . . . . #> 1_139 . . . . . . . . . . . . #> 1_140 . . . . . . . . . . . . #> 1_141 . . . . . . . . . . . . #> 2_201 . . 0.250 0.250 0.250 0.250 0.250 . 0.1250 0.1250 0.1250 0.1250 #> 2_202 0.500 . 0.250 0.250 0.250 0.250 0.250 . 0.1250 0.1250 0.1250 0.1250 #> 2_203 . 0.50 . . . . . . 0.2500 0.2500 . . #> 2_204 0.250 . 0.500 0.250 0.250 0.250 0.250 . 0.2500 0.2500 0.1250 0.1250 #> 2_205 0.250 . 0.250 0.500 0.250 0.250 0.250 . 0.1250 0.1250 0.1250 0.1250 #> 2_206 0.250 . 0.250 0.250 0.500 0.250 0.250 . 0.1250 0.1250 0.1250 0.1250 #> 2_207 0.250 . 0.250 0.250 0.250 0.500 0.250 . 0.1250 0.1250 0.1250 0.1250 #> 2_208 0.250 . 0.250 0.250 0.250 0.250 0.500 . 0.1250 0.1250 0.2500 0.2500 #> 2_209 . . . . . . . 0.50 . . 0.2500 0.2500 #> 2_210 0.125 0.25 0.250 0.125 0.125 0.125 0.125 . 0.5000 0.2500 0.0625 0.0625 #> 2_211 0.125 0.25 0.250 0.125 0.125 0.125 0.125 . 0.2500 0.5000 0.0625 0.0625 #> 2_212 0.125 . 0.125 0.125 0.125 0.125 0.250 0.25 0.0625 0.0625 0.5000 0.2500 #> 2_213 0.125 . 0.125 0.125 0.125 0.125 0.250 0.25 0.0625 0.0625 0.2500 0.5000 #> 2_214 0.125 . 0.125 0.125 0.125 0.125 0.250 0.25 0.0625 0.0625 0.2500 0.2500 #> #> 1_101 . #> 1_102 . #> 1_103 . #> 1_104 . #> 1_105 . #> 1_106 . #> 1_107 . #> 1_108 . #> 1_109 . #> 1_110 . #> 1_111 . #> 1_112 . #> 1_113 . #> 1_114 . #> 1_115 . #> 1_116 . #> 1_117 . #> 1_118 . #> 1_119 . #> 1_120 . #> 1_121 . #> 1_122 . #> 1_123 . #> 1_124 . #> 1_125 . #> 1_126 . #> 1_127 . #> 1_128 . #> 1_129 . #> 1_130 . #> 1_131 . #> 1_132 . #> 1_133 . #> 1_134 . #> 1_135 . #> 1_136 . #> 1_137 . #> 1_138 . #> 1_139 . #> 1_140 . #> 1_141 . #> 2_201 0.1250 #> 2_202 0.1250 #> 2_203 . #> 2_204 0.1250 #> 2_205 0.1250 #> 2_206 0.1250 #> 2_207 0.1250 #> 2_208 0.2500 #> 2_209 0.2500 #> 2_210 0.0625 #> 2_211 0.0625 #> 2_212 0.2500 #> 2_213 0.2500 #> 2_214 0.5000"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/make_class_info.html","id":null,"dir":"Reference","previous_headings":"","what":"Make class information — make_class_info","title":"Make class information — make_class_info","text":"Make class information","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/make_class_info.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make class information — make_class_info","text":"","code":"make_class_info(x)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/make_class_info.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make class information — make_class_info","text":"x list class","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/make_class_info.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Make class information — make_class_info","text":"character vector class information","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/make_class_info.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Make class information — make_class_info","text":"","code":"Pedixplorer::make_class_info(list(1, \"a\", 1:3, list(1, 2))) #> [1] \"\" \"\" \"\" \"\""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/make_famid.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute family id — make_famid","title":"Compute family id — make_famid","text":"Construct family identifier pedigree information","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/make_famid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute family id — make_famid","text":"","code":"# S4 method for class 'character' make_famid(obj, dadid, momid) # S4 method for class 'Pedigree' make_famid(obj)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/make_famid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute family id — make_famid","text":"obj character vector id individuals data.frame informations corresponding columns. dadid vector containing subject, identifiers biologicals fathers. momid vector containing subject, identifiers biologicals mothers.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/make_famid.html","id":"when-used-with-a-character-vector","dir":"Reference","previous_headings":"","what":"When used with a character vector","title":"Compute family id — make_famid","text":"integer vector giving family groupings","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/make_famid.html","id":"when-used-with-a-pedigree-object","dir":"Reference","previous_headings":"","what":"When used with a Pedigree object","title":"Compute family id — make_famid","text":"updated Pedigree object family id added ids updated","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/make_famid.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Compute family id — make_famid","text":"Create vector length n, giving family 'tree' number subject. Pedigree totally connected, everyone end tree 1, otherwise tree numbers represent disconnected subfamilies. Singleton subjects give zero family number.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/make_famid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compute family id — make_famid","text":"","code":"make_famid( c(\"A\", \"B\", \"C\", \"D\", \"E\", \"F\"), c(\"C\", \"D\", \"0\", \"0\", \"0\", \"0\"), c(\"E\", \"E\", \"0\", \"0\", \"0\", \"0\") ) #> [1] \"1\" \"1\" \"1\" \"1\" \"1\" NA data(sampleped) ped1 <- Pedigree(sampleped[,-1]) make_famid(ped1) #> Pedigree object with: #> Ped object with 55 individuals and 13 metadata columns: #> id dadid momid sex famid steril #> col_class #> 1_101 1_101 male 1 #> 1_102 1_102 female 1 #> 1_103 1_103 1_135 1_136 male 1 #> 1_104 1_104 female 1 #> 1_105 1_105 male 1 #> ... ... ... ... ... ... ... #> 2_210 2_210 2_203 2_204 male 2 #> 2_211 2_211 2_203 2_204 male 2 #> 2_212 2_212 2_209 2_208 female 2 #> 2_213 2_213 2_209 2_208 male 2 #> 2_214 2_214 2_209 2_208 male 2 #> status avail affected useful kin isinf #> col_class #> 1_101 FALSE FALSE #> 1_102 FALSE TRUE #> 1_103 FALSE TRUE #> 1_104 FALSE FALSE #> 1_105 FALSE #> ... ... ... ... ... ... ... #> 2_210 FALSE FALSE #> 2_211 TRUE FALSE #> 2_212 TRUE FALSE #> 2_213 FALSE FALSE #> 2_214 TRUE TRUE #> num_child_tot num_child_dir num_child_ind | indId fatherId #> col_class #> 1_101 1 1 0 101 #> 1_102 1 1 0 102 #> 1_103 4 4 0 103 135 #> 1_104 4 4 0 104 #> 1_105 4 4 0 105 #> ... ... ... ... ... ... #> 2_210 0 0 0 210 203 #> 2_211 0 0 0 211 203 #> 2_212 0 0 0 212 209 #> 2_213 0 0 0 213 209 #> 2_214 0 0 0 214 209 #> motherId gender affection available num #> col_class #> 1_101 1 0 0 2 #> 1_102 2 1 0 3 #> 1_103 136 1 1 0 2 #> 1_104 2 0 0 4 #> 1_105 1 0 6 #> ... ... ... ... ... ... #> 2_210 204 1 0 0 2 #> 2_211 204 1 0 1 1 #> 2_212 208 2 0 1 3 #> 2_213 208 1 0 0 2 #> 2_214 208 1 1 1 0 #> error family sterilisation vitalStatus affection_mods #> col_class #> 1_101 0 #> 1_102 1 #> 1_103 1 #> 1_104 0 #> 1_105 NA #> ... ... ... ... ... ... #> 2_210 0 #> 2_211 0 #> 2_212 0 #> 2_213 0 #> 2_214 1 #> avail_mods #> col_class #> 1_101 0 #> 1_102 0 #> 1_103 0 #> 1_104 0 #> 1_105 0 #> ... ... #> 2_210 0 #> 2_211 1 #> 2_212 1 #> 2_213 0 #> 2_214 1 #> Rel object with 0 relationshipswith 0 MZ twin, 0 DZ twin, 0 UZ twin, 0 Spouse: #> id1 id2 code famid #> "},{"path":"https://louislenezet.github.io/Pedixplorer/reference/make_rownames.html","id":null,"dir":"Reference","previous_headings":"","what":"Make rownames for rectangular data display — make_rownames","title":"Make rownames for rectangular data display — make_rownames","text":"Make rownames rectangular data display","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/make_rownames.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make rownames for rectangular data display — make_rownames","text":"","code":"make_rownames(x_rownames, nrow, nhead, ntail)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/make_rownames.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make rownames for rectangular data display — make_rownames","text":"x_rownames rownames data nrow number rows data nhead number rownames display beginning ntail number rownames display end","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/make_rownames.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Make rownames for rectangular data display — make_rownames","text":"character vector rownames","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/make_rownames.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Make rownames for rectangular data display — make_rownames","text":"","code":"Pedixplorer::make_rownames(rownames(mtcars), nrow(mtcars), 3, 3) #> [1] \"Mazda RX4\" \"Mazda RX4 Wag\" \"Datsun 710\" \"...\" #> [5] \"Ferrari Dino\" \"Maserati Bora\" \"Volvo 142E\""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/min_dist_inf.html","id":null,"dir":"Reference","previous_headings":"","what":"Minimum distance to the informative individuals — min_dist_inf","title":"Minimum distance to the informative individuals — min_dist_inf","text":"Compute minimum distance informative individuals others. distance transformation maximum kinship degree informative individuals others. transformation done taking log2 inverse maximum kinship degree. \\(minDist = log2(1 / \\max(kinship))\\) Therefore, minimum distance 0 maximum kinship 1 infinite maximum kinship 0. siblings, kinship value 0.5 minimum distance 1. time kinship degree divided 2, minimum distance increased 1.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/min_dist_inf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Minimum distance to the informative individuals — min_dist_inf","text":"","code":"# S4 method for class 'character' min_dist_inf(obj, dadid, momid, sex, id_inf) # S4 method for class 'Pedigree' min_dist_inf(obj, reset = FALSE, ...) # S4 method for class 'Ped' min_dist_inf(obj, reset = FALSE)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/min_dist_inf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Minimum distance to the informative individuals — min_dist_inf","text":"obj character vector id individuals data.frame informations corresponding columns. ... Additional arguments dadid vector containing subject, identifiers biologicals fathers. momid vector containing subject, identifiers biologicals mothers. sex character, factor numeric vector corresponding gender individuals. transformed ordered factor following levels: male < female < unknown < terminated following values recognized: character() factor() : \"f\", \"m\", \"woman\", \"man\", \"male\", \"female\", \"unknown\", \"terminated\" numeric() : 1 = \"male\", 2 = \"female\", 3 = \"unknown\", 4 = \"terminated\" id_inf identifiers vector informative individuals. reset TRUE, kin isinf columns reset","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/min_dist_inf.html","id":"when-obj-is-a-vector","dir":"Reference","previous_headings":"","what":"When obj is a vector","title":"Minimum distance to the informative individuals — min_dist_inf","text":"vector minimum distance informative individuals others corresponding order individuals obj vector.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/min_dist_inf.html","id":"when-obj-is-a-pedigree","dir":"Reference","previous_headings":"","what":"When obj is a Pedigree","title":"Minimum distance to the informative individuals — min_dist_inf","text":"Pedigree object new slot named 'kin' containing minimum distance individuals informative individuals. isinf slot also updated informative individuals.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/min_dist_inf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Minimum distance to the informative individuals — min_dist_inf","text":"","code":"min_dist_inf( c(\"A\", \"B\", \"C\", \"D\", \"E\"), c(\"C\", \"D\", \"0\", \"0\", \"0\"), c(\"E\", \"E\", \"0\", \"0\", \"0\"), sex = c(1, 2, 1, 2, 1), id_inf = c(\"D\", \"E\") ) #> A B C D E #> 2 2 Inf 1 1 data(sampleped) ped <- is_informative( Pedigree(sampleped), informative = \"AvAf\", col_aff = \"affection_mods\" ) kin(ped(min_dist_inf(ped, col_aff = \"affection_mods\"))) #> 1_101 1_102 1_103 1_104 1_105 1_106 1_107 1_108 1_109 1_110 1_111 1_112 1_113 #> 3 3 2 2 2 2 Inf Inf 2 1 2 2 Inf #> 1_114 1_115 1_116 1_117 1_118 1_119 1_120 1_121 1_122 1_123 1_124 1_125 1_126 #> 2 2 1 Inf 1 1 Inf 2 2 2 1 2 2 #> 1_127 1_128 1_129 1_130 1_131 1_132 1_133 1_134 1_135 1_136 1_137 1_138 1_139 #> 1 1 2 2 2 2 2 2 3 3 Inf 3 4 #> 1_140 1_141 2_201 2_202 2_203 2_204 2_205 2_206 2_207 2_208 2_209 2_210 2_211 #> 4 4 1 2 1 2 2 1 1 2 2 2 2 #> 2_212 2_213 2_214 #> 2 2 1"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/minnbreast.html","id":null,"dir":"Reference","previous_headings":"","what":"Minnesota Breast Cancer Study — minnbreast","title":"Minnesota Breast Cancer Study — minnbreast","text":"Data Minnesota Breast Cancer Family Study. contains extended pedigrees 426 families, identified single proband 1945-1952, follow incident breast cancer.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/minnbreast.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Minnesota Breast Cancer Study — minnbreast","text":"","code":"data(minnbreast)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/minnbreast.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Minnesota Breast Cancer Study — minnbreast","text":"data frame 28081 observations, one line per subject, following 14 variables. id : Subject identifier proband : 1, subject one original 426 probands fatherid : Identifier father, father part data set; zero otherwise motherid : Identifier mother, mother part data set; zero otherwise famid : Family identifier endage : Age last follow-incident cancer cancer : 1 = breast cancer (females) prostate cancer (males), 0 = censored yob : Year birth education : Amount education: 1-8 years, 9-12 years, high school graduate, vocational education beyond high school, college graduate, college graduate, post-graduate education, refused answer questionnaire marstat : Marital status: married, living someone marriage-like relationship, separated divorced, widowed, never married, refused answer questionaire everpreg : Ever pregnant time baseline survey parity : Number births nbreast : Number breast biopsies sex : M F bcpc : Part one families breast / prostate cancer substudy: 0 = , 1 = yes. Note subjects recruited overall study date BP substudy coded zero.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/minnbreast.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Minnesota Breast Cancer Study — minnbreast","text":"original study conducted Dr. Elving Anderson Dight Institute Human Genetics University Minnesota. 1944 1952, 544 sequential breast cancer cases seen University Hospital enrolled, information gathered parents, siblings, offspring, aunts / uncles, grandparents goal understanding possible familial aspects brest cancer. 1991 study resurrected Dr Tom Sellers. original 544 excluded 58 prevalent cases, along another 19 less 2 living relatives time Dr Anderson's survey. remaining 462 families 10 living members, 23 located 8 refused, leaving 426 families updated pedigrees obtained. gave study 13351 males 12699 females (5183 marry-ins). Primary questions relationship early life exposures, breast density, pharmacogenomics incident breast cancer risk. subset families data gathered prostate cancer risk male subjects via questionnaires sent men 40. , data items parentage limited female subjects. 2003 second phase study instituted. pedigrees extended numbers found data set, data gathered questionnaire.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/minnbreast.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Minnesota Breast Cancer Study — minnbreast","text":"Epidemiologic genetic follow-study 544 Minnesota breast cancer families: design methods. Sellers TA, Anderson VE, Potter JD, Bartow SA, Chen PL, Everson L, King RA, Kuni CC, Kushi LH, McGovern PG, et al. Genetic Epidemiology, 1995; 12(4):417-29. Evaluation familial clustering breast prostate cancer Minnesota Breast Cancer Family Study. Grabrick DM, Cerhan JR, Vierkant RA, Therneau TM, Cheville JC, Tindall DJ, Sellers TA. Cancer Detect Prev. 2003; 27(1):30-6. Risk breast cancer oral contraceptive use women family history breast cancer. Grabrick DM, Hartmann LC, Cerhan JR, Vierkant RA, Therneau TM, Vachon CM, Olson JE, Couch FJ, Anderson KE, Pankratz VS, Sellers TA. JAMA. 2000; 284(14):1791-8.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/minnbreast.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Minnesota Breast Cancer Study — minnbreast","text":"","code":"data(minnbreast) breastped <- Pedigree(minnbreast, cols_ren_ped = list( \"indId\" = \"id\", \"fatherId\" = \"fatherid\", \"motherId\" = \"motherid\", \"gender\" = \"sex\", \"family\" = \"famid\" ), missid = \"0\", col_aff = \"cancer\" ) summary(breastped) #> Pedigree object with #> [1] \"Ped object with 28081 individuals and 22 metadata columns\" #> [1] \"Rel object with 0 relationshipswith 0 MZ twin, 0 DZ twin, 0 UZ twin, 0 Spouse\" scales(breastped) #> An object of class \"Scales\" #> Slot \"fill\": #> order column_values column_mods mods labels affected fill density #> 1 1 cancer cancer_mods 0 Healthy <= to 0.5 FALSE white NA #> 2 1 cancer cancer_mods 1 Affected > to 0.5 TRUE red NA #> 3 1 cancer cancer_mods NA NA grey NA #> angle #> 1 NA #> 2 NA #> 3 NA #> #> Slot \"border\": #> column_values column_mods mods labels border #> 1 avail avail_mods NA NA grey #> 2 avail avail_mods 1 Available green #> 3 avail avail_mods 0 Non Available black #> #plot family 8, proband is solid, slash for cancers if (interactive()) { plot(breastped[famid(ped(breastped)) == \"8\"], aff_mark = TRUE) }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/na_to_length.html","id":null,"dir":"Reference","previous_headings":"","what":"NA to specific length — na_to_length","title":"NA to specific length — na_to_length","text":"Check value vector NA NULL. set new value matching length template. check size vector equal template.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/na_to_length.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"NA to specific length — na_to_length","text":"","code":"na_to_length(x, temp, value)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/na_to_length.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"NA to specific length — na_to_length","text":"x vector check. temp template vector use determine length. value value use fill vector.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/na_to_length.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"NA to specific length — na_to_length","text":"vector length temp.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/na_to_length.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"NA to specific length — na_to_length","text":"","code":"na_to_length(NA, rep(0, 4), \"NewValue\") #> [1] \"NewValue\" \"NewValue\" \"NewValue\" \"NewValue\" na_to_length(c(1, 2, 3, NA), rep(0, 4), \"NewValue\") #> [1] 1 2 3 NA"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/norm_ped.html","id":null,"dir":"Reference","previous_headings":"","what":"Normalise a Ped object dataframe — norm_ped","title":"Normalise a Ped object dataframe — norm_ped","text":"Normalise dataframe Ped object","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/norm_ped.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Normalise a Ped object dataframe — norm_ped","text":"","code":"norm_ped( ped_df, na_strings = c(\"NA\", \"\"), missid = NA_character_, try_num = FALSE, cols_used_del = FALSE )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/norm_ped.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Normalise a Ped object dataframe — norm_ped","text":"ped_df data.frame individuals informations. minimum columns required : indID individual identifiers -> id fatherId biological fathers identifiers -> dadid motherId biological mothers identifiers -> momdid gender sex individual -> sex family family identifiers -> famid family column, provided, merged ids field separated underscore using upd_famid() function. following columns also recognize transformed vect_to_binary() function: sterilisation status -> steril available status -> avail vitalStatus, individual dead -> status affection status -> affected values recognized columns 1 0, TRUE FALSE. na_strings Vector strings considered NA values. missid character vector missing values identifiers. id, dadid momid corresponding values set NA_character_. try_num Boolean defining function try convert columns numeric. cols_used_del Boolean defining columns used deleted.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/norm_ped.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Normalise a Ped object dataframe — norm_ped","text":"dataframe different variable correctly standardized errors identified error column","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/norm_ped.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Normalise a Ped object dataframe — norm_ped","text":"Normalise dataframe check columns correspondance able use input create Ped object. Multiple test done errors checked. Sex calculated based gender column. steril column need boolean either TRUE, FALSE 'NA'. considered available individual 'NA' values available column. Duplicated indId nullify relationship individual. individuals errors remove dataframe transfered error dataframe. number checks done ensure dataframe correct:","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/norm_ped.html","id":"on-identifiers-","dir":"Reference","previous_headings":"","what":"On identifiers:","title":"Normalise a Ped object dataframe — norm_ped","text":"ids (id, dadid, momid, famid) empty (!= \"\") id unique (duplicated) dadid momid unique id column (duplicated) id dadid momid Either parents none","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/norm_ped.html","id":"on-sex-","dir":"Reference","previous_headings":"","what":"On sex:","title":"Normalise a Ped object dataframe — norm_ped","text":"sex code either male, female, terminated unknown. parents steril fathers male mothers female","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/norm_ped.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Normalise a Ped object dataframe — norm_ped","text":"","code":"df <- data.frame( indId = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), fatherId = c(\"A\", 0, 1, 3, 0, 4, 1, 0, 6, 6), motherId = c(0, 0, 2, 2, 0, 5, 2, 0, 8, 8), gender = c(1, 2, \"m\", \"man\", \"f\", \"male\", \"m\", \"m\", \"f\", \"f\"), available = c(\"A\", \"1\", 0, NA, 1, 0, 1, 0, 1, 0), famid = c(1, 1, 1, 1, 1, 1, 1, 2, 2, 2), sterilisation = c(\"TRUE\", \"FALSE\", TRUE, FALSE, 1, 0, 1, 0, 1, \"TRUE\"), vitalStatus = c(\"TRUE\", \"FALSE\", TRUE, FALSE, 1, 0, 1, 0, 1, 0), affection = c(\"TRUE\", \"FALSE\", TRUE, FALSE, 1, 0, 1, 0, 1, 0) ) tryCatch( norm_ped(df), error = function(e) print(e) ) #> >"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/norm_rel.html","id":null,"dir":"Reference","previous_headings":"","what":"Normalise a Rel object dataframe — norm_rel","title":"Normalise a Rel object dataframe — norm_rel","text":"Normalise dataframe check columns correspondance able use input create Ped object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/norm_rel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Normalise a Rel object dataframe — norm_rel","text":"","code":"norm_rel(rel_df, na_strings = c(\"NA\", \"\"), missid = NA_character_)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/norm_rel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Normalise a Rel object dataframe — norm_rel","text":"rel_df data.frame special relationships individuals. See Rel() informations. minimum columns required id1, id2 code. famid column can also used specify family individuals. matrix given, columns needs ordered id1, id2, code famid. code values : 1 = Monozygotic twin 2 = Dizygotic twin 3 = twin unknown zygosity 4 = Spouse value relation code recognized function one defined rel_code_to_factor() function. na_strings Vector strings considered NA values. missid character vector missing values identifiers. id, dadid momid corresponding values set NA_character_.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/norm_rel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Normalise a Rel object dataframe — norm_rel","text":"dataframe errors identified","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/norm_rel.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Normalise a Rel object dataframe — norm_rel","text":"famid column, provided, merged ids field separated underscore using upd_famid() function. code column transformed rel_code_to_factor(). Multiple test done errors checked. number checks done ensure dataframe correct:","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/norm_rel.html","id":"on-identifiers-","dir":"Reference","previous_headings":"","what":"On identifiers:","title":"Normalise a Rel object dataframe — norm_rel","text":"ids (id1, id2) empty (!= \"\") id1 id2 ","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/norm_rel.html","id":"on-code","dir":"Reference","previous_headings":"","what":"On code","title":"Normalise a Rel object dataframe — norm_rel","text":"code recognised either \"MZ twin\", \"DZ twin\", \"UZ twin\" \"Spouse\"","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/norm_rel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Normalise a Rel object dataframe — norm_rel","text":"","code":"df <- data.frame( id1 = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), id2 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 1), code = c(\"MZ twin\", \"DZ twin\", \"UZ twin\", \"Spouse\", 1, 2, 3, 4, \"MzTwin\", \"sp oUse\"), famid = c(1, 1, 1, 1, 1, 1, 1, 2, 2, 2) ) norm_rel(df) #> id1 id2 code famid error #> 1 1_1 1_2 MZ twin 1 #> 2 1_2 1_3 DZ twin 1 #> 3 1_3 1_4 UZ twin 1 #> 4 1_4 1_5 Spouse 1 #> 5 1_5 1_6 MZ twin 1 #> 6 1_6 1_7 DZ twin 1 #> 7 1_7 1_8 UZ twin 1 #> 8 2_8 2_9 Spouse 2 #> 9 2_9 2_10 MZ twin 2 #> 10 2_10 2_1 Spouse 2 "},{"path":"https://louislenezet.github.io/Pedixplorer/reference/num_child.html","id":null,"dir":"Reference","previous_headings":"","what":"Number of childs — num_child","title":"Number of childs — num_child","text":"Compute number childs per individual","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/num_child.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Number of childs — num_child","text":"","code":"# S4 method for class 'character_OR_integer' num_child(obj, dadid, momid, rel_df = NULL, missid = NA_character_) # S4 method for class 'Pedigree' num_child(obj, reset = FALSE)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/num_child.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Number of childs — num_child","text":"obj character vector id individuals data.frame informations corresponding columns. dadid vector containing subject, identifiers biologicals fathers. momid vector containing subject, identifiers biologicals mothers. rel_df data.frame special relationships individuals. See Rel() informations. minimum columns required id1, id2 code. famid column can also used specify family individuals. matrix given, columns needs ordered id1, id2, code famid. code values : 1 = Monozygotic twin 2 = Dizygotic twin 3 = twin unknown zygosity 4 = Spouse value relation code recognized function one defined rel_code_to_factor() function. missid character vector missing values identifiers. id, dadid momid corresponding values set NA_character_. reset TRUE, num_child_tot, num_child_ind num_child_dir columns reset.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/num_child.html","id":"when-obj-is-a-vector","dir":"Reference","previous_headings":"","what":"When obj is a vector","title":"Number of childs — num_child","text":"dataframe columns num_child_dir, num_child_ind num_child_tot giving respectively direct, indirect total number child.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/num_child.html","id":"when-obj-is-a-pedigree-object","dir":"Reference","previous_headings":"","what":"When obj is a Pedigree object","title":"Number of childs — num_child","text":"updated Pedigree object columns num_child_dir, num_child_ind num_child_tot added Pedigree ped slot.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/num_child.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Number of childs — num_child","text":"Compute number direct child also number indirect child given ones related linked spouses. relation ship dataframe given, even children present 2 spouses, indirect childs still added.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/num_child.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Number of childs — num_child","text":"","code":"num_child( obj = c(\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\"), dadid = c(\"3\", \"3\", \"6\", \"8\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\"), momid = c(\"4\", \"5\", \"7\", \"9\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\"), rel_df = data.frame( id1 = \"10\", id2 = \"3\", code = \"Spouse\" ) ) #> id dadid momid num_child_dir num_child_tot num_child_ind #> 1 1 3 4 0 0 0 #> 2 2 3 5 0 0 0 #> 3 3 6 7 2 2 0 #> 4 4 8 9 1 2 1 #> 5 5 0 0 1 2 1 #> 6 6 0 0 1 1 0 #> 7 7 0 0 1 1 0 #> 8 8 0 0 1 1 0 #> 9 9 0 0 1 1 0 #> 10 10 0 0 0 2 2 data(sampleped) ped1 <- Pedigree(sampleped[sampleped$famid == \"1\",]) ped1 <- num_child(ped1, reset = TRUE) summary(ped(ped1)) #> [1] \"Ped object with 41 individuals and 13 metadata columns\""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/parent_of.html","id":null,"dir":"Reference","previous_headings":"","what":"Get parents of individuals — parent_of","title":"Get parents of individuals — parent_of","text":"Get parents individuals.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/parent_of.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get parents of individuals — parent_of","text":"","code":"# S4 method for class 'character_OR_integer' parent_of(obj, dadid, momid, id2) # S4 method for class 'Ped' parent_of(obj, id2) # S4 method for class 'Pedigree' parent_of(obj, id2)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/parent_of.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get parents of individuals — parent_of","text":"obj character vector id individuals data.frame informations corresponding columns. dadid vector containing subject, identifiers biologicals fathers. momid vector containing subject, identifiers biologicals mothers. id2 vector individuals identifiers get parents ","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/parent_of.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get parents of individuals — parent_of","text":"vector individuals identifiers corresponding parents individuals id2","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/parent_of.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get parents of individuals — parent_of","text":"","code":"data(sampleped) ped <- Pedigree(sampleped) parent_of(ped, \"1_121\") #> [1] \"1_110\" \"1_109\""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/paste0max.html","id":null,"dir":"Reference","previous_headings":"","what":"Print0 to max — paste0max","title":"Print0 to max — paste0max","text":"Print0 elements inside vector maximum reached.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/paste0max.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print0 to max — paste0max","text":"","code":"paste0max(x, max = 5, sep = \"\", ...)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/paste0max.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print0 to max — paste0max","text":"x vector. max maximum number elements print. ... Additional arguments passed print0","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/paste0max.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print0 to max — paste0max","text":"character vector aggregated maximum reached.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_avaf_infos.html","id":null,"dir":"Reference","previous_headings":"","what":"Shiny modules to display family information — ped_avaf_infos_ui","title":"Shiny modules to display family information — ped_avaf_infos_ui","text":"module allows display health availability data individuals pedigree object. output datatable. function composed two parts: UI server. UI called function ped_avaf_infos_ui() server function ped_avaf_infos_server().","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_avaf_infos.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shiny modules to display family information — ped_avaf_infos_ui","text":"","code":"ped_avaf_infos_ui(id, height = \"auto\") ped_avaf_infos_server(id, pedi, title = \"Family informations\", height = \"auto\") ped_avaf_infos_demo(height = \"auto\")"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_avaf_infos.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shiny modules to display family information — ped_avaf_infos_ui","text":"id string identify module. height height datatable. pedi reactive pedigree object. title title module.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_avaf_infos.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Shiny modules to display family information — ped_avaf_infos_ui","text":"reactive dataframe selected columns renamed names cols_needed cols_supl.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_avaf_infos.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Shiny modules to display family information — ped_avaf_infos_ui","text":"","code":"if (interactive()) { ped_avaf_infos_demo() }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_server.html","id":null,"dir":"Reference","previous_headings":"","what":"Create the server logic for the ped_shiny application — ped_server","title":"Create the server logic for the ped_shiny application — ped_server","text":"Create server logic ped_shiny application","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_server.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create the server logic for the ped_shiny application — ped_server","text":"","code":"ped_server(input, output, session, precision = 2)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_server.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create the server logic for the ped_shiny application — ped_server","text":"input input object Shiny app. output output object Shiny app. session session object Shiny app. precision Number decimal position boxes plot.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_server.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create the server logic for the ped_shiny application — ped_server","text":"shiny::shinyServer()","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_server.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create the server logic for the ped_shiny application — ped_server","text":"","code":"if (interactive()) { ped_shiny() }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_shiny.html","id":null,"dir":"Reference","previous_headings":"","what":"Run Pedixplorer Shiny application — ped_shiny","title":"Run Pedixplorer Shiny application — ped_shiny","text":"function creates shiny application manage visualize pedigree data using ped_ui() ped_server() functions.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_shiny.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run Pedixplorer Shiny application — ped_shiny","text":"","code":"ped_shiny( port = getOption(\"shiny.port\"), host = getOption(\"shiny.host\", \"127.0.0.1\"), precision = 2 )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_shiny.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run Pedixplorer Shiny application — ped_shiny","text":"port (optional) Specify port application list . host (optional) IPv4 address application listen . precision Number decimal position boxes plot.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_shiny.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Run Pedixplorer Shiny application — ped_shiny","text":"Running Shiny Application","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_shiny.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Run Pedixplorer Shiny application — ped_shiny","text":"application composed several modules: Data import Data column selection Data download Family selection Health selection Informative selection Subfamily selection Plotting pedigree Family information","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_shiny.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Run Pedixplorer Shiny application — ped_shiny","text":"","code":"if (interactive()) { ped_shiny() }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_to_legdf.html","id":null,"dir":"Reference","previous_headings":"","what":"Create plotting legend data frame from a Pedigree — ped_to_legdf","title":"Create plotting legend data frame from a Pedigree — ped_to_legdf","text":"Convert Pedigree legend data frame plotted afterwards plot_fromdf().","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_to_legdf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create plotting legend data frame from a Pedigree — ped_to_legdf","text":"","code":"# S4 method for class 'Pedigree' ped_to_legdf( obj, boxh = 1, boxw = 1, cex = 1, adjx = 0, adjy = 0, lwd = par(\"lwd\") )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_to_legdf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create plotting legend data frame from a Pedigree — ped_to_legdf","text":"obj Pedigree object boxh Height polygons elements boxw Width polygons elements cex Character expansion text adjx default=0. Controls horizontal text adjustment labels legend. adjy default=0. Controls vertical text adjustment labels legend. lwd default=par(\"lwd\"). Controls bordering line width elements legend.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_to_legdf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create plotting legend data frame from a Pedigree — ped_to_legdf","text":"list containing legend data frame user coordinates.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_to_legdf.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create plotting legend data frame from a Pedigree — ped_to_legdf","text":"data frame contains following columns: x0, y0, x1, y1: coordinates elements type: type elements fill: fill color elements border: border color elements angle: angle shading elements density: density shading elements cex: size elements label: label elements tips: tips elements (used tooltips) adjx: horizontal text adjustment labels adjy: vertical text adjustment labels columns used plot_fromdf() plot graph.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_to_legdf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create plotting legend data frame from a Pedigree — ped_to_legdf","text":"","code":"data(\"sampleped\") ped <- Pedigree(sampleped) leg_df <- ped_to_legdf(ped) summary(leg_df$df) #> id x0 y0 x1 #> Length:22 Min. : 0.000 Min. :0.000 Min. : NA #> Class :character 1st Qu.: 2.070 1st Qu.:1.000 1st Qu.: NA #> Mode :character Median : 7.902 Median :2.250 Median : NA #> Mean : 6.661 Mean :2.432 Mean :NaN #> 3rd Qu.: 9.923 3rd Qu.:3.500 3rd Qu.: NA #> Max. :14.916 Max. :7.000 Max. : NA #> NA's :22 #> y1 type fill border #> Min. : NA Length:22 Length:22 Length:22 #> 1st Qu.: NA Class :character Class :character Class :character #> Median : NA Mode :character Mode :character Mode :character #> Mean :NaN #> 3rd Qu.: NA #> Max. : NA #> NA's :22 #> angle density cex label #> Min. : NA Min. : NA Min. :1.000 Length:22 #> 1st Qu.: NA 1st Qu.: NA 1st Qu.:1.000 Class :character #> Median : NA Median : NA Median :1.000 Mode :character #> Mean :NaN Mean :NaN Mean :1.075 #> 3rd Qu.: NA 3rd Qu.: NA 3rd Qu.:1.000 #> Max. : NA Max. : NA Max. :1.500 #> NA's :22 NA's :22 NA's :2 #> tips adjx adjy #> Length:22 Min. :0 Min. :1 #> Class :character 1st Qu.:0 1st Qu.:1 #> Mode :character Median :0 Median :1 #> Mean :0 Mean :1 #> 3rd Qu.:0 3rd Qu.:1 #> Max. :0 Max. :1 #> NA's :10 NA's :10 plot_fromdf(leg_df$df, usr = c(-1,15,0,7))"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_to_plotdf.html","id":null,"dir":"Reference","previous_headings":"","what":"Create plotting data frame from a Pedigree — ped_to_plotdf","title":"Create plotting data frame from a Pedigree — ped_to_plotdf","text":"Convert Pedigree data frame elements characteristic plotted afterwards plot_fromdf().","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_to_plotdf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create plotting data frame from a Pedigree — ped_to_plotdf","text":"","code":"# S4 method for class 'Pedigree' ped_to_plotdf( obj, packed = TRUE, width = 6, align = c(1.5, 2), align_parents = TRUE, force = FALSE, cex = 1, symbolsize = cex, pconnect = 0.5, branch = 0.6, aff_mark = TRUE, id_lab = \"id\", label = NULL, precision = 3, lwd = par(\"lwd\"), ... )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_to_plotdf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create plotting data frame from a Pedigree — ped_to_plotdf","text":"obj Pedigree object ... arguments passed par() packed Pedigree compressed. (.e. allow diagonal lines connecting parents children order smaller overall width plot.) width packed output, minimum width plot, inches. align packed Pedigree, align children parents TRUE, extent possible given page width, align left margin FALSE. argument can two element vector, giving alignment parameters, logical value. TRUE, default c(1.5, 2), numeric routine alignped4() called. align_parents align_parents = TRUE, go one step try make parents child depth. (always possible). helps drawing program lining pedigrees 'join middle' via marriage. force force = TRUE, function return depth minus min(depth) depth reach state founders possible. cex Character expansion text symbolsize Size symbols pconnect connecting parent children program try make connecting line close vertical possible, subject lying inside endpoints line connects children least pconnect people. Setting option large number force line connect midpoint children. branch defines much angle used connect various levels nuclear families. aff_mark TRUE, add aff_mark box corresponding value affection column filling scale. id_lab column name id individuals. label NULL, add label box id corresponding value column given. precision number decimal places round solution . lwd default=par(\"lwd\"). Controls line width segments, arcs polygons.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_to_plotdf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create plotting data frame from a Pedigree — ped_to_plotdf","text":"list containing data frame user coordinates.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_to_plotdf.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create plotting data frame from a Pedigree — ped_to_plotdf","text":"data frame contains following columns: x0, y0, x1, y1: coordinates elements type: type elements fill: fill color elements border: border color elements angle: angle shading elements density: density shading elements cex: size elements label: label elements tips: tips elements (used tooltips) adjx: horizontal text adjustment labels adjy: vertical text adjustment labels columns used plot_fromdf() plot graph.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_to_plotdf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create plotting data frame from a Pedigree — ped_to_plotdf","text":"","code":"data(sampleped) ped1 <- Pedigree(sampleped[sampleped$famid == 1,]) plot_df <- ped_to_plotdf(ped1) summary(plot_df$df) #> id x0 y0 x1 #> Length:212 Min. : 0.000 Min. :1.000 Min. : 0.000 #> Class :character 1st Qu.: 3.000 1st Qu.:2.487 1st Qu.: 3.331 #> Mode :character Median : 7.000 Median :3.091 Median : 7.505 #> Mean : 7.296 Mean :3.090 Mean : 7.641 #> 3rd Qu.:11.750 3rd Qu.:4.000 3rd Qu.:11.831 #> Max. :15.010 Max. :4.275 Max. :15.010 #> NA's :126 #> y1 type fill border #> Min. :1.091 Length:212 Length:212 Length:212 #> 1st Qu.:2.355 Class :character Class :character Class :character #> Median :2.750 Mode :character Mode :character Mode :character #> Mean :2.875 #> 3rd Qu.:3.552 #> Max. :3.750 #> NA's :126 #> angle density cex label tips #> Min. : NA Min. : NA Min. :1 Length:212 Length:212 #> 1st Qu.: NA 1st Qu.: NA 1st Qu.:1 Class :character Class :character #> Median : NA Median : NA Median :1 Mode :character Mode :character #> Mean :NaN Mean :NaN Mean :1 #> 3rd Qu.: NA 3rd Qu.: NA 3rd Qu.:1 #> Max. : NA Max. : NA Max. :1 #> NA's :212 NA's :212 #> adjx adjy #> Min. : NA Min. : NA #> 1st Qu.: NA 1st Qu.: NA #> Median : NA Median : NA #> Mean :NaN Mean :NaN #> 3rd Qu.: NA 3rd Qu.: NA #> Max. : NA Max. : NA #> NA's :212 NA's :212 plot_fromdf(plot_df$df, usr = plot_df$par_usr$usr, boxh = plot_df$par_usr$boxh, boxw = plot_df$par_usr$boxw )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_ui.html","id":null,"dir":"Reference","previous_headings":"","what":"Create the user interface for the ped_shiny application — ped_ui","title":"Create the user interface for the ped_shiny application — ped_ui","text":"Create user interface ped_shiny application","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_ui.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create the user interface for the ped_shiny application — ped_ui","text":"shiny::shinyUI()","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_ui.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create the user interface for the ped_shiny application — ped_ui","text":"","code":"if (interactive()) { ped_shiny() }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/permute.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate all possible permutation — permute","title":"Generate all possible permutation — permute","text":"Given vector length n, generate possible permutations numbers 1 n. recursive routine, efficient.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/permute.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate all possible permutation — permute","text":"","code":"permute(x)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/permute.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate all possible permutation — permute","text":"x vector length n","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/permute.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate all possible permutation — permute","text":"matrix n cols n! rows","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_download.html","id":null,"dir":"Reference","previous_headings":"","what":"Shiny module to export plot — plot_download_ui","title":"Shiny module to export plot — plot_download_ui","text":"module allow export multiple type plot reactive object. file type currently supported png, pdf html. function composed two parts: UI server. UI called function plot_download_ui() server function plot_download_server().","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_download.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shiny module to export plot — plot_download_ui","text":"","code":"plot_download_ui(id) plot_download_server( id, my_plot, filename = \"saveplot\", label = \"Download\", width = 500, height = 500, ext = \"png\" ) plot_download_demo()"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_download.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shiny module to export plot — plot_download_ui","text":"id string. my_plot Reactive object containing plot. filename string name file. label string name download button. width numeric set width plot. height numeric set height plot. ext string set extension file.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_download.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Shiny module to export plot — plot_download_ui","text":"shiny module export plot.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_download.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Shiny module to export plot — plot_download_ui","text":"","code":"if (interactive()) { plot_download_demo() }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_fromdf.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a plot from a data.frame — plot_fromdf","title":"Create a plot from a data.frame — plot_fromdf","text":"function used create plot data.frame. ggplot_gen = TRUE, plot generated ggplot2 returned invisibly.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_fromdf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a plot from a data.frame — plot_fromdf","text":"","code":"plot_fromdf( df, usr = NULL, title = NULL, ggplot_gen = FALSE, boxw = 1, boxh = 1, add_to_existing = FALSE )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_fromdf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a plot from a data.frame — plot_fromdf","text":"df data.frame following columns: type: type element plot. Can text, segments, arc polygons. polygons, name polygon must form poly_*_* poly one type given polygons(), first * number slice polygon second * position division polygon. x0: x coordinate center element. y0: y coordinate center element. x1: x coordinate end element. used segments arc. y1: y coordinate end element. used segments arc. fill: fill color element. border: border color element. density: density element. angle: angle element. label: label element. used text. cex: size element. adjx: x adjustment element. used text. adjy: y adjustment element. used text. usr user coordinates plot. title title plot. ggplot_gen TRUE add segments ggplot object boxw Width polygons elements boxh Height polygons elements add_to_existing TRUE, plot added current plot.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_fromdf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a plot from a data.frame — plot_fromdf","text":"invisible ggplot object plot current plotting device","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_fromdf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a plot from a data.frame — plot_fromdf","text":"","code":"data(sampleped) ped1 <- Pedigree(sampleped[sampleped$famid == 1,]) lst <- ped_to_plotdf(ped1) if (interactive()) { plot_fromdf(lst$df, lst$par_usr$usr, boxw = lst$par_usr$boxw, boxh = lst$par_usr$boxh ) }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_legend.html","id":null,"dir":"Reference","previous_headings":"","what":"Shiny module to generate pedigree graph legend. — plot_legend_ui","title":"Shiny module to generate pedigree graph legend. — plot_legend_ui","text":"module allows plot legend pedigree object. function composed two parts: UI server. UI called function plot_legend_ui() server function plot_legend_server(). Small internal function used plotting Pedigree object legend","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_legend.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shiny module to generate pedigree graph legend. — plot_legend_ui","text":"","code":"plot_legend_ui(id, height = \"200px\") plot_legend_server( id, pedi, leg_loc = c(0.2, 1, 0, 1), lwd = par(\"lwd\"), boxw = 1, boxh = 1, adjx = 0, adjy = 0 ) plot_legend_demo(height = \"200px\", leg_loc = c(0.2, 1, 0, 1)) plot_legend( pedi, cex = 1, boxw = 0.1, boxh = 0.1, adjx = 0, adjy = 0, leg_loc = c(0, 1, 0, 1), add_to_existing = FALSE, usr = NULL, lwd = par(\"lwd\") )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_legend.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shiny module to generate pedigree graph legend. — plot_legend_ui","text":"id string. pedi reactive pedigree object. lwd default=par(\"lwd\"). Controls bordering line width elements legend. boxw Width polygons elements boxh Height polygons elements adjx default=0. Controls horizontal text adjustment labels legend. adjy default=0. Controls vertical text adjustment labels legend. cex Character expansion text","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_legend.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Shiny module to generate pedigree graph legend. — plot_legend_ui","text":"static UI legend.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_legend.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Shiny module to generate pedigree graph legend. — plot_legend_ui","text":"","code":"if (interactive()) { plot_legend_demo() }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_ped.html","id":null,"dir":"Reference","previous_headings":"","what":"Shiny module to generate pedigree graph. — plot_ped_ui","title":"Shiny module to generate pedigree graph. — plot_ped_ui","text":"module allows plot pedigree object. plot can interactive. function composed two parts: UI server. UI called function plot_ped_ui() server function plot_ped_server().","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_ped.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shiny module to generate pedigree graph. — plot_ped_ui","text":"","code":"plot_ped_ui(id) plot_ped_server( id, pedi, title, precision = 2, max_ind = 500, lwd = par(\"lwd\") ) plot_ped_demo(pedi, precision = 2, max_ind = 500)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_ped.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shiny module to generate pedigree graph. — plot_ped_ui","text":"id string. pedi reactive pedigree object. title string name plot. precision integer set precision plot. max_ind integer set maximum number individuals plot.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_ped.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Shiny module to generate pedigree graph. — plot_ped_ui","text":"reactive ggplot pedigree object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_ped.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Shiny module to generate pedigree graph. — plot_ped_ui","text":"","code":"if (interactive()) { data(\"sampleped\") pedi <- shiny::reactive({ Pedigree(sampleped[sampleped$famid == \"1\", ]) }) plot_ped_demo(pedi) }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_pedigree.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Pedigrees — plot,Pedigree,missing-method","title":"Plot Pedigrees — plot,Pedigree,missing-method","text":"function used plot Pedigree object. wrapper plot_fromdf() ped_to_plotdf() well ped_to_legdf() legend = TRUE.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_pedigree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Pedigrees — plot,Pedigree,missing-method","text":"","code":"# S4 method for class 'Pedigree,missing' plot( x, aff_mark = TRUE, id_lab = \"id\", label = NULL, ggplot_gen = FALSE, cex = 1, symbolsize = 1, branch = 0.6, packed = TRUE, align = c(1.5, 2), align_parents = TRUE, force = FALSE, width = 6, title = NULL, subreg = NULL, pconnect = 0.5, fam_to_plot = 1, legend = FALSE, leg_cex = 0.8, leg_symbolsize = 0.5, leg_loc = NULL, leg_adjx = 0, leg_adjy = 0, precision = 2, lwd = par(\"lwd\"), ... )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_pedigree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Pedigrees — plot,Pedigree,missing-method","text":"x Pedigree object. aff_mark TRUE, add aff_mark box corresponding value affection column filling scale. id_lab column name id individuals. label NULL, add label box id corresponding value column given. ggplot_gen TRUE add segments ggplot object cex Character expansion text symbolsize Size symbols branch defines much angle used connect various levels nuclear families. packed Pedigree compressed. (.e. allow diagonal lines connecting parents children order smaller overall width plot.) align packed Pedigree, align children parents TRUE, extent possible given page width, align left margin FALSE. argument can two element vector, giving alignment parameters, logical value. TRUE, default c(1.5, 2), numeric routine alignped4() called. align_parents align_parents = TRUE, go one step try make parents child depth. (always possible). helps drawing program lining pedigrees 'join middle' via marriage. force force = TRUE, function return depth minus min(depth) depth reach state founders possible. width packed output, minimum width plot, inches. title title plot. subreg 4-element vector (min x, max x, min depth, max depth), used edit away portions plot coordinates returned ped_to_plotdf(). useful zooming particular region Pedigree. pconnect connecting parent children program try make connecting line close vertical possible, subject lying inside endpoints line connects children least pconnect people. Setting option large number force line connect midpoint children. fam_to_plot default=1. Pedigree contains multiple families, parameter can used select family plot. can numeric value character value. numeric, index family plot returned unique(x$ped$famid). character, family id plot. legend default=FALSE. TRUE, legend added plot. leg_cex default=0.8. Controls size legend text. leg_symbolsize default=0.5. Controls size legend symbols. leg_loc default=NULL. NULL, legend placed upper right corner plot. Otherwise, 4-element vector form (x0, x1, y0, y1) can used specify location legend. leg_adjx default=0. Controls horizontal labels adjustment legend. leg_adjy default=0. Controls vertical labels adjustment legend. precision number decimal places round solution . lwd default=par(\"lwd\"). Controls line width segments, arcs polygons. ... Extra options feed ","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_pedigree.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot Pedigrees — plot,Pedigree,missing-method","text":"invisible list containing df : data.frame used plot Pedigree par_usr : user coordinates used plot Pedigree ggplot : ggplot object ggplot_gen = TRUE","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_pedigree.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot Pedigrees — plot,Pedigree,missing-method","text":"Two important parameters control looks result. One user specified maximum width. smallest possible width maximum number subjects line, user's suggestion low increased 1 + amount (give just little wiggle room). make Pedigree children centered parents simply make width large enough, however, symbols may get small. second align, vector 2 alignment parameters b. set siblings set locations x parents p=c(p1,p2) alignment penalty $$(1/k^)\\sum{=1}{k} [(x_i - (p1+p2)/2)]^2$$ $$\\sum(x- \\overline(p))^2/(k^)$$ k number siblings set. = 1 moving sibship k sibs one unit left right optimal incur cost moving one 1 two sibs place. = 0 large sibships harder move small ones, default value = 1.5 slightly easier move small ones. rationale default long parents somewhere first last siblings result looks fairly good, flexible spacing large family. tethering sibs single spot kept close . alignment penalty spouses \\(b(x_1 - x_2)^2\\), tends keep together. size b controls relative importance sib-parent spouse-spouse closeness.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_pedigree.html","id":"side-effects","dir":"Reference","previous_headings":"","what":"Side Effects","title":"Plot Pedigrees — plot,Pedigree,missing-method","text":"Creates plot current plotting device.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_pedigree.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot Pedigrees — plot,Pedigree,missing-method","text":"","code":"data(sampleped) pedAll <- Pedigree(sampleped) if (interactive()) { plot(pedAll) }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/polyfun.html","id":null,"dir":"Reference","previous_headings":"","what":"Polygonal element — polyfun","title":"Polygonal element — polyfun","text":"Create list x y coordinates polygon given number slices list coordinates polygon.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/polyfun.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Polygonal element — polyfun","text":"","code":"polyfun(nslice, coor)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/polyfun.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Polygonal element — polyfun","text":"nslice Number slices polygon coor Element form generate polygon containing x y coordinates theta","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/polyfun.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Polygonal element — polyfun","text":"list x y coordinates","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/polyfun.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Polygonal element — polyfun","text":"","code":"polyfun(2, list( x = c(-0.5, -0.5, 0.5, 0.5), y = c(-0.5, 0.5, 0.5, -0.5), theta = -c(3, 5, 7, 9) * pi / 4 )) #> [[1]] #> [[1]]$x #> [1] 0.000000e+00 5.551115e-17 -5.000000e-01 -5.000000e-01 -1.110223e-16 #> #> [[1]]$y #> [1] 0.5 0.0 0.0 1.0 1.0 #> #> #> [[2]] #> [[2]]$x #> [1] 0.000000e+00 -1.110223e-16 5.000000e-01 5.000000e-01 1.665335e-16 #> #> [[2]]$y #> [1] 0.5 1.0 1.0 0.0 0.0 #> #>"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/polygons.html","id":null,"dir":"Reference","previous_headings":"","what":"List of polygonal elements — polygons","title":"List of polygonal elements — polygons","text":"Create list polygonal elements x, y coordinates theta square, circle, diamond triangle. number slices element can specified.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/polygons.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List of polygonal elements — polygons","text":"","code":"polygons(nslice = 1)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/polygons.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List of polygonal elements — polygons","text":"nslice Number slices element nslice > 1, elements created polyfun().","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/polygons.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List of polygonal elements — polygons","text":"list polygonal elements x, y coordinates theta slice.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/polygons.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"List of polygonal elements — polygons","text":"","code":"polygons() #> $square #> $square[[1]] #> $square[[1]]$x #> [1] -0.5 -0.5 0.5 0.5 #> #> $square[[1]]$y #> [1] 0 1 1 0 #> #> #> #> $circle #> $circle[[1]] #> $circle[[1]]$x #> [1] 0.50000000 0.49589501 0.48364743 0.46345838 0.43565935 0.40070681 #> [7] 0.35917468 0.31174490 0.25919628 0.20239167 0.14226379 0.07979995 #> [13] 0.01602579 -0.04801151 -0.11126047 -0.17268253 -0.23126915 -0.28605833 #> [19] -0.33615045 -0.38072298 -0.41904405 -0.45048443 -0.47452787 -0.49077958 #> [25] -0.49897270 -0.49897270 -0.49077958 -0.47452787 -0.45048443 -0.41904405 #> [31] -0.38072298 -0.33615045 -0.28605833 -0.23126915 -0.17268253 -0.11126047 #> [37] -0.04801151 0.01602579 0.07979995 0.14226379 0.20239167 0.25919628 #> [43] 0.31174490 0.35917468 0.40070681 0.43565935 0.46345838 0.48364743 #> [49] 0.49589501 0.50000000 #> #> $circle[[1]]$y #> [1] 0.5000000000 0.5639385808 0.6268272920 0.6876335024 0.7453587760 #> [6] 0.7990552652 0.8478412753 0.8909157412 0.9275713815 0.9572063115 #> [11] 0.9793339265 0.9935908917 0.9997431081 0.9976895565 0.9874639561 #> [16] 0.9692342110 0.9432996532 0.9100861273 0.8701389985 0.8241141977 #> [21] 0.7727674506 0.7169418696 0.6575541090 0.5955793144 0.5320351100 #> [26] 0.4679648900 0.4044206856 0.3424458910 0.2830581304 0.2272325494 #> [31] 0.1758858023 0.1298610015 0.0899138727 0.0567003468 0.0307657890 #> [36] 0.0125360439 0.0023104435 0.0002568919 0.0064091083 0.0206660735 #> [41] 0.0427936885 0.0724286185 0.1090842588 0.1521587247 0.2009447348 #> [46] 0.2546412240 0.3123664976 0.3731727080 0.4360614192 0.5000000000 #> #> #> #> $diamond #> $diamond[[1]] #> $diamond[[1]]$x #> [1] 0.0 -0.5 0.0 0.5 #> #> $diamond[[1]]$y #> [1] 0.0 0.5 1.0 0.5 #> #> #> #> $triangle #> $triangle[[1]] #> $triangle[[1]]$x #> [1] 0.00 -0.56 0.56 #> #> $triangle[[1]]$y #> [1] 0 1 1 #> #> #> polygons(4) #> $square #> $square[[1]] #> $square[[1]]$x #> [1] 0.000000e+00 5.551115e-17 -5.000000e-01 -5.000000e-01 #> #> $square[[1]]$y #> [1] 0.5 0.0 0.0 0.5 #> #> #> $square[[2]] #> $square[[2]]$x #> [1] 0.000000e+00 -5.000000e-01 -5.000000e-01 -1.110223e-16 #> #> $square[[2]]$y #> [1] 0.5 0.5 1.0 1.0 #> #> #> $square[[3]] #> $square[[3]]$x #> [1] 0.000000e+00 -1.110223e-16 5.000000e-01 5.000000e-01 #> #> $square[[3]]$y #> [1] 0.5 1.0 1.0 0.5 #> #> #> $square[[4]] #> $square[[4]]$x #> [1] 0.000000e+00 5.000000e-01 5.000000e-01 1.665335e-16 #> #> $square[[4]]$y #> [1] 0.5 0.5 0.0 0.0 #> #> #> #> $circle #> $circle[[1]] #> $circle[[1]]$x #> [1] 0.000000e+00 3.061617e-17 -6.526310e-02 -1.294095e-01 -1.913417e-01 #> [6] -2.500000e-01 -3.043807e-01 -3.535534e-01 -3.966767e-01 -4.330127e-01 #> [11] -4.619398e-01 -4.829629e-01 -4.957224e-01 -5.000000e-01 #> #> $circle[[1]]$y #> [1] 0.500000000 0.000000000 0.004277569 0.017037087 0.038060234 0.066987298 #> [7] 0.103323330 0.146446609 0.195619285 0.250000000 0.308658284 0.370590477 #> [13] 0.434736904 0.500000000 #> #> #> $circle[[2]] #> $circle[[2]]$x #> [1] 0.000000e+00 -5.000000e-01 -4.957224e-01 -4.829629e-01 -4.619398e-01 #> [6] -4.330127e-01 -3.966767e-01 -3.535534e-01 -3.043807e-01 -2.500000e-01 #> [11] -1.913417e-01 -1.294095e-01 -6.526310e-02 -9.184851e-17 #> #> $circle[[2]]$y #> [1] 0.5000000 0.5000000 0.5652631 0.6294095 0.6913417 0.7500000 0.8043807 #> [8] 0.8535534 0.8966767 0.9330127 0.9619398 0.9829629 0.9957224 1.0000000 #> #> #> $circle[[3]] #> $circle[[3]]$x #> [1] 0.000000e+00 -9.184851e-17 6.526310e-02 1.294095e-01 1.913417e-01 #> [6] 2.500000e-01 3.043807e-01 3.535534e-01 3.966767e-01 4.330127e-01 #> [11] 4.619398e-01 4.829629e-01 4.957224e-01 5.000000e-01 #> #> $circle[[3]]$y #> [1] 0.5000000 1.0000000 0.9957224 0.9829629 0.9619398 0.9330127 0.8966767 #> [8] 0.8535534 0.8043807 0.7500000 0.6913417 0.6294095 0.5652631 0.5000000 #> #> #> $circle[[4]] #> $circle[[4]]$x #> [1] 0.000000e+00 5.000000e-01 4.957224e-01 4.829629e-01 4.619398e-01 #> [6] 4.330127e-01 3.966767e-01 3.535534e-01 3.043807e-01 2.500000e-01 #> [11] 1.913417e-01 1.294095e-01 6.526310e-02 1.530808e-16 #> #> $circle[[4]]$y #> [1] 0.500000000 0.500000000 0.434736904 0.370590477 0.308658284 0.250000000 #> [7] 0.195619285 0.146446609 0.103323330 0.066987298 0.038060234 0.017037087 #> [13] 0.004277569 0.000000000 #> #> #> #> $diamond #> $diamond[[1]] #> $diamond[[1]]$x #> [1] 0.000000e+00 5.551115e-17 0.000000e+00 -5.000000e-01 #> #> $diamond[[1]]$y #> [1] 5.000000e-01 5.551115e-17 0.000000e+00 5.000000e-01 #> #> #> $diamond[[2]] #> $diamond[[2]]$x #> [1] 0.000000e+00 -5.000000e-01 -5.000000e-01 -1.110223e-16 #> #> $diamond[[2]]$y #> [1] 0.5 0.5 0.5 1.0 #> #> #> $diamond[[3]] #> $diamond[[3]]$x #> [1] 0.000000e+00 -1.110223e-16 0.000000e+00 5.000000e-01 #> #> $diamond[[3]]$y #> [1] 0.5 1.0 1.0 0.5 #> #> #> $diamond[[4]] #> $diamond[[4]]$x #> [1] 0.000000e+00 5.000000e-01 5.000000e-01 1.665335e-16 #> #> $diamond[[4]]$y #> [1] 5.000000e-01 5.000000e-01 5.000000e-01 1.665335e-16 #> #> #> #> $triangle #> $triangle[[1]] #> $triangle[[1]]$x #> [1] 0.00 0.00 -0.56 -0.28 #> #> $triangle[[1]]$y #> [1] 0.5 0.0 0.0 0.5 #> #> #> $triangle[[2]] #> $triangle[[2]]$x #> [1] 0.000000e+00 -2.800000e-01 0.000000e+00 -1.110223e-16 #> #> $triangle[[2]]$y #> [1] 0.5 0.5 1.0 1.0 #> #> #> $triangle[[3]] #> $triangle[[3]]$x #> [1] 0.000000e+00 -1.110223e-16 2.800000e-01 #> #> $triangle[[3]]$y #> [1] 0.5 1.0 0.5 #> #> #> $triangle[[4]] #> $triangle[[4]]$x #> [1] 0.000000e+00 2.800000e-01 5.600000e-01 1.110223e-16 #> #> $triangle[[4]]$y #> [1] 0.5 0.5 0.0 0.0 #> #> #>"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/read_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Read data from file path — read_data","title":"Read data from file path — read_data","text":"Read dataframe based extension file","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/read_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read data from file path — read_data","text":"","code":"read_data( file, sep = \";\", quote = \"'\", header = TRUE, df_name = NA, strings_as_factors = FALSE, to_char = TRUE, na_values = c(\"\", \"NA\", \"NULL\", \"None\") )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/read_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read data from file path — read_data","text":"file file path sep string defining separator use file quote string defining quote use header boolean defining dataframe contain header df_name string defining name dataframe / sheet use strings_as_factors boolean defining strings interpreted ad factor to_char boolean defining dataset read character.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/read_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read data from file path — read_data","text":"dataframe.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/read_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read data from file path — read_data","text":"function detect extension file proceed use according function read parameters given user.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/read_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read data from file path — read_data","text":"","code":"if (FALSE) { # \\dontrun{ read_data('path/to/my/file.txt', sep=',', header=FALSE) } # }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/rel_code_to_factor.html","id":null,"dir":"Reference","previous_headings":"","what":"Relationship code variable to ordered factor — rel_code_to_factor","title":"Relationship code variable to ordered factor — rel_code_to_factor","text":"Relationship code variable ordered factor","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/rel_code_to_factor.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Relationship code variable to ordered factor — rel_code_to_factor","text":"","code":"rel_code_to_factor(code)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/rel_code_to_factor.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Relationship code variable to ordered factor — rel_code_to_factor","text":"code character, factor numeric vector corresponding relation code individuals: MZ twin = Monozygotic twin DZ twin = Dizygotic twin UZ twin = twin unknown zygosity Spouse = Spouse following values recognized: character() factor() : \"MZ twin\", \"DZ twin\", \"UZ twin\", \"Spouse\" without space words. case important. numeric() : 1 = \"MZ twin\", 2 = \"DZ twin\", 3 = \"UZ twin\", 4 = \"Spouse\"","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/rel_code_to_factor.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Relationship code variable to ordered factor — rel_code_to_factor","text":"ordered factor vector containing transformed variable \"MZ twin\" < \"DZ twin\" < \"UZ twin\" < \"Spouse\"","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/rel_code_to_factor.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Relationship code variable to ordered factor — rel_code_to_factor","text":"","code":"rel_code_to_factor(c(1, 2, 3, 4, \"MZ twin\", \"DZ twin\", \"UZ twin\", \"Spouse\")) #> [1] MZ twin DZ twin UZ twin Spouse MZ twin DZ twin UZ twin Spouse #> Levels: MZ twin < DZ twin < UZ twin < Spouse"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/relped.html","id":null,"dir":"Reference","previous_headings":"","what":"Relped data — relped","title":"Relped data — relped","text":"Small set related individuals testing purposes.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/relped.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Relped data — relped","text":"","code":"data(\"relped\")"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/relped.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Relped data — relped","text":"dataframe composed 4 columns: id1 : first individual identifier, id2 : second individual identifier, code : relationship two individuals, famid : family identifier. relationship codes : 1 Monozygotic twin 2 Dizygotic twin 3 Twin unknown zygosity 4 Spouse relationship","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/relped.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Relped data — relped","text":"small fictive data set relation accompanies sampleped data set. aim create data set variety relationships. 8 relations 4 different types relationships.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/relped.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Relped data — relped","text":"","code":"data(\"relped\") data(\"sampleped\") pedi <- Pedigree(sampleped, relped) summary(pedi) #> Pedigree object with #> [1] \"Ped object with 55 individuals and 13 metadata columns\" #> [1] \"Rel object with 8 relationshipswith 2 MZ twin, 3 DZ twin, 2 UZ twin, 1 Spouse\" if (interactive()) { plot(pedi) }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/sampleped.html","id":null,"dir":"Reference","previous_headings":"","what":"Sampleped data — sampleped","title":"Sampleped data — sampleped","text":"Small sample pedigree data set testing purposes.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/sampleped.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sampleped data — sampleped","text":"","code":"data(\"sampleped\")"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/sampleped.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Sampleped data — sampleped","text":"data frame 55 observations, one line per subject, following 7 variables. famid : Family identifier id : Subject identifier dadid : Identifier father, father part data set; zero otherwise momid : Identifier mother, mother part data set; zero otherwise sex : 1 male 2 female affected : 1 0 avail : 1 0 num : Numerical test variable 0 6 randomly distributed","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/sampleped.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Sampleped data — sampleped","text":"small fictive pedigree data set, 55 individuals 2 families. aim create data set variety pedigree structures.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/sampleped.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sampleped data — sampleped","text":"","code":"data(\"sampleped\") pedi <- Pedigree(sampleped) summary(pedi) #> Pedigree object with #> [1] \"Ped object with 55 individuals and 13 metadata columns\" #> [1] \"Rel object with 0 relationshipswith 0 MZ twin, 0 DZ twin, 0 UZ twin, 0 Spouse\" if (interactive()) { plot(pedi) }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/set_plot_area.html","id":null,"dir":"Reference","previous_headings":"","what":"Set plotting area — set_plot_area","title":"Set plotting area — set_plot_area","text":"Set plotting area","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/set_plot_area.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set plotting area — set_plot_area","text":"","code":"set_plot_area(cex, id, maxlev, xrange, symbolsize, precision = 3, ...)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/set_plot_area.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set plotting area — set_plot_area","text":"cex Character expansion text id character vector identifiers individuals maxlev Maximum level xrange Range x values symbolsize Size symbols precision number significant digits round solution . ... arguments passed par()","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/set_plot_area.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set plotting area — set_plot_area","text":"List user coordinates, old par, box width, box height, label height leg height","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/sex_to_factor.html","id":null,"dir":"Reference","previous_headings":"","what":"Gender variable to ordered factor — sex_to_factor","title":"Gender variable to ordered factor — sex_to_factor","text":"Gender variable ordered factor","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/sex_to_factor.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Gender variable to ordered factor — sex_to_factor","text":"","code":"sex_to_factor(sex)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/sex_to_factor.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Gender variable to ordered factor — sex_to_factor","text":"sex character, factor numeric vector corresponding gender individuals. transformed ordered factor following levels: male < female < unknown < terminated following values recognized: character() factor() : \"f\", \"m\", \"woman\", \"man\", \"male\", \"female\", \"unknown\", \"terminated\" numeric() : 1 = \"male\", 2 = \"female\", 3 = \"unknown\", 4 = \"terminated\"","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/sex_to_factor.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Gender variable to ordered factor — sex_to_factor","text":"ordered factor vector containing transformed variable \"male\" < \"female\" < \"unknown\" < \"terminated\"","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/sex_to_factor.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Gender variable to ordered factor — sex_to_factor","text":"","code":"sex_to_factor(c(1, 2, 3, 4, \"f\", \"m\", \"man\", \"female\")) #> [1] male female unknown terminated female male male #> [8] female #> Levels: male < female < unknown < terminated"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/shift.html","id":null,"dir":"Reference","previous_headings":"","what":"Shift set of siblings to the left or right — shift","title":"Shift set of siblings to the left or right — shift","text":"Shift set siblings left right","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/shift.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shift set of siblings to the left or right — shift","text":"","code":"shift(id, sibs, goleft, hint, twinrel, twinset)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/shift.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shift set of siblings to the left or right — shift","text":"id id subject shifted sibs ids siblings goleft TRUE, shift left, otherwise right hint current hint vector twinrel twin relationship matrix twinset twinset vector","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/shift.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Shift set of siblings to the left or right — shift","text":"updated hint vector","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/shift.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Shift set of siblings to the left or right — shift","text":"routine used auto_hint(). shifts set siblings left right, marriage edge set siblings, closest spouse. also shifts subject , edge set siblings, closest spouse. also shifts monozygotic twins, , together within set twins.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/shrink.html","id":null,"dir":"Reference","previous_headings":"","what":"Shrink Pedigree object — shrink","title":"Shrink Pedigree object — shrink","text":"Shrink Pedigree object specified bit size priority placed trimming uninformative subjects. algorithm useful getting Pedigree condensed minimally informative size algorithms testing limited size Pedigree. avail affected NULL, extracted corresponding accessors Ped object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/shrink.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shrink Pedigree object — shrink","text":"","code":"# S4 method for class 'Pedigree' shrink(obj, avail = NULL, affected = NULL, max_bits = 16) # S4 method for class 'Ped' shrink(obj, avail = NULL, affected = NULL, max_bits = 16)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/shrink.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shrink Pedigree object — shrink","text":"obj Pedigree Ped object. avail logical vector availability status individuals (.e. FALSE = available, TRUE = available, NA = unknown). affected logical vector affection status individuals (.e. FALSE = unaffected, TRUE = affected, NA = unknown). max_bits Optional, bit size shrink Pedigree","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/shrink.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Shrink Pedigree object — shrink","text":"list containing following elements: pedObj: Pedigree object trimming id_trim: Vector ids trimmed Pedigree id_lst: List ids trimmed category bit_size: Vector bit sizes trimming step avail: Vector availability status trimming pedSizeOriginal: Number subjects original Pedigree pedSizeIntermed: Number subjects initial trimming pedSizeFinal: Number subjects final trimming","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/shrink.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Shrink Pedigree object — shrink","text":"Iteratively remove subjects Pedigree. random removal members previously controlled seed argument, remove , forcing users control randomness outside function. First remove uninformative subjects, .e., unavailable (genotyped) available descendants. Next, available terminal subjects unknown phenotype parents available. Last, iteratively shrinks Pedigrees preferentially removing individuals (chosen random multiple status): Subjects unknown affected status Subjects unaffected affected status Affected subjects.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/shrink.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Shrink Pedigree object — shrink","text":"Original Dan Schaid, updated Jason Sinnwell Louis Le Nézet","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/shrink.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Shrink Pedigree object — shrink","text":"","code":"data(sampleped) ped1 <- Pedigree(sampleped[sampleped$famid == '1',]) shrink(ped1, max_bits = 12) #> $pedObj #> Pedigree object with: #> Ped object with 13 individuals and 13 metadata columns: #> id dadid momid sex famid steril #> col_class #> 1_103 1_103 male 1 #> 1_104 1_104 female 1 #> 1_105 1_105 male 1 #> 1_106 1_106 female 1 #> 1_109 1_109 female 1 #> ... ... ... ... ... ... ... #> 1_118 1_118 1_105 1_106 female 1 #> 1_119 1_119 1_105 1_106 male 1 #> 1_124 1_124 1_110 1_109 male 1 #> 1_127 1_127 1_114 1_115 male 1 #> 1_128 1_128 1_114 1_115 male 1 #> status avail affected useful kin isinf #> col_class #> 1_103 FALSE TRUE #> 1_104 FALSE FALSE #> 1_105 FALSE #> 1_106 FALSE #> 1_109 TRUE FALSE #> ... ... ... ... ... ... ... #> 1_118 TRUE TRUE #> 1_119 TRUE TRUE #> 1_124 TRUE TRUE #> 1_127 TRUE TRUE #> 1_128 TRUE TRUE #> num_child_tot num_child_dir num_child_ind | family indId #> col_class #> 1_103 2 2 0 1 103 #> 1_104 2 2 0 1 104 #> 1_105 3 3 0 1 105 #> 1_106 3 3 0 1 106 #> 1_109 1 1 0 1 109 #> ... ... ... ... ... ... #> 1_118 0 0 0 1 118 #> 1_119 0 0 0 1 119 #> 1_124 0 0 0 1 124 #> 1_127 0 0 0 1 127 #> 1_128 0 0 0 1 128 #> fatherId motherId gender affection available #> col_class #> 1_103 135 136 1 1 0 #> 1_104 2 0 0 #> 1_105 1 0 #> 1_106 2 0 #> 1_109 101 102 2 0 1 #> ... ... ... ... ... ... #> 1_118 105 106 2 1 1 #> 1_119 105 106 1 1 1 #> 1_124 110 109 1 1 1 #> 1_127 114 115 1 1 1 #> 1_128 114 115 1 1 1 #> num error sterilisation vitalStatus affection_mods #> col_class #> 1_103 2 1 #> 1_104 4 0 #> 1_105 6 NA #> 1_106 1 NA #> 1_109 3 0 #> ... ... ... ... ... ... #> 1_118 2 1 #> 1_119 6 1 #> 1_124 1 #> 1_127 5 1 #> 1_128 3 1 #> avail_mods #> col_class #> 1_103 0 #> 1_104 0 #> 1_105 0 #> 1_106 0 #> 1_109 1 #> ... ... #> 1_118 1 #> 1_119 1 #> 1_124 1 #> 1_127 1 #> 1_128 1 #> Rel object with 0 relationshipswith 0 MZ twin, 0 DZ twin, 0 UZ twin, 0 Spouse: #> id1 id2 code famid #> #> #> $id_trim #> #> \"1_101\" \"1_102\" \"1_107\" \"1_108\" \"1_111\" \"1_113\" \"1_121\" \"1_122\" \"1_123\" \"1_131\" #> id #> \"1_132\" \"1_134\" \"1_139\" \"1_141\" \"1_140\" \"1_130\" \"1_126\" \"1_125\" \"1_129\" \"1_133\" #> #> \"1_116\" #> #> $id_lst #> $id_lst$unavail #> [1] \"1_101\" \"1_102\" \"1_107\" \"1_108\" \"1_111\" \"1_113\" \"1_121\" \"1_122\" \"1_123\" #> [10] \"1_131\" \"1_132\" \"1_134\" \"1_139\" #> #> $id_lst$affect #> id #> \"1_141\" \"1_140\" \"1_130\" \"1_126\" \"1_125\" \"1_129\" \"1_133\" \"1_116\" #> #> #> $bit_size #> [1] 46 29 27 23 21 19 15 14 13 11 #> #> $avail #> [1] FALSE FALSE FALSE FALSE TRUE TRUE FALSE FALSE TRUE TRUE TRUE TRUE #> [13] TRUE #> #> $pedSizeOriginal #> [1] 41 #> #> $pedSizeIntermed #> [1] 28 #> #> $pedSizeFinal #> [1] 13 #>"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/sketch.html","id":null,"dir":"Reference","previous_headings":"","what":"Sketch of the family information table — sketch","title":"Sketch of the family information table — sketch","text":"Simple function create sketch family information table.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/sketch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sketch of the family information table — sketch","text":"","code":"sketch(var_name)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/sketch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sketch of the family information table — sketch","text":"var_name name health variable","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/sketch.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sketch of the family information table — sketch","text":"html sketch family information table","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/subregion.html","id":null,"dir":"Reference","previous_headings":"","what":"Subset a region of a Pedigree — subregion","title":"Subset a region of a Pedigree — subregion","text":"Subset region Pedigree","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/subregion.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subset a region of a Pedigree — subregion","text":"","code":"subregion(df, subreg = NULL)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/subregion.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Subset a region of a Pedigree — subregion","text":"df data frame plot coordinates subreg 4-element vector (min x, max x, min depth, max depth), used edit away portions plot coordinates returned ped_to_plotdf(). useful zooming particular region Pedigree.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/subregion.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Subset a region of a Pedigree — subregion","text":"subset plot coordinates","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/unrelated.html","id":null,"dir":"Reference","previous_headings":"","what":"Find Unrelated subjects — unrelated","title":"Find Unrelated subjects — unrelated","text":"Determine set maximum number unrelated available subjects Pedigree.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/unrelated.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find Unrelated subjects — unrelated","text":"","code":"# S4 method for class 'Ped' unrelated(obj, avail = NULL) # S4 method for class 'Pedigree' unrelated(obj, avail = NULL)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/unrelated.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find Unrelated subjects — unrelated","text":"obj Pedigree Ped object. avail logical vector availability status individuals (.e. FALSE = available, TRUE = available, NA = unknown).","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/unrelated.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find Unrelated subjects — unrelated","text":"vector ids subjects unrelated.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/unrelated.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find Unrelated subjects — unrelated","text":"Determine set maximum number unrelated available subjects Pedigree, given vectors id, father, mother Pedigree structure, status vector TRUE / FALSE whether subject available (e.g. DNA). greedy algorithm uses kinship matrix, sequentially removing rows/cols non-zero subjects number zero kinship coefficients (greedy choosing row kinship matrix number zeros, remove cols corresponding rows non-zero. account ties count zeros rows, random choice made. Hence, running function multiple times can return different sets unrelated subjects. avail NULL, extracted corresponding accessor Ped object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/unrelated.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Find Unrelated subjects — unrelated","text":"Dan Schaid Shannon McDonnell updated Jason Sinnwell","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/unrelated.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find Unrelated subjects — unrelated","text":"","code":"data(sampleped) fam1 <- sampleped[sampleped$famid == 1, ] ped1 <- Pedigree(fam1) unrelated(ped1) #> [1] \"1_109\" \"1_113\" \"1_116\" \"1_140\" ## some possible vectors ## [1] '110' '113' '133' '109' ## [1] '113' '118' '141' '109' ## [1] '113' '118' '140' '109' ## [1] '110' '113' '116' '109' ## [1] '113' '133' '141' '109'"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/upd_famid.html","id":null,"dir":"Reference","previous_headings":"","what":"Update family prefix in individuals id — upd_famid","title":"Update family prefix in individuals id — upd_famid","text":"Update family prefix individuals identifiers. Individuals identifiers constructed follow famid_id. Therefore update family prefix ids split first underscore first part overwritten famid.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/upd_famid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Update family prefix in individuals id — upd_famid","text":"","code":"# S4 method for class 'character,ANY' upd_famid(obj, famid, missid = NA_character_) # S4 method for class 'Ped,character_OR_integer' upd_famid(obj, famid) # S4 method for class 'Ped,missing' upd_famid(obj) # S4 method for class 'Rel,character_OR_integer' upd_famid(obj, famid) # S4 method for class 'Rel,missing' upd_famid(obj) # S4 method for class 'Pedigree,character_OR_integer' upd_famid(obj, famid) # S4 method for class 'Pedigree,missing' upd_famid(obj)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/upd_famid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Update family prefix in individuals id — upd_famid","text":"obj Ped Pedigree object character vector individual ids famid character vector family identifiers individuals. provide, aggregated individuals identifiers separated underscore. missid character vector missing values identifiers. id, dadid momid corresponding values set NA_character_.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/upd_famid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Update family prefix in individuals id — upd_famid","text":"character vector individual ids family prefix updated","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/upd_famid.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Update family prefix in individuals id — upd_famid","text":"famid missing, famid() function called object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/upd_famid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Update family prefix in individuals id — upd_famid","text":"","code":"upd_famid(c(\"1\", \"2\", \"B_3\"), c(\"A\", \"B\", \"A\")) #> [1] \"A_1\" \"B_2\" \"A_3\" upd_famid(c(\"1\", \"B_2\", \"C_3\", \"4\"), c(\"A\", NA, \"A\", NA)) #> [1] \"A_1\" \"2\" \"A_3\" \"4\" data(sampleped) ped1 <- Pedigree(sampleped[,-1]) id(ped(ped1)) #> [1] \"101\" \"102\" \"103\" \"104\" \"105\" \"106\" \"107\" \"108\" \"109\" \"110\" \"111\" \"112\" #> [13] \"113\" \"114\" \"115\" \"116\" \"117\" \"118\" \"119\" \"120\" \"121\" \"122\" \"123\" \"124\" #> [25] \"125\" \"126\" \"127\" \"128\" \"129\" \"130\" \"131\" \"132\" \"133\" \"134\" \"135\" \"136\" #> [37] \"137\" \"138\" \"139\" \"140\" \"141\" \"201\" \"202\" \"203\" \"204\" \"205\" \"206\" \"207\" #> [49] \"208\" \"209\" \"210\" \"211\" \"212\" \"213\" \"214\" new_fam <- make_famid(id(ped(ped1)), dadid(ped(ped1)), momid(ped(ped1))) id(ped(upd_famid(ped1, new_fam))) #> [1] \"1_101\" \"1_102\" \"1_103\" \"1_104\" \"1_105\" \"1_106\" \"1_107\" \"1_108\" \"1_109\" #> [10] \"1_110\" \"1_111\" \"1_112\" \"113\" \"1_114\" \"1_115\" \"1_116\" \"1_117\" \"1_118\" #> [19] \"1_119\" \"1_120\" \"1_121\" \"1_122\" \"1_123\" \"1_124\" \"1_125\" \"1_126\" \"1_127\" #> [28] \"1_128\" \"1_129\" \"1_130\" \"1_131\" \"1_132\" \"1_133\" \"1_134\" \"1_135\" \"1_136\" #> [37] \"1_137\" \"1_138\" \"1_139\" \"1_140\" \"1_141\" \"2_201\" \"2_202\" \"2_203\" \"2_204\" #> [46] \"2_205\" \"2_206\" \"2_207\" \"2_208\" \"2_209\" \"2_210\" \"2_211\" \"2_212\" \"2_213\" #> [55] \"2_214\" data(sampleped) ped1 <- Pedigree(sampleped[,-1]) make_famid(ped1) #> Pedigree object with: #> Ped object with 55 individuals and 13 metadata columns: #> id dadid momid sex famid steril #> col_class #> 1_101 1_101 male 1 #> 1_102 1_102 female 1 #> 1_103 1_103 1_135 1_136 male 1 #> 1_104 1_104 female 1 #> 1_105 1_105 male 1 #> ... ... ... ... ... ... ... #> 2_210 2_210 2_203 2_204 male 2 #> 2_211 2_211 2_203 2_204 male 2 #> 2_212 2_212 2_209 2_208 female 2 #> 2_213 2_213 2_209 2_208 male 2 #> 2_214 2_214 2_209 2_208 male 2 #> status avail affected useful kin isinf #> col_class #> 1_101 FALSE FALSE #> 1_102 FALSE TRUE #> 1_103 FALSE TRUE #> 1_104 FALSE FALSE #> 1_105 FALSE #> ... ... ... ... ... ... ... #> 2_210 FALSE FALSE #> 2_211 TRUE FALSE #> 2_212 TRUE FALSE #> 2_213 FALSE FALSE #> 2_214 TRUE TRUE #> num_child_tot num_child_dir num_child_ind | indId fatherId #> col_class #> 1_101 1 1 0 101 #> 1_102 1 1 0 102 #> 1_103 4 4 0 103 135 #> 1_104 4 4 0 104 #> 1_105 4 4 0 105 #> ... ... ... ... ... ... #> 2_210 0 0 0 210 203 #> 2_211 0 0 0 211 203 #> 2_212 0 0 0 212 209 #> 2_213 0 0 0 213 209 #> 2_214 0 0 0 214 209 #> motherId gender affection available num #> col_class #> 1_101 1 0 0 2 #> 1_102 2 1 0 3 #> 1_103 136 1 1 0 2 #> 1_104 2 0 0 4 #> 1_105 1 0 6 #> ... ... ... ... ... ... #> 2_210 204 1 0 0 2 #> 2_211 204 1 0 1 1 #> 2_212 208 2 0 1 3 #> 2_213 208 1 0 0 2 #> 2_214 208 1 1 1 0 #> error family sterilisation vitalStatus affection_mods #> col_class #> 1_101 0 #> 1_102 1 #> 1_103 1 #> 1_104 0 #> 1_105 NA #> ... ... ... ... ... ... #> 2_210 0 #> 2_211 0 #> 2_212 0 #> 2_213 0 #> 2_214 1 #> avail_mods #> col_class #> 1_101 0 #> 1_102 0 #> 1_103 0 #> 1_104 0 #> 1_105 0 #> ... ... #> 2_210 0 #> 2_211 1 #> 2_212 1 #> 2_213 0 #> 2_214 1 #> Rel object with 0 relationshipswith 0 MZ twin, 0 DZ twin, 0 UZ twin, 0 Spouse: #> id1 id2 code famid #> "},{"path":"https://louislenezet.github.io/Pedixplorer/reference/useful_inds.html","id":null,"dir":"Reference","previous_headings":"","what":"Usefulness of individuals — useful_inds","title":"Usefulness of individuals — useful_inds","text":"Compute usefulness individuals","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/useful_inds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Usefulness of individuals — useful_inds","text":"","code":"# S4 method for class 'character' useful_inds( obj, dadid, momid, avail, affected, num_child_tot, id_inf, keep_infos = FALSE ) # S4 method for class 'Pedigree' useful_inds( obj, informative = \"AvAf\", keep_infos = FALSE, reset = FALSE, max_dist = NULL ) # S4 method for class 'Ped' useful_inds( obj, informative = \"AvAf\", keep_infos = FALSE, reset = FALSE, max_dist = NULL )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/useful_inds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Usefulness of individuals — useful_inds","text":"obj character vector id individuals data.frame informations corresponding columns. dadid vector containing subject, identifiers biologicals fathers. momid vector containing subject, identifiers biologicals mothers. avail logical vector availability status individuals (.e. FALSE = available, TRUE = available, NA = unknown). affected logical vector affection status individuals (.e. FALSE = unaffected, TRUE = affected, NA = unknown). num_child_tot numeric vector number children individuals id_inf identifiers vector informative individuals. keep_infos Boolean indicate parents unknown status available reverse kept informative Informative individuals selection can take 5 values: 'AvAf' (available affected), 'AvOrAf' (available affected), 'Av' (available ), 'Af' (affected ), '' (individuals) numeric/character vector individuals id boolean reset Boolean indicate useful column reset max_dist maximum distance informative individuals","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/useful_inds.html","id":"when-obj-is-a-vector","dir":"Reference","previous_headings":"","what":"When obj is a vector","title":"Usefulness of individuals — useful_inds","text":"vector useful individuals identifiers","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/useful_inds.html","id":"when-obj-is-a-pedigree-or-ped-object","dir":"Reference","previous_headings":"","what":"When obj is a Pedigree or Ped object","title":"Usefulness of individuals — useful_inds","text":"Pedigree Ped object slot 'useful' containing TRUE useful individuals FALSE otherwise.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/useful_inds.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Usefulness of individuals — useful_inds","text":"Check informativeness individuals based informative parameter given, number children usefulness parents. useful slot added Ped object usefulness individual.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/useful_inds.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Usefulness of individuals — useful_inds","text":"","code":"data(sampleped) ped1 <- Pedigree(sampleped[sampleped$famid == \"1\",]) ped(useful_inds(ped1, informative = \"AvAf\")) #> Ped object with 41 individuals and 13 metadata columns: #> id dadid momid sex famid steril #> col_class #> 1_101 1_101 male 1 #> 1_102 1_102 female 1 #> 1_103 1_103 1_135 1_136 male 1 #> 1_104 1_104 female 1 #> 1_105 1_105 male 1 #> ... ... ... ... ... ... ... #> 1_137 1_137 male 1 #> 1_138 1_138 1_135 1_136 female 1 #> 1_139 1_139 1_137 1_138 male 1 #> 1_140 1_140 1_137 1_138 female 1 #> 1_141 1_141 1_137 1_138 female 1 #> status avail affected useful kin isinf #> col_class #> 1_101 FALSE FALSE TRUE 3 FALSE #> 1_102 FALSE TRUE TRUE 3 FALSE #> 1_103 FALSE TRUE TRUE 2 FALSE #> 1_104 FALSE FALSE TRUE 2 FALSE #> 1_105 FALSE TRUE 2 FALSE #> ... ... ... ... ... ... ... #> 1_137 FALSE TRUE Inf FALSE #> 1_138 FALSE TRUE 3 FALSE #> 1_139 FALSE TRUE TRUE 4 FALSE #> 1_140 TRUE FALSE TRUE 4 FALSE #> 1_141 TRUE FALSE TRUE 4 FALSE #> num_child_tot num_child_dir num_child_ind | family indId #> col_class #> 1_101 1 1 0 1 101 #> 1_102 1 1 0 1 102 #> 1_103 4 4 0 1 103 #> 1_104 4 4 0 1 104 #> 1_105 4 4 0 1 105 #> ... ... ... ... ... ... #> 1_137 3 3 0 1 137 #> 1_138 3 3 0 1 138 #> 1_139 0 0 0 1 139 #> 1_140 0 0 0 1 140 #> 1_141 0 0 0 1 141 #> fatherId motherId gender affection available #> col_class #> 1_101 1 0 0 #> 1_102 2 1 0 #> 1_103 135 136 1 1 0 #> 1_104 2 0 0 #> 1_105 1 0 #> ... ... ... ... ... ... #> 1_137 1 0 #> 1_138 135 136 2 0 #> 1_139 137 138 1 1 0 #> 1_140 137 138 2 0 1 #> 1_141 137 138 2 0 1 #> num error sterilisation vitalStatus affection_mods #> col_class #> 1_101 2 0 #> 1_102 3 1 #> 1_103 2 1 #> 1_104 4 0 #> 1_105 6 NA #> ... ... ... ... ... ... #> 1_137 3 NA #> 1_138 2 NA #> 1_139 3 1 #> 1_140 1 0 #> 1_141 0 0 #> avail_mods #> col_class #> 1_101 0 #> 1_102 0 #> 1_103 0 #> 1_104 0 #> 1_105 0 #> ... ... #> 1_137 0 #> 1_138 0 #> 1_139 0 #> 1_140 1 #> 1_141 1"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/vect_to_binary.html","id":null,"dir":"Reference","previous_headings":"","what":"Vector variable to binary vector — vect_to_binary","title":"Vector variable to binary vector — vect_to_binary","text":"Transform vector binary vector. values 0, 1, TRUE, FALSE, NA transformed NA.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/vect_to_binary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Vector variable to binary vector — vect_to_binary","text":"","code":"vect_to_binary(vect, logical = FALSE)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/vect_to_binary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Vector variable to binary vector — vect_to_binary","text":"vect character, factor, logical numeric vector corresponding binary variable (.e. 0 1). following values recognized: character() factor() : \"TRUE\", \"FALSE\", \"0\", \"1\", \"NA\" respectively transformed 1, 0, 0, 1, NA. Spaces case ignored. values transformed NA. numeric() : 0 1 kept, values transformed NA. logical() : TRUE FALSE tansformed 1 and0. logical Boolean defining output logical vector instead numeric vector (.e. 0 1 becomes FALSE `TRUE).","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/vect_to_binary.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Vector variable to binary vector — vect_to_binary","text":"numeric binary vector size vect 0 1","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/vect_to_binary.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Vector variable to binary vector — vect_to_binary","text":"","code":"vect_to_binary( c(0, 1, 2, 3.6, \"TRUE\", \"FALSE\", \"0\", \"1\", \"NA\", \"B\", TRUE, FALSE, NA) ) #> Warning: NAs introduced by coercion #> [1] 0 1 NA NA 1 0 0 1 NA NA 1 0 NA"}] +[{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Pedixplorer tutorial","text":"document tutorial Pedixplorer package, examples creating Pedigree objects kinship matrices Pedigree utilities. Pedixplorer package updated version Kinship2 package, featuring change maintainer repository CRAN Bioconductor continued development support. contains routines handle family data Pedigree object. initial purpose create correlation structures describe family relationships kinship identity--descent, can used model family data mixed effects models, coxme function. also includes tools Pedigree drawing filtering focused producing compact layouts without intervention. Recent additions include utilities trim Pedigree object various criteria, kinship X chromosome. Supplementary vignettes available explain: Pedigree object vignette(\"pedigree_object\", package = \"Pedixplorer\") alignment algorithm used create Pedigree structure vignette(\"pedigree_alignment\", package = \"Pedixplorer\") kinship algorithm vignette(\"pedigree_kinship\", package = \"Pedixplorer\") plotting algorithm used plot Pedigree vignette(\"pedigree_plot\", package = \"Pedixplorer\")","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"installation","dir":"Articles","previous_headings":"","what":"Installation","title":"Pedixplorer tutorial","text":"Pedixplorer package available Bioconductor can installed following command: package can loaded following command:","code":"if (!requireNamespace(\"BiocManager\", quietly = TRUE)) { install.packages(\"BiocManager\") } BiocManager::install(\"Pedixplorer\") library(Pedixplorer)"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"the-pedigree-s4-object","dir":"Articles","previous_headings":"","what":"The Pedigree S4 object","title":"Pedixplorer tutorial","text":"Pedigree object list dataframes describe family structure. contains following components: ped: Ped object Pedigree information help(Ped). rel: Rel object relationship information help(Rel). scales: Scales object 2 dataframe filling borders informations plot help(Scales). hints: Hints objects 2 slots indicating horder spouse organise Pedigree structure help(Hints).","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"example-data","dir":"Articles","previous_headings":"Basic Usage","what":"Example Data","title":"Pedixplorer tutorial","text":"Two datasets provided within Pedixplorer package: + minnbreast: 17 families breast cancer study + sampleped: two sample pedigrees, 41 14 subjects vignette uses two pedigrees sampleped. information datasets, see help(minnbreast) help(sampleped).","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"pedigree","dir":"Articles","previous_headings":"Basic Usage","what":"Pedigree","title":"Pedixplorer tutorial","text":"First, load sampleped look values dataset, create Pedigree object using Pedigree() function. function automaticaly detect necessary columns dataframe. necessary can modify columns names cols_ren. create Pedigree object, multiple families, dataframe just need family column ped_df dataframe. case, famid column pasted id individuals separated underscore create unique id individual Pedigree object. information Pedigree() function, see help(Pedigree). Pedigree object can subset individual pedigrees family id. Pedigree object print, summary plot method, show . print method prints Ped Rel object pedigree. summary method prints short summary pedigree. Finally plot method displays pedigree. can add title legend plot following command: # Pedigree Shiny application shiny application available create, interact plot pedigrees. launch application, use following command: use simple: first need import dataset select columns use. can select affection informations colors associated . different families present dataset, can select one plot. plot displayed, can filter pedigree selecting informatives subjects keep relatives. pedigree splited multiple families, can select plot. Finally plot displayed can make interactive download resulting image.","code":"data(\"sampleped\") print(sampleped[1:10, ]) ## famid id dadid momid sex affection avail num ## 1 1 101 1 0 0 2 ## 2 1 102 2 1 0 3 ## 3 1 103 135 136 1 1 0 2 ## 4 1 104 2 0 0 4 ## 5 1 105 1 NA 0 6 ## 6 1 106 2 NA 0 1 ## 7 1 107 1 1 0 NA ## 8 1 108 2 0 0 0 ## 9 1 109 101 102 2 0 1 3 ## 10 1 110 103 104 1 1 1 2 ped <- Pedigree(sampleped[c(3, 4, 10, 35, 36), ]) print(ped) ## Pedigree object with: ## Ped object with 5 individuals and 13 metadata columns: ## id dadid momid sex famid steril status avail ## col_class ## 1_103 1_103 1_135 1_136 male 1 FALSE ## 1_104 1_104 female 1 FALSE ## 1_110 1_110 1_103 1_104 male 1 TRUE ## 1_135 1_135 male 1 FALSE ## 1_136 1_136 female 1 FALSE ## affected useful kin isinf num_child_tot num_child_dir num_child_ind | ## col_class ## 1_103 TRUE 1 1 0 ## 1_104 FALSE 1 1 0 ## 1_110 TRUE 0 0 0 ## 1_135 1 1 0 ## 1_136 1 1 0 ## family indId fatherId motherId gender affection available ## col_class ## 1_103 1 103 135 136 1 1 0 ## 1_104 1 104 2 0 0 ## 1_110 1 110 103 104 1 1 1 ## 1_135 1 135 1 0 ## 1_136 1 136 2 0 ## num error sterilisation vitalStatus affection_mods avail_mods ## col_class ## 1_103 2 1 0 ## 1_104 4 0 0 ## 1_110 2 1 1 ## 1_135 5 NA 0 ## 1_136 6 NA 0 ## Rel object with 0 relationshipswith 0 MZ twin, 0 DZ twin, 0 UZ twin, 0 Spouse: ## id1 id2 code famid ## ped <- Pedigree(sampleped) print(famid(ped(ped))) ## [1] \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" ## [25] \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"1\" \"2\" \"2\" \"2\" \"2\" \"2\" \"2\" \"2\" ## [49] \"2\" \"2\" \"2\" \"2\" \"2\" \"2\" \"2\" ped1 <- ped[famid(ped(ped)) == \"1\"] summary(ped1) ## Pedigree object with ## [1] \"Ped object with 41 individuals and 13 metadata columns\" ## [1] \"Rel object with 0 relationshipswith 0 MZ twin, 0 DZ twin, 0 UZ twin, 0 Spouse\" plot(ped1) plot(ped1, title = \"Pedigree 1\", legend = TRUE, leg_loc = c(5, 15, 4.5, 5)) if (interactive()) { ped_shiny() }"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"fixing-pedigree-issues","dir":"Articles","previous_headings":"","what":"Fixing Pedigree Issues","title":"Pedixplorer tutorial","text":"“break” pedigree, can manipulate sex value match parent value (example, change 203 male female, even though 203 father). , first subset datped2, locate id column, match specific id (case, 203). Within id 203, locate sex column. Assign subset incorrect value 2 (female) change original/correct value 1 (male). break pedigree, can delete subjects seem irrelevant pedigree (example, delete 209 married-father). , subset datped2 use -() function locate delete specified subject (case, 209). Reassign code datped22 drop specified subject entirely. error occurs Pedigree() function notices id 203 coded male (1) father. correct , simply employ fix_parents() function adjust sex value match either momid dadid. fix_parents() also add back deleted subjects, fixing Pedigree. fix straightforward (changing one sex value based either mother father), fix_parents() resolve issue. issue complicated, say 203 coded father mother, fix_parents() know one correct therefore issue resolved.","code":"datped2 <- sampleped[sampleped$famid == 2, ] datped2[datped2$id %in% 203, \"sex\"] <- 2 datped2 <- datped2[-which(datped2$id %in% 209), ] tryout <- try({ ped2 <- Pedigree(datped2) }) ## Error in validObject(.Object) : ## invalid class \"Ped\" object: dadid values '2_209' should be in '2_201', '2_202', '2_203', '2_204', '2_205'... fixped2 <- with(datped2, fix_parents(id, dadid, momid, sex)) fixped2 ## id momid dadid sex famid ## 1 201 1 1 ## 2 202 2 1 ## 3 203 1 1 ## 4 204 202 201 2 1 ## 5 205 202 201 1 1 ## 6 206 202 201 2 1 ## 7 207 202 201 2 1 ## 8 208 202 201 2 1 ## 9 210 204 203 1 1 ## 10 211 204 203 1 1 ## 11 212 208 209 2 1 ## 12 213 208 209 1 1 ## 13 214 208 209 1 1 ## 14 209 1 1 ped2 <- Pedigree(fixped2) plot(ped2)"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"kinship","dir":"Articles","previous_headings":"","what":"Kinship","title":"Pedixplorer tutorial","text":"common use pedigrees make matrix kinship coefficients can used mixed effect models. kinship coefficient probability randomly selected allele two people given locus identical descent (IBD), assuming founder alleles independent. example, two alleles per autosomal marker, sampling two alleles replacement DNA p=0.50 probability getting allele twice.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"kinship-for-pedigree-object","dir":"Articles","previous_headings":"Kinship","what":"Kinship for Pedigree object","title":"Pedixplorer tutorial","text":"use kinship() calculate kinship matrix ped2. result special symmetrix matrix class Matrix R package, stored efficiently avoid repeating elements. family 2, see row column names match id figure , see kinship coefficient 0.50, siblings 0.25 (e.g. 204-205), pedigree marry-ins share alleles IBD children coefficient 0.25 (e.g. 203-210). plot can used verify kinship coefficients.","code":"kin2 <- kinship(ped2) kin2[1:9, 1:9] ## 9 x 9 sparse Matrix of class \"dsCMatrix\" ## 1_201 1_202 1_203 1_204 1_205 1_206 1_207 1_208 1_209 ## 1_201 0.50 . . 0.25 0.25 0.25 0.25 0.25 . ## 1_202 . 0.50 . 0.25 0.25 0.25 0.25 0.25 . ## 1_203 . . 0.5 . . . . . . ## 1_204 0.25 0.25 . 0.50 0.25 0.25 0.25 0.25 . ## 1_205 0.25 0.25 . 0.25 0.50 0.25 0.25 0.25 . ## 1_206 0.25 0.25 . 0.25 0.25 0.50 0.25 0.25 . ## 1_207 0.25 0.25 . 0.25 0.25 0.25 0.50 0.25 . ## 1_208 0.25 0.25 . 0.25 0.25 0.25 0.25 0.50 . ## 1_209 . . . . . . . . 0.5"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"kinship-for-pedigree-with-multiple-families","dir":"Articles","previous_headings":"Kinship","what":"Kinship for Pedigree with multiple families","title":"Pedixplorer tutorial","text":"kinship() function also works Pedigree object multiple families. show create kinship matrix, show snapshot two families, row columns names ids subject.","code":"ped <- Pedigree(sampleped) kin_all <- kinship(ped) kin_all[1:9, 1:9] ## 9 x 9 sparse Matrix of class \"dsCMatrix\" ## 1_101 1_102 1_103 1_104 1_105 1_106 1_107 1_108 1_109 ## 1_101 0.50 . . . . . . . 0.25 ## 1_102 . 0.50 . . . . . . 0.25 ## 1_103 . . 0.5 . . . . . . ## 1_104 . . . 0.5 . . . . . ## 1_105 . . . . 0.5 . . . . ## 1_106 . . . . . 0.5 . . . ## 1_107 . . . . . . 0.5 . . ## 1_108 . . . . . . . 0.5 . ## 1_109 0.25 0.25 . . . . . . 0.50 kin_all[40:43, 40:43] ## 4 x 4 sparse Matrix of class \"dsCMatrix\" ## 1_140 1_141 2_201 2_202 ## 1_140 0.50 0.25 . . ## 1_141 0.25 0.50 . . ## 2_201 . . 0.5 . ## 2_202 . . . 0.5 kin_all[42:46, 42:46] ## 5 x 5 sparse Matrix of class \"dsCMatrix\" ## 2_201 2_202 2_203 2_204 2_205 ## 2_201 0.50 . . 0.25 0.25 ## 2_202 . 0.50 . 0.25 0.25 ## 2_203 . . 0.5 . . ## 2_204 0.25 0.25 . 0.50 0.25 ## 2_205 0.25 0.25 . 0.25 0.50"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"kinship-for-twins-in-pedigree-with-multiple-families","dir":"Articles","previous_headings":"Kinship","what":"Kinship for twins in Pedigree with multiple families","title":"Pedixplorer tutorial","text":"Specifying twin relationships Pedigree multiple families object complicated fact user must specify family id id1 id2 belong. show relation matrix requires family id last column, column names done , make plotting kinship matrices show monozygotic twins correctly. show specify monozygosity subjects 206 207 ped2, subjects 125 126 ped1. check looking kinship matrix pairs, correctly 0.5. Note subject 113 ped1 marry-without children Pedigree. Subject 113 Pedigree size 1 kin_all matrix index 41. later show handle marry-ins plotting.","code":"data(\"relped\") relped ## famid id1 id2 code ## 1 1 140 141 1 ## 2 1 139 140 2 ## 3 1 121 123 2 ## 4 1 129 126 4 ## 5 1 130 133 3 ## 6 2 210 211 1 ## 7 2 208 204 2 ## 8 2 212 213 3 ped <- Pedigree(sampleped, relped) kin_all <- kinship(ped) kin_all[24:27, 24:27] ## 4 x 4 sparse Matrix of class \"dsCMatrix\" ## 1_124 1_125 1_126 1_127 ## 1_124 0.5000 0.0625 0.0625 0.0625 ## 1_125 0.0625 0.5000 0.2500 0.1250 ## 1_126 0.0625 0.2500 0.5000 0.1250 ## 1_127 0.0625 0.1250 0.1250 0.5000 kin_all[46:50, 46:50] ## 5 x 5 sparse Matrix of class \"dsCMatrix\" ## 2_205 2_206 2_207 2_208 2_209 ## 2_205 0.50 0.25 0.25 0.25 . ## 2_206 0.25 0.50 0.25 0.25 . ## 2_207 0.25 0.25 0.50 0.25 . ## 2_208 0.25 0.25 0.25 0.50 . ## 2_209 . . . . 0.5"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"optional-pedigree-informations","dir":"Articles","previous_headings":"","what":"Optional Pedigree Informations","title":"Pedixplorer tutorial","text":"use ped2 sampleped sequentially add optional information Pedigree object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"status","dir":"Articles","previous_headings":"Optional Pedigree Informations","what":"Status","title":"Pedixplorer tutorial","text":"example shows specify status indicator, vital status. sampleped data include indicator, create one indicate first generation ped2, subjects 1 2, deceased. status indicator used cross individuals Pedigree plot.","code":"df2 <- sampleped[sampleped$famid == 2, ] names(df2) ## [1] \"famid\" \"id\" \"dadid\" \"momid\" \"sex\" \"affection\" \"avail\" \"num\" df2$status <- c(1, 1, rep(0, 12)) ped2 <- Pedigree(df2) summary(status(ped(ped2))) ## Mode FALSE TRUE ## logical 12 2 plot(ped2)"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"labels","dir":"Articles","previous_headings":"Optional Pedigree Informations","what":"Labels","title":"Pedixplorer tutorial","text":"show use label argument plot method add additional information subject. example , add names existing plot adding new column elementMetadata Ped object Pedigree. space permits, lines characters per line can made using {/em } character indicate new line.","code":"mcols(ped2)$Names <- c( \"John\\nDalton\", \"Linda\", \"Jack\", \"Rachel\", \"Joe\", \"Deb\", \"Lucy\", \"Ken\", \"Barb\", \"Mike\", \"Matt\", \"Mindy\", \"Mark\", \"Marie\\nCurie\" ) plot(ped2, label = \"Names\")"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"affected-indicators","dir":"Articles","previous_headings":"Optional Pedigree Informations","what":"Affected Indicators","title":"Pedixplorer tutorial","text":"show specify affected status single indicator multiple indicators. First, use affected indicator sampleped, contains 0/1 indicators NA missing, let indicate blue eyes. Next, create vector indicator baldness. add second filling scale plot generate_colors(add_to_scale = TRUE). plot shapes subject therefore divided two equal parts shaded differently indicate two affected indicators.","code":"mcols(ped2)$bald <- as.factor(c(0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1)) ped2 <- generate_colors(ped2, col_aff = \"bald\", add_to_scale = TRUE) plot(ped2, legend = TRUE)"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"special-relationships","dir":"Articles","previous_headings":"Optional Pedigree Informations","what":"Special Relationships","title":"Pedixplorer tutorial","text":"Special pedigree relationships can specified matrix relation argument. 4 relationships can specified numeric codes: 1 = Monozygotic twins 2 = Dizygotic twins 3 = twins unknown zygosity 4 = Spouse spouse relationship can indicate marry-couple children together.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"twins","dir":"Articles","previous_headings":"Optional Pedigree Informations > Special Relationships","what":"Twins","title":"Pedixplorer tutorial","text":", use relationship dataset. can specify code column individuals monozygotic ‘1’, dizygotic ‘2’ unknown-zygosity ‘3’ twins. twin relationships represented diverging lines single point. monozygotic twins additional line connecting diverging lines, twins unknown zygosity question mark.","code":"## create twin relationships data(\"relped\") rel(ped2) <- Rel(relped[relped$famid == 2, ]) plot(ped2)"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"inbreeding","dir":"Articles","previous_headings":"Optional Pedigree Informations > Special Relationships","what":"Inbreeding","title":"Pedixplorer tutorial","text":"Another special relationship inbreeding. Inbreeding founders implies founders’ parents related (maternal paternal genes descended single ancestral gene). One thing can add people pedigree show inbreeding. show pair founders (subjects 201 202) inbred, must show parents siblings. , create subjects 197 198 parents 201 also create subjects 199 200 parents 202. make subjects 198 199 siblings, give parents, creating subjects 195 196. results subjects 201 202 first cousins, therefore inbred.","code":"indid <- 195:202 dadid <- c(NA, NA, NA, 196, 196, NA, 197, 199) momid <- c(NA, NA, NA, 195, 195, NA, 198, 200) sex <- c(2, 1, 1, 2, 1, 2, 1, 2) ped3 <- data.frame( id = indid, dadid = dadid, momid = momid, sex = sex ) ped4df <- rbind.data.frame(df2[-c(1, 2), 2:5], ped3) ped4 <- Pedigree(ped4df) plot(ped4)"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"marry-ins","dir":"Articles","previous_headings":"Optional Pedigree Informations > Special Relationships","what":"Marry-ins","title":"Pedixplorer tutorial","text":"Spouse child can also specified rel_df argument setting code value Spouse 4. use ped2 earlier add new spouse relationship individuals 212 211 get following plot.","code":"## create twin relationships rel_df2 <- data.frame( id1 = \"211\", id2 = \"212\", code = 4, famid = \"2\" ) new_rel <- c(rel(ped2), with(rel_df2, Rel(id1, id2, code, famid))) rel(ped2) <- upd_famid(new_rel) plot(ped2)"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"pedigree-plot-details","dir":"Articles","previous_headings":"","what":"Pedigree Plot Details","title":"Pedixplorer tutorial","text":"plot method attempts adhere many standards pedigree plotting, presented Bennet et al. 2008. show tricks pedigree plotting, use ped1 sampleped, 41 subjects 4 generations, including generation double first cousins. first marriage 114, remarried subject 113 without children . specify marriage relation argument, plot method excludes subject 113 plot. basic plot ped1 shown figure .","code":"df1 <- sampleped[sampleped$famid == 1, ] relate1 <- data.frame( id1 = 113, id2 = 114, code = 4, famid = 1 ) ped1 <- Pedigree(df1, relate1) plot(ped1)"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"align-by-input-order","dir":"Articles","previous_headings":"Pedigree Plot Details","what":"Align by Input Order","title":"Pedixplorer tutorial","text":"plot method decent job aligning subjects given order subjects Pedigree object made, sometimes make two copies subject. change order subjects creating Pedigree, can help plot method reduce need duplicate subjects, Figure~ longer subject 110 duplicated.","code":"df1reord <- df1[c(35:41, 1:34), ] ped1reord <- Pedigree(df1reord, relate1) plot(ped1reord)"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"plot-colors-and-scales","dir":"Articles","previous_headings":"Pedigree Plot Details","what":"Plot colors and scales","title":"Pedixplorer tutorial","text":"Pedigree object contains Scales object can modified change colors patterns used plot. make easy user modify function generate_colors() available. function generate color palette filling bordering plot. function transform given column dataframe factor generate color palette level factor. user can modify colors patterns used filling bordering plot. can follow:","code":"scales(ped1) ## An object of class \"Scales\" ## Slot \"fill\": ## order column_values column_mods mods labels affected fill density angle ## 1 1 affection affection_mods 0 Healthy <= to 0.5 FALSE white NA NA ## 2 1 affection affection_mods 1 Affected > to 0.5 TRUE red NA NA ## 3 1 affection affection_mods NA NA grey NA NA ## ## Slot \"border\": ## column_values column_mods mods labels border ## 1 avail avail_mods NA NA grey ## 2 avail avail_mods 1 Available green ## 3 avail avail_mods 0 Non Available black ped1 <- generate_colors( ped1, col_aff = \"num\", add_to_scale = TRUE, is_num = TRUE, keep_full_scale = TRUE, breaks = 2, colors_aff = c(\"blue\", \"green\"), colors_unaff = c(\"yellow\", \"brown\"), threshold = 3, sup_thres_aff = FALSE ) plot(ped1) # To modify a given scale you can do as follow fill(ped1) ## order column_values column_mods mods labels affected fill density ## 1 1 affection affection_mods 0 Healthy <= to 0.5 FALSE white NA ## 2 1 affection affection_mods 1 Affected > to 0.5 TRUE red NA ## 3 1 affection affection_mods NA NA grey NA ## 4 2 num num_mods 1 Affected < to 3 : (1,2] TRUE #0000FF NA ## 5 2 num num_mods 2 Affected < to 3 : [-0.002,1] TRUE #00FF00 NA ## 6 2 num num_mods 3 Healthy >= to 3 : (4.5,6] FALSE #FFFF00 NA ## 7 2 num num_mods 4 Healthy >= to 3 : [3,4.5] FALSE #A52A2A NA ## 8 2 num num_mods NA NA : NA NA grey NA ## angle ## 1 NA ## 2 NA ## 3 NA ## 4 NA ## 5 NA ## 6 NA ## 7 NA ## 8 NA fill(ped1)$fill[4] <- \"#970b6d\" fill(ped1)$density[5] <- 30 fill(ped1)$angle[5] <- 45 border(ped1)$border <- c(\"red\", \"black\", \"orange\") plot(ped1, legend = TRUE, leg_loc = c(7, 18, 1, 1.5))"},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"ped-as-a-data-frame","dir":"Articles","previous_headings":"Pedigree Utility Functions","what":"Ped as a data.frame","title":"Pedixplorer tutorial","text":"main features Pedigree object vectors element subject. sometimes useful extract vectors Pedigree object data.frame basic information can used construct new Pedigree object. possible .data.frame() method, shown .","code":"dfped2 <- as.data.frame(ped(ped2)) dfped2"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"subsetting-and-trimming","dir":"Articles","previous_headings":"Pedigree Utility Functions","what":"Subsetting and Trimming","title":"Pedixplorer tutorial","text":"Pedigrees large size can bottleneck programs run calculations . Pedixplorer package contains routines identify subjects remove. show subject (e.g. subject 210) can removed ped2, Pedigree object changed verifying relation dataframe longer twin relationship subjects 210 211, indicated id1 id2. steps also works id subjects . provide subset(), trims subjects Pedigree id argument. example removing subject 110, done , trim Pedigree vector subject ids. check trimming looking id vector relation matrix.","code":"ped2_rm210 <- ped2[-10] rel(ped2_rm210) ## Rel object with 0 relationshipswith 0 MZ twin, 0 DZ twin, 0 UZ twin, 0 Spouse: ## id1 id2 code famid ## rel(ped2) ## Rel object with 4 relationshipswith 1 MZ twin, 1 DZ twin, 1 UZ twin, 1 Spouse: ## id1 id2 code famid ## ## 1 2_210 2_211 MZ twin 2 ## 2 2_204 2_208 DZ twin 2 ## 3 2_212 2_213 UZ twin 2 ## 4 2_211 2_212 Spouse 2 ped2_trim210 <- subset(ped2, \"2_210\", keep = FALSE) id(ped(ped2_trim210)) ## [1] \"2_201\" \"2_202\" \"2_203\" \"2_204\" \"2_205\" \"2_206\" \"2_207\" \"2_208\" \"2_209\" \"2_211\" \"2_212\" \"2_213\" ## [13] \"2_214\" rel(ped2_trim210) ## Rel object with 3 relationshipswith 0 MZ twin, 1 DZ twin, 1 UZ twin, 1 Spouse: ## id1 id2 code famid ## ## 1 2_204 2_208 DZ twin 2 ## 2 2_212 2_213 UZ twin 2 ## 3 2_211 2_212 Spouse 2 ped2_trim_more <- subset(ped2_trim210, c(\"2_212\", \"2_214\"), keep = FALSE) id(ped(ped2_trim_more)) ## [1] \"2_201\" \"2_202\" \"2_203\" \"2_204\" \"2_205\" \"2_206\" \"2_207\" \"2_208\" \"2_209\" \"2_211\" \"2_213\" rel(ped2_trim_more) ## Rel object with 1 relationshipwith 0 MZ twin, 1 DZ twin, 0 UZ twin, 0 Spouse: ## id1 id2 code famid ## ## 1 2_204 2_208 DZ twin 2"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"shrinking","dir":"Articles","previous_headings":"","what":"Shrinking","title":"Pedixplorer tutorial","text":"additional function Pedixplorer shrink(), shrinks Pedigree specified bit size maintaining maximal amount information genetic linkage association studies. Using indicator availability affected status, removes subjects order: + unavailable available descendants + available parents + available missing affected status + available unaffected + available affected show shrink Pedigree 1 bit size 30, happens bit size removing unavailable subjects. show extract shrunken Pedigree object shrink result, plot . Now shrink Pedigree 1 bit size 25, requires removing subjects informative. tie multiple subjects remove, method randomly chooses one . seed setting, method removes subjects 140 141.","code":"set.seed(200) shrink1_b30 <- shrink(ped1, max_bits = 30) print(shrink1_b30[c(2:8)]) ## $id_trim ## [1] \"1_101\" \"1_102\" \"1_107\" \"1_108\" \"1_111\" \"1_113\" \"1_121\" \"1_122\" \"1_123\" \"1_131\" \"1_132\" \"1_134\" ## [13] \"1_139\" ## ## $id_lst ## $id_lst$unavail ## [1] \"1_101\" \"1_102\" \"1_107\" \"1_108\" \"1_111\" \"1_113\" \"1_121\" \"1_122\" \"1_123\" \"1_131\" \"1_132\" \"1_134\" ## [13] \"1_139\" ## ## ## $bit_size ## [1] 46 29 ## ## $avail ## [1] FALSE FALSE FALSE FALSE TRUE TRUE FALSE FALSE FALSE TRUE FALSE TRUE TRUE FALSE TRUE TRUE ## [17] TRUE TRUE TRUE TRUE TRUE TRUE FALSE FALSE FALSE FALSE TRUE TRUE ## ## $pedSizeOriginal ## [1] 41 ## ## $pedSizeIntermed ## [1] 28 ## ## $pedSizeFinal ## [1] 28 plot(shrink1_b30$pedObj) set.seed(10) shrink1_b25 <- shrink(ped1, max_bits = 25) print(shrink1_b25[c(2:8)]) ## $id_trim ## ## \"1_101\" \"1_102\" \"1_107\" \"1_108\" \"1_111\" \"1_113\" \"1_121\" \"1_122\" \"1_123\" \"1_131\" \"1_132\" \"1_134\" ## id ## \"1_139\" \"1_124\" \"1_130\" \"1_125\" ## ## $id_lst ## $id_lst$unavail ## [1] \"1_101\" \"1_102\" \"1_107\" \"1_108\" \"1_111\" \"1_113\" \"1_121\" \"1_122\" \"1_123\" \"1_131\" \"1_132\" \"1_134\" ## [13] \"1_139\" ## ## $id_lst$affect ## id ## \"1_124\" \"1_130\" \"1_125\" ## ## ## $bit_size ## [1] 46 29 28 26 24 ## ## $avail ## [1] FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE TRUE FALSE TRUE TRUE FALSE TRUE TRUE TRUE ## [17] TRUE TRUE FALSE FALSE FALSE FALSE TRUE TRUE ## ## $pedSizeOriginal ## [1] 41 ## ## $pedSizeIntermed ## [1] 28 ## ## $pedSizeFinal ## [1] 24 plot(shrink1_b25$pedObj)"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"select-unrelateds","dir":"Articles","previous_headings":"","what":"Select Unrelateds","title":"Pedixplorer tutorial","text":"section briefly show use unrelated find set maximum number unrelated available subjects Pedigree. input required Pedigree object vector indicating availability. Pedigrees numerous sets subjects satisfy maximum number unrelateds, method randomly chooses set. show two sets subject ids selected routine discuss . can easily verify sets selected unrelated referring Figure~ see subjects 203 206 unrelated everyone else Pedigree except children. Furthermore, see df2 two, subject 203 available. Therefore, set unrelateds available must include subject 203 one subjects: 201, 204, 206, 207, 212, 214, indicated kinship matrix Pedigree 2 subset availability status 1.","code":"ped2 <- Pedigree(df2) set.seed(10) set1 <- unrelated(ped2) set1 ## [1] \"2_203\" \"2_206\" set2 <- unrelated(ped2) set2 ## [1] \"2_203\" \"2_214\" kin2 <- kinship(ped2) is_avail <- id(ped(ped2))[avail(ped(ped2))] kin2 ## 14 x 14 sparse Matrix of class \"dsCMatrix\" ## [[ suppressing 14 column names '2_201', '2_202', '2_203' ... ]] ## ## 2_201 0.500 . . 0.250 0.250 0.250 0.250 0.250 . 0.1250 0.1250 0.1250 0.1250 0.1250 ## 2_202 . 0.500 . 0.250 0.250 0.250 0.250 0.250 . 0.1250 0.1250 0.1250 0.1250 0.1250 ## 2_203 . . 0.50 . . . . . . 0.2500 0.2500 . . . ## 2_204 0.250 0.250 . 0.500 0.250 0.250 0.250 0.250 . 0.2500 0.2500 0.1250 0.1250 0.1250 ## 2_205 0.250 0.250 . 0.250 0.500 0.250 0.250 0.250 . 0.1250 0.1250 0.1250 0.1250 0.1250 ## 2_206 0.250 0.250 . 0.250 0.250 0.500 0.250 0.250 . 0.1250 0.1250 0.1250 0.1250 0.1250 ## 2_207 0.250 0.250 . 0.250 0.250 0.250 0.500 0.250 . 0.1250 0.1250 0.1250 0.1250 0.1250 ## 2_208 0.250 0.250 . 0.250 0.250 0.250 0.250 0.500 . 0.1250 0.1250 0.2500 0.2500 0.2500 ## 2_209 . . . . . . . . 0.50 . . 0.2500 0.2500 0.2500 ## 2_210 0.125 0.125 0.25 0.250 0.125 0.125 0.125 0.125 . 0.5000 0.2500 0.0625 0.0625 0.0625 ## 2_211 0.125 0.125 0.25 0.250 0.125 0.125 0.125 0.125 . 0.2500 0.5000 0.0625 0.0625 0.0625 ## 2_212 0.125 0.125 . 0.125 0.125 0.125 0.125 0.250 0.25 0.0625 0.0625 0.5000 0.2500 0.2500 ## 2_213 0.125 0.125 . 0.125 0.125 0.125 0.125 0.250 0.25 0.0625 0.0625 0.2500 0.5000 0.2500 ## 2_214 0.125 0.125 . 0.125 0.125 0.125 0.125 0.250 0.25 0.0625 0.0625 0.2500 0.2500 0.5000 kin2[is_avail, is_avail] ## 8 x 8 sparse Matrix of class \"dsCMatrix\" ## 2_201 2_203 2_204 2_206 2_207 2_211 2_212 2_214 ## 2_201 0.500 . 0.250 0.250 0.250 0.1250 0.1250 0.1250 ## 2_203 . 0.50 . . . 0.2500 . . ## 2_204 0.250 . 0.500 0.250 0.250 0.2500 0.1250 0.1250 ## 2_206 0.250 . 0.250 0.500 0.250 0.1250 0.1250 0.1250 ## 2_207 0.250 . 0.250 0.250 0.500 0.1250 0.1250 0.1250 ## 2_211 0.125 0.25 0.250 0.125 0.125 0.5000 0.0625 0.0625 ## 2_212 0.125 . 0.125 0.125 0.125 0.0625 0.5000 0.2500 ## 2_214 0.125 . 0.125 0.125 0.125 0.0625 0.2500 0.5000"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/Pedixplorer.html","id":"session-information","dir":"Articles","previous_headings":"","what":"Session information","title":"Pedixplorer tutorial","text":"","code":"sessionInfo() ## R version 4.4.1 (2024-06-14) ## Platform: x86_64-pc-linux-gnu ## Running under: Ubuntu 22.04.4 LTS ## ## Matrix products: default ## BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 ## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0 ## ## locale: ## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 ## [4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 ## [7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C ## [10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C ## ## time zone: UTC ## tzcode source: system (glibc) ## ## attached base packages: ## [1] stats graphics grDevices utils datasets methods base ## ## other attached packages: ## [1] Pedixplorer_1.1.4 BiocStyle_2.32.1 ## ## loaded via a namespace (and not attached): ## [1] gtable_0.3.5 xfun_0.48 bslib_0.8.0 ggplot2_3.5.1 ## [5] htmlwidgets_1.6.4 lattice_0.22-6 quadprog_1.5-8 vctrs_0.6.5 ## [9] tools_4.4.1 generics_0.1.3 stats4_4.4.1 tibble_3.2.1 ## [13] fansi_1.0.6 highr_0.11 pkgconfig_2.0.3 Matrix_1.7-0 ## [17] data.table_1.16.0 desc_1.4.3 S4Vectors_0.42.1 readxl_1.4.3 ## [21] lifecycle_1.0.4 stringr_1.5.1 compiler_4.4.1 shinytoastr_2.2.0 ## [25] textshaping_0.4.0 munsell_0.5.1 httpuv_1.6.15 shinyWidgets_0.8.7 ## [29] htmltools_0.5.8.1 sass_0.4.9 yaml_2.3.10 lazyeval_0.2.2 ## [33] plotly_4.10.4 later_1.3.2 pillar_1.9.0 pkgdown_2.1.1 ## [37] jquerylib_0.1.4 tidyr_1.3.1 DT_0.33 cachem_1.1.0 ## [41] mime_0.12 tidyselect_1.2.1 digest_0.6.37 stringi_1.8.4 ## [45] colourpicker_1.3.0 dplyr_1.1.4 purrr_1.0.2 bookdown_0.40 ## [49] fastmap_1.2.0 grid_4.4.1 colorspace_2.1-1 cli_3.6.3 ## [53] magrittr_2.0.3 utf8_1.2.4 withr_3.0.1 scales_1.3.0 ## [57] promises_1.3.0 rmarkdown_2.28 httr_1.4.7 gridExtra_2.3 ## [61] cellranger_1.1.0 ragg_1.3.3 shiny_1.9.1 evaluate_1.0.0 ## [65] knitr_1.48 miniUI_0.1.1.1 viridisLite_0.4.2 rlang_1.1.4 ## [69] Rcpp_1.0.13 xtable_1.8-4 glue_1.8.0 BiocManager_1.30.25 ## [73] BiocGenerics_0.50.0 jsonlite_1.8.9 R6_2.5.1 plyr_1.8.9 ## [77] systemfonts_1.1.0 fs_1.6.4"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"pedigree-alignment","dir":"Articles","previous_headings":"","what":"Pedigree alignment","title":"Pedigree alignment details","text":"aligned Pedigree object contains Pedigree along set information allows pretty plotting. information consists two parts: set vertical horizontal plotting coordinates along identifier subject plotted position, list connections made parent/child, spouse/spouse, twin/twin. Creating aligment turned one difficult parts project, area significant work done. routines section completely ignore id component Pedigree; everyone indexed solely row number object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"hints","dir":"Articles","previous_headings":"","what":"Hints","title":"Pedigree alignment details","text":"first part work hints list Pedigree. consists 3 parts: left right order founders processed. order siblings listed within family. selected spouse pairs, left/right, two anchor, .e., determine marriage plotted. default starting values simple: founders processed order appear data set, children appear order found data set, husbands left wives, marriage plotted leftmost spouse. simple example want bend rules two families marry, Pedigrees extend wedded pair. joint Pedigree pair appear right-child left hand family, left-child right hand family. respect founders, assume family three lineages marriage 1 2, another 2 3. joint Pedigree sets 1, 2, 3 left right. hints consist list two components. vector numbers length Pedigree, used order female founders order siblings within family. subjects part either value can arbitrary. 3 column matrix spouse pairs, row indicates left-hand member pair, right-hand member, two anchor, .e., directly connected parent. Double triple marriages can start get interesting.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"auto_hint","dir":"Articles","previous_headings":"","what":"Auto_hint","title":"Pedigree alignment details","text":"routine used create initial hints list. part general intention make routine pretty good drawings automatically. basic algorithm trial error. Start simplest possible hints (user input accepted) Call align see works Fix spouses next . fix top level mixes everything , fixes one level time. routine makes attempt reorder founders. just smart enough figure . first thing done check twins. increase complexity, since twins need move together. rel(ped, \"code\") object factor, first turn numeric. create 3 vectors: twinrel matrix containing pairs twins relation, subset incoming rel dataframe. twinset vector identifies twins, 0 anyone part multiple-birth set, unique id member set. use minimum row number members set id. twinord starting order vector set; mostly makes sure ties (knows user may used starting values.) recent addition carry forward packaged align kindepth align.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"shift-in-auto_hint","dir":"Articles","previous_headings":"Auto_hint","what":"Shift in auto_hint","title":"Pedigree alignment details","text":"Next internal function rearranges someone leftmost rightmost /siblings. real complication twins. one moves move . need keep monozygotics together within band triplets. Algorithm : person moved part twinset, first move twins left end (right case may ), move monozygotes left, move subject left.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"init-auto_hint","dir":"Articles","previous_headings":"Auto_hint","what":"Init auto_hint","title":"Pedigree alignment details","text":"Now, get ordering Pedigree use starting point. numbers start 1 level. need final prettify step, hence align = FALSE. hints structure entered, retain non-zero entries, otherwise people put order data set. allow hints input order vector. twins reordered.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"fixup-auto_hint","dir":"Articles","previous_headings":"Auto_hint","what":"Fixup auto_hint","title":"Pedigree alignment details","text":"result coming back align() set vectors matrices: n vector, number entries per level nid matrix, one row per level, numeric id subject plotted spouse integer matrix, one row per level, subject directly right spouse (1), double marriage (2), neither (0). fam matrix, link upward parents, 0 link. Now, walk levels one one. candidate subject one appears twice level, /parents somewhere else spouse. Move person spouse ends sibships add marriage hint. figure shows simple case. input data set subjects ordered 1–11, left panel result without hints processes subjects order encountered. return values align subject 9 shown twice. first recognized spouse subject 4, second child 6–7. basic logic Find subject listed multiple times line (assume male). means multiple connections, usually one parents spouse tied parents. (spouse marry-placed alongside duplication.) position 2 associated siblings, rearrange put subject 2 right. associated spouse location, put spouse right siblings. Repeat work position 8, moving targets left. either position, associated spouse add marriage. ends marriage anchored, .e., connected family, either end may listed anchor output; follow suggestion duporder routine. one , usually better anchor , marriage processed align family . (least think .) logic works 9 times 10, least human pedigrees. ’ll look complex cases looking duporder (order duplicates) function, returns matrix columns 1 2 pair duplicates, 3 direction. Note following code idlist refers row numbers subject Pedigree, label ped(ped, \"id\").","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"duporder","dir":"Articles","previous_headings":"Auto_hint","what":"duporder","title":"Pedigree alignment details","text":"case shown figure duporder function return single row array values (2, 6, 1), first two positions duplicated subject. anchor 2 since copy connected parents direction TRUE, since spouse left anchor point. id 9, sibs 8, 9, 10, shift function create position hints 2,1,3, cause listed order 9, 8, 10. value spouse 3 (third position row), subjects 3, 4, 5 reordered, finally line (4,9,1) added sptemp matrix. particular case final element 1 2, since connected parents. figure shows complex case several arcs. upper left double marry-. anchor variable code (2,2) since copies anchored spouse. left right sets sibs reordered (even though left one need ), two lines added sptemp matrix: (5,11,1) (11,9,2). upper right pair overlapping arcs. final tree want put sibling 28 right 29 since allow one node join, process subjects lexical order code first shift 28 right later shift 29. duporder function tries order duplicates matrix closest ones processed last. definition close based first whether families touch, second actual distance. third column matrix hints whether marriage plotted left (1) right (2) position pair. goal spread apart families cousins; example children 28/31 plotted 21/22 grandparents, 29/32 25/26 grandparents. logic column ad hoc: put children near edges.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"find-spouse-and-find-sibs","dir":"Articles","previous_headings":"Auto_hint","what":"Find-spouse and find-sibs","title":"Pedigree alignment details","text":"Finally, two helper routines. Finding spouse can interesting – suppose listing Shirley, Fred, Carl, line first three marked spouse = TRUE – means married 3 us. First find string rpos lpos marriage block; 99% time length 2 course. find person block opposite sex, check connected. routine called left-right position alignment arrays returns position. findsibs function starts position returns position well, much simpler findspouse.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"fixup2","dir":"Articles","previous_headings":"Auto_hint","what":"Fixup2","title":"Pedigree alignment details","text":"point common situation shown figure. variable anchor (2,1) showing left hand copy subject 9 connected anchored spouse right hand copy anchored. proper addition spouselist (4, 9, dpairs), last hint dpairs routine parents one follow drawing entire Pedigree. (drawing Pedigree child can reached multiple founders, want find child .) double marry-found figure, subject 11, leads value (2,2) [anchor] variable. proper addition sptemp matrix case two rows, (5, 11, 1) indicating 5 plotted left 11 5-11 marriage, first partner anchor, second row (11, 9, 2). cause common spouse plotted middle. Multiple marriages can lead unanchored subjects. left hand portion figure two double marriages, one left one right anchor values (0,2) (2,0), respectively. add two marriages return list ensure print correct left-right order; 14-4 one correct default easier output line check sex orders. left panel figure shows case subject 11 marries Pedigree also second spouse. anchor variable case (2, 0); first instance 11 spouse tied tree , second instance upward connections. top row, subject 6 values (0, 0) since neither connection upward parent. right hand panel subject 2 anchor variable (0,1).","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"align","dir":"Articles","previous_headings":"","what":"Align","title":"Pedigree alignment details","text":"top level routine alignment 5 arguments ped Pedigree. case multiple families loop family separately. packed allow branches tree overlap? FALSE drawing much easier, final drawing can take huge amount space. width minimum width packed Pedigree. affects small pedigrees, since minimum possible width Pedigree largest number individiuals one generations. align final step alignment done? tries center children parents, degree possible. hints object. normally blank auto_hint invoked. result coming back align set vectors matrices: n vector, number entries per level nid matrix, one row per level, numeric id subject plotted pos horizontal position plotting spouse integer matrix, one row per level, subject directly right spouse (1), double marriage (2), neither (0). fam matrix, link upward parents, 0 link.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"setup1--align","dir":"Articles","previous_headings":"Align","what":"Setup1 -align","title":"Pedigree alignment details","text":"Start setup. Throughout routine row number used subject id (ignoring actual id label). Check everyone either two parents none (singleton confuses us). Verify hints correct. relation data frame, present, factor, convert numeric. Husband index (4 = 4th person Pedigree structure) Wife index Plot order: 1 = husband left, 2 = wife left Anchor: 1 = left member, 2 = right member, 0 = yet determined routine proceeds spousal pair can encountered multiple times; take list ``connected’’ member added Pedigree marriage gets added twice. detect duplicates spouselist need create unique (temporary) spouse-pair id using simple hash. importing data auto_hint, routine’s spouse matrix column 1 = subject plotted left, 2 = subject plotted right. spouselist array column 1 = husband, 2 = wife. Hence clumsy looking ifelse . auto_hint format congenial users, might modify output, spouselist format easier code.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"align-founders","dir":"Articles","previous_headings":"Align","what":"Align-founders","title":"Pedigree alignment details","text":"align routine alignment using 3 co-routines: alignped1 called single subject, returns subtree founded subject, though tree alignped2 called set sibs, calls alignped1 alignped3 multiple times create joint Pedigree alignped3 given two side side plotting structures, merge single one Call alignped1 sequentially founder pair merge results. founder pair married pair, neither father.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"align-finish","dir":"Articles","previous_headings":"Align","what":"Align-finish","title":"Pedigree alignment details","text":"Now finish . 4 tasks : convenience lower level routines kept spouse nid arrays single object – unpack spouse array 1 position indicates subject +1 joined marriage. two common ancestor change 2, indicates double line used plot. Add twins data output. final alignment","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"finish-align2","dir":"Articles","previous_headings":"Align > Align-finish","what":"Finish align(2)","title":"Pedigree alignment details","text":"twins array shape spouse nid arrays: one row per level giving data subjects plotted row. case 0 = nothing 1 = sib right monzygotic twin, 2 = sib right dizygote, 3 = sib right twin, unknown zyogosity.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"finish-align3","dir":"Articles","previous_headings":"Align > Align-finish","what":"Finish align(3)","title":"Pedigree alignment details","text":"point Pedigree arranged, positions row going 1 (number subjects row). (packed Pedigree, usual case). everything pushed left margin pretty, now fix . Note alignped4 wants T/F spouse matrix: care degree relationship spouse.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"alignped1","dir":"Articles","previous_headings":"","what":"alignped1","title":"Pedigree alignment details","text":"first three co-routines. called single subject, returns subtree founded said subject, though tree. go Pedigree, . Input arguments nid numeric id subject question dad points row father, 0=father Pedigree mom points row mother level plotting depth subject horder orders kids within sibship packed true, everything slid left col 1 = Pedigree index husband col 2 = Pedigree index wife col 3 = 1 : plot husband left, 2 = wife left col 4 = 1 : left member rooted , 2 = right member, 0 = either return argument set matrices described section align, along spouselist matrix. latter marriages removed processed.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"alignped1---part1","dir":"Articles","previous_headings":"alignped1","what":"alignped1 - part1","title":"Pedigree alignment details","text":"routine nid array consists final nid array + 1/2 final spouse array. basic algorithm simple. Find spouses x anchor subject. none return trivial tree consisting x alone. marriage set, call alignped2 children add result. Note spouselist matrix contain spouse pairs yet processed. logic anchoring slightly tricky. First, row 4 spouselist matrix 0, anchor first opportunity, .e. now.. Also note spouselist[,3] == spouselist[,4] husband anchor (just write possibilities).","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"alignped1---part2","dir":"Articles","previous_headings":"alignped1","what":"alignped1 - part2","title":"Pedigree alignment details","text":"Create set 3 return structures, matrices (1 + nspouse) columns. children routines widen result.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"alignped1---part3","dir":"Articles","previous_headings":"alignped1","what":"alignped1 - part3","title":"Pedigree alignment details","text":"Now list spouses dealt correponding columns spouselist matrix. Create two complimentary lists lspouse rspouse denote plotted left right. someone lots spouses try split evenly. number spouses odd, men right left, women right. hints spouselist matrix override. put undecided marriages closest x, add predetermined ones left right. majority marriages undetermined singletons, nleft 1 female (put husband left) 0 male. one bug found plotting canine data, lspouse initially empty length(rspouse)> 1. caused nleft>length(indx). fix let indx indexed beyond length, fix JPS 5/2013.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"alignped1---part4","dir":"Articles","previous_headings":"alignped1 > alignped1 - part3","what":"alignped1 - part4","title":"Pedigree alignment details","text":"spouses Pedigree, now look . spouse get list children. call alignped2 generate tree mark connection parent. multiple marriages children need join trees.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"alignped1---part5","dir":"Articles","previous_headings":"alignped1 > alignped1 - part3","what":"alignped1 - part5","title":"Pedigree alignment details","text":"finish need splice together tree made kids, data lev+1 , data . 3 cases. first easiest children found. second, common, tree wider tree , case add data level onto . third narrower, instance child.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"alignped2","dir":"Articles","previous_headings":"","what":"alignped2","title":"Pedigree alignment details","text":"routine takes collection siblings, grows tree , appends side side single tree. input arguments alignped1 exception x vector. routine nothing spouselist matrix, needs pass tree back since one routines called alignped2 might change matrix. code one non-obvious special case. Suppose two sibs marry. first sib processed alignped1 partners (children) added rval structure . second sib processed come back 1 element tree (marriage longer spouselist), added onto rval. rule thus add 1 element tree whose value (must x[]) already rval structure level. (Curt Olswold. find families?)","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"alignped3","dir":"Articles","previous_headings":"","what":"alignped3","title":"Pedigree alignment details","text":"third alignment co-routine merges two pedigree trees side side single object. primary special case rightmost person left tree leftmost person right tree; need plot two copies person side side. (initializing output structures worry - harm column bigger finally needed.) Beyond work simple bookkeeping.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"alignped3---slide","dir":"Articles","previous_headings":"alignped3","what":"alignped3 - slide","title":"Pedigree alignment details","text":"unpacked case, traditional way draw Pedigree can assume paper infinitely wide, parents centered children. case think two trees merged solid blocks. input left margin 0. Compute far slide right tree.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"alignped3---merge","dir":"Articles","previous_headings":"alignped3","what":"alignped3 - merge","title":"Pedigree alignment details","text":"Now merge two trees. Start top level work . n2 = 0, nothing Set proper parent id. one two copies attached fam = 0, max(fam, fam2) preserves correct one. packed, set position. Choose one connected parent, midway double marriage. packed = TRUE determine amount slide row. space last element left Pedigree, less overlap. Move everything Fix children level, right hand Pedigree, point correct parental position.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"alignped4","dir":"Articles","previous_headings":"","what":"alignped4","title":"Pedigree alignment details","text":"alignped4 routine final step alignment. attempts line children parents put spouses siblings “close” , extent possible within constraints page width. routine used intricate complex set, realized task cast constrained quadradic optimization. current code necessary setup calls quadprog function. one point investigated using one simpler least-squares routines \\beta constrained non-negative. However problem can translated form number constraints less number parameters, true problem. two important parameters function. One user specified maximum width. smallest possible width maximum number subjects line, user suggestion low increased 1+ amount (give just little wiggle room). vector 2 alignment parameters b. set siblings x parents p_1 p_2 alignment penalty (1/k^)\\sum{=1}{k} (x_i - (p_1 + p_2)^2 k number siblings set. Using fact \\sum(x_i-c)^2 = \\sum(x_i-\\mu)^2 + k(c-\\mu)^2, =1 moving sibship k sibs one unit left right optimal incur cost moving one 1 two sibs place. =0 large sibships harder move small ones, default value =1.5 slightly easier move small ones. rationale default long parents somewhere first last siblings result looks fairly good, flexible spacing large family. tethering sibs single spot tend kept close . alignment penalty spouses b(x_1 - x_2)^2, tends keep together. size b controls relative importance sib-parent spouse-spouse closeness.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"alignped4---part1","dir":"Articles","previous_headings":"alignped4","what":"alignped4 - part1","title":"Pedigree alignment details","text":"start adding penalties. total number parameters alignment problem (hand quadprog) set sum(n) positions. work array myid keeps track parameter number position easy find. one extra penalty added end. penalty amount final positions shifted constant, penalty matrix positive definite; solve.QP like . add tiny amount leftward pull widest line.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"alignped4-part2","dir":"Articles","previous_headings":"alignped4","what":"alignped4: part2","title":"Pedigree alignment details","text":"Next come constraints. k subjects line k+1 constraints line. first point must \\ge 0, subesquent one must least 1 unit right, final point must \\le max width.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_alignment.html","id":"session-information","dir":"Articles","previous_headings":"","what":"Session information","title":"Pedigree alignment details","text":"","code":"sessionInfo() ## R version 4.4.1 (2024-06-14) ## Platform: x86_64-pc-linux-gnu ## Running under: Ubuntu 22.04.4 LTS ## ## Matrix products: default ## BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 ## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0 ## ## locale: ## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C ## [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 ## [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 ## [7] LC_PAPER=en_US.UTF-8 LC_NAME=C ## [9] LC_ADDRESS=C LC_TELEPHONE=C ## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C ## ## time zone: UTC ## tzcode source: system (glibc) ## ## attached base packages: ## [1] stats graphics grDevices utils datasets methods base ## ## other attached packages: ## [1] Pedixplorer_1.1.4 BiocStyle_2.32.1 ## ## loaded via a namespace (and not attached): ## [1] gtable_0.3.5 xfun_0.48 bslib_0.8.0 ## [4] ggplot2_3.5.1 htmlwidgets_1.6.4 lattice_0.22-6 ## [7] quadprog_1.5-8 vctrs_0.6.5 tools_4.4.1 ## [10] generics_0.1.3 stats4_4.4.1 tibble_3.2.1 ## [13] fansi_1.0.6 highr_0.11 pkgconfig_2.0.3 ## [16] Matrix_1.7-0 data.table_1.16.0 desc_1.4.3 ## [19] S4Vectors_0.42.1 readxl_1.4.3 lifecycle_1.0.4 ## [22] stringr_1.5.1 compiler_4.4.1 shinytoastr_2.2.0 ## [25] textshaping_0.4.0 munsell_0.5.1 httpuv_1.6.15 ## [28] shinyWidgets_0.8.7 htmltools_0.5.8.1 sass_0.4.9 ## [31] yaml_2.3.10 lazyeval_0.2.2 plotly_4.10.4 ## [34] later_1.3.2 pillar_1.9.0 pkgdown_2.1.1 ## [37] jquerylib_0.1.4 tidyr_1.3.1 DT_0.33 ## [40] cachem_1.1.0 mime_0.12 tidyselect_1.2.1 ## [43] digest_0.6.37 stringi_1.8.4 colourpicker_1.3.0 ## [46] dplyr_1.1.4 purrr_1.0.2 bookdown_0.40 ## [49] fastmap_1.2.0 grid_4.4.1 colorspace_2.1-1 ## [52] cli_3.6.3 magrittr_2.0.3 utf8_1.2.4 ## [55] withr_3.0.1 scales_1.3.0 promises_1.3.0 ## [58] rmarkdown_2.28 httr_1.4.7 gridExtra_2.3 ## [61] cellranger_1.1.0 ragg_1.3.3 shiny_1.9.1 ## [64] evaluate_1.0.0 knitr_1.48 miniUI_0.1.1.1 ## [67] viridisLite_0.4.2 rlang_1.1.4 Rcpp_1.0.13 ## [70] xtable_1.8-4 glue_1.8.0 BiocManager_1.30.25 ## [73] BiocGenerics_0.50.0 jsonlite_1.8.9 R6_2.5.1 ## [76] plyr_1.8.9 systemfonts_1.1.0 fs_1.6.4"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_kinship.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Pedigree kinship() details","text":"kinship matrix foundational random effects models family data. n subjects n \\times n matrix whose , j elements contains expected fraction alleles identical descent sampled one subject another subject j. Note diagonal elements matrix 0.5 1: randomly sample twice subject (replacement) get two copies gene inherited father 1/4 time, maternal copy twice (1/4) one 1/2 time. formal definition K(,) = 1/4 + 1/4 + 1/2 K(m,f) m f father mother subject . algorithm used found K Lange, Mathematical Statistical Methods Genetic Analysis, Springer 1997, page 71–72. key idea recursive algorithm K(,j) condition gene selection first index . Let m() f() indices mother father subject g allele randomly sampled subject , may either maternal paternal origin. \\begin{align} K(,j) &= P(\\mbox{$g$ maternal}) * K(m(), j) + P(\\mbox{$g$ paternal}) * K(f(), j) \\label{recur0} \\\\ &= 1/2 K(m(), j) + 1/2 K(f(), j) \\label{recur1} \\\\ K(,) &= 1/2(1 + K(m(), f())) \\label{self} \\end{align} key step equation K(,j) g maternal origin, random selection two maternal genes, IBD state respect subject j random selection m() random selection j. precisely definition K(m(), j). recursion work K(,) since select maternal gene second choice j use different maternal gene. recurrence algorithm work properly need compute values K parent calculations children. Pedigree founders (parents) assumed unassociated, subjects \\begin{align*} K(,) &= 1/2 \\\\ K(,j) &= 0 \\ ; \\ne j \\end{align*} final formula slightly different X chromosome. Equation K(,j) still holds, males probability selected X chromosome maternal 1, male recurrence formula becomes K(,j) = K(m(),j). females unchanged. males K(,) = 1 X chromosome. order already-defined terms right hand side recurrence formula element, subjects need processed following order Generation 0 (founders) K(,j) generation 1 j generation 0. K(,j) j generation 1 K(,j) generation 2 j generation 0 1 K(,j) j generation 2. … kindepth routine assigns plotting depth subject way parents always children. depth need compuations formula K(,j) twice. first time get relationship subject prior generations correct, second correctly compute values subjects level. computations within stage list can vectorized, stages. Let indx index rows generation currently processed, say generation g. add correct computations matrix one row time; calculations depend prior rows exception ,element. approach leads loop containing operations single rows/columns. one point use vectorized version. looks like snippet first line computes values horizontal stripe matrix. correct columns generations Normalisation","what":"Errors present after the normalisation process","title":"Pedigree object","text":"error detected normalisation process, normalised dataframe gave back user errors column added describing encountered problems.","code":"rel_wrong <- rel_df rel_wrong$code[2] <- \"A\" df <- Pedigree(sampleped, rel_wrong) ## Warning in .local(obj, ...): The relationship informations are not valid. Here ## is the normalised relationship informations with the identified problems print(df) ## id1 id2 code famid error ## 1 1_110 1_112 MZ twin 1 ## 2 2_204 2_205 2 CodeNotRecognise"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_object.html","id":"validation","dir":"Articles","previous_headings":"Pedigree Constructor","what":"Validation","title":"Pedigree object","text":"Now data Pedigree object creation ready, given new Pedigree object, trigerring validation process. validation step check many errors : necessary columns present duplicated id momid dadid present id sex column contain “male”, “female”, “unknown” “terminated” values steril, status, available, affected contains 0, 1 NA values Father males Mother females Twins parents MZ twins sex Hints object valid ids contained Ped object …","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_object.html","id":"pedigree-class","dir":"Articles","previous_headings":"","what":"Pedigree Class","title":"Pedigree object","text":"validation S4 object generated. new concept make possible easily setup methods new type object. controls parameters also precise. Pedigree object contains 4 slots, contains different S4 object containing specific type information used Pedigree construction. id identifiers individuals dadid identifiers fathers momid identifiers mothers sex gender individuals id1 identifiers 1st individuals id2 identifiers 2nd individuals code factor describing type relationship (“MZ twin”, “DZ twin”, “UZ twin”, “Spouse”) fill dataframe describing modalities columns correspond affected individuals. Plotting information colour, angle density also provided border dataframe describing modalities columns use plot border plot elements. horder numeric vector ordering individuals plotting spouse matrix spouses information object: help(Ped) help(Rel) help(Scales) help(Hints)","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_object.html","id":"pedigree-accessors","dir":"Articles","previous_headings":"","what":"Pedigree accessors","title":"Pedigree object","text":"Pedigree object now S4 class, made available number accessors. can used getter setter modify value correponding slot object","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_object.html","id":"for-the-pedigree-object","dir":"Articles","previous_headings":"Pedigree accessors","what":"For the Pedigree object","title":"Pedigree object","text":"Get/Set slots : ped(), rel(), scales(), hints() Wrapper Ped object: mcols() Wrapper Scales object: fill(), border() Wrapper Hints object: horder(), spouse()","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_object.html","id":"for-the-ped-object","dir":"Articles","previous_headings":"Pedigree accessors","what":"For the Ped object","title":"Pedigree object","text":"Given input: id(), dadid(), momid(), famid(), sex() infos used : affected(), avail(), status() Computed : isinf(), kin(), useful() Metadata : mcols()","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_object.html","id":"for-the-rel-object","dir":"Articles","previous_headings":"Pedigree accessors","what":"For the Rel object","title":"Pedigree object","text":"id1(), id2(), code(), famid()","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_object.html","id":"for-the-scales-object","dir":"Articles","previous_headings":"Pedigree accessors","what":"For the Scales object","title":"Pedigree object","text":"fill(), border()","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_object.html","id":"for-the-hints-object","dir":"Articles","previous_headings":"Pedigree accessors","what":"For the Hints object","title":"Pedigree object","text":"horder(), spouse()","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_object.html","id":"focus-on-mcols","dir":"Articles","previous_headings":"Pedigree accessors","what":"Focus on mcols()","title":"Pedigree object","text":"mcols() accessors one use add informations individuals.","code":"ped <- Pedigree(sampleped) mcols(ped)[8:12] ## DataFrame with 55 rows and 5 columns ## num error sterilisation vitalStatus affection_mods ## ## 1 2 NA NA NA 0 ## 2 3 NA NA NA 1 ## 3 2 NA NA NA 1 ## 4 4 NA NA NA 0 ## 5 6 NA NA NA NA ## ... ... ... ... ... ... ## 51 2 NA NA NA 0 ## 52 1 NA NA NA 0 ## 53 3 NA NA NA 0 ## 54 2 NA NA NA 0 ## 55 0 NA NA NA 1 ## Add new columns as a threshold if identifiers of individuals superior ## to a given threshold for example mcols(ped)$idth <- ifelse(as.numeric(mcols(ped)$indId) < 200, \"A\", \"B\") mcols(ped)$idth ## [1] \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" ## [20] \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" \"A\" ## [39] \"A\" \"A\" \"A\" \"B\" \"B\" \"B\" \"B\" \"B\" \"B\" \"B\" \"B\" \"B\" \"B\" \"B\" \"B\" \"B\" \"B\""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_object.html","id":"pedigree-methods","dir":"Articles","previous_headings":"","what":"Pedigree methods","title":"Pedigree object","text":"new S4 object comes multiple methods ease use : plot() summary() print() show() .list() [ shrink() generate_colors() is_informative() kindepth() kinship() make_famid() upd_famid() num_child() unrelated() useful_inds()","code":"## We can change the family name based on an other column ped <- upd_famid(ped, mcols(ped)$idth) ## We can substract a given family ped_a <- ped[famid(ped(ped)) == \"A\"] ## Plot it plot(ped_a, cex = 0.5) ## Do a summary summary(ped_a) ## Pedigree object with ## [1] \"Ped object with 41 individuals and 14 metadata columns\" ## [1] \"Rel object with 0 relationshipswith 0 MZ twin, 0 DZ twin, 0 UZ twin, 0 Spouse\" ## Coerce it to a list as.list(ped_a)[[1]][1:3] ## $id ## [1] \"A_101\" \"A_102\" \"A_103\" \"A_104\" \"A_105\" \"A_106\" \"A_107\" \"A_108\" \"A_109\" ## [10] \"A_110\" \"A_111\" \"A_112\" \"A_113\" \"A_114\" \"A_115\" \"A_116\" \"A_117\" \"A_118\" ## [19] \"A_119\" \"A_120\" \"A_121\" \"A_122\" \"A_123\" \"A_124\" \"A_125\" \"A_126\" \"A_127\" ## [28] \"A_128\" \"A_129\" \"A_130\" \"A_131\" \"A_132\" \"A_133\" \"A_134\" \"A_135\" \"A_136\" ## [37] \"A_137\" \"A_138\" \"A_139\" \"A_140\" \"A_141\" ## ## $dadid ## [1] NA NA \"A_135\" NA NA NA NA NA \"A_101\" ## [10] \"A_103\" \"A_103\" \"A_103\" NA \"A_103\" \"A_105\" \"A_105\" NA \"A_105\" ## [19] \"A_105\" \"A_107\" \"A_110\" \"A_110\" \"A_110\" \"A_110\" \"A_112\" \"A_112\" \"A_114\" ## [28] \"A_114\" \"A_117\" \"A_119\" \"A_119\" \"A_119\" \"A_119\" \"A_119\" NA NA ## [37] NA \"A_135\" \"A_137\" \"A_137\" \"A_137\" ## ## $momid ## [1] NA NA \"A_136\" NA NA NA NA NA \"A_102\" ## [10] \"A_104\" \"A_104\" \"A_104\" NA \"A_104\" \"A_106\" \"A_106\" NA \"A_106\" ## [19] \"A_106\" \"A_108\" \"A_109\" \"A_109\" \"A_109\" \"A_109\" \"A_118\" \"A_118\" \"A_115\" ## [28] \"A_115\" \"A_116\" \"A_120\" \"A_120\" \"A_120\" \"A_120\" \"A_120\" NA NA ## [37] NA \"A_136\" \"A_138\" \"A_138\" \"A_138\" ## Shrink it to keep only the necessary information lst1_s <- shrink(ped_a, max_bits = 10) plot(lst1_s$pedObj, cex = 0.5) ## Compute the kinship individuals matrix kinship(ped_a)[1:10, 1:10] ## 10 x 10 sparse Matrix of class \"dsCMatrix\" ## [[ suppressing 10 column names 'A_101', 'A_102', 'A_103' ... ]] ## ## A_101 0.50 . . . . . . . 0.25 . ## A_102 . 0.50 . . . . . . 0.25 . ## A_103 . . 0.50 . . . . . . 0.25 ## A_104 . . . 0.50 . . . . . 0.25 ## A_105 . . . . 0.5 . . . . . ## A_106 . . . . . 0.5 . . . . ## A_107 . . . . . . 0.5 . . . ## A_108 . . . . . . . 0.5 . . ## A_109 0.25 0.25 . . . . . . 0.50 . ## A_110 . . 0.25 0.25 . . . . . 0.50 ## Get the useful individuals ped_a <- useful_inds(ped_a, informative = \"AvAf\") as.data.frame(ped(ped_a))[\"useful\"][1:10, ] ## [1] TRUE TRUE TRUE TRUE TRUE TRUE FALSE FALSE TRUE TRUE"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_object.html","id":"session-information","dir":"Articles","previous_headings":"","what":"Session information","title":"Pedigree object","text":"","code":"sessionInfo() ## R version 4.4.1 (2024-06-14) ## Platform: x86_64-pc-linux-gnu ## Running under: Ubuntu 22.04.4 LTS ## ## Matrix products: default ## BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 ## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0 ## ## locale: ## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C ## [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 ## [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 ## [7] LC_PAPER=en_US.UTF-8 LC_NAME=C ## [9] LC_ADDRESS=C LC_TELEPHONE=C ## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C ## ## time zone: UTC ## tzcode source: system (glibc) ## ## attached base packages: ## [1] stats graphics grDevices utils datasets methods base ## ## other attached packages: ## [1] Pedixplorer_1.1.4 BiocStyle_2.32.1 ## ## loaded via a namespace (and not attached): ## [1] gtable_0.3.5 xfun_0.48 bslib_0.8.0 ## [4] ggplot2_3.5.1 htmlwidgets_1.6.4 lattice_0.22-6 ## [7] quadprog_1.5-8 vctrs_0.6.5 tools_4.4.1 ## [10] generics_0.1.3 stats4_4.4.1 tibble_3.2.1 ## [13] fansi_1.0.6 highr_0.11 pkgconfig_2.0.3 ## [16] Matrix_1.7-0 data.table_1.16.0 desc_1.4.3 ## [19] S4Vectors_0.42.1 readxl_1.4.3 lifecycle_1.0.4 ## [22] stringr_1.5.1 compiler_4.4.1 shinytoastr_2.2.0 ## [25] textshaping_0.4.0 munsell_0.5.1 httpuv_1.6.15 ## [28] shinyWidgets_0.8.7 htmltools_0.5.8.1 sass_0.4.9 ## [31] yaml_2.3.10 lazyeval_0.2.2 plotly_4.10.4 ## [34] later_1.3.2 pillar_1.9.0 pkgdown_2.1.1 ## [37] jquerylib_0.1.4 tidyr_1.3.1 DT_0.33 ## [40] cachem_1.1.0 mime_0.12 tidyselect_1.2.1 ## [43] digest_0.6.37 stringi_1.8.4 colourpicker_1.3.0 ## [46] dplyr_1.1.4 purrr_1.0.2 bookdown_0.40 ## [49] fastmap_1.2.0 grid_4.4.1 colorspace_2.1-1 ## [52] cli_3.6.3 magrittr_2.0.3 utf8_1.2.4 ## [55] withr_3.0.1 scales_1.3.0 promises_1.3.0 ## [58] rmarkdown_2.28 httr_1.4.7 gridExtra_2.3 ## [61] cellranger_1.1.0 ragg_1.3.3 shiny_1.9.1 ## [64] evaluate_1.0.0 knitr_1.48 miniUI_0.1.1.1 ## [67] viridisLite_0.4.2 rlang_1.1.4 Rcpp_1.0.13 ## [70] xtable_1.8-4 glue_1.8.0 BiocManager_1.30.25 ## [73] BiocGenerics_0.50.0 jsonlite_1.8.9 R6_2.5.1 ## [76] plyr_1.8.9 systemfonts_1.1.0 fs_1.6.4"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_plot.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Pedigree plotting details","text":"plotting function Pedigrees 5 tasks Gather information check data. important step call align. Set plot region size symbols. program wants plot circles squares, needs understand geometry paper, Pedigree size, text size get right shape size symbols. Set plot add symbols subject Add connecting lines spouses, children parents Create invisible return value containing locations. Another task, yet completely understood, certainly implemented, might break plot across multiple pages.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_plot.html","id":"setup","dir":"Articles","previous_headings":"","what":"Setup","title":"Pedigree plotting details","text":"new version plotting Pedigree function works two step. ped_to_plotdf() create dataframe Pedigree given containing necessary information plot elements Pedigree: “polygons”, “text”, “segments”, “arcs” plot_from_df() use given dataframe plot element given advantage two step method, plotting can parralelised, element can customised user necessary additional elements can also added plot just adding new row. multiple families present Pedigree object, one dataframe per family produced first one plotted. informations two functions, see help page. help(ped_to_plotdf) help(plot_fromdf)","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_plot.html","id":"sizing","dir":"Articles","previous_headings":"","what":"Sizing","title":"Pedigree plotting details","text":"Now need set sizes. align() get maximum width depth. one plotted row row returned matrices. number columns matrices max width Pedigree, unused positions shorter rows, can identifed nid value 0. Horizontal locations point go 0 xmax, subjects least 1 unit apart; large number exactly one unit part. locations top center plotted symbol.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_plot.html","id":"set-the-graphical-parameters","dir":"Articles","previous_headings":"Sizing","what":"Set the graphical parameters","title":"Pedigree plotting details","text":"like make boxes 2.5 characters wide, matches labels, 0.9 units wide .5 units high. also want vertical room labels. done set_plot_area() function. least 1/2 stemp2 space stemp2 space . stemp3 variable height labels: users may use multi-line ones. constraints (box height + label height) \\times maxlev \\le height : boxes labels fit vertically (box height) \\times (maxlev + (maxlev-1)/2) \\le height : least 1/2 box space row boxes (box width) \\le stemp1 inches (box width) \\le 0.8 unit user coordinates, otherwise appear touch User coordinates go min(xrange)- 1/2 box width max(xrange) + 1/2 box width. box square (inches) first 3 easy. fourth comes play packed pedigrees. Assume box maximum size .8 units, .e., minimal spacing . xmin -.45 xmax + .45 covers plot region, scaling user coordinates inches (.8 + xmax-xmin) box .8 \\times (figure width) / (.8 + xmax-xmin). transformation user units inches horizontally depends box size, since need allow 1/2 box left right. Vertically range 1 nrow spans tops symbols, figure region height less (height text last row + 1 box); remember coordinates point top center box. want row 1 plot top, done appropriate setting usr parameter.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_plot.html","id":"subsetting-and-sub-region","dir":"Articles","previous_headings":"Sizing","what":"Subsetting and Sub-Region","title":"Pedigree plotting details","text":"section still experimental might change. Also, original documentation TM Therneau, within sizing section . Sometimes Pedigree large fit comfortably one page. subregion argument allows one plot portion Pedigree based plot region. Along tools select portions Pedigree based relatedness, descendents particular marriage, gives tool addressing . breaks original goal completely automatic plots, users keep asking . argument subregion = c(min x, max x, min depth, max depth), works editing away portions plist object returned align. First decide lines keep. take subjects away line, update spouses twins, fix parentage line .","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_plot.html","id":"ped_to_plotdf","dir":"Articles","previous_headings":"","what":"ped_to_plotdf()","title":"Pedigree plotting details","text":"first function create dataframe necessary plotting information Pedigree object. steps : Add boxes (depend affection sex) marks. Add status crossing present. Add id text labels Add connections, one one, beginning spouses. Add connections children parents. Add lines/arcs connect multiple instances subject.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_plot.html","id":"details-on-the-polygon-filling-and-border","dir":"Articles","previous_headings":"ped_to_plotdf()","what":"Details on the polygon filling and border","title":"Pedigree plotting details","text":"polygon named based shape (“square”, “circle”,“diamond”, “triangle”), total number division whole shape, position division plot. number division depend number affection register fill slot scale slot Pedigree. filling depend color given corresponding modality individual, border polygon.","code":"library(Pedixplorer) types <- c( \"square_1_1\", # Whole square \"circle_2_1\", # Semi circle first division \"diamond_3_2\", # Third of diamond second division \"triangle_4_3\" # Fourth of triangle third division ) df <- plot_df <- data.frame( x0 = c(1, 3, 5, 7), y0 = 1, type = types, fill = c(\"red\", \"blue\", \"green\", \"yellow\"), border = \"black\", angle = c(NA, 90, 0, 45), density = c(NA, 10, 20, 40) ) plot_fromdf(df, usr = c(0, 8, 0, 2))"},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_plot.html","id":"details-on-connecting-children-to-parents-","dir":"Articles","previous_headings":"ped_to_plotdf()","what":"Details on connecting children to parents.","title":"Pedigree plotting details","text":"First lines child, trivial except twins, triplets, etc. draw horizontal bar across siblings finally connector parent. twins, vertical lines angled towards common point, variable called target . horizontal part easier things family family. plist$twins variable 1/2/3 twin right, 0 otherwise.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_plot.html","id":"details-on-arcs-","dir":"Articles","previous_headings":"ped_to_plotdf()","what":"Details on arcs.","title":"Pedigree plotting details","text":"last set lines dotted arcs connect mulitiple instances subject line. instances may may line. arrcconect function draws quadratic arc locations (x1, y1) (x2, y2) whose height 1/2 unit straight line connection.","code":""},{"path":[]},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_plot.html","id":"symbols","dir":"Articles","previous_headings":"plot_fromdf() > Polygons drawing","what":"Symbols","title":"Pedigree plotting details","text":"four sumbols corresponding four sex codes: square = male, circle = female, diamond= unknown, triangle = terminated. shaded according value(s) affected status subject, filling uses standard arguments polygon() function. complexity multiple affected status given, case symbol divided sections, clockwise starting lower left. asked Beth (original author) particular reason start 6 o-clock, now established history. first part code create collection polygons make symbol. used . collection kept list four elements square, circle, diamond triangle. turn list max(fill(ped, \"order\")) elements, turn list x y coordinates.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_plot.html","id":"circfun","dir":"Articles","previous_headings":"plot_fromdf() > Polygons drawing","what":"Circfun","title":"Pedigree plotting details","text":"circle function quite simple. number segments arbitrary, 50 seems enough make eye happy. draw ray 0 edge, portion arc. polygon function connect back center.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_plot.html","id":"polyfun","dir":"Articles","previous_headings":"plot_fromdf() > Polygons drawing","what":"Polyfun","title":"Pedigree plotting details","text":"Now interesting one — dividing polygon ‘’pie slices’’. computing can’t use usual y= + bx formula line, doesn’t work vertical ones (like sides square). Instead use alternate formulation terms dummy variable z. \\begin{eqnarray*} x &=& + bz \\\\ y &=& c + dz \\\\ \\end{eqnarray*} Furthermore, choose constants , b, c, d side polygon correspond 0 \\le z \\le 1. intersection particular ray angle theta particular side satisfy \\begin{eqnarray} theta &=& y/x = \\frac{+ bz}{c+dz} \\nonumber \\\\ z &=& \\frac{\\theta -c}{b - d\\theta} \\\\ \\end{eqnarray} Equation z lead division zero ray origin intersect side, e.g., vertical divider parallel sides square symbol. solutions want 0 \\le z \\le 1 ‘’forward’’’ part ray. latter true inner product x \\cos(\\theta) + y \\sin(\\theta) >0. Exactly one polygon sides satisfy conditions.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_plot.html","id":"final-output","dir":"Articles","previous_headings":"","what":"Final output","title":"Pedigree plotting details","text":"Pedigree plotted new frame added current device. ggplot_gen = TRUE, ggplot object create informations available invisible object given back plot_fromdf()","code":"Notes: Remind the user of subjects who did not get plotted; these are ususally subjects who are married in but without children. Unless the Pedigree contains spousal information the routine does not know who is the spouse. Then restore the plot parameters. This would only not be done if someone wants to further annotate the plot."},{"path":"https://louislenezet.github.io/Pedixplorer/articles/pedigree_plot.html","id":"session-information","dir":"Articles","previous_headings":"","what":"Session information","title":"Pedigree plotting details","text":"","code":"sessionInfo() ## R version 4.4.1 (2024-06-14) ## Platform: x86_64-pc-linux-gnu ## Running under: Ubuntu 22.04.4 LTS ## ## Matrix products: default ## BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 ## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0 ## ## locale: ## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C ## [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 ## [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 ## [7] LC_PAPER=en_US.UTF-8 LC_NAME=C ## [9] LC_ADDRESS=C LC_TELEPHONE=C ## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C ## ## time zone: UTC ## tzcode source: system (glibc) ## ## attached base packages: ## [1] stats graphics grDevices utils datasets methods base ## ## other attached packages: ## [1] Pedixplorer_1.1.4 BiocStyle_2.32.1 ## ## loaded via a namespace (and not attached): ## [1] gtable_0.3.5 xfun_0.48 bslib_0.8.0 ## [4] ggplot2_3.5.1 htmlwidgets_1.6.4 lattice_0.22-6 ## [7] quadprog_1.5-8 vctrs_0.6.5 tools_4.4.1 ## [10] generics_0.1.3 stats4_4.4.1 tibble_3.2.1 ## [13] fansi_1.0.6 highr_0.11 pkgconfig_2.0.3 ## [16] Matrix_1.7-0 data.table_1.16.0 desc_1.4.3 ## [19] S4Vectors_0.42.1 readxl_1.4.3 lifecycle_1.0.4 ## [22] stringr_1.5.1 compiler_4.4.1 shinytoastr_2.2.0 ## [25] textshaping_0.4.0 munsell_0.5.1 httpuv_1.6.15 ## [28] shinyWidgets_0.8.7 htmltools_0.5.8.1 sass_0.4.9 ## [31] yaml_2.3.10 lazyeval_0.2.2 plotly_4.10.4 ## [34] later_1.3.2 pillar_1.9.0 pkgdown_2.1.1 ## [37] jquerylib_0.1.4 tidyr_1.3.1 DT_0.33 ## [40] cachem_1.1.0 mime_0.12 tidyselect_1.2.1 ## [43] digest_0.6.37 stringi_1.8.4 colourpicker_1.3.0 ## [46] dplyr_1.1.4 purrr_1.0.2 bookdown_0.40 ## [49] fastmap_1.2.0 grid_4.4.1 colorspace_2.1-1 ## [52] cli_3.6.3 magrittr_2.0.3 utf8_1.2.4 ## [55] scales_1.3.0 promises_1.3.0 rmarkdown_2.28 ## [58] httr_1.4.7 gridExtra_2.3 cellranger_1.1.0 ## [61] ragg_1.3.3 shiny_1.9.1 evaluate_1.0.0 ## [64] knitr_1.48 miniUI_0.1.1.1 viridisLite_0.4.2 ## [67] rlang_1.1.4 Rcpp_1.0.13 xtable_1.8-4 ## [70] glue_1.8.0 BiocManager_1.30.25 BiocGenerics_0.50.0 ## [73] jsonlite_1.8.9 R6_2.5.1 plyr_1.8.9 ## [76] systemfonts_1.1.0 fs_1.6.4"},{"path":"https://louislenezet.github.io/Pedixplorer/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Louis Le Nézet. Author, maintainer, contributor. Jason Sinnwell. Author. Terry Therneau. Author. Daniel Schaid. Contributor. Elizabeth Atkinson. Contributor.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Le Nézet L, Sinnwell J, Therneau T (2024). Pedixplorer: Pedigree Functions. R package version 1.1.4, https://louislenezet.github.io/Pedixplorer/.","code":"@Manual{, title = {Pedixplorer: Pedigree Functions}, author = {Louis {Le Nézet} and Jason Sinnwell and Terry Therneau}, year = {2024}, note = {R package version 1.1.4}, url = {https://louislenezet.github.io/Pedixplorer/}, }"},{"path":"https://louislenezet.github.io/Pedixplorer/index.html","id":"pedixplorer-a-bioconductor-package-to-create-filter-and-draw-pedigree","dir":"","previous_headings":"","what":"Pedixplorer - A BioConductor R package for pedigree creation, filtering and drawing","title":"Pedixplorer - A BioConductor R package for pedigree creation, filtering and drawing","text":"Try today Pedixplorer shiny app easily use package.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/index.html","id":"from-github","dir":"","previous_headings":"Installation through R","what":"From Github","title":"Pedixplorer - A BioConductor R package for pedigree creation, filtering and drawing","text":"","code":"if (!require(\"remotes\", quietly = TRUE)) install.packages(\"remotes\") remotes::install_github(\"louislenezet/Pedixplorer\", build_vignettes=TRUE )"},{"path":"https://louislenezet.github.io/Pedixplorer/index.html","id":"from-bioconductor","dir":"","previous_headings":"Installation through R","what":"From Bioconductor","title":"Pedixplorer - A BioConductor R package for pedigree creation, filtering and drawing","text":"","code":"if (!require(\"BiocManager\", quietly = TRUE)) install.packages(\"BiocManager\") BiocManager::install(\"Pedixplorer\")"},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/index.html","id":"the-pedigree-function","dir":"","previous_headings":"Main functions","what":"The Pedigree() Function","title":"Pedixplorer - A BioConductor R package for pedigree creation, filtering and drawing","text":"Pedigree() function creates S4 class Pedigree object. core slot Pedigree object ped slot built row per person, linked father id mother id. relationships can specified, affection status can matrix multiple categories rel slot. informations affection availability stored respectively scales$fill scales$border slots therefore used fill color border elements Pedigree graph.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/index.html","id":"the-generate_colors-function","dir":"","previous_headings":"Main functions","what":"The generate_colors() Function","title":"Pedixplorer - A BioConductor R package for pedigree creation, filtering and drawing","text":"generate_colors() function generates color palette affection status. function used Pedigree() function generate scales$fill scales$border slots. user can also use function generate color palette specific affection status added Pedigree object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/index.html","id":"the-plotpedigree-method","dir":"","previous_headings":"Main functions","what":"The plot.Pedigree() Method","title":"Pedixplorer - A BioConductor R package for pedigree creation, filtering and drawing","text":"plot.Pedigree() method Pedigree object plots “family tree”, relatives generation row, affection statuses divided plot symbol person. function designed two steps: First Pedigree object converted data frame elements needed plot Pedigree (.e. boxes, lines, text, etc.). done ped_to_plotdf() function. data frame plotted using plot_fromdf() function.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/index.html","id":"the-kinship-funtion","dir":"","previous_headings":"Main functions","what":"The kinship() Funtion","title":"Pedixplorer - A BioConductor R package for pedigree creation, filtering and drawing","text":"kinship() function creates kinship matrix Pedigree object. coded dyplotype organisms, handling relationships can specified Pedigree object, including inbreeding, monozygotic twins, etc. recent addition handling kinship matrix X Y chromosomes.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/index.html","id":"other-notable-functions","dir":"","previous_headings":"Main functions","what":"Other Notable Functions","title":"Pedixplorer - A BioConductor R package for pedigree creation, filtering and drawing","text":"shrink() shrink Pedigree given size, keeping informative individuals single affection variable. fix_parents() add parents children mother dad listed already included. also fix sex status parent mis-specified. useful use creating Pedigree object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/index.html","id":"diagrams","dir":"","previous_headings":"","what":"Diagrams","title":"Pedixplorer - A BioConductor R package for pedigree creation, filtering and drawing","text":"diagrams show main functions package related.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/index.html","id":"details","dir":"","previous_headings":"Diagrams","what":"Details","title":"Pedixplorer - A BioConductor R package for pedigree creation, filtering and drawing","text":"details different parts diagram.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/index.html","id":"documentation-and-news","dir":"","previous_headings":"","what":"Documentation and News","title":"Pedixplorer - A BioConductor R package for pedigree creation, filtering and drawing","text":"view documentation start R enter:","code":"library(Pedixplorer) help(package=\"Pedixplorer\") # Or to view the vignettes browseVignettes(\"Pedixplorer\") # Or to see the news utils::news(package=\"Pedixplorer\")"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Hints-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Hints object — Hints-class","title":"Hints object — Hints-class","text":"hints used specify order individuals pedigree specify order spouses.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Hints-class.html","id":"constructor-","dir":"Reference","previous_headings":"","what":"Constructor :","title":"Hints object — Hints-class","text":"either need provide horder spouse dedicated parameters (together separately), inside list.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Hints-class.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Hints object — Hints-class","text":"","code":"Hints(horder, spouse) # S4 method for class 'list,missing_OR_NULL' Hints(horder, spouse) # S4 method for class 'numeric,data.frame' Hints(horder, spouse) # S4 method for class 'numeric,missing_OR_NULL' Hints(horder, spouse)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Hints-class.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Hints object — Hints-class","text":"horder named numeric vector one element per subject Pedigree. determines relative horizontal order subjects within sibship, well relative order processing founder couples. (latter, female founders ordered though sisters). names vector individual identifiers. spouse data.frame one row per hinted marriage, usually marriages pedigree need added hint, instance reverse plot order husband/wife pair. row contains id left spouse (.e. idl), id right hand spouse (.e. idr), anchor (.e : anchor : 1 = left, 2 = right, 0 = either). Children preferentially appear parents anchored spouse.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Hints-class.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Hints object — Hints-class","text":"Hints object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Hints-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Hints object — Hints-class","text":"horder numeric named vector one element per subject Pedigree. determines relative horizontal order subjects within sibship, well relative order processing founder couples. (latter, female founders ordered though sisters). spouse data.frame one row per hinted marriage, usually marriages Pedigree need added hint, instance reverse plot order husband/wife pair. row contains identifiers left spouse, right hand spouse, anchor (.e : 1 = left, 2 = right, 0 = either).","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Hints-class.html","id":"accessors","dir":"Reference","previous_headings":"","what":"Accessors","title":"Hints object — Hints-class","text":"horder(x) : Get horder vector horder(x) <- value : Set horder vector spouse(x) : Get spouse data.frame spouse(x) <- value : Set spouse data.frame","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Hints-class.html","id":"generics","dir":"Reference","previous_headings":"","what":"Generics","title":"Hints object — Hints-class","text":".list(x): Convert Hints object list subset(x, , keep = TRUE): Subset Hints object based individuals identifiers given. : vector individuals identifiers keep. keep : logical value indicating individuals kept deleted.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Hints-class.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Hints object — Hints-class","text":"","code":"Hints( list( horder = c(\"1\" = 1, \"2\" = 2, \"3\" = 3), spouse = data.frame( idl = c(\"1\", \"2\"), idr = c(\"2\", \"3\"), anchor = c(1, 2) ) ) ) #> An object of class \"Hints\" #> Slot \"horder\": #> 1 2 3 #> 1 2 3 #> #> Slot \"spouse\": #> [1] idl idr anchor #> <0 rows> (or 0-length row.names) #> Hints( horder = c(\"1\" = 1, \"2\" = 2, \"3\" = 3), spouse = data.frame( idl = c(\"1\", \"2\"), idr = c(\"2\", \"3\"), anchor = c(1, 2) ) ) #> An object of class \"Hints\" #> Slot \"horder\": #> 1 2 3 #> 1 2 3 #> #> Slot \"spouse\": #> idl idr anchor #> 1 1 2 left #> 2 2 3 right #> Hints( horder = c(\"1\" = 1, \"2\" = 2, \"3\" = 3) ) #> An object of class \"Hints\" #> Slot \"horder\": #> 1 2 3 #> 1 2 3 #> #> Slot \"spouse\": #> [1] idl idr anchor #> <0 rows> (or 0-length row.names) #>"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Ped-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Ped object — Ped-class","title":"Ped object — Ped-class","text":"S4 class represent identity informations individuals pedigree.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Ped-class.html","id":"constructor-","dir":"Reference","previous_headings":"","what":"Constructor :","title":"Ped object — Ped-class","text":"either need provide vector size slot data.frame corresponding columns. metadata correspond columns correspond Ped slots.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Ped-class.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ped object — Ped-class","text":"","code":"# S4 method for class 'data.frame' Ped(obj, cols_used_init = FALSE, cols_used_del = FALSE) # S4 method for class 'character_OR_integer' Ped( obj, sex, dadid, momid, famid = NA, steril = NA, status = NA, avail = NA, affected = NA, missid = NA_character_, useful = NA, isinf = NA, kin = NA_real_ )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Ped-class.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ped object — Ped-class","text":"obj character vector id individuals data.frame informations corresponding columns. cols_used_init Boolean defining columns used initialised NA. cols_used_del Boolean defining columns used deleted. sex character, factor numeric vector corresponding gender individuals. transformed ordered factor following levels: male < female < unknown < terminated following values recognized: character() factor() : \"f\", \"m\", \"woman\", \"man\", \"male\", \"female\", \"unknown\", \"terminated\" numeric() : 1 = \"male\", 2 = \"female\", 3 = \"unknown\", 4 = \"terminated\" dadid vector containing subject, identifiers biologicals fathers. momid vector containing subject, identifiers biologicals mothers. famid character vector family identifiers individuals. provide, aggregated individuals identifiers separated underscore. steril logical vector sterilisation status individuals (.e. FALSE = sterilised, TRUE = sterilised, NA = unknown). status logical vector affection status individuals (.e. FALSE = alive, TRUE = dead, NA = unknown). avail logical vector availability status individuals (.e. FALSE = available, TRUE = available, NA = unknown). affected logical vector affection status individuals (.e. FALSE = unaffected, TRUE = affected, NA = unknown). missid character vector missing values identifiers. id, dadid momid corresponding values set NA_character_. useful logical vector usefulness status individuals (.e. FALSE = useful, TRUE = useful). isinf logical vector indicating individual informative (.e. FALSE = informative, TRUE = informative). kin numeric vector minimal kinship value individuals informative individuals.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Ped-class.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Ped object — Ped-class","text":"Ped object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Ped-class.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Ped object — Ped-class","text":"minimal needed informations id, dadid, momid sex. slots used store recognized informations. Additional columns can added Ped object stored elementMetadata slot Ped object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Ped-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Ped object — Ped-class","text":"id character vector id individuals. dadid character vector id father individuals. momid character vector id mother individuals. sex ordered factor vector sex individuals (.e. male < female < unknown < terminated). famid character vector family identifiers individuals (optional). steril logical vector sterilisation status individuals (.e. FALSE = sterilised, TRUE = sterilised, NA = unknown). status logical vector affection status individuals (.e. FALSE = alive, TRUE = dead, NA = unknown). avail logical vector availability status individuals (.e. FALSE = available, TRUE = available, NA = unknown). affected logical vector affection status individuals (.e. FALSE = affected, TRUE = affected, NA = unknown). useful logical vector usefulness status individuals (.e. FALSE = useful, TRUE = useful). isinf logical vector indicating individual informative (.e. FALSE = informative, TRUE = informative). kin numeric vector minimal kinship value individuals useful individuals. num_child_tot numeric vector total number children individuals. num_child_dir numeric vector number children individuals. num_child_ind numeric vector number children individuals. elementMetadata DataFrame additional metadata columns Ped object. metadata Meta informations pedigree.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Ped-class.html","id":"accessors","dir":"Reference","previous_headings":"","what":"Accessors","title":"Ped object — Ped-class","text":"following accessors, x parameters Ped object. getters return vector length x values corresponding slot. getter, setter name, use slot(x) <- value. value parameter vector length x, except mcols() accessors value list data.frame elements length x. id(x) : Individuals identifiers dadid(x) : Individuals' father identifiers momid(x) : Individuals' mother identifiers famid(x) : Individuals' family identifiers sex(x) : Individuals' gender affected(x) : Individuals' affection status avail(x) : Individuals' availability status status(x) : Individuals' death status isinf(x) : Individuals' informativeness status kin(x) : Individuals' kinship distance informative individuals useful(x) : Individuals' usefullness status mcols(x) : Individuals' metadata","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Ped-class.html","id":"generics","dir":"Reference","previous_headings":"","what":"Generics","title":"Ped object — Ped-class","text":"summary(x): Compute summary Ped object show(x): Convert Ped object data.frame print summary. .list(x): Convert Ped object list metadata columns end. .data.frame(x): Convert Ped object data.frame metadata columns end. subset(x, , del_parents = FALSE, keep = TRUE): Subset Ped object based individuals identifiers given. : vector individuals identifiers keep. del_parents : value indicating parents individuals deleted. keep : logical value indicating individuals kept deleted.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Ped-class.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ped object — Ped-class","text":"","code":"data(sampleped) Ped(sampleped) #> Ped object with 55 individuals and 2 metadata columns: #> id dadid momid sex famid steril #> col_class #> 101 101 male 1 #> 102 102 female 1 #> 103 103 135 136 male 1 #> 104 104 female 1 #> 105 105 male 1 #> ... ... ... ... ... ... ... #> 210 210 203 204 male 2 #> 211 211 203 204 male 2 #> 212 212 209 208 female 2 #> 213 213 209 208 male 2 #> 214 214 209 208 male 2 #> status avail affected useful kin isinf #> col_class #> 101 FALSE #> 102 FALSE #> 103 FALSE #> 104 FALSE #> 105 FALSE #> ... ... ... ... ... ... ... #> 210 FALSE #> 211 TRUE #> 212 TRUE #> 213 FALSE #> 214 TRUE #> num_child_tot num_child_dir num_child_ind | affection num #> col_class #> 101 1 1 0 0 2 #> 102 1 1 0 1 3 #> 103 4 4 0 1 2 #> 104 4 4 0 0 4 #> 105 4 4 0 6 #> ... ... ... ... ... ... #> 210 0 0 0 0 2 #> 211 0 0 0 0 1 #> 212 0 0 0 0 3 #> 213 0 0 0 0 2 #> 214 0 0 0 1 0 Ped( obj = c(\"1\", \"2\", \"3\", \"4\", \"5\", \"6\"), dadid = c(\"4\", \"4\", \"6\", \"0\", \"0\", \"0\"), momid = c(\"5\", \"5\", \"5\", \"0\", \"0\", \"0\"), sex = c(1, 2, 3, 1, 2, 1), missid = \"0\" ) #> Ped object with 6 individuals and 0 metadata columns: #> id dadid momid sex famid steril #> col_class #> 1 1 4 5 male #> 2 2 4 5 female #> 3 3 6 5 unknown #> 4 4 male #> 5 5 female #> 6 6 male #> status avail affected useful kin isinf #> col_class #> 1 #> 2 #> 3 #> 4 #> 5 #> 6 #> num_child_tot num_child_dir num_child_ind #> col_class #> 1 0 0 0 #> 2 0 0 0 #> 3 0 0 0 #> 4 3 2 1 #> 5 3 3 0 #> 6 3 1 2"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Pedigree-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Pedigree object — Pedigree-class","title":"Pedigree object — Pedigree-class","text":"pedigree ensemble individuals linked family tree. Pedigree object store informations individuals special relationships . also permit store informations needed plot pedigree (.e. scales hints).","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Pedigree-class.html","id":"constructor-","dir":"Reference","previous_headings":"","what":"Constructor :","title":"Pedigree object — Pedigree-class","text":"Main constructor package. constructor help create Pedigree object different data.frame set vectors. errors found data, function return data.frame errors Ped object Rel object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Pedigree-class.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Pedigree object — Pedigree-class","text":"","code":"Pedigree(obj, ...) # S4 method for class 'character_OR_integer' Pedigree( obj, dadid, momid, sex, famid = NA, avail = NULL, affected = NULL, status = NULL, steril = NULL, rel_df = NULL, missid = NA_character_, col_aff = \"affection\", normalize = TRUE, ... ) # S4 method for class 'data.frame' Pedigree( obj = data.frame(indId = character(), fatherId = character(), motherId = character(), gender = numeric(), family = character(), available = numeric(), vitalStatus = numeric(), affection = numeric(), sterilisation = numeric()), rel_df = data.frame(id1 = character(), id2 = character(), code = numeric(), famid = character()), cols_ren_ped = list(indId = \"id\", fatherId = \"dadid\", motherId = \"momid\", family = \"famid\", gender = \"sex\", sterilisation = \"steril\", affection = \"affected\", available = \"avail\", vitalStatus = \"status\"), cols_ren_rel = list(id1 = \"indId1\", id2 = \"indId2\", famid = \"family\"), hints = list(horder = NULL, spouse = NULL), normalize = TRUE, missid = NA_character_, col_aff = \"affection\", na_strings = c(\"NA\", \"N/A\", \"None\", \"none\", \"null\", \"NULL\"), ... )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Pedigree-class.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Pedigree object — Pedigree-class","text":"obj vector individuals identifiers data.frame individuals informations. See Ped() informations. ... Arguments passed generate_colors dadid vector containing subject, identifiers biologicals fathers. momid vector containing subject, identifiers biologicals mothers. sex character, factor numeric vector corresponding gender individuals. transformed ordered factor following levels: male < female < unknown < terminated following values recognized: character() factor() : \"f\", \"m\", \"woman\", \"man\", \"male\", \"female\", \"unknown\", \"terminated\" numeric() : 1 = \"male\", 2 = \"female\", 3 = \"unknown\", 4 = \"terminated\" famid character vector family identifiers individuals. provide, aggregated individuals identifiers separated underscore. avail logical vector availability status individuals (.e. FALSE = available, TRUE = available, NA = unknown). affected logical vector affection status individuals (.e. FALSE = unaffected, TRUE = affected, NA = unknown). Can also data.frame length obj. matrix, converted data.frame columns named col_aff argument. status logical vector affection status individuals (.e. FALSE = alive, TRUE = dead, NA = unknown). steril logical vector sterilisation status individuals (.e. FALSE = sterilised, TRUE = sterilised, NA = unknown). rel_df data.frame special relationships individuals. See Rel() informations. minimum columns required id1, id2 code. famid column can also used specify family individuals. matrix given, columns needs ordered id1, id2, code famid. code values : 1 = Monozygotic twin 2 = Dizygotic twin 3 = twin unknown zygosity 4 = Spouse value relation code recognized function one defined rel_code_to_factor() function. missid character vector missing values identifiers. id, dadid momid corresponding values set NA_character_. col_aff character vector name column used affection status. normalize logical know data normalised. cols_ren_ped named list columns rename pedigree dataframe. useful want use dataframe different column names. names list new column names values old column names. default values used normalize = TRUE. cols_ren_rel named list columns rename relationship matrix. useful want use dataframe different column names. names list new column names values old column names. hints Hints object named list containing horder spouse. na_strings Vector strings considered NA values.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Pedigree-class.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Pedigree object — Pedigree-class","text":"Pedigree object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Pedigree-class.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Pedigree object — Pedigree-class","text":"normalization set TRUE, data standardized using function norm_ped() norm_rel(). data.frame given, columns names needed depend normalization selected . normalization selected, columns names needed follow columns names needed parenthesis: indID: individual identifier (id) fatherId: identifier biological father (dadid) motherId: identifier biological mother (momid) gender: sex individual (sex) family: family identifier individual (famid) sterilisation: sterilisation status individual (steril) available: availability status individual (avail) vitalStatus: death status individual (status) affection: affection status individual (affected) ...: columns stored elementMetadata slot minimum columns required : indID / id fatherId / dadid motherId / momid gender / sex family / famid column can also used specify family individuals merge indId / id field separated underscore. columns sterilisation, available, vitalStatus, affection transformed vect_to_binary() function normalisation selected. use normalisation, columns checked 0 1. affected data.frame, col_aff overwritten column names data.frame.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Pedigree-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Pedigree object — Pedigree-class","text":"ped Ped object identity informations. See Ped() informations. rel Rel object special relationships. See Rel() informations. scales Scales object filling bordering colors used plot. See Scales() informations. hints Hints object ordering individuals plot. See Hints() informations.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Pedigree-class.html","id":"accessors","dir":"Reference","previous_headings":"","what":"Accessors","title":"Pedigree object — Pedigree-class","text":"ped(x, slot) : Get value specific slot Ped object ped(x) : Get Ped object ped(x, slot) <- value : Set value specific slot Ped object Wrapper slot(ped(x)) <- value ped(x) <- value : Set Ped object mcols(x) : Get metadata Pedigree object. function wrapper around mcols(ped(x)). mcols(x) <- value : Set metadata Pedigree object. function wrapper around mcols(ped(x)) <- value. rel(x, slot) : Get value specific slot Rel object rel(x) : Get Rel object rel(x, slot) <- value : Set value specific slot Rel object Wrapper slot(rel(x)) <- value rel(x) <- value : Set Rel object scales(x) : Get Scales object scales(x) <- value : Set Scales object fill(x) : Get fill data.frame Scales object. Wrapper fill(scales(x)) fill(x) <- value : Set fill data.frame Scales object. Wrapper fill(scales(x)) <- value border(x) : Get border data.frame Scales object. Wrapper border(scales(x)) border(x) <- value : Set border data.frame Scales object. Wrapper border(scales(x)) <- value hints(x) : Get Hints object hints(x) <- value : Set Hints object horder(x) : Get horder vector Hints object. Wrapper horder(hints(x)) horder(x) <- value : Set horder vector Hints object. Wrapper horder(hints(x)) <- value spouse(x) : Get spouse data.frame Hints object. Wrapper spouse(hints(x)). spouse(x) <- value : Set spouse data.frame Hints object. Wrapper spouse(hints(x)) <- value.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Pedigree-class.html","id":"generics","dir":"Reference","previous_headings":"","what":"Generics","title":"Pedigree object — Pedigree-class","text":"length(x): Get length Pedigree object. Wrapper length(ped(x)). show(x): Print information Ped Rel object inside Pedigree object. summary(x): Compute summary Ped Rel object inside Pedigree object. .list(x): Convert Pedigree object list subset(x, , keep = TRUE): Subset Pedigree object based individuals identifiers given. : vector individuals identifiers keep. del_parents : logical value indicating parents individuals deleted. keep : logical value indicating individuals kept deleted. x[, del_parents, keep]: Subset Pedigree object based individuals identifiers given.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Pedigree-class.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Pedigree object — Pedigree-class","text":"","code":"Pedigree( obj = c(\"1\", \"2\", \"3\", \"4\", \"5\", \"6\"), dadid = c(\"4\", \"4\", \"6\", \"0\", \"0\", \"0\"), momid = c(\"5\", \"5\", \"5\", \"0\", \"0\", \"0\"), sex = c(1, 2, 3, 1, 2, 1), avail = c(0, 1, 0, 1, 0, 1), affected = matrix(c( 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1 ), ncol = 2), col_aff = c(\"aff1\", \"aff2\"), missid = \"0\", rel_df = matrix(c( \"1\", \"2\", 2 ), ncol = 3, byrow = TRUE), ) #> Pedigree object with: #> Ped object with 6 individuals and 15 metadata columns: #> id dadid momid sex famid steril #> col_class #> 1 1 4 5 male #> 2 2 4 5 female #> 3 3 6 5 unknown #> 4 4 male #> 5 5 female #> 6 6 male #> status avail affected useful kin isinf #> col_class #> 1 FALSE TRUE #> 2 TRUE TRUE #> 3 FALSE TRUE #> 4 TRUE TRUE #> 5 FALSE TRUE #> 6 TRUE TRUE #> num_child_tot num_child_dir num_child_ind | family indId #> col_class #> 1 0 0 0 0 1 #> 2 0 0 0 0 2 #> 3 0 0 0 0 3 #> 4 3 2 1 0 4 #> 5 3 3 0 0 5 #> 6 3 1 2 0 6 #> fatherId motherId gender V1 V2 #> col_class #> 1 4 5 1 0 1 #> 2 4 5 2 1 1 #> 3 6 5 3 0 1 #> 4 0 0 1 1 1 #> 5 0 0 2 0 1 #> 6 0 0 1 1 1 #> available error sterilisation vitalStatus affection #> col_class #> 1 0 #> 2 1 #> 3 0 #> 4 1 #> 5 0 #> 6 1 #> V1_mods avail_mods V2_mods #> col_class #> 1 0 0 1 #> 2 1 1 1 #> 3 0 0 1 #> 4 1 1 1 #> 5 0 0 1 #> 6 1 1 1 #> Rel object with 1 relationshipwith 0 MZ twin, 1 DZ twin, 0 UZ twin, 0 Spouse: #> id1 id2 code famid #> #> 1 1 2 DZ twin data(sampleped) Pedigree(sampleped) #> Pedigree object with: #> Ped object with 55 individuals and 13 metadata columns: #> id dadid momid sex famid steril #> col_class #> 1_101 1_101 male 1 #> 1_102 1_102 female 1 #> 1_103 1_103 1_135 1_136 male 1 #> 1_104 1_104 female 1 #> 1_105 1_105 male 1 #> ... ... ... ... ... ... ... #> 2_210 2_210 2_203 2_204 male 2 #> 2_211 2_211 2_203 2_204 male 2 #> 2_212 2_212 2_209 2_208 female 2 #> 2_213 2_213 2_209 2_208 male 2 #> 2_214 2_214 2_209 2_208 male 2 #> status avail affected useful kin isinf #> col_class #> 1_101 FALSE FALSE #> 1_102 FALSE TRUE #> 1_103 FALSE TRUE #> 1_104 FALSE FALSE #> 1_105 FALSE #> ... ... ... ... ... ... ... #> 2_210 FALSE FALSE #> 2_211 TRUE FALSE #> 2_212 TRUE FALSE #> 2_213 FALSE FALSE #> 2_214 TRUE TRUE #> num_child_tot num_child_dir num_child_ind | family indId #> col_class #> 1_101 1 1 0 1 101 #> 1_102 1 1 0 1 102 #> 1_103 4 4 0 1 103 #> 1_104 4 4 0 1 104 #> 1_105 4 4 0 1 105 #> ... ... ... ... ... ... #> 2_210 0 0 0 2 210 #> 2_211 0 0 0 2 211 #> 2_212 0 0 0 2 212 #> 2_213 0 0 0 2 213 #> 2_214 0 0 0 2 214 #> fatherId motherId gender affection available #> col_class #> 1_101 1 0 0 #> 1_102 2 1 0 #> 1_103 135 136 1 1 0 #> 1_104 2 0 0 #> 1_105 1 0 #> ... ... ... ... ... ... #> 2_210 203 204 1 0 0 #> 2_211 203 204 1 0 1 #> 2_212 209 208 2 0 1 #> 2_213 209 208 1 0 0 #> 2_214 209 208 1 1 1 #> num error sterilisation vitalStatus affection_mods #> col_class #> 1_101 2 0 #> 1_102 3 1 #> 1_103 2 1 #> 1_104 4 0 #> 1_105 6 NA #> ... ... ... ... ... ... #> 2_210 2 0 #> 2_211 1 0 #> 2_212 3 0 #> 2_213 2 0 #> 2_214 0 1 #> avail_mods #> col_class #> 1_101 0 #> 1_102 0 #> 1_103 0 #> 1_104 0 #> 1_105 0 #> ... ... #> 2_210 0 #> 2_211 1 #> 2_212 1 #> 2_213 0 #> 2_214 1 #> Rel object with 0 relationshipswith 0 MZ twin, 0 DZ twin, 0 UZ twin, 0 Spouse: #> id1 id2 code famid #> "},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Pedixplorer_package.html","id":null,"dir":"Reference","previous_headings":"","what":"The Pedixplorer package for pedigree data — Pedixplorer-package","title":"The Pedixplorer package for pedigree data — Pedixplorer-package","text":"Pedixplorer package pedigree data updated package kinship2 package. kinship2 package originally written Terry Therneau Jason Sinnwell. Pedixplorer package fork kinship2 package additional functionality bug fixes.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Pedixplorer_package.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"The Pedixplorer package for pedigree data — Pedixplorer-package","text":"package download, NEWS, README available CRAN: Kinship2 previous version package.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Pedixplorer_package.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"The Pedixplorer package for pedigree data — Pedixplorer-package","text":"listed widely used functions available arsenal: Pedigree(): Contstructor Pedigree class, given identifiers, sex, affection status(es), special relationships kinship(): Calculates kinship matrix, probability allele sampled two individuals via IBD. plot() : Method transform Pedigree object graphical plot. Allows extra information included id plot symbol. method use plot_fromdf() function transform Pedigree object data frame graphical elements, done legend ped_to_legdf() function. done, data frames plotted plot_fromdf() function. shrink(): Shrink Pedigree specific bit size, removing non-informative members first. bit_size(): Approximate output SAS's PROC FREQ procedure using /list option TABLE statement.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Pedixplorer_package.html","id":"data","dir":"Reference","previous_headings":"","what":"Data","title":"The Pedixplorer package for pedigree data — Pedixplorer-package","text":"sampleped(): Pedigree example data sets two pedigrees minnbreast(): Larger cohort pedigrees MN breast cancer study","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Pedixplorer_package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"The Pedixplorer package for pedigree data — Pedixplorer-package","text":"Maintainer: Louis Le Nézet louislenezet@gmail.com (ORCID) [contributor] Authors: Jason Sinnwell sinnwell.jason@mayo.edu Terry Therneau contributors: Daniel Schaid [contributor] Elizabeth Atkinson [contributor]","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Pedixplorer_package.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"The Pedixplorer package for pedigree data — Pedixplorer-package","text":"","code":"library(Pedixplorer)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Rel-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Rel object — Rel-class","title":"Rel object — Rel-class","text":"S4 class represent special relationships Pedigree.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Rel-class.html","id":"constructor-","dir":"Reference","previous_headings":"","what":"Constructor :","title":"Rel object — Rel-class","text":"either need provide vector size slot data.frame corresponding columns.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Rel-class.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Rel object — Rel-class","text":"","code":"# S4 method for class 'data.frame' Rel(obj) # S4 method for class 'character_OR_integer' Rel(obj, id2, code, famid = NA_character_)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Rel-class.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rel object — Rel-class","text":"obj character vector id first individuals pairs data.frame informations corresponding columns. id2 character vector id second individuals pairs code character, factor numeric vector corresponding relation code individuals: MZ twin = Monozygotic twin DZ twin = Dizygotic twin UZ twin = twin unknown zygosity Spouse = Spouse following values recognized: character() factor() : \"MZ twin\", \"DZ twin\", \"UZ twin\", \"Spouse\" without space words. case important. numeric() : 1 = \"MZ twin\", 2 = \"DZ twin\", 3 = \"UZ twin\", 4 = \"Spouse\" famid character vector family identifiers individuals. provide, aggregated individuals identifiers separated underscore.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Rel-class.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Rel object — Rel-class","text":"Rel object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Rel-class.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Rel object — Rel-class","text":"Rel object list special relationships individuals pedigree. used create Pedigree object. minimal needed informations id1, id2 code. famid provided, individuals id aggregated famid character ensure uniqueness id.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Rel-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Rel object — Rel-class","text":"id1 character vector id first individual. id2 character vector id second individual. code ordered factor vector code special relationship. (.e. MZ twin < DZ twin < UZ twin < Spouse). famid character vector famid individuals.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Rel-class.html","id":"accessors","dir":"Reference","previous_headings":"","what":"Accessors","title":"Rel object — Rel-class","text":"following accessors, x parameters Rel object. getters return vector length x values corresponding slot. code(x) : Relationships' code id1(x) : Relationships' first individuals' identifier id2(x) : Relationships' second individuals' identifier famid(x) : Relationships' individuals' family identifier famid(x) <- value : Set relationships' individuals' family identifier value : character integer vector length x family identifiers","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Rel-class.html","id":"generics","dir":"Reference","previous_headings":"","what":"Generics","title":"Rel object — Rel-class","text":"summary(x): Compute summary Rel object show(x): Convert Rel object data.frame print summary. .list(x): Convert Rel object list .data.frame(x): Convert Rel object data.frame subset(x, , keep = TRUE): Subset Rel object based individuals identifiers given. : vector individuals identifiers keep. keep : logical value indicating individuals kept deleted.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Rel-class.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Rel object — Rel-class","text":"","code":"rel_df <- data.frame( id1 = c(\"1\", \"2\", \"3\"), id2 = c(\"2\", \"3\", \"4\"), code = c(1, 2, 3) ) Rel(rel_df) #> Rel object with 3 relationshipswith 1 MZ twin, 1 DZ twin, 1 UZ twin, 0 Spouse: #> id1 id2 code famid #> #> 1 1 2 MZ twin #> 2 2 3 DZ twin #> 3 3 4 UZ twin Rel( obj = c(\"1\", \"2\", \"3\"), id2 = c(\"2\", \"3\", \"4\"), code = c(1, 2, 3) ) #> Rel object with 3 relationshipswith 1 MZ twin, 1 DZ twin, 1 UZ twin, 0 Spouse: #> id1 id2 code famid #> #> 1 1 2 MZ twin #> 2 2 3 DZ twin #> 3 3 4 UZ twin "},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Scales-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Scales object — Scales-class","title":"Scales object — Scales-class","text":"Scales object list two data.frame. first one used represent affection status individuals therefore filling individuals pedigree plot. second one used represent availability status individuals therefore border color individuals pedigree plot.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Scales-class.html","id":"constructor-","dir":"Reference","previous_headings":"","what":"Constructor :","title":"Scales object — Scales-class","text":"need provide fill border dedicated parameters. However usually done using generate_colors() function Pedigree object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Scales-class.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scales object — Scales-class","text":"","code":"Scales(fill, border) # S4 method for class 'data.frame,data.frame' Scales(fill, border)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Scales-class.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scales object — Scales-class","text":"fill data.frame informations affection status. columns needed : 'order': order affection used 'column_values': name column containing raw values Ped object 'column_mods': name column containing mods transformed values Ped object 'mods': different mods 'labels': corresponding labels mods 'affected': logical value indicating mod correspond affected individuals 'fill': color use mods 'density': density shading 'angle': angle shading border data.frame informations availability status. columns needed : 'column_values': name column containing raw values Ped object 'column_mods': name column containing mods transformed values Ped object 'mods': different mods 'labels': corresponding labels mods 'border': color use mods","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Scales-class.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Scales object — Scales-class","text":"Scales object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Scales-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Scales object — Scales-class","text":"fill data.frame informations affection status. columns needed : 'order': order affection used 'column_values': name column containing raw values Ped object 'column_mods': name column containing mods transformed values Ped object 'mods': different mods 'labels': corresponding labels mods 'affected': logical value indicating mod correspond affected individuals 'fill': color use mods 'density': density shading 'angle': angle shading border data.frame informations availability status. columns needed : 'column_values': name column containing raw values Ped object 'column_mods': name column containing mods transformed values Ped object 'mods': different mods 'labels': corresponding labels mods 'border': color use mods","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Scales-class.html","id":"accessors","dir":"Reference","previous_headings":"","what":"Accessors","title":"Scales object — Scales-class","text":"fill(x) : Get fill data.frame fill(x) <- value : Set fill data.frame border(x) : Get border data.frame border(x) <- value : Set border data.frame Scales object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Scales-class.html","id":"generics","dir":"Reference","previous_headings":"","what":"Generics","title":"Scales object — Scales-class","text":".list(x): Convert Scales object list","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/Scales-class.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Scales object — Scales-class","text":"","code":"Scales( fill = data.frame( order = 1, column_values = \"affected\", column_mods = \"affected_mods\", mods = c(0, 1), labels = c(\"unaffected\", \"affected\"), affected = c(FALSE, TRUE), fill = c(\"white\", \"red\"), density = c(NA, 20), angle = c(NA, 45) ), border = data.frame( column_values = \"avail\", column_mods = \"avail_mods\", mods = c(0, 1), labels = c(\"not available\", \"available\"), border = c(\"black\", \"blue\") ) ) #> An object of class \"Scales\" #> Slot \"fill\": #> order column_values column_mods mods labels affected fill density #> 1 1 affected affected_mods 0 unaffected FALSE white NA #> 2 1 affected affected_mods 1 affected TRUE red 20 #> angle #> 1 NA #> 2 45 #> #> Slot \"border\": #> column_values column_mods mods labels border #> 1 avail avail_mods 0 not available black #> 2 avail avail_mods 1 available blue #>"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/align.html","id":null,"dir":"Reference","previous_headings":"","what":"Align a Pedigree object — align","title":"Align a Pedigree object — align","text":"Given Pedigree, function creates helper matrices describe layout plot Pedigree.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/align.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Align a Pedigree object — align","text":"","code":"# S4 method for class 'Pedigree' align( obj, packed = TRUE, width = 10, align = TRUE, hints = NULL, missid = \"NA_character_\", align_parents = TRUE, force = FALSE, precision = 2 )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/align.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Align a Pedigree object — align","text":"obj Pedigree object packed Pedigree compressed. (.e. allow diagonal lines connecting parents children order smaller overall width plot.) width packed output, minimum width plot, inches. align packed Pedigree, align children parents TRUE, extent possible given page width, align left margin FALSE. argument can two element vector, giving alignment parameters, logical value. TRUE, default c(1.5, 2), numeric routine alignped4() called. hints Hints object named list containing horder spouse. NULL Hints stored obj used. missid character vector missing values identifiers. id, dadid momid corresponding values set NA_character_. align_parents align_parents = TRUE, go one step try make parents child depth. (always possible). helps drawing program lining pedigrees 'join middle' via marriage. force force = TRUE, function return depth minus min(depth) depth reach state founders possible. precision number decimal places round solution .","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/align.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Align a Pedigree object — align","text":"list components n: vector giving number subjects horizonal level plot nid: matrix one row level, giving numeric id subject plotted. (value 17 means 17th subject Pedigree). pos: matrix giving horizontal position plot point fam: matrix giving family id plot point. value 3 mean two subjects positions 3 4, row , subject's parents. spouse: matrix values 0 = spouse 1 = subject plotted immediate right spouse 2 = subject plotted immediate right inbred spouse twins: Optional matrix present Pedigree contains twins : 0 = twin 1 = sibling right monozygotic twin 2 = sibling right dizygotic twin 3 = sibling right twin unknown zygosity","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/align.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Align a Pedigree object — align","text":"internal routine, used almost exclusively ped_to_plotdf(). subservient functions auto_hint(), alignped1(), alignped2(), alignped3(), alignped4() contain bulk computation. hints missing auto_hint() routine called supply initial guess. multiple families present obj Pedigree, routine called family, results combined list returned. information can read associated vignette: vignette(\"pedigree_alignment\").","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/align.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Align a Pedigree object — align","text":"","code":"data(sampleped) ped <- Pedigree(sampleped) align(ped) #> $`1` #> $`1`$n #> [1] 2 10 16 14 #> #> $`1`$nid #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] #> [1,] 35 36 0 0 0 0 0 0 0 0 0 0 0 0 #> [2,] 1 2 3 4 37 38 5 6 7 8 0 0 0 0 #> [3,] 9 10 11 12 14 39 40 41 14 15 12 18 17 16 #> [4,] 21 22 23 24 27 28 25 26 29 30 31 32 33 34 #> [,15] [,16] #> [1,] 0 0 #> [2,] 0 0 #> [3,] 19 20 #> [4,] 0 0 #> #> $`1`$pos #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] #> [1,] 3.8 4.8 0.0 0.0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 #> [2,] 0.0 1.0 2.8 3.8 4.80 5.80 11.25 12.25 14.01 15.01 0.00 0.00 0.00 #> [3,] 0.0 1.0 2.0 3.0 4.00 5.00 6.00 7.00 8.00 9.00 10.00 11.00 12.00 #> [4,] 0.0 1.0 2.0 3.0 6.01 7.01 8.01 9.01 10.01 11.01 12.01 13.01 14.01 #> [,14] [,15] [,16] #> [1,] 0.00 0 0 #> [2,] 0.00 0 0 #> [3,] 13.00 14 15 #> [4,] 15.01 0 0 #> #> $`1`$fam #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] #> [1,] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [2,] 0 0 1 0 0 1 0 0 0 0 0 0 0 0 #> [3,] 1 3 3 3 3 5 5 5 0 7 0 7 0 7 #> [4,] 1 1 1 1 9 9 11 11 13 15 15 15 15 15 #> [,15] [,16] #> [1,] 0 0 #> [2,] 0 0 #> [3,] 7 9 #> [4,] 0 0 #> #> $`1`$spouse #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] #> [1,] 1 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [2,] 1 0 1 0 1 0 1 0 1 0 0 0 0 0 #> [3,] 1 0 0 0 0 0 0 0 1 0 1 0 1 0 #> [4,] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [,15] [,16] #> [1,] 0 0 #> [2,] 0 0 #> [3,] 1 0 #> [4,] 0 0 #> #> #> $`2` #> $`2`$n #> [1] 2 7 5 #> #> $`2`$nid #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 1 2 0 0 0 0 0 #> [2,] 3 4 5 6 7 9 8 #> [3,] 10 11 12 13 14 0 0 #> #> $`2`$pos #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 2.7 3.7 0.0 0.0 0.0 0 0 #> [2,] 0.0 1.0 2.0 3.0 4.0 5 6 #> [3,] 0.0 1.0 4.5 5.5 6.5 0 0 #> #> $`2`$fam #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 0 0 0 0 0 0 0 #> [2,] 0 1 1 1 1 0 1 #> [3,] 1 1 6 6 6 0 0 #> #> $`2`$spouse #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 1 0 0 0 0 0 0 #> [2,] 1 0 0 0 0 1 0 #> [3,] 0 0 0 0 0 0 0 #> #>"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped1.html","id":null,"dir":"Reference","previous_headings":"","what":"Alignment first routine — alignped1","title":"Alignment first routine — alignped1","text":"First alignment routine create subtree founded single subject though tree.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped1.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Alignment first routine — alignped1","text":"","code":"alignped1(idx, dadx, momx, level, horder, packed, spouselist)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped1.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Alignment first routine — alignped1","text":"idx Indexes subjects dadx Indexes fathers momx Indexes mothers level Vector level subject horder named numeric vector one element per subject Pedigree. determines relative horizontal order subjects within sibship, well relative order processing founder couples. (latter, female founders ordered though sisters). names vector individual identifiers. packed Pedigree compressed. (.e. allow diagonal lines connecting parents children order smaller overall width plot.) spouselist Matrix spouses 4 columns: 1: husband index 2: wife index 3: husband anchor 4: wife anchor","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped1.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Alignment first routine — alignped1","text":"list containing elements plot Pedigree. contains set matrices along spouselist matrix. latter marriages removed processed. n : vector giving number subjects horizonal level plot nid : matrix one row level, giving numeric id subject plotted. (value 17 means 17th subject Pedigree). pos : matrix giving horizontal position plot point fam : matrix giving family id plot point. value 3 mean two subjects positions 3 4, row , subject's parents. spouselist : Spouse matrix anchors informations","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped1.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Alignment first routine — alignped1","text":"routine nid array consists final nid array + 1/2 final spouse array. Note spouselist matrix contain spouse pairs yet processed. logic anchoring slightly tricky.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped1.html","id":"-anchoring-","dir":"Reference","previous_headings":"","what":"1. Anchoring:","title":"Alignment first routine — alignped1","text":"First, col 4 spouselist matrix 0, anchor first opportunity. Also note spouselist[, 3] == spouselist[, 4] husband anchor (just write possibilities).","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped1.html","id":"-return-values-initialization-","dir":"Reference","previous_headings":"","what":"2. Return values initialization:","title":"Alignment first routine — alignped1","text":"Create set 3 return structures, matrices 1 + nspouse columns. children routines widen result.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped1.html","id":"-create-lspouse-and-rspouse-","dir":"Reference","previous_headings":"","what":"3. Create lspouse and rspouse:","title":"Alignment first routine — alignped1","text":"two complimentary lists denote spouses plotted left right. someone lots spouses try split evenly. number spouses odd, men right left, women right. hints spouselist matrix override. put undecided marriages closest idx, add predetermined ones left right. majority marriages undetermined singletons, nleft 1 female (put husband left) 0 male. one bug found plotting canine data, lspouse initially empty length(rspouse) > 1. caused nleft > length(indx). fix let indx indexed beyond length, fix JPS 5/2013.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped1.html","id":"-list-the-children-","dir":"Reference","previous_headings":"","what":"4. List the children:","title":"Alignment first routine — alignped1","text":"spouse get list children. call alignped2() generate tree mark connection parent. multiple marriages children need join trees.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped1.html","id":"-splice-the-tree-","dir":"Reference","previous_headings":"","what":"5. Splice the tree:","title":"Alignment first routine — alignped1","text":"finish need splice together tree made kids, data lev + 1 , data . 3 cases: children found. tree wider tree , case add data level onto . tree narrower, instance child.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped1.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Alignment first routine — alignped1","text":"","code":"data(sampleped) ped <- Pedigree(sampleped) align(ped) #> $`1` #> $`1`$n #> [1] 2 10 16 14 #> #> $`1`$nid #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] #> [1,] 35 36 0 0 0 0 0 0 0 0 0 0 0 0 #> [2,] 1 2 3 4 37 38 5 6 7 8 0 0 0 0 #> [3,] 9 10 11 12 14 39 40 41 14 15 12 18 17 16 #> [4,] 21 22 23 24 27 28 25 26 29 30 31 32 33 34 #> [,15] [,16] #> [1,] 0 0 #> [2,] 0 0 #> [3,] 19 20 #> [4,] 0 0 #> #> $`1`$pos #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] #> [1,] 3.8 4.8 0.0 0.0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 #> [2,] 0.0 1.0 2.8 3.8 4.80 5.80 11.25 12.25 14.01 15.01 0.00 0.00 0.00 #> [3,] 0.0 1.0 2.0 3.0 4.00 5.00 6.00 7.00 8.00 9.00 10.00 11.00 12.00 #> [4,] 0.0 1.0 2.0 3.0 6.01 7.01 8.01 9.01 10.01 11.01 12.01 13.01 14.01 #> [,14] [,15] [,16] #> [1,] 0.00 0 0 #> [2,] 0.00 0 0 #> [3,] 13.00 14 15 #> [4,] 15.01 0 0 #> #> $`1`$fam #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] #> [1,] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [2,] 0 0 1 0 0 1 0 0 0 0 0 0 0 0 #> [3,] 1 3 3 3 3 5 5 5 0 7 0 7 0 7 #> [4,] 1 1 1 1 9 9 11 11 13 15 15 15 15 15 #> [,15] [,16] #> [1,] 0 0 #> [2,] 0 0 #> [3,] 7 9 #> [4,] 0 0 #> #> $`1`$spouse #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] #> [1,] 1 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [2,] 1 0 1 0 1 0 1 0 1 0 0 0 0 0 #> [3,] 1 0 0 0 0 0 0 0 1 0 1 0 1 0 #> [4,] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [,15] [,16] #> [1,] 0 0 #> [2,] 0 0 #> [3,] 1 0 #> [4,] 0 0 #> #> #> $`2` #> $`2`$n #> [1] 2 7 5 #> #> $`2`$nid #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 1 2 0 0 0 0 0 #> [2,] 3 4 5 6 7 9 8 #> [3,] 10 11 12 13 14 0 0 #> #> $`2`$pos #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 2.7 3.7 0.0 0.0 0.0 0 0 #> [2,] 0.0 1.0 2.0 3.0 4.0 5 6 #> [3,] 0.0 1.0 4.5 5.5 6.5 0 0 #> #> $`2`$fam #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 0 0 0 0 0 0 0 #> [2,] 0 1 1 1 1 0 1 #> [3,] 1 1 6 6 6 0 0 #> #> $`2`$spouse #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 1 0 0 0 0 0 0 #> [2,] 1 0 0 0 0 1 0 #> [3,] 0 0 0 0 0 0 0 #> #>"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped2.html","id":null,"dir":"Reference","previous_headings":"","what":"Alignment second routine — alignped2","title":"Alignment second routine — alignped2","text":"Second four co-routines takes collection siblings, grows tree , appends side side single tree.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Alignment second routine — alignped2","text":"","code":"alignped2(idx, dadx, momx, level, horder, packed, spouselist)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Alignment second routine — alignped2","text":"idx Indexes subjects dadx Indexes fathers momx Indexes mothers level Vector level subject horder named numeric vector one element per subject Pedigree. determines relative horizontal order subjects within sibship, well relative order processing founder couples. (latter, female founders ordered though sisters). names vector individual identifiers. packed Pedigree compressed. (.e. allow diagonal lines connecting parents children order smaller overall width plot.) spouselist Matrix spouses 4 columns: 1: husband index 2: wife index 3: husband anchor 4: wife anchor","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Alignment second routine — alignped2","text":"list containing elements plot Pedigree. contains set matrices along spouselist matrix. latter marriages removed processed. n : vector giving number subjects horizonal level plot nid : matrix one row level, giving numeric id subject plotted. (value 17 means 17th subject Pedigree). pos : matrix giving horizontal position plot point fam : matrix giving family id plot point. value 3 mean two subjects positions 3 4, row , subject's parents. spouselist : Spouse matrix anchors informations","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped2.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Alignment second routine — alignped2","text":"input arguments alignped1() exception idx vector. routine nothing spouselist matrix, needs pass tree back since one routines called alignped2() might change matrix. code one non-obvious special case. Suppose two sibs marry. first sib processed alignped1 partners (children) added rval structure . second sib processed come back 1 element tree (marriage longer spouselist), added onto rval. rule thus add 1 element tree whose value (must idx[] already rval structure level.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Alignment second routine — alignped2","text":"","code":"data(sampleped) ped <- Pedigree(sampleped) align(ped) #> $`1` #> $`1`$n #> [1] 2 10 16 14 #> #> $`1`$nid #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] #> [1,] 35 36 0 0 0 0 0 0 0 0 0 0 0 0 #> [2,] 1 2 3 4 37 38 5 6 7 8 0 0 0 0 #> [3,] 9 10 11 12 14 39 40 41 14 15 12 18 17 16 #> [4,] 21 22 23 24 27 28 25 26 29 30 31 32 33 34 #> [,15] [,16] #> [1,] 0 0 #> [2,] 0 0 #> [3,] 19 20 #> [4,] 0 0 #> #> $`1`$pos #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] #> [1,] 3.8 4.8 0.0 0.0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 #> [2,] 0.0 1.0 2.8 3.8 4.80 5.80 11.25 12.25 14.01 15.01 0.00 0.00 0.00 #> [3,] 0.0 1.0 2.0 3.0 4.00 5.00 6.00 7.00 8.00 9.00 10.00 11.00 12.00 #> [4,] 0.0 1.0 2.0 3.0 6.01 7.01 8.01 9.01 10.01 11.01 12.01 13.01 14.01 #> [,14] [,15] [,16] #> [1,] 0.00 0 0 #> [2,] 0.00 0 0 #> [3,] 13.00 14 15 #> [4,] 15.01 0 0 #> #> $`1`$fam #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] #> [1,] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [2,] 0 0 1 0 0 1 0 0 0 0 0 0 0 0 #> [3,] 1 3 3 3 3 5 5 5 0 7 0 7 0 7 #> [4,] 1 1 1 1 9 9 11 11 13 15 15 15 15 15 #> [,15] [,16] #> [1,] 0 0 #> [2,] 0 0 #> [3,] 7 9 #> [4,] 0 0 #> #> $`1`$spouse #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] #> [1,] 1 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [2,] 1 0 1 0 1 0 1 0 1 0 0 0 0 0 #> [3,] 1 0 0 0 0 0 0 0 1 0 1 0 1 0 #> [4,] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [,15] [,16] #> [1,] 0 0 #> [2,] 0 0 #> [3,] 1 0 #> [4,] 0 0 #> #> #> $`2` #> $`2`$n #> [1] 2 7 5 #> #> $`2`$nid #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 1 2 0 0 0 0 0 #> [2,] 3 4 5 6 7 9 8 #> [3,] 10 11 12 13 14 0 0 #> #> $`2`$pos #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 2.7 3.7 0.0 0.0 0.0 0 0 #> [2,] 0.0 1.0 2.0 3.0 4.0 5 6 #> [3,] 0.0 1.0 4.5 5.5 6.5 0 0 #> #> $`2`$fam #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 0 0 0 0 0 0 0 #> [2,] 0 1 1 1 1 0 1 #> [3,] 1 1 6 6 6 0 0 #> #> $`2`$spouse #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 1 0 0 0 0 0 0 #> [2,] 1 0 0 0 0 1 0 #> [3,] 0 0 0 0 0 0 0 #> #>"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped3.html","id":null,"dir":"Reference","previous_headings":"","what":"Alignment third routine — alignped3","title":"Alignment third routine — alignped3","text":"Third four co-routines merges two pedigree trees side side single object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped3.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Alignment third routine — alignped3","text":"","code":"alignped3(alt1, alt2, packed, space = 1)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped3.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Alignment third routine — alignped3","text":"alt1 Alignment first tree alt2 Alignment second tree packed Pedigree compressed. (.e. allow diagonal lines connecting parents children order smaller overall width plot.) space Space two subjects","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped3.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Alignment third routine — alignped3","text":"list containing elements plot Pedigree. contains set matrices along spouselist matrix. latter marriages removed processed. n : vector giving number subjects horizonal level plot nid : matrix one row level, giving numeric id subject plotted. (value 17 means 17th subject Pedigree). pos : matrix giving horizontal position plot point fam : matrix giving family id plot point. value 3 mean two subjects positions 3 4, row , subject's parents. spouselist : Spouse matrix anchors informations","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped3.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Alignment third routine — alignped3","text":"primary special case rightmost person left tree leftmost person right tree; need plot two copies person side side. (initializing output structures worry , harm column bigger finally needed.) Beyond work simple book keeping.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped3.html","id":"-slide-","dir":"Reference","previous_headings":"","what":"1. Slide:","title":"Alignment third routine — alignped3","text":"unpacked case, traditional way draw Pedigree can assume paper infinitely wide, parents centered children. case think two trees merged solid blocks. input left margin 0. Compute far slide right tree.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped3.html","id":"-merge-","dir":"Reference","previous_headings":"","what":"2. Merge:","title":"Alignment third routine — alignped3","text":"Now merge two trees. Start top level work .","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped3.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Alignment third routine — alignped3","text":"","code":"data(sampleped) ped <- Pedigree(sampleped) align(ped) #> $`1` #> $`1`$n #> [1] 2 10 16 14 #> #> $`1`$nid #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] #> [1,] 35 36 0 0 0 0 0 0 0 0 0 0 0 0 #> [2,] 1 2 3 4 37 38 5 6 7 8 0 0 0 0 #> [3,] 9 10 11 12 14 39 40 41 14 15 12 18 17 16 #> [4,] 21 22 23 24 27 28 25 26 29 30 31 32 33 34 #> [,15] [,16] #> [1,] 0 0 #> [2,] 0 0 #> [3,] 19 20 #> [4,] 0 0 #> #> $`1`$pos #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] #> [1,] 3.8 4.8 0.0 0.0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 #> [2,] 0.0 1.0 2.8 3.8 4.80 5.80 11.25 12.25 14.01 15.01 0.00 0.00 0.00 #> [3,] 0.0 1.0 2.0 3.0 4.00 5.00 6.00 7.00 8.00 9.00 10.00 11.00 12.00 #> [4,] 0.0 1.0 2.0 3.0 6.01 7.01 8.01 9.01 10.01 11.01 12.01 13.01 14.01 #> [,14] [,15] [,16] #> [1,] 0.00 0 0 #> [2,] 0.00 0 0 #> [3,] 13.00 14 15 #> [4,] 15.01 0 0 #> #> $`1`$fam #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] #> [1,] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [2,] 0 0 1 0 0 1 0 0 0 0 0 0 0 0 #> [3,] 1 3 3 3 3 5 5 5 0 7 0 7 0 7 #> [4,] 1 1 1 1 9 9 11 11 13 15 15 15 15 15 #> [,15] [,16] #> [1,] 0 0 #> [2,] 0 0 #> [3,] 7 9 #> [4,] 0 0 #> #> $`1`$spouse #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] #> [1,] 1 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [2,] 1 0 1 0 1 0 1 0 1 0 0 0 0 0 #> [3,] 1 0 0 0 0 0 0 0 1 0 1 0 1 0 #> [4,] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [,15] [,16] #> [1,] 0 0 #> [2,] 0 0 #> [3,] 1 0 #> [4,] 0 0 #> #> #> $`2` #> $`2`$n #> [1] 2 7 5 #> #> $`2`$nid #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 1 2 0 0 0 0 0 #> [2,] 3 4 5 6 7 9 8 #> [3,] 10 11 12 13 14 0 0 #> #> $`2`$pos #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 2.7 3.7 0.0 0.0 0.0 0 0 #> [2,] 0.0 1.0 2.0 3.0 4.0 5 6 #> [3,] 0.0 1.0 4.5 5.5 6.5 0 0 #> #> $`2`$fam #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 0 0 0 0 0 0 0 #> [2,] 0 1 1 1 1 0 1 #> [3,] 1 1 6 6 6 0 0 #> #> $`2`$spouse #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 1 0 0 0 0 0 0 #> [2,] 1 0 0 0 0 1 0 #> [3,] 0 0 0 0 0 0 0 #> #>"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped4.html","id":null,"dir":"Reference","previous_headings":"","what":"Alignment fourth routine — alignped4","title":"Alignment fourth routine — alignped4","text":"Last routines attempts line children parents put spouses siblings \"close\" , extent possible within constraints page width.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped4.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Alignment fourth routine — alignped4","text":"","code":"alignped4(rval, spouse, level, width, align, precision = 2)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped4.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Alignment fourth routine — alignped4","text":"rval list components n, nid, pos, fam. spouse boolean matrix one row per level representing subject spouse . level Vector level subject width packed output, minimum width plot, inches. align packed Pedigree, align children parents TRUE, extent possible given page width, align left margin FALSE. argument can two element vector, giving alignment parameters, logical value. TRUE, default c(1.5, 2), numeric routine alignped4() called. precision number decimal places round solution .","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped4.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Alignment fourth routine — alignped4","text":"updated position matrix","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped4.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Alignment fourth routine — alignped4","text":"alignped4() routine final step alignment. current code necessary setup calls quadprog::solve.QP() function. two important parameters function: maximum width specified. smallest possible width maximum number subjects line. user suggestion low increased amount plus one (give just little wiggle room). align vector 2 alignment parameters b. set siblings x parents p_1 p_2 alignment penalty : $$(1/k^)\\sum_{=1}^{k} (x_i - (p_1 + p_2)/2)^2$$ k number siblings set. Using fact = 1 : $$\\sum(x_i-c)^2 = \\sum(x_i-\\mu)^2 + k(c-\\mu)^2$$ moving sibship k sibs one unit left right optimal incur cost moving one 1 two sibs place. = 0 large sibships harder move small ones. default value = 1.5, slightly easier move small ones. rationale default long parents somewhere first last siblings result looks fairly good, flexible spacing large family. tethering sibs single spot tend kept close . alignment penalty spouses \\(b(x_1 - x_2)^2\\), tends keep together. size b controls relative importance sib-parent spouse-spouse closeness. start adding penalties. total number parameters alignment problem (hand quadprog) set sum(n) positions. work array myid keeps track parameter number position easy find. one extra penalty added end. penalty amount final positions shifted constant, penalty matrix positive definite; solve.QP() like . add tiny amount leftward pull widest line. k subjects line k+1 constraints line. first point must \\(\\ge 0\\), subsequent one must least 1 unit right, final point must \\(\\le\\) max width.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/alignped4.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Alignment fourth routine — alignped4","text":"","code":"data(sampleped) ped <- Pedigree(sampleped) align(ped) #> $`1` #> $`1`$n #> [1] 2 10 16 14 #> #> $`1`$nid #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] #> [1,] 35 36 0 0 0 0 0 0 0 0 0 0 0 0 #> [2,] 1 2 3 4 37 38 5 6 7 8 0 0 0 0 #> [3,] 9 10 11 12 14 39 40 41 14 15 12 18 17 16 #> [4,] 21 22 23 24 27 28 25 26 29 30 31 32 33 34 #> [,15] [,16] #> [1,] 0 0 #> [2,] 0 0 #> [3,] 19 20 #> [4,] 0 0 #> #> $`1`$pos #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] #> [1,] 3.8 4.8 0.0 0.0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 #> [2,] 0.0 1.0 2.8 3.8 4.80 5.80 11.25 12.25 14.01 15.01 0.00 0.00 0.00 #> [3,] 0.0 1.0 2.0 3.0 4.00 5.00 6.00 7.00 8.00 9.00 10.00 11.00 12.00 #> [4,] 0.0 1.0 2.0 3.0 6.01 7.01 8.01 9.01 10.01 11.01 12.01 13.01 14.01 #> [,14] [,15] [,16] #> [1,] 0.00 0 0 #> [2,] 0.00 0 0 #> [3,] 13.00 14 15 #> [4,] 15.01 0 0 #> #> $`1`$fam #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] #> [1,] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [2,] 0 0 1 0 0 1 0 0 0 0 0 0 0 0 #> [3,] 1 3 3 3 3 5 5 5 0 7 0 7 0 7 #> [4,] 1 1 1 1 9 9 11 11 13 15 15 15 15 15 #> [,15] [,16] #> [1,] 0 0 #> [2,] 0 0 #> [3,] 7 9 #> [4,] 0 0 #> #> $`1`$spouse #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] #> [1,] 1 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [2,] 1 0 1 0 1 0 1 0 1 0 0 0 0 0 #> [3,] 1 0 0 0 0 0 0 0 1 0 1 0 1 0 #> [4,] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [,15] [,16] #> [1,] 0 0 #> [2,] 0 0 #> [3,] 1 0 #> [4,] 0 0 #> #> #> $`2` #> $`2`$n #> [1] 2 7 5 #> #> $`2`$nid #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 1 2 0 0 0 0 0 #> [2,] 3 4 5 6 7 9 8 #> [3,] 10 11 12 13 14 0 0 #> #> $`2`$pos #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 2.7 3.7 0.0 0.0 0.0 0 0 #> [2,] 0.0 1.0 2.0 3.0 4.0 5 6 #> [3,] 0.0 1.0 4.5 5.5 6.5 0 0 #> #> $`2`$fam #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 0 0 0 0 0 0 0 #> [2,] 0 1 1 1 1 0 1 #> [3,] 1 1 6 6 6 0 0 #> #> $`2`$spouse #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 1 0 0 0 0 0 0 #> [2,] 1 0 0 0 0 1 0 #> [3,] 0 0 0 0 0 0 0 #> #>"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ancestors.html","id":null,"dir":"Reference","previous_headings":"","what":"Ancestors indexes of a subject — ancestors","title":"Ancestors indexes of a subject — ancestors","text":"Given index one multiple individual(s), function iterate mom dad indexes list ancestors said individual(s). function use align() function identify spouse pairs common ancestor therefore need connected double line (.e. inbred).","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ancestors.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ancestors indexes of a subject — ancestors","text":"","code":"ancestors(idx, momx, dadx)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ancestors.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ancestors indexes of a subject — ancestors","text":"idx Indexes subjects momx Indexes mothers dadx Indexes fathers","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ancestors.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Ancestors indexes of a subject — ancestors","text":"vector ancestor indexes","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ancestors.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ancestors indexes of a subject — ancestors","text":"","code":"ancestors(c(1), c(3, 4, 5, 6), c(7, 8, 9, 10)) #> [1] 3 5 7 9 ancestors(c(1, 2), c(3, 4, 5, 6), c(7, 8, 9, 10)) #> [1] 3 4 5 6 7 8 9 10"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/anchor_to_factor.html","id":null,"dir":"Reference","previous_headings":"","what":"Anchor variable to ordered factor — anchor_to_factor","title":"Anchor variable to ordered factor — anchor_to_factor","text":"Anchor variable ordered factor","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/anchor_to_factor.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Anchor variable to ordered factor — anchor_to_factor","text":"","code":"anchor_to_factor(anchor)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/anchor_to_factor.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Anchor variable to ordered factor — anchor_to_factor","text":"anchor character, factor numeric vector corresponding anchor individuals. following values recognized: character() factor() : \"0\", \"1\", \"2\", \"left\", \"right\", \"either\" numeric() : 1 = \"left\", 2 = \"right\", 0 = \"either\"","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/anchor_to_factor.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Anchor variable to ordered factor — anchor_to_factor","text":"ordered factor vector containing transformed variable \"either\" < \"left\" < \"right\"","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/anchor_to_factor.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Anchor variable to ordered factor — anchor_to_factor","text":"","code":"anchor_to_factor(c(1, 2, 0, \"left\", \"right\", \"either\")) #> [1] left right either left right either #> Levels: left < right < either"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/auto_hint.html","id":null,"dir":"Reference","previous_headings":"","what":"Initial hint for a Pedigree alignment — auto_hint","title":"Initial hint for a Pedigree alignment — auto_hint","text":"Compute initial guess alignment Pedigree","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/auto_hint.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Initial hint for a Pedigree alignment — auto_hint","text":"","code":"# S4 method for class 'Pedigree' auto_hint(obj, hints = NULL, packed = TRUE, align = FALSE, reset = FALSE)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/auto_hint.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Initial hint for a Pedigree alignment — auto_hint","text":"obj Pedigree object hints Hints object named list containing horder spouse. NULL Hints stored obj used. packed Pedigree compressed. (.e. allow diagonal lines connecting parents children order smaller overall width plot.) align packed Pedigree, align children parents TRUE, extent possible given page width, align left margin FALSE. argument can two element vector, giving alignment parameters, logical value. TRUE, default c(1.5, 2), numeric routine alignped4() called. reset TRUE, even Ped object Hints, reset initial values.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/auto_hint.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Initial hint for a Pedigree alignment — auto_hint","text":"initial Hints object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/auto_hint.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Initial hint for a Pedigree alignment — auto_hint","text":"Pedigree structure can contain Hints object helps reorder Pedigree (e.g. left--right order children within family) plot minimal distortion. routine used create initial version hints. can modified desired. routine normally called user. moves children within families, marriages \"edge\" set children, closest spouse. pedigrees single connection two families simple-minded approach works surprisingly well. complex structures hand-tuning hints may required. auto_hint() called vector numbers hints argument, values founder females used order founder families left right across plot. values within sibship used preliminary order siblings within family; may changed move one edge match spouse. actual values vector important, order.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/auto_hint.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Initial hint for a Pedigree alignment — auto_hint","text":"","code":"data(sampleped) ped <- Pedigree(sampleped[sampleped$famid == 1, ]) auto_hint(ped) #> An object of class \"Hints\" #> Slot \"horder\": #> 1_101 1_102 1_103 1_104 1_105 1_106 1_107 1_108 1_109 1_110 1_111 1_112 1_113 #> 1 2 3 4 5 6 7 8 1 1 2 3 1 #> 1_114 1_115 1_116 1_117 1_118 1_119 1_120 1_121 1_122 1_123 1_124 1_125 1_126 #> 4 1 3 9 2 4 10 1 2 3 4 5 6 #> 1_127 1_128 1_129 1_130 1_131 1_132 1_133 1_134 1_135 1_136 1_137 1_138 1_139 #> 7 8 9 10 11 12 13 14 2 3 10 11 11 #> 1_140 1_141 #> 12 13 #> #> Slot \"spouse\": #> idl idr anchor #> 1 1_112 1_118 right #> 2 1_114 1_115 right #> 3 1_109 1_110 left #>"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/best_hint.html","id":null,"dir":"Reference","previous_headings":"","what":"Best hint for a Pedigree alignment — best_hint","title":"Best hint for a Pedigree alignment — best_hint","text":"computer time cheap, use routine get best Pedigree alignment. routine try possible founder orders, return one least stress.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/best_hint.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Best hint for a Pedigree alignment — best_hint","text":"","code":"# S4 method for class 'Pedigree' best_hint(obj, wt = c(1000, 10, 1), tolerance = 0)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/best_hint.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Best hint for a Pedigree alignment — best_hint","text":"obj Pedigree object wt vector three weights three error measures. Default c(1000, 10, 1). number duplicate individuals plot sum absolute values differences positions duplicate individuals sum absolute values differences center children parents. tolerance maximum stress level accept. Default 0","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/best_hint.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Best hint for a Pedigree alignment — best_hint","text":"best Hints object permutations","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/best_hint.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Best hint for a Pedigree alignment — best_hint","text":"auto_hint() routine rearrange sibling order, founder order. calls auto_hint() every possible founder order, finds plot least \"stress\". stress computed weighted sum three error measures: nbArcs number duplicate individuals plot lgArcs sum absolute values differences positions duplicate individuals lgParentsChilds sum absolute values differences center children parents $$stress = wt[1] * nbArcs + wt[2] * lgArcs + wt[3] * lgParentsChilds $$ search, plot found stress level less tolerance, search terminated.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/best_hint.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Best hint for a Pedigree alignment — best_hint","text":"","code":"data(sampleped) ped <- Pedigree(sampleped[sampleped$famid == 1,]) best_hint(ped) #> An object of class \"Hints\" #> Slot \"horder\": #> 1_101 1_102 1_103 1_104 1_105 1_106 1_107 1_108 1_109 1_110 1_111 1_112 1_113 #> 1 1 3 4 5 3 7 4 9 1 2 3 13 #> 1_114 1_115 1_116 1_117 1_118 1_119 1_120 1_121 1_122 1_123 1_124 1_125 1_126 #> 4 1 3 17 2 4 20 21 22 23 24 25 26 #> 1_127 1_128 1_129 1_130 1_131 1_132 1_133 1_134 1_135 1_136 1_137 1_138 1_139 #> 27 28 29 30 31 32 33 34 35 2 37 38 39 #> 1_140 1_141 #> 40 41 #> #> Slot \"spouse\": #> idl idr anchor #> 1 1_112 1_118 right #> 2 1_114 1_115 right #> 3 1_109 1_110 left #>"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/bit_size.html","id":null,"dir":"Reference","previous_headings":"","what":"Bit size of a Pedigree — bit_size","title":"Bit size of a Pedigree — bit_size","text":"Utility function used shrink() function calculate bit size Pedigree.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/bit_size.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Bit size of a Pedigree — bit_size","text":"","code":"# S4 method for class 'character_OR_integer' bit_size(obj, momid, missid = NA_character_) # S4 method for class 'Pedigree' bit_size(obj) # S4 method for class 'Ped' bit_size(obj)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/bit_size.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Bit size of a Pedigree — bit_size","text":"obj Ped Pedigree object vector fathers identifiers momid vector containing subject, identifiers biologicals mothers. missid character vector missing values identifiers. id, dadid momid corresponding values set NA_character_.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/bit_size.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Bit size of a Pedigree — bit_size","text":"list following components: bit_size bit size Pedigree nFounder number founders Pedigree nNonFounder number non founders Pedigree","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/bit_size.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Bit size of a Pedigree — bit_size","text":"bit size Pedigree defined : $$ 2 \\times NbNonFounders - NbFounders $$ NbNonFounders number non founders Pedigree (.e. individuals identified parents) NbFounders number founders Pedigree (.e. individuals without identified parents).","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/bit_size.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Bit size of a Pedigree — bit_size","text":"","code":"data(sampleped) ped <- Pedigree(sampleped) bit_size(ped) #> $bit_size #> [1] 62 #> #> $nFounder #> [1] 16 #> #> $nNonFounder #> [1] 39 #>"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_columns.html","id":null,"dir":"Reference","previous_headings":"","what":"Check columns presence in a dataframe — check_columns","title":"Check columns presence in a dataframe — check_columns","text":"Check presence / absence columns names depending need","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_columns.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check columns presence in a dataframe — check_columns","text":"","code":"check_columns( df, cols_needed = NULL, cols_used = NULL, cols_to_use = NULL, others_cols = FALSE, cols_used_init = FALSE, cols_to_use_init = FALSE, cols_used_del = FALSE, verbose = FALSE )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_columns.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check columns presence in a dataframe — check_columns","text":"df dataframe use cols_needed vector columns needed cols_used vector columns used script overwritten. cols_to_use vector optional columns authorized. others_cols Boolean defining non defined columns allowed. cols_used_init Boolean defining columns used initialised NA. cols_to_use_init Boolean defining optional columns initialised NA. cols_used_del Boolean defining columns used deleted. verbose message prompted user","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_columns.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check columns presence in a dataframe — check_columns","text":"Dataframe column allowed column correctly initialised.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_columns.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Check columns presence in a dataframe — check_columns","text":"3 types columns checked: cols_needed : columns need present missing error prompted script stop cols_used : columns used script overwritten NA. cols_to_use : columns optional recognise present. last two types columns can initialised NA needed.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_columns.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check columns presence in a dataframe — check_columns","text":"","code":"data.frame #> function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE, #> fix.empty.names = TRUE, stringsAsFactors = FALSE) #> { #> data.row.names <- if (check.rows && is.null(row.names)) #> function(current, new, i) { #> if (is.character(current)) #> new <- as.character(new) #> if (is.character(new)) #> current <- as.character(current) #> if (anyDuplicated(new)) #> return(current) #> if (is.null(current)) #> return(new) #> if (all(current == new) || all(current == \"\")) #> return(new) #> stop(gettextf(\"mismatch of row names in arguments of 'data.frame', item %d\", #> i), domain = NA) #> } #> else function(current, new, i) { #> current %||% if (anyDuplicated(new)) { #> warning(gettextf(\"some row.names duplicated: %s --> row.names NOT used\", #> paste(which(duplicated(new)), collapse = \",\")), #> domain = NA) #> current #> } #> else new #> } #> object <- as.list(substitute(list(...)))[-1L] #> mirn <- missing(row.names) #> mrn <- is.null(row.names) #> x <- list(...) #> n <- length(x) #> if (n < 1L) { #> if (!mrn) { #> if (is.object(row.names) || !is.integer(row.names)) #> row.names <- as.character(row.names) #> if (anyNA(row.names)) #> stop(\"row names contain missing values\") #> if (anyDuplicated(row.names)) #> stop(gettextf(\"duplicate row.names: %s\", paste(unique(row.names[duplicated(row.names)]), #> collapse = \", \")), domain = NA) #> } #> else row.names <- integer() #> return(structure(list(), names = character(), row.names = row.names, #> class = \"data.frame\")) #> } #> vnames <- names(x) #> if (length(vnames) != n) #> vnames <- character(n) #> no.vn <- !nzchar(vnames) #> vlist <- vnames <- as.list(vnames) #> nrows <- ncols <- integer(n) #> for (i in seq_len(n)) { #> xi <- if (is.character(x[[i]]) || is.list(x[[i]])) #> as.data.frame(x[[i]], optional = TRUE, stringsAsFactors = stringsAsFactors) #> else as.data.frame(x[[i]], optional = TRUE) #> nrows[i] <- .row_names_info(xi) #> ncols[i] <- length(xi) #> namesi <- names(xi) #> if (ncols[i] > 1L) { #> if (length(namesi) == 0L) #> namesi <- seq_len(ncols[i]) #> vnames[[i]] <- if (no.vn[i]) #> namesi #> else paste(vnames[[i]], namesi, sep = \".\") #> } #> else if (length(namesi)) { #> vnames[[i]] <- namesi #> } #> else if (fix.empty.names && no.vn[[i]]) { #> tmpname <- deparse(object[[i]], nlines = 1L)[1L] #> if (startsWith(tmpname, \"I(\") && endsWith(tmpname, #> \")\")) { #> ntmpn <- nchar(tmpname, \"c\") #> tmpname <- substr(tmpname, 3L, ntmpn - 1L) #> } #> vnames[[i]] <- tmpname #> } #> if (mirn && nrows[i] > 0L) { #> rowsi <- attr(xi, \"row.names\") #> if (any(nzchar(rowsi))) #> row.names <- data.row.names(row.names, rowsi, #> i) #> } #> nrows[i] <- abs(nrows[i]) #> vlist[[i]] <- xi #> } #> nr <- max(nrows) #> for (i in seq_len(n)[nrows < nr]) { #> xi <- vlist[[i]] #> if (nrows[i] > 0L && (nr%%nrows[i] == 0L)) { #> xi <- unclass(xi) #> fixed <- TRUE #> for (j in seq_along(xi)) { #> xi1 <- xi[[j]] #> if (is.vector(xi1) || is.factor(xi1)) #> xi[[j]] <- rep(xi1, length.out = nr) #> else if (is.character(xi1) && inherits(xi1, \"AsIs\")) #> xi[[j]] <- structure(rep(xi1, length.out = nr), #> class = class(xi1)) #> else if (inherits(xi1, \"Date\") || inherits(xi1, #> \"POSIXct\")) #> xi[[j]] <- rep(xi1, length.out = nr) #> else { #> fixed <- FALSE #> break #> } #> } #> if (fixed) { #> vlist[[i]] <- xi #> next #> } #> } #> stop(gettextf(\"arguments imply differing number of rows: %s\", #> paste(unique(nrows), collapse = \", \")), domain = NA) #> } #> value <- unlist(vlist, recursive = FALSE, use.names = FALSE) #> vnames <- as.character(unlist(vnames[ncols > 0L])) #> if (fix.empty.names && any(noname <- !nzchar(vnames))) #> vnames[noname] <- paste0(\"Var.\", seq_along(vnames))[noname] #> if (check.names) { #> if (fix.empty.names) #> vnames <- make.names(vnames, unique = TRUE) #> else { #> nz <- nzchar(vnames) #> vnames[nz] <- make.names(vnames[nz], unique = TRUE) #> } #> } #> names(value) <- vnames #> if (!mrn) { #> if (length(row.names) == 1L && nr != 1L) { #> if (is.character(row.names)) #> row.names <- match(row.names, vnames, 0L) #> if (length(row.names) != 1L || row.names < 1L || #> row.names > length(vnames)) #> stop(\"'row.names' should specify one of the variables\") #> i <- row.names #> row.names <- value[[i]] #> value <- value[-i] #> } #> else if (!is.null(row.names) && length(row.names) != #> nr) #> stop(\"row names supplied are of the wrong length\") #> } #> else if (!is.null(row.names) && length(row.names) != nr) { #> warning(\"row names were found from a short variable and have been discarded\") #> row.names <- NULL #> } #> class(value) <- \"data.frame\" #> if (is.null(row.names)) #> attr(value, \"row.names\") <- .set_row_names(nr) #> else { #> if (is.object(row.names) || !is.integer(row.names)) #> row.names <- as.character(row.names) #> if (anyNA(row.names)) #> stop(\"row names contain missing values\") #> if (anyDuplicated(row.names)) #> stop(gettextf(\"duplicate row.names: %s\", paste(unique(row.names[duplicated(row.names)]), #> collapse = \", \")), domain = NA) #> row.names(value) <- row.names #> } #> value #> } #> #> df <- data.frame( ColN1 = c(1, 2), ColN2 = 4, ColU1 = 'B', ColU2 = '1', ColTU1 = 'A', ColTU2 = 3, ColNR1 = 4, ColNR2 = 5 ) tryCatch( check_columns( df, c('ColN1', 'ColN2'), c('ColU1', 'ColU2'), c('ColTU1', 'ColTU2') ), error = function(e) print(e)) #> "},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_num_na.html","id":null,"dir":"Reference","previous_headings":"","what":"Is numeric or NA — check_num_na","title":"Is numeric or NA — check_num_na","text":"Check variable given numeric NA","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_num_na.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is numeric or NA — check_num_na","text":"","code":"check_num_na(var, na_as_num = TRUE)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_num_na.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is numeric or NA — check_num_na","text":"var Vector value test na_as_num Boolean defining NA string considered numerical values","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_num_na.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is numeric or NA — check_num_na","text":"vector boolean size var","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_num_na.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Is numeric or NA — check_num_na","text":"Check values var numeric NA case na_as_num set TRUE.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_slot_fd.html","id":null,"dir":"Reference","previous_headings":"","what":"Check if the fields are present in an object slot — check_slot_fd","title":"Check if the fields are present in an object slot — check_slot_fd","text":"Check fields present object slot","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_slot_fd.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if the fields are present in an object slot — check_slot_fd","text":"","code":"check_slot_fd(obj, slot = NULL, fields = character())"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_slot_fd.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if the fields are present in an object slot — check_slot_fd","text":"obj object. slot slot object. fields character vector fields check.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_slot_fd.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check if the fields are present in an object slot — check_slot_fd","text":"character vector errors .","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_values.html","id":null,"dir":"Reference","previous_headings":"","what":"Check values in a slot — check_values","title":"Check values in a slot — check_values","text":"Check values slot vector values.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_values.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check values in a slot — check_values","text":"","code":"check_values(val, ref, name = NULL, present = TRUE)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_values.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check values in a slot — check_values","text":"val vector values check. ref vector reference values. name character vector name values check. present logical value indicating values present ","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/check_values.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check values in a slot — check_values","text":"character vector errors .","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/circfun.html","id":null,"dir":"Reference","previous_headings":"","what":"Circular element — circfun","title":"Circular element — circfun","text":"Create list x y coordinates circle given number slices.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/circfun.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Circular element — circfun","text":"","code":"circfun(nslice, n = 50)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/circfun.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Circular element — circfun","text":"nslice Number slices circle n Total number points circle","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/circfun.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Circular element — circfun","text":"list x y coordinates per slice.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/circfun.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Circular element — circfun","text":"","code":"circfun(1) #> [[1]] #> [[1]]$x #> [1] 0.000000e+00 3.061617e-17 -6.393858e-02 -1.268273e-01 -1.876335e-01 #> [6] -2.453588e-01 -2.990553e-01 -3.478413e-01 -3.909157e-01 -4.275714e-01 #> [11] -4.572063e-01 -4.793339e-01 -4.935909e-01 -4.997431e-01 -4.976896e-01 #> [16] -4.874640e-01 -4.692342e-01 -4.432997e-01 -4.100861e-01 -3.701390e-01 #> [21] -3.241142e-01 -2.727675e-01 -2.169419e-01 -1.575541e-01 -9.557931e-02 #> [26] -3.203511e-02 3.203511e-02 9.557931e-02 1.575541e-01 2.169419e-01 #> [31] 2.727675e-01 3.241142e-01 3.701390e-01 4.100861e-01 4.432997e-01 #> [36] 4.692342e-01 4.874640e-01 4.976896e-01 4.997431e-01 4.935909e-01 #> [41] 4.793339e-01 4.572063e-01 4.275714e-01 3.909157e-01 3.478413e-01 #> [46] 2.990553e-01 2.453588e-01 1.876335e-01 1.268273e-01 6.393858e-02 #> [51] 1.530808e-16 #> #> [[1]]$y #> [1] 0.500000000 0.000000000 0.004104993 0.016352568 0.036541621 0.064340648 #> [7] 0.099293189 0.140825325 0.188255099 0.240803716 0.297608328 0.357736207 #> [13] 0.420200052 0.483974211 0.548011513 0.611260467 0.672682527 0.731269145 #> [19] 0.786058330 0.836150445 0.880722979 0.919044052 0.950484434 0.974527874 #> [25] 0.990779578 0.998972696 0.998972696 0.990779578 0.974527874 0.950484434 #> [31] 0.919044052 0.880722979 0.836150445 0.786058330 0.731269145 0.672682527 #> [37] 0.611260467 0.548011513 0.483974211 0.420200052 0.357736207 0.297608328 #> [43] 0.240803716 0.188255099 0.140825325 0.099293189 0.064340648 0.036541621 #> [49] 0.016352568 0.004104993 0.000000000 #> #> circfun(1, 10) #> [[1]] #> [[1]]$x #> [1] 0.000000e+00 3.061617e-17 -3.213938e-01 -4.924039e-01 -4.330127e-01 #> [6] -1.710101e-01 1.710101e-01 4.330127e-01 4.924039e-01 3.213938e-01 #> [11] 1.530808e-16 #> #> [[1]]$y #> [1] 0.5000000 0.0000000 0.1169778 0.4131759 0.7500000 0.9698463 0.9698463 #> [8] 0.7500000 0.4131759 0.1169778 0.0000000 #> #> circfun(4, 50) #> [[1]] #> [[1]]$x #> [1] 0.000000e+00 3.061617e-17 -6.526310e-02 -1.294095e-01 -1.913417e-01 #> [6] -2.500000e-01 -3.043807e-01 -3.535534e-01 -3.966767e-01 -4.330127e-01 #> [11] -4.619398e-01 -4.829629e-01 -4.957224e-01 -5.000000e-01 #> #> [[1]]$y #> [1] 0.500000000 0.000000000 0.004277569 0.017037087 0.038060234 0.066987298 #> [7] 0.103323330 0.146446609 0.195619285 0.250000000 0.308658284 0.370590477 #> [13] 0.434736904 0.500000000 #> #> #> [[2]] #> [[2]]$x #> [1] 0.000000e+00 -5.000000e-01 -4.957224e-01 -4.829629e-01 -4.619398e-01 #> [6] -4.330127e-01 -3.966767e-01 -3.535534e-01 -3.043807e-01 -2.500000e-01 #> [11] -1.913417e-01 -1.294095e-01 -6.526310e-02 -9.184851e-17 #> #> [[2]]$y #> [1] 0.5000000 0.5000000 0.5652631 0.6294095 0.6913417 0.7500000 0.8043807 #> [8] 0.8535534 0.8966767 0.9330127 0.9619398 0.9829629 0.9957224 1.0000000 #> #> #> [[3]] #> [[3]]$x #> [1] 0.000000e+00 -9.184851e-17 6.526310e-02 1.294095e-01 1.913417e-01 #> [6] 2.500000e-01 3.043807e-01 3.535534e-01 3.966767e-01 4.330127e-01 #> [11] 4.619398e-01 4.829629e-01 4.957224e-01 5.000000e-01 #> #> [[3]]$y #> [1] 0.5000000 1.0000000 0.9957224 0.9829629 0.9619398 0.9330127 0.8966767 #> [8] 0.8535534 0.8043807 0.7500000 0.6913417 0.6294095 0.5652631 0.5000000 #> #> #> [[4]] #> [[4]]$x #> [1] 0.000000e+00 5.000000e-01 4.957224e-01 4.829629e-01 4.619398e-01 #> [6] 4.330127e-01 3.966767e-01 3.535534e-01 3.043807e-01 2.500000e-01 #> [11] 1.913417e-01 1.294095e-01 6.526310e-02 1.530808e-16 #> #> [[4]]$y #> [1] 0.500000000 0.500000000 0.434736904 0.370590477 0.308658284 0.250000000 #> [7] 0.195619285 0.146446609 0.103323330 0.066987298 0.038060234 0.017037087 #> [13] 0.004277569 0.000000000 #> #>"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/color_picker.html","id":null,"dir":"Reference","previous_headings":"","what":"Shiny modules to select colours — color_picker_ui","title":"Shiny modules to select colours — color_picker_ui","text":"function allows select different colours array variables.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/color_picker.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shiny modules to select colours — color_picker_ui","text":"","code":"color_picker_ui(id) color_picker_server(id, colors = NULL) color_picker_demo()"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/color_picker.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shiny modules to select colours — color_picker_ui","text":"id string identify module. colors list variables default colours.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/color_picker.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Shiny modules to select colours — color_picker_ui","text":"reactive list selected colours.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/color_picker.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Shiny modules to select colours — color_picker_ui","text":"","code":"if (interactive()) { color_picker_demo() }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/data_col_sel.html","id":null,"dir":"Reference","previous_headings":"","what":"Shiny modules to select columns from a dataframe — data_col_sel_ui","title":"Shiny modules to select columns from a dataframe — data_col_sel_ui","text":"function allows select columns dataframe rename names cols_needed cols_supl. generate Shiny module can used Shiny app. function composed two parts: UI server. UI called function data_col_sel_ui() server function data_col_sel_server().","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/data_col_sel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shiny modules to select columns from a dataframe — data_col_sel_ui","text":"","code":"data_col_sel_ui(id) data_col_sel_server( id, df, cols_needed, cols_supl, title, na_omit = TRUE, others_cols = TRUE ) data_col_sel_demo()"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/data_col_sel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shiny modules to select columns from a dataframe — data_col_sel_ui","text":"id string identify module. df reactive dataframe. cols_needed character vector mandatory columns. cols_supl character vector optional columns. title string display selectInput. na_omit boolean allow selection NA. others_cols boolean authorize columns present output datatable.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/data_col_sel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Shiny modules to select columns from a dataframe — data_col_sel_ui","text":"reactive dataframe selected columns renamed names cols_needed cols_supl.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/data_col_sel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Shiny modules to select columns from a dataframe — data_col_sel_ui","text":"","code":"if (interactive()) { data_col_sel_demo() }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/data_download.html","id":null,"dir":"Reference","previous_headings":"","what":"Shiny modules to download a dataframe — data_download_ui","title":"Shiny modules to download a dataframe — data_download_ui","text":"function allows download dataframe csv file. generate Shiny module can used Shiny app. function composed two parts: UI server. UI called function data_download_ui() server function data_download_server().","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/data_download.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shiny modules to download a dataframe — data_download_ui","text":"","code":"data_download_ui(id) data_download_server( id, df, filename, label = NULL, helper = TRUE, title = \"Data download\" ) data_download_demo()"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/data_download.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shiny modules to download a dataframe — data_download_ui","text":"id string identify module. df reactive dataframe. filename string name file. label string display download button. helper boolean display helper message.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/data_download.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Shiny modules to download a dataframe — data_download_ui","text":"shiny module export dataframe.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/data_download.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Shiny modules to download a dataframe — data_download_ui","text":"","code":"if (interactive()) { data_download_demo() }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/data_import.html","id":null,"dir":"Reference","previous_headings":"","what":"Shiny modules to import data files — data_import_ui","title":"Shiny modules to import data files — data_import_ui","text":"module allow import multiple type data. file type currently supported csv, txt, xls, xslx, rda tab. server dynamically create selection input multiple dataframe present file selected. module composed two parts: UI server. UI called function data_import_ui() server function data_import_server(). Different options available user import data.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/data_import.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shiny modules to import data files — data_import_ui","text":"","code":"data_import_ui(id) data_import_server( id, label = \"Select data file\", dftest = datasets::mtcars, max_request_size = 30 ) data_import_demo(options = list())"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/data_import.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shiny modules to import data files — data_import_ui","text":"id string. label string use prompt user dftest dataframe test function max_request_size number define maximum size file can uploaded.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/data_import.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Shiny modules to import data files — data_import_ui","text":"reactive dataframe selected user.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/data_import.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Shiny modules to import data files — data_import_ui","text":"","code":"if (interactive()) { data_import_demo() }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/descendants.html","id":null,"dir":"Reference","previous_headings":"","what":"Descendants of individuals — descendants","title":"Descendants of individuals — descendants","text":"Find descendants particular list individuals given Pedigree object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/descendants.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Descendants of individuals — descendants","text":"","code":"# S4 method for class 'character_OR_integer,character_OR_integer' descendants(idlist, obj, dadid, momid) # S4 method for class 'character_OR_integer,Pedigree' descendants(idlist, obj) # S4 method for class 'character_OR_integer,Ped' descendants(idlist, obj)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/descendants.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Descendants of individuals — descendants","text":"idlist List individuals identifiers considered obj Ped Pedigree object vector individuals identifiers. dadid vector containing subject, identifiers biologicals fathers. momid vector containing subject, identifiers biologicals mothers.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/descendants.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Descendants of individuals — descendants","text":"Vector descendants individuals idlist. list ordered.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/descendants.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Descendants of individuals — descendants","text":"","code":"data(\"sampleped\") ped <- Pedigree(sampleped) descendants(c(\"1_101\", \"2_208\"), ped) #> [1] \"1_109\" \"2_212\" \"2_213\" \"2_214\" \"1_121\" \"1_122\" \"1_123\" \"1_124\""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/draw_arc.html","id":null,"dir":"Reference","previous_headings":"","what":"Draw arcs — draw_arc","title":"Draw arcs — draw_arc","text":"Draw arcs","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/draw_arc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Draw arcs — draw_arc","text":"","code":"draw_arc( x0, y0, x1, y1, p = NULL, ggplot_gen = FALSE, lwd = par(\"lwd\"), lty = 2, col = \"black\" )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/draw_arc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Draw arcs — draw_arc","text":"x0 x coordinate first point y0 y coordinate first point x1 x coordinate second point y1 y coordinate second point p ggplot object ggplot_gen TRUE add segments ggplot object lwd Line width lty Line type col Line color","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/draw_arc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Draw arcs — draw_arc","text":"Plot arcs current device add ggplot object","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/draw_polygon.html","id":null,"dir":"Reference","previous_headings":"","what":"Draw a polygon — draw_polygon","title":"Draw a polygon — draw_polygon","text":"Draw polygon","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/draw_polygon.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Draw a polygon — draw_polygon","text":"","code":"draw_polygon( x, y, p = NULL, ggplot_gen = FALSE, fill = \"grey\", border = \"black\", density = NULL, angle = 45, lwd = par(\"lwd\") )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/draw_polygon.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Draw a polygon — draw_polygon","text":"x x coordinates y y coordinates p ggplot object ggplot_gen TRUE add segments ggplot object fill Fill color border Border color density Density shading angle Angle shading lwd Line width","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/draw_polygon.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Draw a polygon — draw_polygon","text":"Plot polygon current device add ggplot object","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/draw_segment.html","id":null,"dir":"Reference","previous_headings":"","what":"Draw segments — draw_segment","title":"Draw segments — draw_segment","text":"Draw segments","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/draw_segment.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Draw segments — draw_segment","text":"","code":"draw_segment( x0, y0, x1, y1, p = NULL, ggplot_gen = FALSE, col = par(\"fg\"), lwd = par(\"lwd\"), lty = par(\"lty\") )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/draw_segment.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Draw segments — draw_segment","text":"x0 x coordinate first point y0 y coordinate first point x1 x coordinate second point y1 y coordinate second point p ggplot object ggplot_gen TRUE add segments ggplot object col Line color lwd Line width lty Line type","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/draw_segment.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Draw segments — draw_segment","text":"Plot segments current device add ggplot object","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/draw_text.html","id":null,"dir":"Reference","previous_headings":"","what":"Draw texts — draw_text","title":"Draw texts — draw_text","text":"Draw texts","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/draw_text.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Draw texts — draw_text","text":"","code":"draw_text( x, y, label, p = NULL, ggplot_gen = FALSE, cex = 1, col = NULL, adjx = 0, adjy = 0 )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/draw_text.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Draw texts — draw_text","text":"x x coordinates y y coordinates label Text displayed p ggplot object ggplot_gen TRUE add segments ggplot object cex Character expansion text col Text color adjx x adjustment adjy y adjustment","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/draw_text.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Draw texts — draw_text","text":"Plot text current device add ggplot object","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/duporder.html","id":null,"dir":"Reference","previous_headings":"","what":"Find the duplicate pairs of a subject — duporder","title":"Find the duplicate pairs of a subject — duporder","text":"Find duplicate pairs subject","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/duporder.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find the duplicate pairs of a subject — duporder","text":"","code":"duporder(idlist, plist, lev, obj)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/duporder.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find the duplicate pairs of a subject — duporder","text":"idlist List individuals identifiers considered plist alignment structure representing Pedigree layout. See align() details. lev generation level subject obj Pedigree object","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/duporder.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find the duplicate pairs of a subject — duporder","text":"matrix duplicate pairs","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/duporder.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find the duplicate pairs of a subject — duporder","text":"routine used auto_hint(). finds duplicate pairs subject returns order plotted.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/exclude_stray_marryin.html","id":null,"dir":"Reference","previous_headings":"","what":"Exclude stray marry-ins — exclude_stray_marryin","title":"Exclude stray marry-ins — exclude_stray_marryin","text":"Exclude founders parents.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/exclude_stray_marryin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Exclude stray marry-ins — exclude_stray_marryin","text":"","code":"exclude_stray_marryin(id, dadid, momid)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/exclude_stray_marryin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Exclude stray marry-ins — exclude_stray_marryin","text":"id character vector identifiers individuals dadid vector containing subject, identifiers biologicals fathers. momid vector containing subject, identifiers biologicals mothers.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/exclude_stray_marryin.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Exclude stray marry-ins — exclude_stray_marryin","text":"Returns data frame subject identifiers parents. data frame trimmed founders parents.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/exclude_unavail_founders.html","id":null,"dir":"Reference","previous_headings":"","what":"Exclude unavailable founders — exclude_unavail_founders","title":"Exclude unavailable founders — exclude_unavail_founders","text":"Exclude unavailable founders.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/exclude_unavail_founders.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Exclude unavailable founders — exclude_unavail_founders","text":"","code":"exclude_unavail_founders(id, dadid, momid, avail, missid = NA_character_)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/exclude_unavail_founders.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Exclude unavailable founders — exclude_unavail_founders","text":"id character vector identifiers individuals dadid vector containing subject, identifiers biologicals fathers. momid vector containing subject, identifiers biologicals mothers. avail logical vector availability status individuals (.e. FALSE = available, TRUE = available, NA = unknown). missid character vector missing values identifiers. id, dadid momid corresponding values set NA_character_.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/exclude_unavail_founders.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Exclude unavailable founders — exclude_unavail_founders","text":"Returns list following components: n_trimmed Number trimmed individuals id_trimmed Vector IDs trimmed individuals id Vector subject identifiers dadid Vector father identifiers momid Vector mother identifiers","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/family_check.html","id":null,"dir":"Reference","previous_headings":"","what":"Check family — family_check","title":"Check family — family_check","text":"Error check family classification","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/family_check.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check family — family_check","text":"","code":"# S4 method for class 'character_OR_integer' family_check(obj, dadid, momid, famid, newfam) # S4 method for class 'Pedigree' family_check(obj) # S4 method for class 'Ped' family_check(obj)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/family_check.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check family — family_check","text":"obj character vector id individuals data.frame informations corresponding columns. dadid vector containing subject, identifiers biologicals fathers. momid vector containing subject, identifiers biologicals mothers. famid character vector family identifiers individuals. provide, aggregated individuals identifiers separated underscore. newfam result call make_famid(). already computed user, adding argument shortens running time somewhat.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/family_check.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check family — family_check","text":"data frame one row unique family id famid argument one detected Pedigree object. Components output : famid : family id, entered data set n : Number subjects family unrelated : Number appear unrelated anyone else entire Pedigree. usually marry-ins children (Pedigree), problem. split : Number unique 'new' family ids. 0 = one 'family' related anyone else (good) 1 = everythings fine 2 + = family appears set disjoint trees. missing people? join : Number families unique family, actually joined one. 0 hope.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/family_check.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Check family — family_check","text":"Given family id vector, also compute familial grouping first principles using parenting data, compare results. make_famid() function used create de novo family id parentage data, compared family id given data. joins, attribute 'join' attached. matrix family row labels, new-family-id columns, number subjects entries.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/family_check.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check family — family_check","text":"","code":"# use 2 samplepeds data(sampleped) pedAll <- Pedigree(sampleped) ## check them giving separate ped ids fcheck.sep <- family_check(pedAll) fcheck.sep #> famid n unrelated split join #> 1 1 41 1 1 0 #> 2 2 14 0 1 0 ## check assigning them same ped id fcheck.combined <- with(sampleped, family_check(id, dadid, momid, rep(1, nrow(sampleped)))) fcheck.combined #> famid n unrelated split join #> 1 1 55 1 2 0"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/family_infos_table.html","id":null,"dir":"Reference","previous_headings":"","what":"Affection and availability information table — family_infos_table","title":"Affection and availability information table — family_infos_table","text":"function creates table affection availability information individuals pedigree object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/family_infos_table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Affection and availability information table — family_infos_table","text":"","code":"family_infos_table(pedi, col_val = NA)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/family_infos_table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Affection and availability information table — family_infos_table","text":"pedi pedigree object. col_val column name fill slot pedigree object use table.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/family_infos_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Affection and availability information table — family_infos_table","text":"cross table dataframe affection availability information.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/family_infos_table.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Affection and availability information table — family_infos_table","text":"","code":"data(sampleped) pedi <- Pedigree(sampleped) pedi <- generate_colors(pedi, \"num_child_tot\", threshold = 2) Pedixplorer:::family_infos_table(pedi, \"num_child_tot\") #> Affected mods TRUE FALSE NA #> 1 0 Healthy <= to 2 20 21 0 #> 2 1 Affected > to 2 4 10 0 #> 3 NA NA 0 0 0 Pedixplorer:::family_infos_table(pedi, \"affection\") #> Affected mods TRUE FALSE NA #> 1 0 Healthy <= to 0.5 12 12 0 #> 2 1 Affected > to 0.5 12 11 0 #> 3 NA NA 0 8 0"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/family_sel.html","id":null,"dir":"Reference","previous_headings":"","what":"Shiny module to select a family in a pedigree — family_sel_ui","title":"Shiny module to select a family in a pedigree — family_sel_ui","text":"module allows select family pedigree object. function composed two parts: UI server. UI called function family_sel_ui() server function family_sel_server().","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/family_sel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shiny module to select a family in a pedigree — family_sel_ui","text":"","code":"family_sel_ui(id) family_sel_server( id, pedi, fam_var = NULL, fam_sel = NULL, title = \"Family selection\" ) family_sel_demo(fam_var = NULL, fam_sel = NULL, title = \"Family selection\")"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/family_sel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shiny module to select a family in a pedigree — family_sel_ui","text":"id string identify module. pedi reactive pedigree object. fam_var default family variable use family indicator. fam_sel default family select. title title module.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/family_sel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Shiny module to select a family in a pedigree — family_sel_ui","text":"reactive list subselected pedigree object selected family id.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/family_sel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Shiny module to select a family in a pedigree — family_sel_ui","text":"","code":"if (interactive()) { family_sel_demo() }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_avail_affected.html","id":null,"dir":"Reference","previous_headings":"","what":"Find single affected and available individual from a Pedigree — find_avail_affected","title":"Find single affected and available individual from a Pedigree — find_avail_affected","text":"Finds one subject among available non-parents indicated affection status.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_avail_affected.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find single affected and available individual from a Pedigree — find_avail_affected","text":"","code":"# S4 method for class 'Ped' find_avail_affected(obj, avail = NULL, affected = NULL, affstatus = NA) # S4 method for class 'Pedigree' find_avail_affected(obj, avail = NULL, affected = NULL, affstatus = NA)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_avail_affected.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find single affected and available individual from a Pedigree — find_avail_affected","text":"obj Ped Pedigree object. avail logical vector availability status individuals (.e. FALSE = available, TRUE = available, NA = unknown). affected logical vector affection status individuals (.e. FALSE = unaffected, TRUE = affected, NA = unknown). affstatus Affection status search .","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_avail_affected.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find single affected and available individual from a Pedigree — find_avail_affected","text":"list returned following components ped new Ped object newAvail Vector availability status trimmed individuals idTrimmed Vector IDs trimmed individuals isTrimmed logical value indicating whether Ped object trimmed bit_size Bit size trimmed Ped","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_avail_affected.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find single affected and available individual from a Pedigree — find_avail_affected","text":"used within shrink(), function called first affected indicator, affected item Pedigree matrix multiple affected indicators. avail affected null, function use corresponding Ped accessor.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_avail_affected.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find single affected and available individual from a Pedigree — find_avail_affected","text":"","code":"data(sampleped) ped <- Pedigree(sampleped) find_avail_affected(ped, affstatus = 1) #> $ped #> Ped object with 38 individuals and 13 metadata columns: #> id dadid momid sex famid steril #> col_class #> 1_103 1_103 1_135 1_136 male 1 #> 1_104 1_104 female 1 #> 1_105 1_105 male 1 #> 1_106 1_106 female 1 #> 1_109 1_109 female 1 #> ... ... ... ... ... ... ... #> 2_208 2_208 2_201 2_202 female 2 #> 2_209 2_209 male 2 #> 2_211 2_211 2_203 2_204 male 2 #> 2_212 2_212 2_209 2_208 female 2 #> 2_214 2_214 2_209 2_208 male 2 #> status avail affected useful kin isinf #> col_class #> 1_103 FALSE TRUE #> 1_104 FALSE FALSE #> 1_105 FALSE #> 1_106 FALSE #> 1_109 TRUE FALSE #> ... ... ... ... ... ... ... #> 2_208 FALSE FALSE #> 2_209 FALSE FALSE #> 2_211 TRUE FALSE #> 2_212 TRUE FALSE #> 2_214 TRUE TRUE #> num_child_tot num_child_dir num_child_ind | family indId #> col_class #> 1_103 3 3 0 1 103 #> 1_104 3 3 0 1 104 #> 1_105 4 4 0 1 105 #> 1_106 4 4 0 1 106 #> 1_109 0 0 0 1 109 #> ... ... ... ... ... ... #> 2_208 2 2 0 2 208 #> 2_209 2 2 0 2 209 #> 2_211 0 0 0 2 211 #> 2_212 0 0 0 2 212 #> 2_214 0 0 0 2 214 #> fatherId motherId gender affection available #> col_class #> 1_103 135 136 1 1 0 #> 1_104 2 0 0 #> 1_105 1 0 #> 1_106 2 0 #> 1_109 101 102 2 0 1 #> ... ... ... ... ... ... #> 2_208 201 202 2 0 0 #> 2_209 1 0 0 #> 2_211 203 204 1 0 1 #> 2_212 209 208 2 0 1 #> 2_214 209 208 1 1 1 #> num error sterilisation vitalStatus affection_mods #> col_class #> 1_103 2 1 #> 1_104 4 0 #> 1_105 6 NA #> 1_106 1 NA #> 1_109 3 0 #> ... ... ... ... ... ... #> 2_208 1 0 #> 2_209 2 0 #> 2_211 1 0 #> 2_212 3 0 #> 2_214 0 1 #> avail_mods #> col_class #> 1_103 0 #> 1_104 0 #> 1_105 0 #> 1_106 0 #> 1_109 1 #> ... ... #> 2_208 0 #> 2_209 0 #> 2_211 1 #> 2_212 1 #> 2_214 1 #> #> $new_avail #> [1] FALSE FALSE FALSE FALSE TRUE TRUE FALSE FALSE FALSE TRUE FALSE TRUE #> [13] TRUE FALSE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE FALSE FALSE #> [25] FALSE TRUE TRUE TRUE FALSE TRUE TRUE TRUE TRUE FALSE FALSE TRUE #> [37] TRUE TRUE #> #> $id_trimmed #> [1] \"1_124\" #> #> $is_trimmed #> [1] TRUE #> #> $bit_size #> [1] 37 #>"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_avail_noninform.html","id":null,"dir":"Reference","previous_headings":"","what":"Find uninformative but available subject — find_avail_noninform","title":"Find uninformative but available subject — find_avail_noninform","text":"Finds subjects among available non-parents affection equal 0.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_avail_noninform.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find uninformative but available subject — find_avail_noninform","text":"","code":"# S4 method for class 'Ped' find_avail_noninform(obj, avail = NULL, affected = NULL) # S4 method for class 'Pedigree' find_avail_noninform(obj, avail = NULL, affected = NULL)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_avail_noninform.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find uninformative but available subject — find_avail_noninform","text":"obj Ped Pedigree object. avail logical vector availability status individuals (.e. FALSE = available, TRUE = available, NA = unknown). affected logical vector affection status individuals (.e. FALSE = unaffected, TRUE = affected, NA = unknown).","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_avail_noninform.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find uninformative but available subject — find_avail_noninform","text":"Vector subject ids can removed lowest informativeness.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_avail_noninform.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find uninformative but available subject — find_avail_noninform","text":"Identify subjects remove Pedigree available non-informative (unaffected). second step remove subjects shrink() Pedigree meet desired bit size. avail affected null, function use corresponding Ped accessor.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_avail_noninform.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find uninformative but available subject — find_avail_noninform","text":"","code":"data(sampleped) ped <- Pedigree(sampleped) find_avail_noninform(ped) #> [1] \"1_101\" \"1_102\" \"1_107\" \"1_108\" \"1_111\" \"1_113\" \"1_121\" \"1_122\" \"1_123\" #> [10] \"1_131\" \"1_132\" \"1_134\" \"1_139\" \"2_205\" \"2_210\" \"2_213\""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_unavailable.html","id":null,"dir":"Reference","previous_headings":"","what":"Find unavailable subjects in a Pedigree — find_unavailable","title":"Find unavailable subjects in a Pedigree — find_unavailable","text":"Find identifiers subjects Pedigree iteratively, anyone available available descendant successively removing unavailable terminal nodes.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_unavailable.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find unavailable subjects in a Pedigree — find_unavailable","text":"","code":"# S4 method for class 'Ped' find_unavailable(obj, avail = NULL) # S4 method for class 'Pedigree' find_unavailable(obj, avail = NULL)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_unavailable.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find unavailable subjects in a Pedigree — find_unavailable","text":"obj Ped Pedigree object. avail logical vector availability status individuals (.e. FALSE = available, TRUE = available, NA = unknown).","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_unavailable.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find unavailable subjects in a Pedigree — find_unavailable","text":"Returns vector subject ids can removed.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_unavailable.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find unavailable subjects in a Pedigree — find_unavailable","text":"avail null, function use corresponding Ped accessor. Originally written pedTrim Steve Iturria, modified Dan Schaid 2007, now split two separate functions: find_unavailable(), trim() tasks separately. find_unavailable() calls exclude_stray_marryin() find stray available marry-ins isolated trimming unavailable offspring, exclude_unavail_founders(). subject ids character, make sure none characters ids colon (\":\"), special character used concatenate split subjects within utility. trim() functions now replaced subset() function.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_unavailable.html","id":"side-effects","dir":"Reference","previous_headings":"","what":"Side Effects","title":"Find unavailable subjects in a Pedigree — find_unavailable","text":"Relation matrix subsetting trimmed special relations include subjects trim.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/find_unavailable.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find unavailable subjects in a Pedigree — find_unavailable","text":"","code":"data(sampleped) ped1 <- Pedigree(sampleped[sampleped$famid == \"1\",]) find_unavailable(ped1) #> [1] \"1_101\" \"1_102\" \"1_107\" \"1_108\" \"1_111\" \"1_113\" \"1_121\" \"1_122\" \"1_123\" #> [10] \"1_131\" \"1_132\" \"1_134\" \"1_139\""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/findsibs.html","id":null,"dir":"Reference","previous_headings":"","what":"Find the siblings of a subject — findsibs","title":"Find the siblings of a subject — findsibs","text":"Find siblings subject","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/findsibs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find the siblings of a subject — findsibs","text":"","code":"findsibs(idpos, plist, lev)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/findsibs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find the siblings of a subject — findsibs","text":"idpos position subject plist alignment structure representing Pedigree layout. See align() details. lev generation level subject","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/findsibs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find the siblings of a subject — findsibs","text":"positions siblings","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/findsibs.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find the siblings of a subject — findsibs","text":"routine used auto_hint(). finds siblings subject.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/findspouse.html","id":null,"dir":"Reference","previous_headings":"","what":"Find the spouse of a subject — findspouse","title":"Find the spouse of a subject — findspouse","text":"Find spouse subject","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/findspouse.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find the spouse of a subject — findspouse","text":"","code":"findspouse(idpos, plist, lev, obj)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/findspouse.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find the spouse of a subject — findspouse","text":"idpos position subject plist alignment structure representing Pedigree layout. See align() details. lev generation level subject obj Pedigree object","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/findspouse.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find the spouse of a subject — findspouse","text":"position spouse","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/findspouse.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find the spouse of a subject — findspouse","text":"routine used auto_hint(). finds spouse subject.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/fix_parents.html","id":null,"dir":"Reference","previous_headings":"","what":"Fix parents relationship and gender — fix_parents","title":"Fix parents relationship and gender — fix_parents","text":"Fix sex parents, add parents missing data. Can used dataframe vector different individuals informations.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/fix_parents.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fix parents relationship and gender — fix_parents","text":"","code":"# S4 method for class 'character' fix_parents(obj, dadid, momid, sex, famid = NULL, missid = NA_character_) # S4 method for class 'data.frame' fix_parents(obj, del_parents = NULL, filter = NULL, missid = NA_character_)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/fix_parents.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fix parents relationship and gender — fix_parents","text":"obj data.frame vector individuals identifiers. dataframe given must contain columns id, dadid, momid, sex famid (optional). dadid vector containing subject, identifiers biologicals fathers. momid vector containing subject, identifiers biologicals mothers. sex character, factor numeric vector corresponding gender individuals. transformed ordered factor following levels: male < female < unknown < terminated following values recognized: character() factor() : \"f\", \"m\", \"woman\", \"man\", \"male\", \"female\", \"unknown\", \"terminated\" numeric() : 1 = \"male\", 2 = \"female\", 3 = \"unknown\", 4 = \"terminated\" famid character vector family identifiers individuals. provide, aggregated individuals identifiers separated underscore. missid character vector missing values identifiers. id, dadid momid corresponding values set NA_character_. del_parents Boolean defining missing parents needs deleted fixed. one one parent missing, removed, parents missing, removed. NULL parent removed missing parents added new rows. filter Filtering column containing 0 1 rows kept proceeding.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/fix_parents.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fix parents relationship and gender — fix_parents","text":"data.frame id, dadid, momid, sex columns relationships fixed.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/fix_parents.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fix parents relationship and gender — fix_parents","text":"First look add parents whose ids given momid/dadid. Second, fix sex parents. Last look add second parent children one parent id given. famid vector given family id added ids individuals (id, dadid, momid) separated underscore proceeding.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/fix_parents.html","id":"special-case-for-dataframe","dir":"Reference","previous_headings":"","what":"Special case for dataframe","title":"Fix parents relationship and gender — fix_parents","text":"Check presence parents id id field. presence behaviour depend delete parameter TRUE use fix_parents function merge back fields dataframe set availability O non available parents. FALSE delete id missing parents","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/fix_parents.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Fix parents relationship and gender — fix_parents","text":"Jason Sinnwell","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/fix_parents.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fix parents relationship and gender — fix_parents","text":"","code":"test1char <- data.frame( id = paste('fam', 101:111, sep = ''), sex = c('male', 'female')[c(1, 2, 1, 2, 1, 1, 2, 2, 1, 2, 1)], father = c( 0, 0, 'fam101', 'fam101', 'fam101', 0, 0, 'fam106', 'fam106', 'fam106', 'fam109' ), mother = c( 0, 0, 'fam102', 'fam102', 'fam102', 0, 0, 'fam107', 'fam107', 'fam107', 'fam112' ) ) test1newmom <- with(test1char, fix_parents(id, father, mother, sex, missid = NA_character_ )) Pedigree(test1newmom) #> Warning: The Pedigree informations are not valid. Here is the normalised Pedigree informations with the identified problems #> indId motherId fatherId gender family sex steril status avail id #> 1 fam101 0 0 1 1 male NA NA NA 1_fam101 #> 2 fam102 0 0 2 1 female NA NA NA 1_fam102 #> 3 fam103 fam102 fam101 1 1 male NA NA NA 1_fam103 #> 4 fam104 fam102 fam101 2 1 female NA NA NA 1_fam104 #> 5 fam105 fam102 fam101 1 1 male NA NA NA 1_fam105 #> 6 fam106 0 0 1 1 male NA NA NA 1_fam106 #> 7 fam107 0 0 2 1 female NA NA NA 1_fam107 #> 8 fam108 fam107 fam106 2 1 female NA NA NA 1_fam108 #> 9 fam109 fam107 fam106 1 1 male NA NA NA 1_fam109 #> 10 fam110 fam107 fam106 2 1 female NA NA NA 1_fam110 #> 11 fam111 fam112 fam109 1 1 male NA NA NA 1_fam111 #> 12 0 1 1 female NA NA NA 1_0 #> 13 0 2 female NA NA NA 0 #> 14 fam112 2 1 female NA NA NA 1_fam112 #> dadid momid famid error affected #> 1 1_0 1_0 1 NA #> 2 1_0 1_0 1 NA #> 3 1_fam101 1_fam102 1 NA #> 4 1_fam101 1_fam102 1 NA #> 5 1_fam101 1_fam102 1 NA #> 6 1_0 1_0 1 NA #> 7 1_0 1_0 1 NA #> 8 1_fam106 1_fam107 1 NA #> 9 1_fam106 1_fam107 1 NA #> 10 1_fam106 1_fam107 1 NA #> 11 1_fam109 1_fam112 1 NA #> 12 1 isMotherAndFather_isFatherButNotMale NA #> 13 NA #> 14 1 NA #> available sterilisation vitalStatus affection #> 1 NA NA NA NA #> 2 NA NA NA NA #> 3 NA NA NA NA #> 4 NA NA NA NA #> 5 NA NA NA NA #> 6 NA NA NA NA #> 7 NA NA NA NA #> 8 NA NA NA NA #> 9 NA NA NA NA #> 10 NA NA NA NA #> 11 NA NA NA NA #> 12 NA NA NA NA #> 13 NA NA NA NA #> 14 NA NA NA NA"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_aff_inds.html","id":null,"dir":"Reference","previous_headings":"","what":"Process the affection informations — generate_aff_inds","title":"Process the affection informations — generate_aff_inds","text":"Perform transformation uppon vector given one containing affection status obtain affected binary state.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_aff_inds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Process the affection informations — generate_aff_inds","text":"","code":"generate_aff_inds( values, mods_aff = NULL, threshold = NULL, sup_thres_aff = NULL, is_num = NULL )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_aff_inds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Process the affection informations — generate_aff_inds","text":"values Vector containing values column process. mods_aff Vector modality consider affected case values factor. threshold Numeric value separating affected healthy subject case values numeric. sup_thres_aff Boolean defining affected individual threshold . TRUE, individuals considered affected value values stricly threshold. FALSE, individuals considered affected value stricly threshold. is_num Boolean defining values need considered numeric.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_aff_inds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Process the affection informations — generate_aff_inds","text":"dataframe affected column processed accordingly. different columns : mods: different modalities column labels: labels different modalities affected: column processed TRUE/FALSE values","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_aff_inds.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Process the affection informations — generate_aff_inds","text":"function helps configure binary state character numeric variable.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_aff_inds.html","id":"if-the-variable-is-a-character-or-a-factor-","dir":"Reference","previous_headings":"","what":"If the variable is a character or a factor:","title":"Process the affection informations — generate_aff_inds","text":"case affected state depend modality provided affected status. individuals value corresponding one element vector mods_aff considered affected.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_aff_inds.html","id":"if-the-variable-is-numeric-","dir":"Reference","previous_headings":"","what":"If the variable is numeric:","title":"Process the affection informations — generate_aff_inds","text":"case affected state TRUE value individual threshold sup_thres_aff TRUE FALSE otherwise.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_aff_inds.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Process the affection informations — generate_aff_inds","text":"Louis Le Nézet","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_aff_inds.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Process the affection informations — generate_aff_inds","text":"","code":"generate_aff_inds(c(1, 2, 3, 4, 5), threshold = 3, sup_thres_aff = TRUE) #> mods labels affected #> 1 0 Healthy <= to 3 FALSE #> 2 0 Healthy <= to 3 FALSE #> 3 0 Healthy <= to 3 FALSE #> 4 1 Affected > to 3 TRUE #> 5 1 Affected > to 3 TRUE generate_aff_inds(c(\"A\", \"B\", \"C\", \"A\", \"V\", \"B\"), mods_aff = c(\"A\", \"B\")) #> mods labels affected #> 1 1 Affected are A / B TRUE #> 2 1 Affected are A / B TRUE #> 3 0 Healthy are C / V FALSE #> 4 1 Affected are A / B TRUE #> 5 0 Healthy are C / V FALSE #> 6 1 Affected are A / B TRUE"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_border.html","id":null,"dir":"Reference","previous_headings":"","what":"Process the border colors based on availability — generate_border","title":"Process the border colors based on availability — generate_border","text":"Perform transformation uppon vector given one containing availability status compute border color. vector given transformed using vect_to_binary() function.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_border.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Process the border colors based on availability — generate_border","text":"","code":"generate_border(values, colors_avail = c(\"green\", \"black\"), colors_na = \"grey\")"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_border.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Process the border colors based on availability — generate_border","text":"values vector containing values process available. colors_avail Set 2 colors use box's border individual. first color used available individual (avail == 1) second unavailable individual (avail == 0). colors_na Color use individuals informations.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_border.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Process the border colors based on availability — generate_border","text":"list three elements mods : processed values column numeric factor avail : logical vector indicating individual available sc_bord : dataframe containing description modality scale","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_border.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Process the border colors based on availability — generate_border","text":"","code":"generate_border(c(1, 0, 1, 0, NA, 1, 0, 1, 0, NA)) #> $mods #> [1] 1 0 1 0 NA 1 0 1 0 NA #> #> $avail #> [1] TRUE FALSE TRUE FALSE NA TRUE FALSE TRUE FALSE NA #> #> $sc_bord #> column mods border labels #> 1 avail NA grey NA #> 2 avail 1 green Available #> 3 avail 0 black Non Available #>"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_colors.html","id":null,"dir":"Reference","previous_headings":"","what":"Process the filling and border colors based on affection and availability — generate_colors","title":"Process the filling and border colors based on affection and availability — generate_colors","text":"Perform transformation uppon dataframe given compute colors filling border individuals based affection availability status.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_colors.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Process the filling and border colors based on affection and availability — generate_colors","text":"","code":"# S4 method for class 'character' generate_colors( obj, avail, mods_aff = NULL, is_num = FALSE, keep_full_scale = FALSE, colors_aff = c(\"yellow2\", \"red\"), colors_unaff = c(\"white\", \"steelblue4\"), colors_avail = c(\"green\", \"black\"), colors_na = \"grey\" ) # S4 method for class 'numeric' generate_colors( obj, avail, threshold = 0.5, sup_thres_aff = TRUE, is_num = TRUE, keep_full_scale = FALSE, breaks = 3, colors_aff = c(\"yellow2\", \"red\"), colors_unaff = c(\"white\", \"steelblue4\"), colors_avail = c(\"green\", \"black\"), colors_na = \"grey\" ) # S4 method for class 'Pedigree' generate_colors( obj, col_aff = \"affected\", add_to_scale = TRUE, col_avail = \"avail\", is_num = NULL, mods_aff = NULL, threshold = 0.5, sup_thres_aff = TRUE, keep_full_scale = FALSE, breaks = 3, colors_aff = c(\"yellow2\", \"red\"), colors_unaff = c(\"white\", \"steelblue4\"), colors_avail = c(\"green\", \"black\"), colors_na = \"grey\", reset = TRUE )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_colors.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Process the filling and border colors based on affection and availability — generate_colors","text":"obj Pedigree object vector containing affection status individuals. affection status can numeric character. avail logical vector availability status individuals (.e. FALSE = available, TRUE = available, NA = unknown). mods_aff Vector modality consider affected case values factor. is_num Boolean defining values need considered numeric. keep_full_scale Boolean defining affection values need set scale. values numeric filling scale calculated based values number breaks given. values numeric levels get color colors_aff Set increasing colors use filling affected individuls. colors_unaff Set increasing colors use filling unaffected individuls. colors_avail Set 2 colors use box's border individual. first color used available individual (avail == 1) second unavailable individual (avail == 0). colors_na Color use individuals informations. threshold Numeric value separating affected healthy subject case values numeric. sup_thres_aff Boolean defining affected individual threshold . TRUE, individuals considered affected value values stricly threshold. FALSE, individuals considered affected value stricly threshold. breaks Number breaks use using full scale numeric values. number breaks done values affected individuals unaffected individuals. col_aff character vector name column used affection status. add_to_scale Boolean defining scales need added existing scales need replace existing scales. col_avail character vector name column used availability status. reset TRUE scale specified column reset already present.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_colors.html","id":"when-used-with-a-vector","dir":"Reference","previous_headings":"","what":"When used with a vector","title":"Process the filling and border colors based on affection and availability — generate_colors","text":"list two elements list containing filling colors processed description list containing border colors processed description","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_colors.html","id":"when-used-with-a-pedigree-object","dir":"Reference","previous_headings":"","what":"When used with a Pedigree object","title":"Process the filling and border colors based on affection and availability — generate_colors","text":"Pedigree object affected avail columns processed accordingly well scales slot updated.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_colors.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Process the filling and border colors based on affection and availability — generate_colors","text":"colors set using generate_fill()] generate_border() functions respectively filling border.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_colors.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Process the filling and border colors based on affection and availability — generate_colors","text":"","code":"generate_colors( c(\"A\", \"B\", \"A\", \"B\", NA, \"A\", \"B\", \"A\", \"B\", NA), c(1, 0, 1, 0, NA, 1, 0, 1, 0, NA), mods_aff = \"A\" ) #> $fill #> $fill$mods #> [1] 1 0 1 0 NA 1 0 1 0 NA #> #> $fill$affected #> [1] TRUE FALSE TRUE FALSE NA TRUE FALSE TRUE FALSE NA #> #> $fill$sc_fill #> mods labels affected fill density angle #> 1 1 Affected are A TRUE red NA NA #> 2 0 Healthy are B FALSE white NA NA #> 5 NA NA grey NA NA #> #> #> $bord #> $bord$mods #> [1] 1 0 1 0 NA 1 0 1 0 NA #> #> $bord$avail #> [1] TRUE FALSE TRUE FALSE NA TRUE FALSE TRUE FALSE NA #> #> $bord$sc_bord #> column mods border labels #> 1 avail NA grey NA #> 2 avail 1 green Available #> 3 avail 0 black Non Available #> #> generate_colors( c(10, 0, 5, 7, NA, 6, 2, 1, 3, NA), c(1, 0, 1, 0, NA, 1, 0, 1, 0, NA), threshold = 3, keep_full_scale = TRUE ) #> $fill #> $fill$mods #> [1] 6 1 4 5 NA 4 2 1 3 NA #> #> $fill$affected #> [1] TRUE FALSE TRUE TRUE NA TRUE FALSE FALSE FALSE NA #> #> $fill$sc_fill #> mods labels affected fill density angle #> 1 6 Affected > to 3 : (8.33,10] TRUE #FF0000 NA NA #> 2 1 Healthy <= to 3 : [-0.003,1] FALSE #FFFFFF NA NA #> 3 4 Affected > to 3 : [5,6.67] TRUE #EEEE00 NA NA #> 4 5 Affected > to 3 : (6.67,8.33] TRUE #F67700 NA NA #> 5 NA NA : NA NA grey NA NA #> 7 2 Healthy <= to 3 : (1,2] FALSE #9AB1C4 NA NA #> 9 3 Healthy <= to 3 : (2,3] FALSE #36648B NA NA #> #> #> $bord #> $bord$mods #> [1] 1 0 1 0 NA 1 0 1 0 NA #> #> $bord$avail #> [1] TRUE FALSE TRUE FALSE NA TRUE FALSE TRUE FALSE NA #> #> $bord$sc_bord #> column mods border labels #> 1 avail NA grey NA #> 2 avail 1 green Available #> 3 avail 0 black Non Available #> #> data(\"sampleped\") ped <- Pedigree(sampleped) ped <- generate_colors(ped, \"affected\", add_to_scale=FALSE) scales(ped) #> An object of class \"Scales\" #> Slot \"fill\": #> order column_values column_mods mods labels affected #> 1 1 affected affected_mods 0 Healthy are FALSE / TRUE FALSE #> 2 1 affected affected_mods NA NA #> fill density angle #> 1 white NA NA #> 2 grey NA NA #> #> Slot \"border\": #> column_values column_mods mods labels border #> 1 avail avail_mods NA NA grey #> 2 avail avail_mods 1 Available green #> 3 avail avail_mods 0 Non Available black #>"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_fill.html","id":null,"dir":"Reference","previous_headings":"","what":"Process the filling colors based on affection — generate_fill","title":"Process the filling colors based on affection — generate_fill","text":"Perform transformation uppon column given one containing affection status compute filling color.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_fill.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Process the filling colors based on affection — generate_fill","text":"","code":"generate_fill( values, affected, labels, is_num = NULL, keep_full_scale = FALSE, breaks = 3, colors_aff = c(\"yellow2\", \"red\"), colors_unaff = c(\"white\", \"steelblue4\"), colors_na = \"grey\" )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_fill.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Process the filling colors based on affection — generate_fill","text":"values vector containing values process affection. affected logical vector affection status individuals (.e. FALSE = unaffected, TRUE = affected, NA = unknown). labels vector containing labels use affection. is_num Boolean defining values need considered numeric. keep_full_scale Boolean defining affection values need set scale. values numeric filling scale calculated based values number breaks given. values numeric levels get color breaks Number breaks use using full scale numeric values. number breaks done values affected individuals unaffected individuals. colors_aff Set increasing colors use filling affected individuls. colors_unaff Set increasing colors use filling unaffected individuls. colors_na Color use individuals informations.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_fill.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Process the filling colors based on affection — generate_fill","text":"list three elements mods : processed values column numeric factor affected : logical vector indicating individual affected sc_fill : dataframe containing description modality scale","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_fill.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Process the filling colors based on affection — generate_fill","text":"colors set using grDevices::colorRampPalette() function colors given parameters. colors set follow: keep_full_scale FALSE: affected individuals get first color colors_aff vector unaffected individuals get first color colors_unaff vector. keep_full_scale TRUE: values numeric: levels affected values vector get color colors_aff vector using grDevices::colorRampPalette() done unaffected individuals using colors_unaff. values numeric: mean affected individuals compared mean unaffected individuals colors set color gradient follow direction affection.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/generate_fill.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Process the filling colors based on affection — generate_fill","text":"","code":"aff <- generate_aff_inds(seq_len(5), threshold = 3, sup_thres_aff = TRUE) generate_fill(seq_len(5), aff$affected, aff$labels) #> $mods #> [1] 0 0 0 1 1 #> #> $affected #> [1] FALSE FALSE FALSE TRUE TRUE #> #> $sc_fill #> mods labels affected fill density angle #> 1 0 Healthy <= to 3 FALSE white NA NA #> 4 1 Affected > to 3 TRUE red NA NA #> generate_fill(seq_len(5), aff$affected, aff$labels, keep_full_scale = TRUE) #> $mods #> [1] 1 2 3 4 6 #> #> $affected #> [1] FALSE FALSE FALSE TRUE TRUE #> #> $sc_fill #> mods labels affected fill density angle #> 1 1 Healthy <= to 3 : [0.998,1.67] FALSE #FFFFFF NA NA #> 2 2 Healthy <= to 3 : (1.67,2.33] FALSE #9AB1C4 NA NA #> 3 3 Healthy <= to 3 : (2.33,3] FALSE #36648B NA NA #> 4 4 Affected > to 3 : [4,4.33] TRUE #EEEE00 NA NA #> 5 6 Affected > to 3 : (4.67,5] TRUE #FF0000 NA NA #>"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_dataframe.html","id":null,"dir":"Reference","previous_headings":"","what":"Get dataframe name — get_dataframe","title":"Get dataframe name — get_dataframe","text":"Extract name different dataframe present file","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_dataframe.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get dataframe name — get_dataframe","text":"","code":"get_dataframe(file)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_dataframe.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get dataframe name — get_dataframe","text":"file file path","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_dataframe.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get dataframe name — get_dataframe","text":"vector dataframe name present.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_dataframe.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get dataframe name — get_dataframe","text":"function detect extension file extract necessary different dataframe / sheet names available.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_dataframe.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get dataframe name — get_dataframe","text":"","code":"if (FALSE) { # \\dontrun{ get_dataframe('path/to/my/file.txt') } # }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_famid.html","id":null,"dir":"Reference","previous_headings":"","what":"Get family id — get_famid","title":"Get family id — get_famid","text":"Get family id ftom individuals identifiers.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_famid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get family id — get_famid","text":"","code":"get_famid(obj) # S4 method for class 'character' get_famid(obj)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_famid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get family id — get_famid","text":"obj character vector individual ids","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_famid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get family id — get_famid","text":"character vector family ids","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_famid.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get family id — get_famid","text":"family id first part individual id, separated underscore. individual id contain underscore, family id set NA.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_famid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get family id — get_famid","text":"","code":"get_famid(c(\"A\", \"1_B\", \"C_2\", \"D_\", \"_E\", \"F\")) #> [1] NA \"1\" \"C\" \"D\" NA NA"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_families_table.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarise the families information for a given variable in a data frame — get_families_table","title":"Summarise the families information for a given variable in a data frame — get_families_table","text":"function summarises families information given variable data frame. returns numerous modality family number individuals family.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_families_table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarise the families information for a given variable in a data frame — get_families_table","text":"","code":"get_families_table(df, var)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_families_table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarise the families information for a given variable in a data frame — get_families_table","text":"df data frame var variable summarise","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_families_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summarise the families information for a given variable in a data frame — get_families_table","text":"data frame family information","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_families_table.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summarise the families information for a given variable in a data frame — get_families_table","text":"","code":"df <- data.frame( famid = c(1, 1, 2, 2, 3, 3), health = c(\"A\", \"B\", \"A\", \"A\", \"B\", \"B\") ) get_families_table(df, \"health\") #> # A tibble: 3 × 3 #> famid `Major mod` `Nb Ind` #> #> 1 1 A 2 #> 2 2 A 2 #> 3 3 B 2"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_title.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the title of the family information table — get_title","title":"Get the title of the family information table — get_title","text":"function generates title family information table depending selected family subfamily parameters.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_title.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the title of the family information table — get_title","text":"","code":"get_title( family_sel, subfamily_sel, family_var, mod, inf_selected, kin_max, keep_parents, nb_rows, short_title = FALSE )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_title.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the title of the family information table — get_title","text":"family_sel selected family subfamily_sel selected subfamily family_var selected family variable mod selected affected modality inf_selected selected informative individuals kin_max maximum kinship keep_parents keep parents option nb_rows number individuals short_title boolean generate short title","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_title.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the title of the family information table — get_title","text":"string title","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_title.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the title of the family information table — get_title","text":"","code":"get_title(1, 1, \"health\", \"A\", \"All\", 3, TRUE, 10, FALSE) #> [1] \"Pedigree trimmed of family N*1 sub-family N*1 (N=10) from All individuals.\" get_title(1, 1, \"health\", \"A\", \"All\", 3, TRUE, 10, TRUE) #> [1] \"Ped_F1_K3_T_IAll_SF1\" get_title(1, 1, \"health\", \"A\", \"All\", 3, FALSE, 10, FALSE) #> [1] \"Pedigree of family N*1 sub-family N*1 (N=10) from All individuals.\""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_twin_rel.html","id":null,"dir":"Reference","previous_headings":"","what":"Get twin relationships — get_twin_rel","title":"Get twin relationships — get_twin_rel","text":"Get twin relationships","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_twin_rel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get twin relationships — get_twin_rel","text":"","code":"get_twin_rel(obj)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_twin_rel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get twin relationships — get_twin_rel","text":"obj Pedigree object","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_twin_rel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get twin relationships — get_twin_rel","text":"list containing components twinset set twins twinrel twins relationships twinord order twins","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/get_twin_rel.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get twin relationships — get_twin_rel","text":"routine function determine twin relationships Pedigree. determine order twins Pedigree. used auto_hint().","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/health_sel.html","id":null,"dir":"Reference","previous_headings":"","what":"Shiny module to select a health variable in a pedigree — health_sel_ui","title":"Shiny module to select a health variable in a pedigree — health_sel_ui","text":"module allows select health variables pedigree object. function composed two parts: UI server. UI called function health_sel_ui() server function health_sel_server().","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/health_sel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shiny module to select a health variable in a pedigree — health_sel_ui","text":"","code":"health_sel_ui(id) health_sel_server( id, pedi, var = NULL, as_num = NULL, mods_aff = NULL, threshold = NULL, sup_threshold = NULL ) health_sel_demo()"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/health_sel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shiny module to select a health variable in a pedigree — health_sel_ui","text":"id string identify module. pedi reactive pedigree object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/health_sel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Shiny module to select a health variable in a pedigree — health_sel_ui","text":"reactive list following informations:actions-box health_var: selected health variable, to_num: boolean know health variable needs considered numeric, mods_aff: character vector affected modalities, threshold: numeric threshold determine affected individuals, sup_threshold: boolean know affected individuals strickly superior threshold.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/health_sel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Shiny module to select a health variable in a pedigree — health_sel_ui","text":"","code":"if (interactive()) { health_sel_demo() }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ibd_matrix.html","id":null,"dir":"Reference","previous_headings":"","what":"IBD matrix — ibd_matrix","title":"IBD matrix — ibd_matrix","text":"Transform identity descent (IBD) matrix data form produced external programs SOLAR compact form used coxme lmekin routines.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ibd_matrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"IBD matrix — ibd_matrix","text":"","code":"ibd_matrix(id1, id2, ibd, idmap, diagonal)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ibd_matrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"IBD matrix — ibd_matrix","text":"id1 character vector id first individuals pairs matrix data frame 3 columns: id1, id2, ibd id2 character vector id second individuals pairs ibd IBD value pair idmap optional 2 column matrix data frame whose first element internal value (found id1 id2, whose second element used dimnames result diagonal optional value diagonal element. present, missing diagonal elements input data set value.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ibd_matrix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"IBD matrix — ibd_matrix","text":"sparse matrix class dsCMatrix. form used kinship matrices.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ibd_matrix.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"IBD matrix — ibd_matrix","text":"IBD matrix set n subjects n n symmetric matrix whose ,j element contains, given genetic location, 0/1 indicator whether 0, 1/2 2/2 alleles j identical descent. Fractional values occur IBD fraction must imputed. diagonal 1. Since large fraction values zero, programs Solar return data set containing non-zero elements. well, Solar renumbered subjects seq_len(n) way families grouped together matrix; separate index file contains mapping new id original one. final matrix labeled original identifiers.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ibd_matrix.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"IBD matrix — ibd_matrix","text":"","code":"df <- data.frame( id1 = c(\"1\", \"2\", \"1\"), id2 = c(\"2\", \"3\", \"4\"), ibd = c(0.5, 0.16, 0.27) ) ibd_matrix(df$id1, df$id2, df$ibd, diagonal = 2) #> 4 x 4 sparse Matrix of class \"dsCMatrix\" #> 1 2 3 4 #> 1 2.00 0.50 . 0.27 #> 2 0.50 2.00 0.16 . #> 3 . 0.16 2.00 . #> 4 0.27 . . 2.00"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/inf_sel.html","id":null,"dir":"Reference","previous_headings":"","what":"Shiny module to select the informative individuals in a pedigree — inf_sel_ui","title":"Shiny module to select the informative individuals in a pedigree — inf_sel_ui","text":"module allows select informative individuals pedigree object. used subset pedigree object function useful_inds(). filtering options available (max kinship keep parents). function composed two parts: UI server. UI called function inf_sel_ui() server function inf_sel_server().","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/inf_sel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shiny module to select the informative individuals in a pedigree — inf_sel_ui","text":"","code":"inf_sel_ui(id) inf_sel_server(id, pedi) inf_sel_demo(pedi)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/inf_sel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shiny module to select the informative individuals in a pedigree — inf_sel_ui","text":"id string identify module. pedi reactive pedigree object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/inf_sel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Shiny module to select the informative individuals in a pedigree — inf_sel_ui","text":"reactive pedigree object subselected informative individuals.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/inf_sel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Shiny module to select the informative individuals in a pedigree — inf_sel_ui","text":"","code":"if (interactive()) { data(\"sampleped\") pedi <- shiny::reactive({ Pedigree(sampleped[sampleped$famid == \"1\", ]) }) inf_sel_demo(pedi) }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_disconnected.html","id":null,"dir":"Reference","previous_headings":"","what":"Are individuals disconnected — is_disconnected","title":"Are individuals disconnected — is_disconnected","text":"Check individuals disconnected.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_disconnected.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Are individuals disconnected — is_disconnected","text":"","code":"is_disconnected(id, dadid, momid)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_disconnected.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Are individuals disconnected — is_disconnected","text":"dadid vector containing subject, identifiers biologicals fathers. momid vector containing subject, identifiers biologicals mothers.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_disconnected.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Are individuals disconnected — is_disconnected","text":"vector boolean size id TRUE individual disconnected FALSE otherwise","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_disconnected.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Are individuals disconnected — is_disconnected","text":"individuals considered disconnected kinship individuals 0.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_disconnected.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Are individuals disconnected — is_disconnected","text":"","code":"is_disconnected( c(\"1\", \"2\", \"3\", \"4\", \"5\"), c(\"3\", \"3\", NA, NA, NA), c(\"4\", \"4\", NA, NA, NA) ) #> 1 2 3 4 5 #> FALSE FALSE FALSE FALSE TRUE"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_founder.html","id":null,"dir":"Reference","previous_headings":"","what":"Are individuals founders — is_founder","title":"Are individuals founders — is_founder","text":"Check individuals founders.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_founder.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Are individuals founders — is_founder","text":"","code":"is_founder(momid, dadid, missid = NA_character_)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_founder.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Are individuals founders — is_founder","text":"momid vector containing subject, identifiers biologicals mothers. dadid vector containing subject, identifiers biologicals fathers. missid character vector missing values identifiers. id, dadid momid corresponding values set NA_character_.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_founder.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Are individuals founders — is_founder","text":"vector boolean size dadid momid TRUE individual parents (.e founder) FALSE otherwise.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_founder.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Are individuals founders — is_founder","text":"","code":"is_founder(c(\"3\", \"3\", NA, NA), c(\"4\", \"4\", NA, NA)) #> [1] FALSE FALSE TRUE TRUE"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_informative.html","id":null,"dir":"Reference","previous_headings":"","what":"Find informative individuals — is_informative","title":"Find informative individuals — is_informative","text":"Select ids informative individuals.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_informative.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find informative individuals — is_informative","text":"","code":"# S4 method for class 'character_OR_integer' is_informative(obj, avail, affected, informative = \"AvAf\") # S4 method for class 'Ped' is_informative(obj, informative = \"AvAf\", reset = FALSE) # S4 method for class 'Pedigree' is_informative(obj, col_aff = NULL, informative = \"AvAf\", reset = FALSE)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_informative.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find informative individuals — is_informative","text":"obj character vector id individuals data.frame informations corresponding columns. avail logical vector availability status individuals (.e. FALSE = available, TRUE = available, NA = unknown). affected logical vector affection status individuals (.e. FALSE = unaffected, TRUE = affected, NA = unknown). informative Informative individuals selection can take 5 values: 'AvAf' (available affected), 'AvOrAf' (available affected), 'Av' (available ), 'Af' (affected ), '' (individuals) numeric/character vector individuals id boolean reset TRUE, isinf slot reset col_aff character vector name column used affection status.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_informative.html","id":"when-obj-is-a-vector","dir":"Reference","previous_headings":"","what":"When obj is a vector","title":"Find informative individuals — is_informative","text":"vector individuals informative identifiers.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_informative.html","id":"when-obj-is-a-pedigree","dir":"Reference","previous_headings":"","what":"When obj is a Pedigree","title":"Find informative individuals — is_informative","text":"Pedigree object isinf slot updated.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_informative.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find informative individuals — is_informative","text":"Depending informative parameter, function extract ids informative individuals. case numeric vector, function return vector. case boolean, function return ids individuals TRUE, NA otherwise. case string, function return ids corresponding informative individuals based avail affected columns.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_informative.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find informative individuals — is_informative","text":"","code":"is_informative(c(\"A\", \"B\", \"C\", \"D\", \"E\"), informative = c(\"A\", \"B\")) #> [1] \"A\" \"B\" is_informative(c(\"A\", \"B\", \"C\", \"D\", \"E\"), informative = c(1, 2)) #> [1] \"A\" \"B\" is_informative(c(\"A\", \"B\", \"C\", \"D\", \"E\"), informative = c(\"A\", \"B\")) #> [1] \"A\" \"B\" is_informative(c(\"A\", \"B\", \"C\", \"D\", \"E\"), avail = c(1, 0, 0, 1, 1), affected = c(0, 1, 0, 1, 1), informative = \"AvAf\") #> [1] \"D\" \"E\" is_informative(c(\"A\", \"B\", \"C\", \"D\", \"E\"), avail = c(1, 0, 0, 1, 1), affected = c(0, 1, 0, 1, 1), informative = \"AvOrAf\") #> [1] \"A\" \"B\" \"D\" \"E\" is_informative(c(\"A\", \"B\", \"C\", \"D\", \"E\"), informative = c(TRUE, FALSE, TRUE, FALSE, TRUE)) #> [1] \"A\" \"C\" \"E\" data(\"sampleped\") ped <- Pedigree(sampleped) ped <- is_informative(ped, col_aff = \"affection_mods\") isinf(ped(ped)) #> [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE #> [13] FALSE FALSE FALSE TRUE FALSE TRUE TRUE FALSE FALSE FALSE FALSE TRUE #> [25] FALSE FALSE TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #> [37] FALSE FALSE FALSE FALSE FALSE TRUE FALSE TRUE FALSE FALSE TRUE TRUE #> [49] FALSE FALSE FALSE FALSE FALSE FALSE TRUE data(\"sampleped\") ped <- Pedigree(sampleped) ped <- is_informative(ped, col_aff = \"affection_mods\") isinf(ped(ped)) #> [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE #> [13] FALSE FALSE FALSE TRUE FALSE TRUE TRUE FALSE FALSE FALSE FALSE TRUE #> [25] FALSE FALSE TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #> [37] FALSE FALSE FALSE FALSE FALSE TRUE FALSE TRUE FALSE FALSE TRUE TRUE #> [49] FALSE FALSE FALSE FALSE FALSE FALSE TRUE"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_parent.html","id":null,"dir":"Reference","previous_headings":"","what":"Are individuals parents — is_parent","title":"Are individuals parents — is_parent","text":"Check individuals parents.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_parent.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Are individuals parents — is_parent","text":"","code":"# S4 method for class 'character_OR_integer' is_parent(obj, dadid, momid, missid = NA_character_) # S4 method for class 'Ped' is_parent(obj, missid = NA_character_)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_parent.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Are individuals parents — is_parent","text":"obj vector subjects identifiers Ped object dadid vector containing subject, identifiers biologicals fathers. momid vector containing subject, identifiers biologicals mothers. missid character vector missing values identifiers. id, dadid momid corresponding values set NA_character_.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_parent.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Are individuals parents — is_parent","text":"vector boolean size obj TRUE individual parent FALSE otherwise","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_parent.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Are individuals parents — is_parent","text":"","code":"is_parent(c(\"1\", \"2\", \"3\", \"4\"), c(\"3\", \"3\", NA, NA), c(\"4\", \"4\", NA, NA)) #> [1] FALSE FALSE TRUE TRUE data(sampleped) ped <- Pedigree(sampleped) is_parent(ped(ped)) #> [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE TRUE #> [13] FALSE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE FALSE FALSE FALSE #> [25] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE TRUE #> [37] TRUE TRUE FALSE FALSE FALSE TRUE TRUE TRUE TRUE FALSE FALSE FALSE #> [49] TRUE TRUE FALSE FALSE FALSE FALSE FALSE"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_hints.html","id":null,"dir":"Reference","previous_headings":"","what":"Check if a Hints object is valid — is_valid_hints","title":"Check if a Hints object is valid — is_valid_hints","text":"Check horder spouse slots valid: horder named numeric vector spouse data.frame three idr, idl, anchor columns idr idl different contains NA idr idl couple unique anchor column right, left either values ids spouse needs names horder vector","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_hints.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if a Hints object is valid — is_valid_hints","text":"","code":"is_valid_hints(object)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_hints.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if a Hints object is valid — is_valid_hints","text":"object Hints object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_hints.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check if a Hints object is valid — is_valid_hints","text":"character vector errors TRUE errors.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_ped.html","id":null,"dir":"Reference","previous_headings":"","what":"Check if a Ped object is valid — is_valid_ped","title":"Check if a Ped object is valid — is_valid_ped","text":"Multiple checks done ","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_ped.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if a Ped object is valid — is_valid_ped","text":"","code":"is_valid_ped(object)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_ped.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if a Ped object is valid — is_valid_ped","text":"object Ped object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_ped.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check if a Ped object is valid — is_valid_ped","text":"character vector errors TRUE errors.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_ped.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Check if a Ped object is valid — is_valid_ped","text":"Check ped ids slots right values Check sex, steril, status, avail affected slots right values Check dad male mom female Check individuals parents none","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_pedigree.html","id":null,"dir":"Reference","previous_headings":"","what":"Check if a Pedigree object is valid — is_valid_pedigree","title":"Check if a Pedigree object is valid — is_valid_pedigree","text":"Multiple checks done ","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_pedigree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if a Pedigree object is valid — is_valid_pedigree","text":"","code":"is_valid_pedigree(object)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_pedigree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if a Pedigree object is valid — is_valid_pedigree","text":"object Ped object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_pedigree.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check if a Pedigree object is valid — is_valid_pedigree","text":"character vector errors TRUE errors.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_pedigree.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Check if a Pedigree object is valid — is_valid_pedigree","text":"Check Rel id Ped object Check twins parents Check MZ twins sex Check columns used scales Ped object Check fill & border modalities Ped object column Check id used Hints object Ped object Check spouse Hints object male / female","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_rel.html","id":null,"dir":"Reference","previous_headings":"","what":"Check if a Rel object is valid — is_valid_rel","title":"Check if a Rel object is valid — is_valid_rel","text":"Multiple checks done ","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_rel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if a Rel object is valid — is_valid_rel","text":"","code":"is_valid_rel(object)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_rel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if a Rel object is valid — is_valid_rel","text":"object Ped object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_rel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check if a Rel object is valid — is_valid_rel","text":"character vector errors TRUE errors.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_rel.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Check if a Rel object is valid — is_valid_rel","text":"Check \"id1\", \"id2\", \"code\", \"famid\" slots exist Check \"code\" slots right values (.e. \"MZ twin\", \"DZ twin\", \"UZ twin\", \"Spouse\") Check \"id1\" different \"id2\" Check \"id1\" smaller \"id2\" Check duplicate relation present","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_scales.html","id":null,"dir":"Reference","previous_headings":"","what":"Check if a Scales object is valid — is_valid_scales","title":"Check if a Scales object is valid — is_valid_scales","text":"Check fill border slots valid: fill slot data.frame \"order\", \"column_values\", \"column_mods\", \"mods\", \"labels\", \"affected\", \"fill\", \"density\", \"angle\" columns. \"affected\" logical. \"density\", \"angle\", \"order\", \"mods\" numeric. \"column_values\", \"column_mods\", \"labels\", \"fill\" character. border slot data.frame \"column_values\", \"column_mods\", \"mods\", \"labels\", \"border\" columns. \"column_values\", \"column_mods\", \"labels\", \"border\" character. \"mods\" numeric.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_scales.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if a Scales object is valid — is_valid_scales","text":"","code":"is_valid_scales(object)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_scales.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if a Scales object is valid — is_valid_scales","text":"object Scales object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/is_valid_scales.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check if a Scales object is valid — is_valid_scales","text":"character vector errors TRUE errors.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/kindepth.html","id":null,"dir":"Reference","previous_headings":"","what":"Individual's depth in a pedigree — kindepth","title":"Individual's depth in a pedigree — kindepth","text":"Computes depth subject Pedigree.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/kindepth.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Individual's depth in a pedigree — kindepth","text":"","code":"# S4 method for class 'character_OR_integer' kindepth(obj, dadid, momid, align_parents = FALSE, force = FALSE) # S4 method for class 'Pedigree' kindepth(obj, align_parents = FALSE, force = FALSE) # S4 method for class 'Ped' kindepth(obj, align_parents = FALSE, force = FALSE)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/kindepth.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Individual's depth in a pedigree — kindepth","text":"obj character vector id individuals data.frame informations corresponding columns. dadid vector containing subject, identifiers biologicals fathers. momid vector containing subject, identifiers biologicals mothers. align_parents align_parents = TRUE, go one step try make parents child depth. (always possible). helps drawing program lining pedigrees 'join middle' via marriage. force force = TRUE, function return depth minus min(depth) depth reach state founders possible.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/kindepth.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Individual's depth in a pedigree — kindepth","text":"integer vector containing depth subject","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/kindepth.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Individual's depth in a pedigree — kindepth","text":"Mark person depth Pedigree; 0 founder, otherwise : $$depth = 1 + \\max(fatherDepth, motherDepth)$$ case inbred Pedigree perfect alignment may exist.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/kindepth.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Individual's depth in a pedigree — kindepth","text":"Terry Therneau, updated Louis Le Nézet","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/kindepth.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Individual's depth in a pedigree — kindepth","text":"","code":"kindepth( c(\"A\", \"B\", \"C\", \"D\", \"E\"), c(\"C\", \"D\", \"0\", \"0\", \"0\"), c(\"E\", \"E\", \"0\", \"0\", \"0\") ) #> [1] 1 1 0 0 0 data(sampleped) ped1 <- Pedigree(sampleped[sampleped$famid == \"1\",]) kindepth(ped1) #> [1] 0 0 1 0 0 0 0 0 1 2 2 2 0 2 1 1 0 1 1 1 3 3 3 3 3 3 3 3 2 2 2 2 2 2 0 0 0 1 #> [39] 2 2 2"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/kinship.html","id":null,"dir":"Reference","previous_headings":"","what":"Kinship matrix — kinship","title":"Kinship matrix — kinship","text":"Compute kinship matrix set related autosomal subjects. function generic, can accept Pedigree, Ped vector first argument.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/kinship.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Kinship matrix — kinship","text":"","code":"# S4 method for class 'Ped' kinship(obj, chrtype = \"autosome\") # S4 method for class 'character' kinship(obj, dadid, momid, sex, chrtype = \"autosome\") # S4 method for class 'Pedigree' kinship(obj, chrtype = \"autosome\")"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/kinship.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Kinship matrix — kinship","text":"obj Pedigree Ped object vector subject identifiers. chrtype chromosome type. currently supported types 'autosome' 'X' 'x'. dadid vector containing subject, identifiers biologicals fathers. momid vector containing subject, identifiers biologicals mothers. sex character, factor numeric vector corresponding gender individuals. transformed ordered factor following levels: male < female < unknown < terminated following values recognized: character() factor() : \"f\", \"m\", \"woman\", \"man\", \"male\", \"female\", \"unknown\", \"terminated\" numeric() : 1 = \"male\", 2 = \"female\", 3 = \"unknown\", 4 = \"terminated\"","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/kinship.html","id":"when-obj-is-a-vector","dir":"Reference","previous_headings":"","what":"When obj is a vector","title":"Kinship matrix — kinship","text":"matrix kinship coefficients.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/kinship.html","id":"when-obj-is-a-pedigree","dir":"Reference","previous_headings":"","what":"When obj is a Pedigree","title":"Kinship matrix — kinship","text":"matrix kinship coefficients ordered families present Pedigree object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/kinship.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Kinship matrix — kinship","text":"function usually called Pedigree. call Ped vector provided backwards compatibility earlier release library less capable. Note using Ped vector, information twins available function. called Pedigree, routine create block-diagonal-symmetric sparse matrix object class dsCMatrix. Since [, j] value result 0 two unrelated individuals j Matrix utilizes sparse representation, resulting object often orders magnitude smaller ordinary matrix. Two genes G1 G2 identical descent (IBD) physical copies ancestral gene; two genes identical state represent allele. brown eye gene inherited mother IBD ; gene unrelated individual . kinship coefficient two subjects probability randomly selected allele locus IBD . obviously 0 unrelated individuals. autosomal site inbreeding 0.5 individual , .25 mother child, .125 uncle neice, etc. computation based recursive algorithm described Lange, assumes founder alleles independent.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/kinship.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Kinship matrix — kinship","text":"K Lange, Mathematical Statistical Methods Genetic Analysis, Springer-Verlag, New York, 1997.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/kinship.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Kinship matrix — kinship","text":"","code":"kinship(c(\"A\", \"B\", \"C\", \"D\", \"E\"), c(\"C\", \"D\", \"0\", \"0\", \"0\"), c(\"E\", \"E\", \"0\", \"0\", \"0\"), sex = c(1, 2, 1, 2, 1)) #> 5 x 5 sparse Matrix of class \"dsCMatrix\" #> A B C D E #> A 0.500 0.125 0.25 . 0.25 #> B 0.125 0.500 . 0.25 0.25 #> C 0.250 . 0.50 . . #> D . 0.250 . 0.50 . #> E 0.250 0.250 . . 0.50 kinship(c(\"A\", \"B\", \"C\", \"D\", \"E\"), c(\"C\", \"D\", \"0\", \"0\", \"0\"), c(\"E\", \"E\", \"0\", \"0\", \"0\"), sex = c(1, 2, 1, 2, 1), chrtype = \"x\" ) #> 5 x 5 sparse Matrix of class \"dsCMatrix\" #> A B C D E #> A 1.0 0.50 . . 1.0 #> B 0.5 0.50 . 0.25 0.5 #> C . . 1 . . #> D . 0.25 . 0.50 . #> E 1.0 0.50 . . 1.0 data(sampleped) ped <- Pedigree(sampleped) kinship(ped) #> 55 x 55 sparse Matrix of class \"dsCMatrix\" #> [[ suppressing 55 column names ‘1_101’, ‘1_102’, ‘1_103’ ... ]] #> #> 1_101 0.500 . . . . . . . 0.25 . . . #> 1_102 . 0.500 . . . . . . 0.25 . . . #> 1_103 . . 0.500 . . . . . . 0.2500 0.2500 0.2500 #> 1_104 . . . 0.500 . . . . . 0.2500 0.2500 0.2500 #> 1_105 . . . . 0.500 . . . . . . . #> 1_106 . . . . . 0.500 . . . . . . #> 1_107 . . . . . . 0.500 . . . . . #> 1_108 . . . . . . . 0.500 . . . . #> 1_109 0.250 0.250 . . . . . . 0.50 . . . #> 1_110 . . 0.250 0.250 . . . . . 0.5000 0.2500 0.2500 #> 1_111 . . 0.250 0.250 . . . . . 0.2500 0.5000 0.2500 #> 1_112 . . 0.250 0.250 . . . . . 0.2500 0.2500 0.5000 #> 1_113 . . . . . . . . . . . . #> 1_114 . . 0.250 0.250 . . . . . 0.2500 0.2500 0.2500 #> 1_115 . . . . 0.250 0.250 . . . . . . #> 1_116 . . . . 0.250 0.250 . . . . . . #> 1_117 . . . . . . . . . . . . #> 1_118 . . . . 0.250 0.250 . . . . . . #> 1_119 . . . . 0.250 0.250 . . . . . . #> 1_120 . . . . . . 0.250 0.250 . . . . #> 1_121 0.125 0.125 0.125 0.125 . . . . 0.25 0.2500 0.1250 0.1250 #> 1_122 0.125 0.125 0.125 0.125 . . . . 0.25 0.2500 0.1250 0.1250 #> 1_123 0.125 0.125 0.125 0.125 . . . . 0.25 0.2500 0.1250 0.1250 #> 1_124 0.125 0.125 0.125 0.125 . . . . 0.25 0.2500 0.1250 0.1250 #> 1_125 . . 0.125 0.125 0.125 0.125 . . . 0.1250 0.1250 0.2500 #> 1_126 . . 0.125 0.125 0.125 0.125 . . . 0.1250 0.1250 0.2500 #> 1_127 . . 0.125 0.125 0.125 0.125 . . . 0.1250 0.1250 0.1250 #> 1_128 . . 0.125 0.125 0.125 0.125 . . . 0.1250 0.1250 0.1250 #> 1_129 . . . . 0.125 0.125 . . . . . . #> 1_130 . . . . 0.125 0.125 0.125 0.125 . . . . #> 1_131 . . . . 0.125 0.125 0.125 0.125 . . . . #> 1_132 . . . . 0.125 0.125 0.125 0.125 . . . . #> 1_133 . . . . 0.125 0.125 0.125 0.125 . . . . #> 1_134 . . . . 0.125 0.125 0.125 0.125 . . . . #> 1_135 . . 0.250 . . . . . . 0.1250 0.1250 0.1250 #> 1_136 . . 0.250 . . . . . . 0.1250 0.1250 0.1250 #> 1_137 . . . . . . . . . . . . #> 1_138 . . 0.250 . . . . . . 0.1250 0.1250 0.1250 #> 1_139 . . 0.125 . . . . . . 0.0625 0.0625 0.0625 #> 1_140 . . 0.125 . . . . . . 0.0625 0.0625 0.0625 #> 1_141 . . 0.125 . . . . . . 0.0625 0.0625 0.0625 #> 2_201 . . . . . . . . . . . . #> 2_202 . . . . . . . . . . . . #> 2_203 . . . . . . . . . . . . #> 2_204 . . . . . . . . . . . . #> 2_205 . . . . . . . . . . . . #> 2_206 . . . . . . . . . . . . #> 2_207 . . . . . . . . . . . . #> 2_208 . . . . . . . . . . . . #> 2_209 . . . . . . . . . . . . #> 2_210 . . . . . . . . . . . . #> 2_211 . . . . . . . . . . . . #> 2_212 . . . . . . . . . . . . #> 2_213 . . . . . . . . . . . . #> 2_214 . . . . . . . . . . . . #> #> 1_101 . . . . . . . . 0.12500 0.12500 0.12500 #> 1_102 . . . . . . . . 0.12500 0.12500 0.12500 #> 1_103 . 0.2500 . . . . . . 0.12500 0.12500 0.12500 #> 1_104 . 0.2500 . . . . . . 0.12500 0.12500 0.12500 #> 1_105 . . 0.250 0.250 . 0.250 0.250 . . . . #> 1_106 . . 0.250 0.250 . 0.250 0.250 . . . . #> 1_107 . . . . . . . 0.25 . . . #> 1_108 . . . . . . . 0.25 . . . #> 1_109 . . . . . . . . 0.25000 0.25000 0.25000 #> 1_110 . 0.2500 . . . . . . 0.25000 0.25000 0.25000 #> 1_111 . 0.2500 . . . . . . 0.12500 0.12500 0.12500 #> 1_112 . 0.2500 . . . . . . 0.12500 0.12500 0.12500 #> 1_113 0.5 . . . . . . . . . . #> 1_114 . 0.5000 . . . . . . 0.12500 0.12500 0.12500 #> 1_115 . . 0.500 0.250 . 0.250 0.250 . . . . #> 1_116 . . 0.250 0.500 . 0.250 0.250 . . . . #> 1_117 . . . . 0.50 . . . . . . #> 1_118 . . 0.250 0.250 . 0.500 0.250 . . . . #> 1_119 . . 0.250 0.250 . 0.250 0.500 . . . . #> 1_120 . . . . . . . 0.50 . . . #> 1_121 . 0.1250 . . . . . . 0.50000 0.25000 0.25000 #> 1_122 . 0.1250 . . . . . . 0.25000 0.50000 0.25000 #> 1_123 . 0.1250 . . . . . . 0.25000 0.25000 0.50000 #> 1_124 . 0.1250 . . . . . . 0.25000 0.25000 0.25000 #> 1_125 . 0.1250 0.125 0.125 . 0.250 0.125 . 0.06250 0.06250 0.06250 #> 1_126 . 0.1250 0.125 0.125 . 0.250 0.125 . 0.06250 0.06250 0.06250 #> 1_127 . 0.2500 0.250 0.125 . 0.125 0.125 . 0.06250 0.06250 0.06250 #> 1_128 . 0.2500 0.250 0.125 . 0.125 0.125 . 0.06250 0.06250 0.06250 #> 1_129 . . 0.125 0.250 0.25 0.125 0.125 . . . . #> 1_130 . . 0.125 0.125 . 0.125 0.250 0.25 . . . #> 1_131 . . 0.125 0.125 . 0.125 0.250 0.25 . . . #> 1_132 . . 0.125 0.125 . 0.125 0.250 0.25 . . . #> 1_133 . . 0.125 0.125 . 0.125 0.250 0.25 . . . #> 1_134 . . 0.125 0.125 . 0.125 0.250 0.25 . . . #> 1_135 . 0.1250 . . . . . . 0.06250 0.06250 0.06250 #> 1_136 . 0.1250 . . . . . . 0.06250 0.06250 0.06250 #> 1_137 . . . . . . . . . . . #> 1_138 . 0.1250 . . . . . . 0.06250 0.06250 0.06250 #> 1_139 . 0.0625 . . . . . . 0.03125 0.03125 0.03125 #> 1_140 . 0.0625 . . . . . . 0.03125 0.03125 0.03125 #> 1_141 . 0.0625 . . . . . . 0.03125 0.03125 0.03125 #> 2_201 . . . . . . . . . . . #> 2_202 . . . . . . . . . . . #> 2_203 . . . . . . . . . . . #> 2_204 . . . . . . . . . . . #> 2_205 . . . . . . . . . . . #> 2_206 . . . . . . . . . . . #> 2_207 . . . . . . . . . . . #> 2_208 . . . . . . . . . . . #> 2_209 . . . . . . . . . . . #> 2_210 . . . . . . . . . . . #> 2_211 . . . . . . . . . . . #> 2_212 . . . . . . . . . . . #> 2_213 . . . . . . . . . . . #> 2_214 . . . . . . . . . . . #> #> 1_101 0.12500 . . . . . . . . #> 1_102 0.12500 . . . . . . . . #> 1_103 0.12500 0.12500 0.12500 0.12500 0.12500 . . . . #> 1_104 0.12500 0.12500 0.12500 0.12500 0.12500 . . . . #> 1_105 . 0.12500 0.12500 0.12500 0.12500 0.1250 0.1250 0.1250 0.1250 #> 1_106 . 0.12500 0.12500 0.12500 0.12500 0.1250 0.1250 0.1250 0.1250 #> 1_107 . . . . . . 0.1250 0.1250 0.1250 #> 1_108 . . . . . . 0.1250 0.1250 0.1250 #> 1_109 0.25000 . . . . . . . . #> 1_110 0.25000 0.12500 0.12500 0.12500 0.12500 . . . . #> 1_111 0.12500 0.12500 0.12500 0.12500 0.12500 . . . . #> 1_112 0.12500 0.25000 0.25000 0.12500 0.12500 . . . . #> 1_113 . . . . . . . . . #> 1_114 0.12500 0.12500 0.12500 0.25000 0.25000 . . . . #> 1_115 . 0.12500 0.12500 0.25000 0.25000 0.1250 0.1250 0.1250 0.1250 #> 1_116 . 0.12500 0.12500 0.12500 0.12500 0.2500 0.1250 0.1250 0.1250 #> 1_117 . . . . . 0.2500 . . . #> 1_118 . 0.25000 0.25000 0.12500 0.12500 0.1250 0.1250 0.1250 0.1250 #> 1_119 . 0.12500 0.12500 0.12500 0.12500 0.1250 0.2500 0.2500 0.2500 #> 1_120 . . . . . . 0.2500 0.2500 0.2500 #> 1_121 0.25000 0.06250 0.06250 0.06250 0.06250 . . . . #> 1_122 0.25000 0.06250 0.06250 0.06250 0.06250 . . . . #> 1_123 0.25000 0.06250 0.06250 0.06250 0.06250 . . . . #> 1_124 0.50000 0.06250 0.06250 0.06250 0.06250 . . . . #> 1_125 0.06250 0.50000 0.25000 0.12500 0.12500 0.0625 0.0625 0.0625 0.0625 #> 1_126 0.06250 0.25000 0.50000 0.12500 0.12500 0.0625 0.0625 0.0625 0.0625 #> 1_127 0.06250 0.12500 0.12500 0.50000 0.25000 0.0625 0.0625 0.0625 0.0625 #> 1_128 0.06250 0.12500 0.12500 0.25000 0.50000 0.0625 0.0625 0.0625 0.0625 #> 1_129 . 0.06250 0.06250 0.06250 0.06250 0.5000 0.0625 0.0625 0.0625 #> 1_130 . 0.06250 0.06250 0.06250 0.06250 0.0625 0.5000 0.2500 0.2500 #> 1_131 . 0.06250 0.06250 0.06250 0.06250 0.0625 0.2500 0.5000 0.2500 #> 1_132 . 0.06250 0.06250 0.06250 0.06250 0.0625 0.2500 0.2500 0.5000 #> 1_133 . 0.06250 0.06250 0.06250 0.06250 0.0625 0.2500 0.2500 0.2500 #> 1_134 . 0.06250 0.06250 0.06250 0.06250 0.0625 0.2500 0.2500 0.2500 #> 1_135 0.06250 0.06250 0.06250 0.06250 0.06250 . . . . #> 1_136 0.06250 0.06250 0.06250 0.06250 0.06250 . . . . #> 1_137 . . . . . . . . . #> 1_138 0.06250 0.06250 0.06250 0.06250 0.06250 . . . . #> 1_139 0.03125 0.03125 0.03125 0.03125 0.03125 . . . . #> 1_140 0.03125 0.03125 0.03125 0.03125 0.03125 . . . . #> 1_141 0.03125 0.03125 0.03125 0.03125 0.03125 . . . . #> 2_201 . . . . . . . . . #> 2_202 . . . . . . . . . #> 2_203 . . . . . . . . . #> 2_204 . . . . . . . . . #> 2_205 . . . . . . . . . #> 2_206 . . . . . . . . . #> 2_207 . . . . . . . . . #> 2_208 . . . . . . . . . #> 2_209 . . . . . . . . . #> 2_210 . . . . . . . . . #> 2_211 . . . . . . . . . #> 2_212 . . . . . . . . . #> 2_213 . . . . . . . . . #> 2_214 . . . . . . . . . #> #> 1_101 . . . . . . . . . . #> 1_102 . . . . . . . . . . #> 1_103 . . 0.2500 0.2500 . 0.2500 0.12500 0.12500 0.12500 . #> 1_104 . . . . . . . . . . #> 1_105 0.1250 0.1250 . . . . . . . . #> 1_106 0.1250 0.1250 . . . . . . . . #> 1_107 0.1250 0.1250 . . . . . . . . #> 1_108 0.1250 0.1250 . . . . . . . . #> 1_109 . . . . . . . . . . #> 1_110 . . 0.1250 0.1250 . 0.1250 0.06250 0.06250 0.06250 . #> 1_111 . . 0.1250 0.1250 . 0.1250 0.06250 0.06250 0.06250 . #> 1_112 . . 0.1250 0.1250 . 0.1250 0.06250 0.06250 0.06250 . #> 1_113 . . . . . . . . . . #> 1_114 . . 0.1250 0.1250 . 0.1250 0.06250 0.06250 0.06250 . #> 1_115 0.1250 0.1250 . . . . . . . . #> 1_116 0.1250 0.1250 . . . . . . . . #> 1_117 . . . . . . . . . . #> 1_118 0.1250 0.1250 . . . . . . . . #> 1_119 0.2500 0.2500 . . . . . . . . #> 1_120 0.2500 0.2500 . . . . . . . . #> 1_121 . . 0.0625 0.0625 . 0.0625 0.03125 0.03125 0.03125 . #> 1_122 . . 0.0625 0.0625 . 0.0625 0.03125 0.03125 0.03125 . #> 1_123 . . 0.0625 0.0625 . 0.0625 0.03125 0.03125 0.03125 . #> 1_124 . . 0.0625 0.0625 . 0.0625 0.03125 0.03125 0.03125 . #> 1_125 0.0625 0.0625 0.0625 0.0625 . 0.0625 0.03125 0.03125 0.03125 . #> 1_126 0.0625 0.0625 0.0625 0.0625 . 0.0625 0.03125 0.03125 0.03125 . #> 1_127 0.0625 0.0625 0.0625 0.0625 . 0.0625 0.03125 0.03125 0.03125 . #> 1_128 0.0625 0.0625 0.0625 0.0625 . 0.0625 0.03125 0.03125 0.03125 . #> 1_129 0.0625 0.0625 . . . . . . . . #> 1_130 0.2500 0.2500 . . . . . . . . #> 1_131 0.2500 0.2500 . . . . . . . . #> 1_132 0.2500 0.2500 . . . . . . . . #> 1_133 0.5000 0.2500 . . . . . . . . #> 1_134 0.2500 0.5000 . . . . . . . . #> 1_135 . . 0.5000 . . 0.2500 0.12500 0.12500 0.12500 . #> 1_136 . . . 0.5000 . 0.2500 0.12500 0.12500 0.12500 . #> 1_137 . . . . 0.50 . 0.25000 0.25000 0.25000 . #> 1_138 . . 0.2500 0.2500 . 0.5000 0.25000 0.25000 0.25000 . #> 1_139 . . 0.1250 0.1250 0.25 0.2500 0.50000 0.25000 0.25000 . #> 1_140 . . 0.1250 0.1250 0.25 0.2500 0.25000 0.50000 0.25000 . #> 1_141 . . 0.1250 0.1250 0.25 0.2500 0.25000 0.25000 0.50000 . #> 2_201 . . . . . . . . . 0.500 #> 2_202 . . . . . . . . . . #> 2_203 . . . . . . . . . . #> 2_204 . . . . . . . . . 0.250 #> 2_205 . . . . . . . . . 0.250 #> 2_206 . . . . . . . . . 0.250 #> 2_207 . . . . . . . . . 0.250 #> 2_208 . . . . . . . . . 0.250 #> 2_209 . . . . . . . . . . #> 2_210 . . . . . . . . . 0.125 #> 2_211 . . . . . . . . . 0.125 #> 2_212 . . . . . . . . . 0.125 #> 2_213 . . . . . . . . . 0.125 #> 2_214 . . . . . . . . . 0.125 #> #> 1_101 . . . . . . . . . . . . #> 1_102 . . . . . . . . . . . . #> 1_103 . . . . . . . . . . . . #> 1_104 . . . . . . . . . . . . #> 1_105 . . . . . . . . . . . . #> 1_106 . . . . . . . . . . . . #> 1_107 . . . . . . . . . . . . #> 1_108 . . . . . . . . . . . . #> 1_109 . . . . . . . . . . . . #> 1_110 . . . . . . . . . . . . #> 1_111 . . . . . . . . . . . . #> 1_112 . . . . . . . . . . . . #> 1_113 . . . . . . . . . . . . #> 1_114 . . . . . . . . . . . . #> 1_115 . . . . . . . . . . . . #> 1_116 . . . . . . . . . . . . #> 1_117 . . . . . . . . . . . . #> 1_118 . . . . . . . . . . . . #> 1_119 . . . . . . . . . . . . #> 1_120 . . . . . . . . . . . . #> 1_121 . . . . . . . . . . . . #> 1_122 . . . . . . . . . . . . #> 1_123 . . . . . . . . . . . . #> 1_124 . . . . . . . . . . . . #> 1_125 . . . . . . . . . . . . #> 1_126 . . . . . . . . . . . . #> 1_127 . . . . . . . . . . . . #> 1_128 . . . . . . . . . . . . #> 1_129 . . . . . . . . . . . . #> 1_130 . . . . . . . . . . . . #> 1_131 . . . . . . . . . . . . #> 1_132 . . . . . . . . . . . . #> 1_133 . . . . . . . . . . . . #> 1_134 . . . . . . . . . . . . #> 1_135 . . . . . . . . . . . . #> 1_136 . . . . . . . . . . . . #> 1_137 . . . . . . . . . . . . #> 1_138 . . . . . . . . . . . . #> 1_139 . . . . . . . . . . . . #> 1_140 . . . . . . . . . . . . #> 1_141 . . . . . . . . . . . . #> 2_201 . . 0.250 0.250 0.250 0.250 0.250 . 0.1250 0.1250 0.1250 0.1250 #> 2_202 0.500 . 0.250 0.250 0.250 0.250 0.250 . 0.1250 0.1250 0.1250 0.1250 #> 2_203 . 0.50 . . . . . . 0.2500 0.2500 . . #> 2_204 0.250 . 0.500 0.250 0.250 0.250 0.250 . 0.2500 0.2500 0.1250 0.1250 #> 2_205 0.250 . 0.250 0.500 0.250 0.250 0.250 . 0.1250 0.1250 0.1250 0.1250 #> 2_206 0.250 . 0.250 0.250 0.500 0.250 0.250 . 0.1250 0.1250 0.1250 0.1250 #> 2_207 0.250 . 0.250 0.250 0.250 0.500 0.250 . 0.1250 0.1250 0.1250 0.1250 #> 2_208 0.250 . 0.250 0.250 0.250 0.250 0.500 . 0.1250 0.1250 0.2500 0.2500 #> 2_209 . . . . . . . 0.50 . . 0.2500 0.2500 #> 2_210 0.125 0.25 0.250 0.125 0.125 0.125 0.125 . 0.5000 0.2500 0.0625 0.0625 #> 2_211 0.125 0.25 0.250 0.125 0.125 0.125 0.125 . 0.2500 0.5000 0.0625 0.0625 #> 2_212 0.125 . 0.125 0.125 0.125 0.125 0.250 0.25 0.0625 0.0625 0.5000 0.2500 #> 2_213 0.125 . 0.125 0.125 0.125 0.125 0.250 0.25 0.0625 0.0625 0.2500 0.5000 #> 2_214 0.125 . 0.125 0.125 0.125 0.125 0.250 0.25 0.0625 0.0625 0.2500 0.2500 #> #> 1_101 . #> 1_102 . #> 1_103 . #> 1_104 . #> 1_105 . #> 1_106 . #> 1_107 . #> 1_108 . #> 1_109 . #> 1_110 . #> 1_111 . #> 1_112 . #> 1_113 . #> 1_114 . #> 1_115 . #> 1_116 . #> 1_117 . #> 1_118 . #> 1_119 . #> 1_120 . #> 1_121 . #> 1_122 . #> 1_123 . #> 1_124 . #> 1_125 . #> 1_126 . #> 1_127 . #> 1_128 . #> 1_129 . #> 1_130 . #> 1_131 . #> 1_132 . #> 1_133 . #> 1_134 . #> 1_135 . #> 1_136 . #> 1_137 . #> 1_138 . #> 1_139 . #> 1_140 . #> 1_141 . #> 2_201 0.1250 #> 2_202 0.1250 #> 2_203 . #> 2_204 0.1250 #> 2_205 0.1250 #> 2_206 0.1250 #> 2_207 0.1250 #> 2_208 0.2500 #> 2_209 0.2500 #> 2_210 0.0625 #> 2_211 0.0625 #> 2_212 0.2500 #> 2_213 0.2500 #> 2_214 0.5000"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/make_class_info.html","id":null,"dir":"Reference","previous_headings":"","what":"Make class information — make_class_info","title":"Make class information — make_class_info","text":"Make class information","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/make_class_info.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make class information — make_class_info","text":"","code":"make_class_info(x)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/make_class_info.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make class information — make_class_info","text":"x list class","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/make_class_info.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Make class information — make_class_info","text":"character vector class information","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/make_class_info.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Make class information — make_class_info","text":"","code":"Pedixplorer::make_class_info(list(1, \"a\", 1:3, list(1, 2))) #> [1] \"\" \"\" \"\" \"\""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/make_famid.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute family id — make_famid","title":"Compute family id — make_famid","text":"Construct family identifier pedigree information","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/make_famid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute family id — make_famid","text":"","code":"# S4 method for class 'character' make_famid(obj, dadid, momid) # S4 method for class 'Pedigree' make_famid(obj)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/make_famid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute family id — make_famid","text":"obj character vector id individuals data.frame informations corresponding columns. dadid vector containing subject, identifiers biologicals fathers. momid vector containing subject, identifiers biologicals mothers.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/make_famid.html","id":"when-used-with-a-character-vector","dir":"Reference","previous_headings":"","what":"When used with a character vector","title":"Compute family id — make_famid","text":"integer vector giving family groupings","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/make_famid.html","id":"when-used-with-a-pedigree-object","dir":"Reference","previous_headings":"","what":"When used with a Pedigree object","title":"Compute family id — make_famid","text":"updated Pedigree object family id added ids updated","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/make_famid.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Compute family id — make_famid","text":"Create vector length n, giving family 'tree' number subject. Pedigree totally connected, everyone end tree 1, otherwise tree numbers represent disconnected subfamilies. Singleton subjects give zero family number.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/make_famid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compute family id — make_famid","text":"","code":"make_famid( c(\"A\", \"B\", \"C\", \"D\", \"E\", \"F\"), c(\"C\", \"D\", \"0\", \"0\", \"0\", \"0\"), c(\"E\", \"E\", \"0\", \"0\", \"0\", \"0\") ) #> [1] \"1\" \"1\" \"1\" \"1\" \"1\" NA data(sampleped) ped1 <- Pedigree(sampleped[,-1]) make_famid(ped1) #> Pedigree object with: #> Ped object with 55 individuals and 13 metadata columns: #> id dadid momid sex famid steril #> col_class #> 1_101 1_101 male 1 #> 1_102 1_102 female 1 #> 1_103 1_103 1_135 1_136 male 1 #> 1_104 1_104 female 1 #> 1_105 1_105 male 1 #> ... ... ... ... ... ... ... #> 2_210 2_210 2_203 2_204 male 2 #> 2_211 2_211 2_203 2_204 male 2 #> 2_212 2_212 2_209 2_208 female 2 #> 2_213 2_213 2_209 2_208 male 2 #> 2_214 2_214 2_209 2_208 male 2 #> status avail affected useful kin isinf #> col_class #> 1_101 FALSE FALSE #> 1_102 FALSE TRUE #> 1_103 FALSE TRUE #> 1_104 FALSE FALSE #> 1_105 FALSE #> ... ... ... ... ... ... ... #> 2_210 FALSE FALSE #> 2_211 TRUE FALSE #> 2_212 TRUE FALSE #> 2_213 FALSE FALSE #> 2_214 TRUE TRUE #> num_child_tot num_child_dir num_child_ind | indId fatherId #> col_class #> 1_101 1 1 0 101 #> 1_102 1 1 0 102 #> 1_103 4 4 0 103 135 #> 1_104 4 4 0 104 #> 1_105 4 4 0 105 #> ... ... ... ... ... ... #> 2_210 0 0 0 210 203 #> 2_211 0 0 0 211 203 #> 2_212 0 0 0 212 209 #> 2_213 0 0 0 213 209 #> 2_214 0 0 0 214 209 #> motherId gender affection available num #> col_class #> 1_101 1 0 0 2 #> 1_102 2 1 0 3 #> 1_103 136 1 1 0 2 #> 1_104 2 0 0 4 #> 1_105 1 0 6 #> ... ... ... ... ... ... #> 2_210 204 1 0 0 2 #> 2_211 204 1 0 1 1 #> 2_212 208 2 0 1 3 #> 2_213 208 1 0 0 2 #> 2_214 208 1 1 1 0 #> error family sterilisation vitalStatus affection_mods #> col_class #> 1_101 0 #> 1_102 1 #> 1_103 1 #> 1_104 0 #> 1_105 NA #> ... ... ... ... ... ... #> 2_210 0 #> 2_211 0 #> 2_212 0 #> 2_213 0 #> 2_214 1 #> avail_mods #> col_class #> 1_101 0 #> 1_102 0 #> 1_103 0 #> 1_104 0 #> 1_105 0 #> ... ... #> 2_210 0 #> 2_211 1 #> 2_212 1 #> 2_213 0 #> 2_214 1 #> Rel object with 0 relationshipswith 0 MZ twin, 0 DZ twin, 0 UZ twin, 0 Spouse: #> id1 id2 code famid #> "},{"path":"https://louislenezet.github.io/Pedixplorer/reference/make_rownames.html","id":null,"dir":"Reference","previous_headings":"","what":"Make rownames for rectangular data display — make_rownames","title":"Make rownames for rectangular data display — make_rownames","text":"Make rownames rectangular data display","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/make_rownames.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make rownames for rectangular data display — make_rownames","text":"","code":"make_rownames(x_rownames, nrow, nhead, ntail)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/make_rownames.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make rownames for rectangular data display — make_rownames","text":"x_rownames rownames data nrow number rows data nhead number rownames display beginning ntail number rownames display end","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/make_rownames.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Make rownames for rectangular data display — make_rownames","text":"character vector rownames","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/make_rownames.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Make rownames for rectangular data display — make_rownames","text":"","code":"Pedixplorer::make_rownames(rownames(mtcars), nrow(mtcars), 3, 3) #> [1] \"Mazda RX4\" \"Mazda RX4 Wag\" \"Datsun 710\" \"...\" #> [5] \"Ferrari Dino\" \"Maserati Bora\" \"Volvo 142E\""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/min_dist_inf.html","id":null,"dir":"Reference","previous_headings":"","what":"Minimum distance to the informative individuals — min_dist_inf","title":"Minimum distance to the informative individuals — min_dist_inf","text":"Compute minimum distance informative individuals others. distance transformation maximum kinship degree informative individuals others. transformation done taking log2 inverse maximum kinship degree. \\(minDist = log2(1 / \\max(kinship))\\) Therefore, minimum distance 0 maximum kinship 1 infinite maximum kinship 0. siblings, kinship value 0.5 minimum distance 1. time kinship degree divided 2, minimum distance increased 1.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/min_dist_inf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Minimum distance to the informative individuals — min_dist_inf","text":"","code":"# S4 method for class 'character' min_dist_inf(obj, dadid, momid, sex, id_inf) # S4 method for class 'Pedigree' min_dist_inf(obj, reset = FALSE, ...) # S4 method for class 'Ped' min_dist_inf(obj, reset = FALSE)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/min_dist_inf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Minimum distance to the informative individuals — min_dist_inf","text":"obj character vector id individuals data.frame informations corresponding columns. ... Additional arguments dadid vector containing subject, identifiers biologicals fathers. momid vector containing subject, identifiers biologicals mothers. sex character, factor numeric vector corresponding gender individuals. transformed ordered factor following levels: male < female < unknown < terminated following values recognized: character() factor() : \"f\", \"m\", \"woman\", \"man\", \"male\", \"female\", \"unknown\", \"terminated\" numeric() : 1 = \"male\", 2 = \"female\", 3 = \"unknown\", 4 = \"terminated\" id_inf identifiers vector informative individuals. reset TRUE, kin isinf columns reset","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/min_dist_inf.html","id":"when-obj-is-a-vector","dir":"Reference","previous_headings":"","what":"When obj is a vector","title":"Minimum distance to the informative individuals — min_dist_inf","text":"vector minimum distance informative individuals others corresponding order individuals obj vector.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/min_dist_inf.html","id":"when-obj-is-a-pedigree","dir":"Reference","previous_headings":"","what":"When obj is a Pedigree","title":"Minimum distance to the informative individuals — min_dist_inf","text":"Pedigree object new slot named 'kin' containing minimum distance individuals informative individuals. isinf slot also updated informative individuals.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/min_dist_inf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Minimum distance to the informative individuals — min_dist_inf","text":"","code":"min_dist_inf( c(\"A\", \"B\", \"C\", \"D\", \"E\"), c(\"C\", \"D\", \"0\", \"0\", \"0\"), c(\"E\", \"E\", \"0\", \"0\", \"0\"), sex = c(1, 2, 1, 2, 1), id_inf = c(\"D\", \"E\") ) #> A B C D E #> 2 2 Inf 1 1 data(sampleped) ped <- is_informative( Pedigree(sampleped), informative = \"AvAf\", col_aff = \"affection_mods\" ) kin(ped(min_dist_inf(ped, col_aff = \"affection_mods\"))) #> 1_101 1_102 1_103 1_104 1_105 1_106 1_107 1_108 1_109 1_110 1_111 1_112 1_113 #> 3 3 2 2 2 2 Inf Inf 2 1 2 2 Inf #> 1_114 1_115 1_116 1_117 1_118 1_119 1_120 1_121 1_122 1_123 1_124 1_125 1_126 #> 2 2 1 Inf 1 1 Inf 2 2 2 1 2 2 #> 1_127 1_128 1_129 1_130 1_131 1_132 1_133 1_134 1_135 1_136 1_137 1_138 1_139 #> 1 1 2 2 2 2 2 2 3 3 Inf 3 4 #> 1_140 1_141 2_201 2_202 2_203 2_204 2_205 2_206 2_207 2_208 2_209 2_210 2_211 #> 4 4 1 2 1 2 2 1 1 2 2 2 2 #> 2_212 2_213 2_214 #> 2 2 1"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/minnbreast.html","id":null,"dir":"Reference","previous_headings":"","what":"Minnesota Breast Cancer Study — minnbreast","title":"Minnesota Breast Cancer Study — minnbreast","text":"Data Minnesota Breast Cancer Family Study. contains extended pedigrees 426 families, identified single proband 1945-1952, follow incident breast cancer.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/minnbreast.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Minnesota Breast Cancer Study — minnbreast","text":"","code":"data(minnbreast)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/minnbreast.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Minnesota Breast Cancer Study — minnbreast","text":"data frame 28081 observations, one line per subject, following 14 variables. id : Subject identifier proband : 1, subject one original 426 probands fatherid : Identifier father, father part data set; zero otherwise motherid : Identifier mother, mother part data set; zero otherwise famid : Family identifier endage : Age last follow-incident cancer cancer : 1 = breast cancer (females) prostate cancer (males), 0 = censored yob : Year birth education : Amount education: 1-8 years, 9-12 years, high school graduate, vocational education beyond high school, college graduate, college graduate, post-graduate education, refused answer questionnaire marstat : Marital status: married, living someone marriage-like relationship, separated divorced, widowed, never married, refused answer questionaire everpreg : Ever pregnant time baseline survey parity : Number births nbreast : Number breast biopsies sex : M F bcpc : Part one families breast / prostate cancer substudy: 0 = , 1 = yes. Note subjects recruited overall study date BP substudy coded zero.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/minnbreast.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Minnesota Breast Cancer Study — minnbreast","text":"original study conducted Dr. Elving Anderson Dight Institute Human Genetics University Minnesota. 1944 1952, 544 sequential breast cancer cases seen University Hospital enrolled, information gathered parents, siblings, offspring, aunts / uncles, grandparents goal understanding possible familial aspects brest cancer. 1991 study resurrected Dr Tom Sellers. original 544 excluded 58 prevalent cases, along another 19 less 2 living relatives time Dr Anderson's survey. remaining 462 families 10 living members, 23 located 8 refused, leaving 426 families updated pedigrees obtained. gave study 13351 males 12699 females (5183 marry-ins). Primary questions relationship early life exposures, breast density, pharmacogenomics incident breast cancer risk. subset families data gathered prostate cancer risk male subjects via questionnaires sent men 40. , data items parentage limited female subjects. 2003 second phase study instituted. pedigrees extended numbers found data set, data gathered questionnaire.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/minnbreast.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Minnesota Breast Cancer Study — minnbreast","text":"Epidemiologic genetic follow-study 544 Minnesota breast cancer families: design methods. Sellers TA, Anderson VE, Potter JD, Bartow SA, Chen PL, Everson L, King RA, Kuni CC, Kushi LH, McGovern PG, et al. Genetic Epidemiology, 1995; 12(4):417-29. Evaluation familial clustering breast prostate cancer Minnesota Breast Cancer Family Study. Grabrick DM, Cerhan JR, Vierkant RA, Therneau TM, Cheville JC, Tindall DJ, Sellers TA. Cancer Detect Prev. 2003; 27(1):30-6. Risk breast cancer oral contraceptive use women family history breast cancer. Grabrick DM, Hartmann LC, Cerhan JR, Vierkant RA, Therneau TM, Vachon CM, Olson JE, Couch FJ, Anderson KE, Pankratz VS, Sellers TA. JAMA. 2000; 284(14):1791-8.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/minnbreast.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Minnesota Breast Cancer Study — minnbreast","text":"","code":"data(minnbreast) breastped <- Pedigree(minnbreast, cols_ren_ped = list( \"indId\" = \"id\", \"fatherId\" = \"fatherid\", \"motherId\" = \"motherid\", \"gender\" = \"sex\", \"family\" = \"famid\" ), missid = \"0\", col_aff = \"cancer\" ) summary(breastped) #> Pedigree object with #> [1] \"Ped object with 28081 individuals and 22 metadata columns\" #> [1] \"Rel object with 0 relationshipswith 0 MZ twin, 0 DZ twin, 0 UZ twin, 0 Spouse\" scales(breastped) #> An object of class \"Scales\" #> Slot \"fill\": #> order column_values column_mods mods labels affected fill density #> 1 1 cancer cancer_mods 0 Healthy <= to 0.5 FALSE white NA #> 2 1 cancer cancer_mods 1 Affected > to 0.5 TRUE red NA #> 3 1 cancer cancer_mods NA NA grey NA #> angle #> 1 NA #> 2 NA #> 3 NA #> #> Slot \"border\": #> column_values column_mods mods labels border #> 1 avail avail_mods NA NA grey #> 2 avail avail_mods 1 Available green #> 3 avail avail_mods 0 Non Available black #> #plot family 8, proband is solid, slash for cancers if (interactive()) { plot(breastped[famid(ped(breastped)) == \"8\"], aff_mark = TRUE) }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/na_to_length.html","id":null,"dir":"Reference","previous_headings":"","what":"NA to specific length — na_to_length","title":"NA to specific length — na_to_length","text":"Check value vector NA NULL. set new value matching length template. check size vector equal template.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/na_to_length.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"NA to specific length — na_to_length","text":"","code":"na_to_length(x, temp, value)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/na_to_length.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"NA to specific length — na_to_length","text":"x vector check. temp template vector use determine length. value value use fill vector.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/na_to_length.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"NA to specific length — na_to_length","text":"vector length temp.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/na_to_length.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"NA to specific length — na_to_length","text":"","code":"na_to_length(NA, rep(0, 4), \"NewValue\") #> [1] \"NewValue\" \"NewValue\" \"NewValue\" \"NewValue\" na_to_length(c(1, 2, 3, NA), rep(0, 4), \"NewValue\") #> [1] 1 2 3 NA"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/norm_ped.html","id":null,"dir":"Reference","previous_headings":"","what":"Normalise a Ped object dataframe — norm_ped","title":"Normalise a Ped object dataframe — norm_ped","text":"Normalise dataframe Ped object","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/norm_ped.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Normalise a Ped object dataframe — norm_ped","text":"","code":"norm_ped( ped_df, na_strings = c(\"NA\", \"\"), missid = NA_character_, try_num = FALSE, cols_used_del = FALSE )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/norm_ped.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Normalise a Ped object dataframe — norm_ped","text":"ped_df data.frame individuals informations. minimum columns required : indID individual identifiers -> id fatherId biological fathers identifiers -> dadid motherId biological mothers identifiers -> momdid gender sex individual -> sex family family identifiers -> famid family column, provided, merged ids field separated underscore using upd_famid() function. following columns also recognize transformed vect_to_binary() function: sterilisation status -> steril available status -> avail vitalStatus, individual dead -> status affection status -> affected values recognized columns 1 0, TRUE FALSE. na_strings Vector strings considered NA values. missid character vector missing values identifiers. id, dadid momid corresponding values set NA_character_. try_num Boolean defining function try convert columns numeric. cols_used_del Boolean defining columns used deleted.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/norm_ped.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Normalise a Ped object dataframe — norm_ped","text":"dataframe different variable correctly standardized errors identified error column","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/norm_ped.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Normalise a Ped object dataframe — norm_ped","text":"Normalise dataframe check columns correspondance able use input create Ped object. Multiple test done errors checked. Sex calculated based gender column. steril column need boolean either TRUE, FALSE 'NA'. considered available individual 'NA' values available column. Duplicated indId nullify relationship individual. individuals errors remove dataframe transfered error dataframe. number checks done ensure dataframe correct:","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/norm_ped.html","id":"on-identifiers-","dir":"Reference","previous_headings":"","what":"On identifiers:","title":"Normalise a Ped object dataframe — norm_ped","text":"ids (id, dadid, momid, famid) empty (!= \"\") id unique (duplicated) dadid momid unique id column (duplicated) id dadid momid Either parents none","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/norm_ped.html","id":"on-sex-","dir":"Reference","previous_headings":"","what":"On sex:","title":"Normalise a Ped object dataframe — norm_ped","text":"sex code either male, female, terminated unknown. parents steril fathers male mothers female","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/norm_ped.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Normalise a Ped object dataframe — norm_ped","text":"","code":"df <- data.frame( indId = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), fatherId = c(\"A\", 0, 1, 3, 0, 4, 1, 0, 6, 6), motherId = c(0, 0, 2, 2, 0, 5, 2, 0, 8, 8), gender = c(1, 2, \"m\", \"man\", \"f\", \"male\", \"m\", \"m\", \"f\", \"f\"), available = c(\"A\", \"1\", 0, NA, 1, 0, 1, 0, 1, 0), famid = c(1, 1, 1, 1, 1, 1, 1, 2, 2, 2), sterilisation = c(\"TRUE\", \"FALSE\", TRUE, FALSE, 1, 0, 1, 0, 1, \"TRUE\"), vitalStatus = c(\"TRUE\", \"FALSE\", TRUE, FALSE, 1, 0, 1, 0, 1, 0), affection = c(\"TRUE\", \"FALSE\", TRUE, FALSE, 1, 0, 1, 0, 1, 0) ) tryCatch( norm_ped(df), error = function(e) print(e) ) #> >"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/norm_rel.html","id":null,"dir":"Reference","previous_headings":"","what":"Normalise a Rel object dataframe — norm_rel","title":"Normalise a Rel object dataframe — norm_rel","text":"Normalise dataframe check columns correspondance able use input create Ped object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/norm_rel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Normalise a Rel object dataframe — norm_rel","text":"","code":"norm_rel(rel_df, na_strings = c(\"NA\", \"\"), missid = NA_character_)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/norm_rel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Normalise a Rel object dataframe — norm_rel","text":"rel_df data.frame special relationships individuals. See Rel() informations. minimum columns required id1, id2 code. famid column can also used specify family individuals. matrix given, columns needs ordered id1, id2, code famid. code values : 1 = Monozygotic twin 2 = Dizygotic twin 3 = twin unknown zygosity 4 = Spouse value relation code recognized function one defined rel_code_to_factor() function. na_strings Vector strings considered NA values. missid character vector missing values identifiers. id, dadid momid corresponding values set NA_character_.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/norm_rel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Normalise a Rel object dataframe — norm_rel","text":"dataframe errors identified","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/norm_rel.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Normalise a Rel object dataframe — norm_rel","text":"famid column, provided, merged ids field separated underscore using upd_famid() function. code column transformed rel_code_to_factor(). Multiple test done errors checked. number checks done ensure dataframe correct:","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/norm_rel.html","id":"on-identifiers-","dir":"Reference","previous_headings":"","what":"On identifiers:","title":"Normalise a Rel object dataframe — norm_rel","text":"ids (id1, id2) empty (!= \"\") id1 id2 ","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/norm_rel.html","id":"on-code","dir":"Reference","previous_headings":"","what":"On code","title":"Normalise a Rel object dataframe — norm_rel","text":"code recognised either \"MZ twin\", \"DZ twin\", \"UZ twin\" \"Spouse\"","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/norm_rel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Normalise a Rel object dataframe — norm_rel","text":"","code":"df <- data.frame( id1 = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), id2 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 1), code = c(\"MZ twin\", \"DZ twin\", \"UZ twin\", \"Spouse\", 1, 2, 3, 4, \"MzTwin\", \"sp oUse\"), famid = c(1, 1, 1, 1, 1, 1, 1, 2, 2, 2) ) norm_rel(df) #> id1 id2 code famid error #> 1 1_1 1_2 MZ twin 1 #> 2 1_2 1_3 DZ twin 1 #> 3 1_3 1_4 UZ twin 1 #> 4 1_4 1_5 Spouse 1 #> 5 1_5 1_6 MZ twin 1 #> 6 1_6 1_7 DZ twin 1 #> 7 1_7 1_8 UZ twin 1 #> 8 2_8 2_9 Spouse 2 #> 9 2_9 2_10 MZ twin 2 #> 10 2_10 2_1 Spouse 2 "},{"path":"https://louislenezet.github.io/Pedixplorer/reference/num_child.html","id":null,"dir":"Reference","previous_headings":"","what":"Number of childs — num_child","title":"Number of childs — num_child","text":"Compute number childs per individual","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/num_child.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Number of childs — num_child","text":"","code":"# S4 method for class 'character_OR_integer' num_child(obj, dadid, momid, rel_df = NULL, missid = NA_character_) # S4 method for class 'Pedigree' num_child(obj, reset = FALSE)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/num_child.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Number of childs — num_child","text":"obj character vector id individuals data.frame informations corresponding columns. dadid vector containing subject, identifiers biologicals fathers. momid vector containing subject, identifiers biologicals mothers. rel_df data.frame special relationships individuals. See Rel() informations. minimum columns required id1, id2 code. famid column can also used specify family individuals. matrix given, columns needs ordered id1, id2, code famid. code values : 1 = Monozygotic twin 2 = Dizygotic twin 3 = twin unknown zygosity 4 = Spouse value relation code recognized function one defined rel_code_to_factor() function. missid character vector missing values identifiers. id, dadid momid corresponding values set NA_character_. reset TRUE, num_child_tot, num_child_ind num_child_dir columns reset.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/num_child.html","id":"when-obj-is-a-vector","dir":"Reference","previous_headings":"","what":"When obj is a vector","title":"Number of childs — num_child","text":"dataframe columns num_child_dir, num_child_ind num_child_tot giving respectively direct, indirect total number child.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/num_child.html","id":"when-obj-is-a-pedigree-object","dir":"Reference","previous_headings":"","what":"When obj is a Pedigree object","title":"Number of childs — num_child","text":"updated Pedigree object columns num_child_dir, num_child_ind num_child_tot added Pedigree ped slot.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/num_child.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Number of childs — num_child","text":"Compute number direct child also number indirect child given ones related linked spouses. relation ship dataframe given, even children present 2 spouses, indirect childs still added.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/num_child.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Number of childs — num_child","text":"","code":"num_child( obj = c(\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\"), dadid = c(\"3\", \"3\", \"6\", \"8\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\"), momid = c(\"4\", \"5\", \"7\", \"9\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\"), rel_df = data.frame( id1 = \"10\", id2 = \"3\", code = \"Spouse\" ) ) #> id dadid momid num_child_dir num_child_tot num_child_ind #> 1 1 3 4 0 0 0 #> 2 2 3 5 0 0 0 #> 3 3 6 7 2 2 0 #> 4 4 8 9 1 2 1 #> 5 5 0 0 1 2 1 #> 6 6 0 0 1 1 0 #> 7 7 0 0 1 1 0 #> 8 8 0 0 1 1 0 #> 9 9 0 0 1 1 0 #> 10 10 0 0 0 2 2 data(sampleped) ped1 <- Pedigree(sampleped[sampleped$famid == \"1\",]) ped1 <- num_child(ped1, reset = TRUE) summary(ped(ped1)) #> [1] \"Ped object with 41 individuals and 13 metadata columns\""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/parent_of.html","id":null,"dir":"Reference","previous_headings":"","what":"Get parents of individuals — parent_of","title":"Get parents of individuals — parent_of","text":"Get parents individuals.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/parent_of.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get parents of individuals — parent_of","text":"","code":"# S4 method for class 'character_OR_integer' parent_of(obj, dadid, momid, id2) # S4 method for class 'Ped' parent_of(obj, id2) # S4 method for class 'Pedigree' parent_of(obj, id2)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/parent_of.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get parents of individuals — parent_of","text":"obj character vector id individuals data.frame informations corresponding columns. dadid vector containing subject, identifiers biologicals fathers. momid vector containing subject, identifiers biologicals mothers. id2 vector individuals identifiers get parents ","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/parent_of.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get parents of individuals — parent_of","text":"vector individuals identifiers corresponding parents individuals id2","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/parent_of.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get parents of individuals — parent_of","text":"","code":"data(sampleped) ped <- Pedigree(sampleped) parent_of(ped, \"1_121\") #> [1] \"1_110\" \"1_109\""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/paste0max.html","id":null,"dir":"Reference","previous_headings":"","what":"Print0 to max — paste0max","title":"Print0 to max — paste0max","text":"Print0 elements inside vector maximum reached.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/paste0max.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print0 to max — paste0max","text":"","code":"paste0max(x, max = 5, sep = \"\", ...)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/paste0max.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print0 to max — paste0max","text":"x vector. max maximum number elements print. ... Additional arguments passed print0","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/paste0max.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print0 to max — paste0max","text":"character vector aggregated maximum reached.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_avaf_infos.html","id":null,"dir":"Reference","previous_headings":"","what":"Shiny modules to display family information — ped_avaf_infos_ui","title":"Shiny modules to display family information — ped_avaf_infos_ui","text":"module allows display health availability data individuals pedigree object. output datatable. function composed two parts: UI server. UI called function ped_avaf_infos_ui() server function ped_avaf_infos_server().","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_avaf_infos.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shiny modules to display family information — ped_avaf_infos_ui","text":"","code":"ped_avaf_infos_ui(id, height = \"auto\") ped_avaf_infos_server(id, pedi, title = \"Family informations\", height = \"auto\") ped_avaf_infos_demo(height = \"auto\")"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_avaf_infos.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shiny modules to display family information — ped_avaf_infos_ui","text":"id string identify module. height height datatable. pedi reactive pedigree object. title title module.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_avaf_infos.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Shiny modules to display family information — ped_avaf_infos_ui","text":"reactive dataframe selected columns renamed names cols_needed cols_supl.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_avaf_infos.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Shiny modules to display family information — ped_avaf_infos_ui","text":"","code":"if (interactive()) { ped_avaf_infos_demo() }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_server.html","id":null,"dir":"Reference","previous_headings":"","what":"Create the server logic for the ped_shiny application — ped_server","title":"Create the server logic for the ped_shiny application — ped_server","text":"Create server logic ped_shiny application","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_server.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create the server logic for the ped_shiny application — ped_server","text":"","code":"ped_server(input, output, session, precision = 2)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_server.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create the server logic for the ped_shiny application — ped_server","text":"input input object Shiny app. output output object Shiny app. session session object Shiny app. precision Number decimal position boxes plot.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_server.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create the server logic for the ped_shiny application — ped_server","text":"shiny::shinyServer()","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_server.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create the server logic for the ped_shiny application — ped_server","text":"","code":"if (interactive()) { ped_shiny() }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_shiny.html","id":null,"dir":"Reference","previous_headings":"","what":"Run Pedixplorer Shiny application — ped_shiny","title":"Run Pedixplorer Shiny application — ped_shiny","text":"function creates shiny application manage visualize pedigree data using ped_ui() ped_server() functions.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_shiny.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run Pedixplorer Shiny application — ped_shiny","text":"","code":"ped_shiny( port = getOption(\"shiny.port\"), host = getOption(\"shiny.host\", \"127.0.0.1\"), precision = 2 )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_shiny.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run Pedixplorer Shiny application — ped_shiny","text":"port (optional) Specify port application list . host (optional) IPv4 address application listen . precision Number decimal position boxes plot.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_shiny.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Run Pedixplorer Shiny application — ped_shiny","text":"Running Shiny Application","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_shiny.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Run Pedixplorer Shiny application — ped_shiny","text":"application composed several modules: Data import Data column selection Data download Family selection Health selection Informative selection Subfamily selection Plotting pedigree Family information","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_shiny.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Run Pedixplorer Shiny application — ped_shiny","text":"","code":"if (interactive()) { ped_shiny() }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_to_legdf.html","id":null,"dir":"Reference","previous_headings":"","what":"Create plotting legend data frame from a Pedigree — ped_to_legdf","title":"Create plotting legend data frame from a Pedigree — ped_to_legdf","text":"Convert Pedigree legend data frame plotted afterwards plot_fromdf().","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_to_legdf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create plotting legend data frame from a Pedigree — ped_to_legdf","text":"","code":"# S4 method for class 'Pedigree' ped_to_legdf( obj, boxh = 1, boxw = 1, cex = 1, adjx = 0, adjy = 0, lwd = par(\"lwd\") )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_to_legdf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create plotting legend data frame from a Pedigree — ped_to_legdf","text":"obj Pedigree object boxh Height polygons elements boxw Width polygons elements cex Character expansion text adjx default=0. Controls horizontal text adjustment labels legend. adjy default=0. Controls vertical text adjustment labels legend. lwd default=par(\"lwd\"). Controls bordering line width elements legend.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_to_legdf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create plotting legend data frame from a Pedigree — ped_to_legdf","text":"list containing legend data frame user coordinates.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_to_legdf.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create plotting legend data frame from a Pedigree — ped_to_legdf","text":"data frame contains following columns: x0, y0, x1, y1: coordinates elements type: type elements fill: fill color elements border: border color elements angle: angle shading elements density: density shading elements cex: size elements label: label elements tips: tips elements (used tooltips) adjx: horizontal text adjustment labels adjy: vertical text adjustment labels columns used plot_fromdf() plot graph.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_to_legdf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create plotting legend data frame from a Pedigree — ped_to_legdf","text":"","code":"data(\"sampleped\") ped <- Pedigree(sampleped) leg_df <- ped_to_legdf(ped) summary(leg_df$df) #> id x0 y0 x1 #> Length:22 Min. : 0.000 Min. :0.000 Min. : NA #> Class :character 1st Qu.: 2.070 1st Qu.:1.000 1st Qu.: NA #> Mode :character Median : 7.902 Median :2.250 Median : NA #> Mean : 6.661 Mean :2.432 Mean :NaN #> 3rd Qu.: 9.923 3rd Qu.:3.500 3rd Qu.: NA #> Max. :14.916 Max. :7.000 Max. : NA #> NA's :22 #> y1 type fill border #> Min. : NA Length:22 Length:22 Length:22 #> 1st Qu.: NA Class :character Class :character Class :character #> Median : NA Mode :character Mode :character Mode :character #> Mean :NaN #> 3rd Qu.: NA #> Max. : NA #> NA's :22 #> angle density cex label #> Min. : NA Min. : NA Min. :1.000 Length:22 #> 1st Qu.: NA 1st Qu.: NA 1st Qu.:1.000 Class :character #> Median : NA Median : NA Median :1.000 Mode :character #> Mean :NaN Mean :NaN Mean :1.075 #> 3rd Qu.: NA 3rd Qu.: NA 3rd Qu.:1.000 #> Max. : NA Max. : NA Max. :1.500 #> NA's :22 NA's :22 NA's :2 #> tips adjx adjy #> Length:22 Min. :0 Min. :1 #> Class :character 1st Qu.:0 1st Qu.:1 #> Mode :character Median :0 Median :1 #> Mean :0 Mean :1 #> 3rd Qu.:0 3rd Qu.:1 #> Max. :0 Max. :1 #> NA's :10 NA's :10 plot_fromdf(leg_df$df, usr = c(-1,15,0,7))"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_to_plotdf.html","id":null,"dir":"Reference","previous_headings":"","what":"Create plotting data frame from a Pedigree — ped_to_plotdf","title":"Create plotting data frame from a Pedigree — ped_to_plotdf","text":"Convert Pedigree data frame elements characteristic plotted afterwards plot_fromdf().","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_to_plotdf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create plotting data frame from a Pedigree — ped_to_plotdf","text":"","code":"# S4 method for class 'Pedigree' ped_to_plotdf( obj, packed = TRUE, width = 6, align = c(1.5, 2), align_parents = TRUE, force = FALSE, cex = 1, symbolsize = cex, pconnect = 0.5, branch = 0.6, aff_mark = TRUE, id_lab = \"id\", label = NULL, precision = 3, lwd = par(\"lwd\"), ... )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_to_plotdf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create plotting data frame from a Pedigree — ped_to_plotdf","text":"obj Pedigree object ... arguments passed par() packed Pedigree compressed. (.e. allow diagonal lines connecting parents children order smaller overall width plot.) width packed output, minimum width plot, inches. align packed Pedigree, align children parents TRUE, extent possible given page width, align left margin FALSE. argument can two element vector, giving alignment parameters, logical value. TRUE, default c(1.5, 2), numeric routine alignped4() called. align_parents align_parents = TRUE, go one step try make parents child depth. (always possible). helps drawing program lining pedigrees 'join middle' via marriage. force force = TRUE, function return depth minus min(depth) depth reach state founders possible. cex Character expansion text symbolsize Size symbols pconnect connecting parent children program try make connecting line close vertical possible, subject lying inside endpoints line connects children least pconnect people. Setting option large number force line connect midpoint children. branch defines much angle used connect various levels nuclear families. aff_mark TRUE, add aff_mark box corresponding value affection column filling scale. id_lab column name id individuals. label NULL, add label box id corresponding value column given. precision number decimal places round solution . lwd default=par(\"lwd\"). Controls line width segments, arcs polygons.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_to_plotdf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create plotting data frame from a Pedigree — ped_to_plotdf","text":"list containing data frame user coordinates.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_to_plotdf.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create plotting data frame from a Pedigree — ped_to_plotdf","text":"data frame contains following columns: x0, y0, x1, y1: coordinates elements type: type elements fill: fill color elements border: border color elements angle: angle shading elements density: density shading elements cex: size elements label: label elements tips: tips elements (used tooltips) adjx: horizontal text adjustment labels adjy: vertical text adjustment labels columns used plot_fromdf() plot graph.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_to_plotdf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create plotting data frame from a Pedigree — ped_to_plotdf","text":"","code":"data(sampleped) ped1 <- Pedigree(sampleped[sampleped$famid == 1,]) plot_df <- ped_to_plotdf(ped1) summary(plot_df$df) #> id x0 y0 x1 #> Length:212 Min. : 0.000 Min. :1.000 Min. : 0.000 #> Class :character 1st Qu.: 3.000 1st Qu.:2.487 1st Qu.: 3.331 #> Mode :character Median : 7.000 Median :3.091 Median : 7.505 #> Mean : 7.296 Mean :3.090 Mean : 7.641 #> 3rd Qu.:11.750 3rd Qu.:4.000 3rd Qu.:11.831 #> Max. :15.010 Max. :4.275 Max. :15.010 #> NA's :126 #> y1 type fill border #> Min. :1.091 Length:212 Length:212 Length:212 #> 1st Qu.:2.355 Class :character Class :character Class :character #> Median :2.750 Mode :character Mode :character Mode :character #> Mean :2.875 #> 3rd Qu.:3.552 #> Max. :3.750 #> NA's :126 #> angle density cex label tips #> Min. : NA Min. : NA Min. :1 Length:212 Length:212 #> 1st Qu.: NA 1st Qu.: NA 1st Qu.:1 Class :character Class :character #> Median : NA Median : NA Median :1 Mode :character Mode :character #> Mean :NaN Mean :NaN Mean :1 #> 3rd Qu.: NA 3rd Qu.: NA 3rd Qu.:1 #> Max. : NA Max. : NA Max. :1 #> NA's :212 NA's :212 #> adjx adjy #> Min. : NA Min. : NA #> 1st Qu.: NA 1st Qu.: NA #> Median : NA Median : NA #> Mean :NaN Mean :NaN #> 3rd Qu.: NA 3rd Qu.: NA #> Max. : NA Max. : NA #> NA's :212 NA's :212 plot_fromdf(plot_df$df, usr = plot_df$par_usr$usr, boxh = plot_df$par_usr$boxh, boxw = plot_df$par_usr$boxw )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_ui.html","id":null,"dir":"Reference","previous_headings":"","what":"Create the user interface for the ped_shiny application — ped_ui","title":"Create the user interface for the ped_shiny application — ped_ui","text":"Create user interface ped_shiny application","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_ui.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create the user interface for the ped_shiny application — ped_ui","text":"shiny::shinyUI()","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/ped_ui.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create the user interface for the ped_shiny application — ped_ui","text":"","code":"if (interactive()) { ped_shiny() }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/permute.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate all possible permutation — permute","title":"Generate all possible permutation — permute","text":"Given vector length n, generate possible permutations numbers 1 n. recursive routine, efficient.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/permute.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate all possible permutation — permute","text":"","code":"permute(x)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/permute.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate all possible permutation — permute","text":"x vector length n","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/permute.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate all possible permutation — permute","text":"matrix n cols n! rows","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_download.html","id":null,"dir":"Reference","previous_headings":"","what":"Shiny module to export plot — plot_download_ui","title":"Shiny module to export plot — plot_download_ui","text":"module allow export multiple type plot reactive object. file type currently supported png, pdf html. function composed two parts: UI server. UI called function plot_download_ui() server function plot_download_server().","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_download.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shiny module to export plot — plot_download_ui","text":"","code":"plot_download_ui(id) plot_download_server( id, my_plot, filename = \"saveplot\", label = \"Download\", width = 500, height = 500, ext = \"png\" ) plot_download_demo()"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_download.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shiny module to export plot — plot_download_ui","text":"id string. my_plot Reactive object containing plot. filename string name file. label string name download button. width numeric set width plot. height numeric set height plot. ext string set extension file.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_download.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Shiny module to export plot — plot_download_ui","text":"shiny module export plot.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_download.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Shiny module to export plot — plot_download_ui","text":"","code":"if (interactive()) { plot_download_demo() }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_fromdf.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a plot from a data.frame — plot_fromdf","title":"Create a plot from a data.frame — plot_fromdf","text":"function used create plot data.frame. ggplot_gen = TRUE, plot generated ggplot2 returned invisibly.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_fromdf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a plot from a data.frame — plot_fromdf","text":"","code":"plot_fromdf( df, usr = NULL, title = NULL, ggplot_gen = FALSE, boxw = 1, boxh = 1, add_to_existing = FALSE )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_fromdf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a plot from a data.frame — plot_fromdf","text":"df data.frame following columns: type: type element plot. Can text, segments, arc polygons. polygons, name polygon must form poly_*_* poly one type given polygons(), first * number slice polygon second * position division polygon. x0: x coordinate center element. y0: y coordinate center element. x1: x coordinate end element. used segments arc. y1: y coordinate end element. used segments arc. fill: fill color element. border: border color element. density: density element. angle: angle element. label: label element. used text. cex: size element. adjx: x adjustment element. used text. adjy: y adjustment element. used text. usr user coordinates plot. title title plot. ggplot_gen TRUE add segments ggplot object boxw Width polygons elements boxh Height polygons elements add_to_existing TRUE, plot added current plot.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_fromdf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a plot from a data.frame — plot_fromdf","text":"invisible ggplot object plot current plotting device","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_fromdf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a plot from a data.frame — plot_fromdf","text":"","code":"data(sampleped) ped1 <- Pedigree(sampleped[sampleped$famid == 1,]) lst <- ped_to_plotdf(ped1) if (interactive()) { plot_fromdf(lst$df, lst$par_usr$usr, boxw = lst$par_usr$boxw, boxh = lst$par_usr$boxh ) }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_legend.html","id":null,"dir":"Reference","previous_headings":"","what":"Shiny module to generate pedigree graph legend. — plot_legend_ui","title":"Shiny module to generate pedigree graph legend. — plot_legend_ui","text":"module allows plot legend pedigree object. function composed two parts: UI server. UI called function plot_legend_ui() server function plot_legend_server(). Small internal function used plotting Pedigree object legend","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_legend.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shiny module to generate pedigree graph legend. — plot_legend_ui","text":"","code":"plot_legend_ui(id, height = \"200px\") plot_legend_server( id, pedi, leg_loc = c(0.2, 1, 0, 1), lwd = par(\"lwd\"), boxw = 1, boxh = 1, adjx = 0, adjy = 0 ) plot_legend_demo(height = \"200px\", leg_loc = c(0.2, 1, 0, 1)) plot_legend( pedi, cex = 1, boxw = 0.1, boxh = 0.1, adjx = 0, adjy = 0, leg_loc = c(0, 1, 0, 1), add_to_existing = FALSE, usr = NULL, lwd = par(\"lwd\") )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_legend.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shiny module to generate pedigree graph legend. — plot_legend_ui","text":"id string. pedi reactive pedigree object. lwd default=par(\"lwd\"). Controls bordering line width elements legend. boxw Width polygons elements boxh Height polygons elements adjx default=0. Controls horizontal text adjustment labels legend. adjy default=0. Controls vertical text adjustment labels legend. cex Character expansion text","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_legend.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Shiny module to generate pedigree graph legend. — plot_legend_ui","text":"static UI legend.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_legend.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Shiny module to generate pedigree graph legend. — plot_legend_ui","text":"","code":"if (interactive()) { plot_legend_demo() }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_ped.html","id":null,"dir":"Reference","previous_headings":"","what":"Shiny module to generate pedigree graph. — plot_ped_ui","title":"Shiny module to generate pedigree graph. — plot_ped_ui","text":"module allows plot pedigree object. plot can interactive. function composed two parts: UI server. UI called function plot_ped_ui() server function plot_ped_server().","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_ped.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shiny module to generate pedigree graph. — plot_ped_ui","text":"","code":"plot_ped_ui(id) plot_ped_server( id, pedi, title, precision = 2, max_ind = 500, lwd = par(\"lwd\") ) plot_ped_demo(pedi, precision = 2, max_ind = 500)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_ped.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shiny module to generate pedigree graph. — plot_ped_ui","text":"id string. pedi reactive pedigree object. title string name plot. precision integer set precision plot. max_ind integer set maximum number individuals plot.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_ped.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Shiny module to generate pedigree graph. — plot_ped_ui","text":"reactive ggplot pedigree object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_ped.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Shiny module to generate pedigree graph. — plot_ped_ui","text":"","code":"if (interactive()) { data(\"sampleped\") pedi <- shiny::reactive({ Pedigree(sampleped[sampleped$famid == \"1\", ]) }) plot_ped_demo(pedi) }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_pedigree.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Pedigrees — plot,Pedigree,missing-method","title":"Plot Pedigrees — plot,Pedigree,missing-method","text":"function used plot Pedigree object. wrapper plot_fromdf() ped_to_plotdf() well ped_to_legdf() legend = TRUE.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_pedigree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Pedigrees — plot,Pedigree,missing-method","text":"","code":"# S4 method for class 'Pedigree,missing' plot( x, aff_mark = TRUE, id_lab = \"id\", label = NULL, ggplot_gen = FALSE, cex = 1, symbolsize = 1, branch = 0.6, packed = TRUE, align = c(1.5, 2), align_parents = TRUE, force = FALSE, width = 6, title = NULL, subreg = NULL, pconnect = 0.5, fam_to_plot = 1, legend = FALSE, leg_cex = 0.8, leg_symbolsize = 0.5, leg_loc = NULL, leg_adjx = 0, leg_adjy = 0, precision = 2, lwd = par(\"lwd\"), ... )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_pedigree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Pedigrees — plot,Pedigree,missing-method","text":"x Pedigree object. aff_mark TRUE, add aff_mark box corresponding value affection column filling scale. id_lab column name id individuals. label NULL, add label box id corresponding value column given. ggplot_gen TRUE add segments ggplot object cex Character expansion text symbolsize Size symbols branch defines much angle used connect various levels nuclear families. packed Pedigree compressed. (.e. allow diagonal lines connecting parents children order smaller overall width plot.) align packed Pedigree, align children parents TRUE, extent possible given page width, align left margin FALSE. argument can two element vector, giving alignment parameters, logical value. TRUE, default c(1.5, 2), numeric routine alignped4() called. align_parents align_parents = TRUE, go one step try make parents child depth. (always possible). helps drawing program lining pedigrees 'join middle' via marriage. force force = TRUE, function return depth minus min(depth) depth reach state founders possible. width packed output, minimum width plot, inches. title title plot. subreg 4-element vector (min x, max x, min depth, max depth), used edit away portions plot coordinates returned ped_to_plotdf(). useful zooming particular region Pedigree. pconnect connecting parent children program try make connecting line close vertical possible, subject lying inside endpoints line connects children least pconnect people. Setting option large number force line connect midpoint children. fam_to_plot default=1. Pedigree contains multiple families, parameter can used select family plot. can numeric value character value. numeric, index family plot returned unique(x$ped$famid). character, family id plot. legend default=FALSE. TRUE, legend added plot. leg_cex default=0.8. Controls size legend text. leg_symbolsize default=0.5. Controls size legend symbols. leg_loc default=NULL. NULL, legend placed upper right corner plot. Otherwise, 4-element vector form (x0, x1, y0, y1) can used specify location legend. leg_adjx default=0. Controls horizontal labels adjustment legend. leg_adjy default=0. Controls vertical labels adjustment legend. precision number decimal places round solution . lwd default=par(\"lwd\"). Controls line width segments, arcs polygons. ... Extra options feed ","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_pedigree.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot Pedigrees — plot,Pedigree,missing-method","text":"invisible list containing df : data.frame used plot Pedigree par_usr : user coordinates used plot Pedigree ggplot : ggplot object ggplot_gen = TRUE","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_pedigree.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot Pedigrees — plot,Pedigree,missing-method","text":"Two important parameters control looks result. One user specified maximum width. smallest possible width maximum number subjects line, user's suggestion low increased 1 + amount (give just little wiggle room). make Pedigree children centered parents simply make width large enough, however, symbols may get small. second align, vector 2 alignment parameters b. set siblings set locations x parents p=c(p1,p2) alignment penalty $$(1/k^)\\sum{=1}{k} [(x_i - (p1+p2)/2)]^2$$ $$\\sum(x- \\overline(p))^2/(k^)$$ k number siblings set. = 1 moving sibship k sibs one unit left right optimal incur cost moving one 1 two sibs place. = 0 large sibships harder move small ones, default value = 1.5 slightly easier move small ones. rationale default long parents somewhere first last siblings result looks fairly good, flexible spacing large family. tethering sibs single spot kept close . alignment penalty spouses \\(b(x_1 - x_2)^2\\), tends keep together. size b controls relative importance sib-parent spouse-spouse closeness.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_pedigree.html","id":"side-effects","dir":"Reference","previous_headings":"","what":"Side Effects","title":"Plot Pedigrees — plot,Pedigree,missing-method","text":"Creates plot current plotting device.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/plot_pedigree.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot Pedigrees — plot,Pedigree,missing-method","text":"","code":"data(sampleped) pedAll <- Pedigree(sampleped) if (interactive()) { plot(pedAll) }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/polyfun.html","id":null,"dir":"Reference","previous_headings":"","what":"Polygonal element — polyfun","title":"Polygonal element — polyfun","text":"Create list x y coordinates polygon given number slices list coordinates polygon.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/polyfun.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Polygonal element — polyfun","text":"","code":"polyfun(nslice, coor)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/polyfun.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Polygonal element — polyfun","text":"nslice Number slices polygon coor Element form generate polygon containing x y coordinates theta","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/polyfun.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Polygonal element — polyfun","text":"list x y coordinates","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/polyfun.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Polygonal element — polyfun","text":"","code":"polyfun(2, list( x = c(-0.5, -0.5, 0.5, 0.5), y = c(-0.5, 0.5, 0.5, -0.5), theta = -c(3, 5, 7, 9) * pi / 4 )) #> [[1]] #> [[1]]$x #> [1] 0.000000e+00 5.551115e-17 -5.000000e-01 -5.000000e-01 -1.110223e-16 #> #> [[1]]$y #> [1] 0.5 0.0 0.0 1.0 1.0 #> #> #> [[2]] #> [[2]]$x #> [1] 0.000000e+00 -1.110223e-16 5.000000e-01 5.000000e-01 1.665335e-16 #> #> [[2]]$y #> [1] 0.5 1.0 1.0 0.0 0.0 #> #>"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/polygons.html","id":null,"dir":"Reference","previous_headings":"","what":"List of polygonal elements — polygons","title":"List of polygonal elements — polygons","text":"Create list polygonal elements x, y coordinates theta square, circle, diamond triangle. number slices element can specified.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/polygons.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List of polygonal elements — polygons","text":"","code":"polygons(nslice = 1)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/polygons.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List of polygonal elements — polygons","text":"nslice Number slices element nslice > 1, elements created polyfun().","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/polygons.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List of polygonal elements — polygons","text":"list polygonal elements x, y coordinates theta slice.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/polygons.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"List of polygonal elements — polygons","text":"","code":"polygons() #> $square #> $square[[1]] #> $square[[1]]$x #> [1] -0.5 -0.5 0.5 0.5 #> #> $square[[1]]$y #> [1] 0 1 1 0 #> #> #> #> $circle #> $circle[[1]] #> $circle[[1]]$x #> [1] 0.50000000 0.49589501 0.48364743 0.46345838 0.43565935 0.40070681 #> [7] 0.35917468 0.31174490 0.25919628 0.20239167 0.14226379 0.07979995 #> [13] 0.01602579 -0.04801151 -0.11126047 -0.17268253 -0.23126915 -0.28605833 #> [19] -0.33615045 -0.38072298 -0.41904405 -0.45048443 -0.47452787 -0.49077958 #> [25] -0.49897270 -0.49897270 -0.49077958 -0.47452787 -0.45048443 -0.41904405 #> [31] -0.38072298 -0.33615045 -0.28605833 -0.23126915 -0.17268253 -0.11126047 #> [37] -0.04801151 0.01602579 0.07979995 0.14226379 0.20239167 0.25919628 #> [43] 0.31174490 0.35917468 0.40070681 0.43565935 0.46345838 0.48364743 #> [49] 0.49589501 0.50000000 #> #> $circle[[1]]$y #> [1] 0.5000000000 0.5639385808 0.6268272920 0.6876335024 0.7453587760 #> [6] 0.7990552652 0.8478412753 0.8909157412 0.9275713815 0.9572063115 #> [11] 0.9793339265 0.9935908917 0.9997431081 0.9976895565 0.9874639561 #> [16] 0.9692342110 0.9432996532 0.9100861273 0.8701389985 0.8241141977 #> [21] 0.7727674506 0.7169418696 0.6575541090 0.5955793144 0.5320351100 #> [26] 0.4679648900 0.4044206856 0.3424458910 0.2830581304 0.2272325494 #> [31] 0.1758858023 0.1298610015 0.0899138727 0.0567003468 0.0307657890 #> [36] 0.0125360439 0.0023104435 0.0002568919 0.0064091083 0.0206660735 #> [41] 0.0427936885 0.0724286185 0.1090842588 0.1521587247 0.2009447348 #> [46] 0.2546412240 0.3123664976 0.3731727080 0.4360614192 0.5000000000 #> #> #> #> $diamond #> $diamond[[1]] #> $diamond[[1]]$x #> [1] 0.0 -0.5 0.0 0.5 #> #> $diamond[[1]]$y #> [1] 0.0 0.5 1.0 0.5 #> #> #> #> $triangle #> $triangle[[1]] #> $triangle[[1]]$x #> [1] 0.00 -0.56 0.56 #> #> $triangle[[1]]$y #> [1] 0 1 1 #> #> #> polygons(4) #> $square #> $square[[1]] #> $square[[1]]$x #> [1] 0.000000e+00 5.551115e-17 -5.000000e-01 -5.000000e-01 #> #> $square[[1]]$y #> [1] 0.5 0.0 0.0 0.5 #> #> #> $square[[2]] #> $square[[2]]$x #> [1] 0.000000e+00 -5.000000e-01 -5.000000e-01 -1.110223e-16 #> #> $square[[2]]$y #> [1] 0.5 0.5 1.0 1.0 #> #> #> $square[[3]] #> $square[[3]]$x #> [1] 0.000000e+00 -1.110223e-16 5.000000e-01 5.000000e-01 #> #> $square[[3]]$y #> [1] 0.5 1.0 1.0 0.5 #> #> #> $square[[4]] #> $square[[4]]$x #> [1] 0.000000e+00 5.000000e-01 5.000000e-01 1.665335e-16 #> #> $square[[4]]$y #> [1] 0.5 0.5 0.0 0.0 #> #> #> #> $circle #> $circle[[1]] #> $circle[[1]]$x #> [1] 0.000000e+00 3.061617e-17 -6.526310e-02 -1.294095e-01 -1.913417e-01 #> [6] -2.500000e-01 -3.043807e-01 -3.535534e-01 -3.966767e-01 -4.330127e-01 #> [11] -4.619398e-01 -4.829629e-01 -4.957224e-01 -5.000000e-01 #> #> $circle[[1]]$y #> [1] 0.500000000 0.000000000 0.004277569 0.017037087 0.038060234 0.066987298 #> [7] 0.103323330 0.146446609 0.195619285 0.250000000 0.308658284 0.370590477 #> [13] 0.434736904 0.500000000 #> #> #> $circle[[2]] #> $circle[[2]]$x #> [1] 0.000000e+00 -5.000000e-01 -4.957224e-01 -4.829629e-01 -4.619398e-01 #> [6] -4.330127e-01 -3.966767e-01 -3.535534e-01 -3.043807e-01 -2.500000e-01 #> [11] -1.913417e-01 -1.294095e-01 -6.526310e-02 -9.184851e-17 #> #> $circle[[2]]$y #> [1] 0.5000000 0.5000000 0.5652631 0.6294095 0.6913417 0.7500000 0.8043807 #> [8] 0.8535534 0.8966767 0.9330127 0.9619398 0.9829629 0.9957224 1.0000000 #> #> #> $circle[[3]] #> $circle[[3]]$x #> [1] 0.000000e+00 -9.184851e-17 6.526310e-02 1.294095e-01 1.913417e-01 #> [6] 2.500000e-01 3.043807e-01 3.535534e-01 3.966767e-01 4.330127e-01 #> [11] 4.619398e-01 4.829629e-01 4.957224e-01 5.000000e-01 #> #> $circle[[3]]$y #> [1] 0.5000000 1.0000000 0.9957224 0.9829629 0.9619398 0.9330127 0.8966767 #> [8] 0.8535534 0.8043807 0.7500000 0.6913417 0.6294095 0.5652631 0.5000000 #> #> #> $circle[[4]] #> $circle[[4]]$x #> [1] 0.000000e+00 5.000000e-01 4.957224e-01 4.829629e-01 4.619398e-01 #> [6] 4.330127e-01 3.966767e-01 3.535534e-01 3.043807e-01 2.500000e-01 #> [11] 1.913417e-01 1.294095e-01 6.526310e-02 1.530808e-16 #> #> $circle[[4]]$y #> [1] 0.500000000 0.500000000 0.434736904 0.370590477 0.308658284 0.250000000 #> [7] 0.195619285 0.146446609 0.103323330 0.066987298 0.038060234 0.017037087 #> [13] 0.004277569 0.000000000 #> #> #> #> $diamond #> $diamond[[1]] #> $diamond[[1]]$x #> [1] 0.000000e+00 5.551115e-17 0.000000e+00 -5.000000e-01 #> #> $diamond[[1]]$y #> [1] 5.000000e-01 5.551115e-17 0.000000e+00 5.000000e-01 #> #> #> $diamond[[2]] #> $diamond[[2]]$x #> [1] 0.000000e+00 -5.000000e-01 -5.000000e-01 -1.110223e-16 #> #> $diamond[[2]]$y #> [1] 0.5 0.5 0.5 1.0 #> #> #> $diamond[[3]] #> $diamond[[3]]$x #> [1] 0.000000e+00 -1.110223e-16 0.000000e+00 5.000000e-01 #> #> $diamond[[3]]$y #> [1] 0.5 1.0 1.0 0.5 #> #> #> $diamond[[4]] #> $diamond[[4]]$x #> [1] 0.000000e+00 5.000000e-01 5.000000e-01 1.665335e-16 #> #> $diamond[[4]]$y #> [1] 5.000000e-01 5.000000e-01 5.000000e-01 1.665335e-16 #> #> #> #> $triangle #> $triangle[[1]] #> $triangle[[1]]$x #> [1] 0.00 0.00 -0.56 -0.28 #> #> $triangle[[1]]$y #> [1] 0.5 0.0 0.0 0.5 #> #> #> $triangle[[2]] #> $triangle[[2]]$x #> [1] 0.000000e+00 -2.800000e-01 0.000000e+00 -1.110223e-16 #> #> $triangle[[2]]$y #> [1] 0.5 0.5 1.0 1.0 #> #> #> $triangle[[3]] #> $triangle[[3]]$x #> [1] 0.000000e+00 -1.110223e-16 2.800000e-01 #> #> $triangle[[3]]$y #> [1] 0.5 1.0 0.5 #> #> #> $triangle[[4]] #> $triangle[[4]]$x #> [1] 0.000000e+00 2.800000e-01 5.600000e-01 1.110223e-16 #> #> $triangle[[4]]$y #> [1] 0.5 0.5 0.0 0.0 #> #> #>"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/read_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Read data from file path — read_data","title":"Read data from file path — read_data","text":"Read dataframe based extension file","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/read_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read data from file path — read_data","text":"","code":"read_data( file, sep = \";\", quote = \"'\", header = TRUE, df_name = NA, strings_as_factors = FALSE, to_char = TRUE, na_values = c(\"\", \"NA\", \"NULL\", \"None\") )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/read_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read data from file path — read_data","text":"file file path sep string defining separator use file quote string defining quote use header boolean defining dataframe contain header df_name string defining name dataframe / sheet use strings_as_factors boolean defining strings interpreted ad factor to_char boolean defining dataset read character.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/read_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read data from file path — read_data","text":"dataframe.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/read_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read data from file path — read_data","text":"function detect extension file proceed use according function read parameters given user.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/read_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read data from file path — read_data","text":"","code":"if (FALSE) { # \\dontrun{ read_data('path/to/my/file.txt', sep=',', header=FALSE) } # }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/rel_code_to_factor.html","id":null,"dir":"Reference","previous_headings":"","what":"Relationship code variable to ordered factor — rel_code_to_factor","title":"Relationship code variable to ordered factor — rel_code_to_factor","text":"Relationship code variable ordered factor","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/rel_code_to_factor.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Relationship code variable to ordered factor — rel_code_to_factor","text":"","code":"rel_code_to_factor(code)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/rel_code_to_factor.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Relationship code variable to ordered factor — rel_code_to_factor","text":"code character, factor numeric vector corresponding relation code individuals: MZ twin = Monozygotic twin DZ twin = Dizygotic twin UZ twin = twin unknown zygosity Spouse = Spouse following values recognized: character() factor() : \"MZ twin\", \"DZ twin\", \"UZ twin\", \"Spouse\" without space words. case important. numeric() : 1 = \"MZ twin\", 2 = \"DZ twin\", 3 = \"UZ twin\", 4 = \"Spouse\"","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/rel_code_to_factor.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Relationship code variable to ordered factor — rel_code_to_factor","text":"ordered factor vector containing transformed variable \"MZ twin\" < \"DZ twin\" < \"UZ twin\" < \"Spouse\"","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/rel_code_to_factor.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Relationship code variable to ordered factor — rel_code_to_factor","text":"","code":"rel_code_to_factor(c(1, 2, 3, 4, \"MZ twin\", \"DZ twin\", \"UZ twin\", \"Spouse\")) #> [1] MZ twin DZ twin UZ twin Spouse MZ twin DZ twin UZ twin Spouse #> Levels: MZ twin < DZ twin < UZ twin < Spouse"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/relped.html","id":null,"dir":"Reference","previous_headings":"","what":"Relped data — relped","title":"Relped data — relped","text":"Small set related individuals testing purposes.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/relped.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Relped data — relped","text":"","code":"data(\"relped\")"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/relped.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Relped data — relped","text":"dataframe composed 4 columns: id1 : first individual identifier, id2 : second individual identifier, code : relationship two individuals, famid : family identifier. relationship codes : 1 Monozygotic twin 2 Dizygotic twin 3 Twin unknown zygosity 4 Spouse relationship","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/relped.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Relped data — relped","text":"small fictive data set relation accompanies sampleped data set. aim create data set variety relationships. 8 relations 4 different types relationships.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/relped.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Relped data — relped","text":"","code":"data(\"relped\") data(\"sampleped\") pedi <- Pedigree(sampleped, relped) summary(pedi) #> Pedigree object with #> [1] \"Ped object with 55 individuals and 13 metadata columns\" #> [1] \"Rel object with 8 relationshipswith 2 MZ twin, 3 DZ twin, 2 UZ twin, 1 Spouse\" if (interactive()) { plot(pedi) }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/sampleped.html","id":null,"dir":"Reference","previous_headings":"","what":"Sampleped data — sampleped","title":"Sampleped data — sampleped","text":"Small sample pedigree data set testing purposes.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/sampleped.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sampleped data — sampleped","text":"","code":"data(\"sampleped\")"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/sampleped.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Sampleped data — sampleped","text":"data frame 55 observations, one line per subject, following 7 variables. famid : Family identifier id : Subject identifier dadid : Identifier father, father part data set; zero otherwise momid : Identifier mother, mother part data set; zero otherwise sex : 1 male 2 female affected : 1 0 avail : 1 0 num : Numerical test variable 0 6 randomly distributed","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/sampleped.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Sampleped data — sampleped","text":"small fictive pedigree data set, 55 individuals 2 families. aim create data set variety pedigree structures.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/sampleped.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sampleped data — sampleped","text":"","code":"data(\"sampleped\") pedi <- Pedigree(sampleped) summary(pedi) #> Pedigree object with #> [1] \"Ped object with 55 individuals and 13 metadata columns\" #> [1] \"Rel object with 0 relationshipswith 0 MZ twin, 0 DZ twin, 0 UZ twin, 0 Spouse\" if (interactive()) { plot(pedi) }"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/set_plot_area.html","id":null,"dir":"Reference","previous_headings":"","what":"Set plotting area — set_plot_area","title":"Set plotting area — set_plot_area","text":"Set plotting area","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/set_plot_area.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set plotting area — set_plot_area","text":"","code":"set_plot_area(cex, id, maxlev, xrange, symbolsize, precision = 3, ...)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/set_plot_area.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set plotting area — set_plot_area","text":"cex Character expansion text id character vector identifiers individuals maxlev Maximum level xrange Range x values symbolsize Size symbols precision number significant digits round solution . ... arguments passed par()","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/set_plot_area.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set plotting area — set_plot_area","text":"List user coordinates, old par, box width, box height, label height leg height","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/sex_to_factor.html","id":null,"dir":"Reference","previous_headings":"","what":"Gender variable to ordered factor — sex_to_factor","title":"Gender variable to ordered factor — sex_to_factor","text":"Gender variable ordered factor","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/sex_to_factor.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Gender variable to ordered factor — sex_to_factor","text":"","code":"sex_to_factor(sex)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/sex_to_factor.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Gender variable to ordered factor — sex_to_factor","text":"sex character, factor numeric vector corresponding gender individuals. transformed ordered factor following levels: male < female < unknown < terminated following values recognized: character() factor() : \"f\", \"m\", \"woman\", \"man\", \"male\", \"female\", \"unknown\", \"terminated\" numeric() : 1 = \"male\", 2 = \"female\", 3 = \"unknown\", 4 = \"terminated\"","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/sex_to_factor.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Gender variable to ordered factor — sex_to_factor","text":"ordered factor vector containing transformed variable \"male\" < \"female\" < \"unknown\" < \"terminated\"","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/sex_to_factor.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Gender variable to ordered factor — sex_to_factor","text":"","code":"sex_to_factor(c(1, 2, 3, 4, \"f\", \"m\", \"man\", \"female\")) #> [1] male female unknown terminated female male male #> [8] female #> Levels: male < female < unknown < terminated"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/shift.html","id":null,"dir":"Reference","previous_headings":"","what":"Shift set of siblings to the left or right — shift","title":"Shift set of siblings to the left or right — shift","text":"Shift set siblings left right","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/shift.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shift set of siblings to the left or right — shift","text":"","code":"shift(id, sibs, goleft, hint, twinrel, twinset)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/shift.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shift set of siblings to the left or right — shift","text":"id id subject shifted sibs ids siblings goleft TRUE, shift left, otherwise right hint current hint vector twinrel twin relationship matrix twinset twinset vector","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/shift.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Shift set of siblings to the left or right — shift","text":"updated hint vector","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/shift.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Shift set of siblings to the left or right — shift","text":"routine used auto_hint(). shifts set siblings left right, marriage edge set siblings, closest spouse. also shifts subject , edge set siblings, closest spouse. also shifts monozygotic twins, , together within set twins.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/shrink.html","id":null,"dir":"Reference","previous_headings":"","what":"Shrink Pedigree object — shrink","title":"Shrink Pedigree object — shrink","text":"Shrink Pedigree object specified bit size priority placed trimming uninformative subjects. algorithm useful getting Pedigree condensed minimally informative size algorithms testing limited size Pedigree. avail affected NULL, extracted corresponding accessors Ped object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/shrink.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shrink Pedigree object — shrink","text":"","code":"# S4 method for class 'Pedigree' shrink(obj, avail = NULL, affected = NULL, max_bits = 16) # S4 method for class 'Ped' shrink(obj, avail = NULL, affected = NULL, max_bits = 16)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/shrink.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shrink Pedigree object — shrink","text":"obj Pedigree Ped object. avail logical vector availability status individuals (.e. FALSE = available, TRUE = available, NA = unknown). affected logical vector affection status individuals (.e. FALSE = unaffected, TRUE = affected, NA = unknown). max_bits Optional, bit size shrink Pedigree","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/shrink.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Shrink Pedigree object — shrink","text":"list containing following elements: pedObj: Pedigree object trimming id_trim: Vector ids trimmed Pedigree id_lst: List ids trimmed category bit_size: Vector bit sizes trimming step avail: Vector availability status trimming pedSizeOriginal: Number subjects original Pedigree pedSizeIntermed: Number subjects initial trimming pedSizeFinal: Number subjects final trimming","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/shrink.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Shrink Pedigree object — shrink","text":"Iteratively remove subjects Pedigree. random removal members previously controlled seed argument, remove , forcing users control randomness outside function. First remove uninformative subjects, .e., unavailable (genotyped) available descendants. Next, available terminal subjects unknown phenotype parents available. Last, iteratively shrinks Pedigrees preferentially removing individuals (chosen random multiple status): Subjects unknown affected status Subjects unaffected affected status Affected subjects.","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/shrink.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Shrink Pedigree object — shrink","text":"Original Dan Schaid, updated Jason Sinnwell Louis Le Nézet","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/shrink.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Shrink Pedigree object — shrink","text":"","code":"data(sampleped) ped1 <- Pedigree(sampleped[sampleped$famid == '1',]) shrink(ped1, max_bits = 12) #> $pedObj #> Pedigree object with: #> Ped object with 13 individuals and 13 metadata columns: #> id dadid momid sex famid steril #> col_class #> 1_103 1_103 male 1 #> 1_104 1_104 female 1 #> 1_105 1_105 male 1 #> 1_106 1_106 female 1 #> 1_109 1_109 female 1 #> ... ... ... ... ... ... ... #> 1_118 1_118 1_105 1_106 female 1 #> 1_119 1_119 1_105 1_106 male 1 #> 1_124 1_124 1_110 1_109 male 1 #> 1_127 1_127 1_114 1_115 male 1 #> 1_128 1_128 1_114 1_115 male 1 #> status avail affected useful kin isinf #> col_class #> 1_103 FALSE TRUE #> 1_104 FALSE FALSE #> 1_105 FALSE #> 1_106 FALSE #> 1_109 TRUE FALSE #> ... ... ... ... ... ... ... #> 1_118 TRUE TRUE #> 1_119 TRUE TRUE #> 1_124 TRUE TRUE #> 1_127 TRUE TRUE #> 1_128 TRUE TRUE #> num_child_tot num_child_dir num_child_ind | family indId #> col_class #> 1_103 2 2 0 1 103 #> 1_104 2 2 0 1 104 #> 1_105 3 3 0 1 105 #> 1_106 3 3 0 1 106 #> 1_109 1 1 0 1 109 #> ... ... ... ... ... ... #> 1_118 0 0 0 1 118 #> 1_119 0 0 0 1 119 #> 1_124 0 0 0 1 124 #> 1_127 0 0 0 1 127 #> 1_128 0 0 0 1 128 #> fatherId motherId gender affection available #> col_class #> 1_103 135 136 1 1 0 #> 1_104 2 0 0 #> 1_105 1 0 #> 1_106 2 0 #> 1_109 101 102 2 0 1 #> ... ... ... ... ... ... #> 1_118 105 106 2 1 1 #> 1_119 105 106 1 1 1 #> 1_124 110 109 1 1 1 #> 1_127 114 115 1 1 1 #> 1_128 114 115 1 1 1 #> num error sterilisation vitalStatus affection_mods #> col_class #> 1_103 2 1 #> 1_104 4 0 #> 1_105 6 NA #> 1_106 1 NA #> 1_109 3 0 #> ... ... ... ... ... ... #> 1_118 2 1 #> 1_119 6 1 #> 1_124 1 #> 1_127 5 1 #> 1_128 3 1 #> avail_mods #> col_class #> 1_103 0 #> 1_104 0 #> 1_105 0 #> 1_106 0 #> 1_109 1 #> ... ... #> 1_118 1 #> 1_119 1 #> 1_124 1 #> 1_127 1 #> 1_128 1 #> Rel object with 0 relationshipswith 0 MZ twin, 0 DZ twin, 0 UZ twin, 0 Spouse: #> id1 id2 code famid #> #> #> $id_trim #> #> \"1_101\" \"1_102\" \"1_107\" \"1_108\" \"1_111\" \"1_113\" \"1_121\" \"1_122\" \"1_123\" \"1_131\" #> id #> \"1_132\" \"1_134\" \"1_139\" \"1_141\" \"1_140\" \"1_130\" \"1_126\" \"1_125\" \"1_129\" \"1_133\" #> #> \"1_116\" #> #> $id_lst #> $id_lst$unavail #> [1] \"1_101\" \"1_102\" \"1_107\" \"1_108\" \"1_111\" \"1_113\" \"1_121\" \"1_122\" \"1_123\" #> [10] \"1_131\" \"1_132\" \"1_134\" \"1_139\" #> #> $id_lst$affect #> id #> \"1_141\" \"1_140\" \"1_130\" \"1_126\" \"1_125\" \"1_129\" \"1_133\" \"1_116\" #> #> #> $bit_size #> [1] 46 29 27 23 21 19 15 14 13 11 #> #> $avail #> [1] FALSE FALSE FALSE FALSE TRUE TRUE FALSE FALSE TRUE TRUE TRUE TRUE #> [13] TRUE #> #> $pedSizeOriginal #> [1] 41 #> #> $pedSizeIntermed #> [1] 28 #> #> $pedSizeFinal #> [1] 13 #>"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/sketch.html","id":null,"dir":"Reference","previous_headings":"","what":"Sketch of the family information table — sketch","title":"Sketch of the family information table — sketch","text":"Simple function create sketch family information table.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/sketch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sketch of the family information table — sketch","text":"","code":"sketch(var_name)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/sketch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sketch of the family information table — sketch","text":"var_name name health variable","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/sketch.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sketch of the family information table — sketch","text":"html sketch family information table","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/subregion.html","id":null,"dir":"Reference","previous_headings":"","what":"Subset a region of a Pedigree — subregion","title":"Subset a region of a Pedigree — subregion","text":"Subset region Pedigree","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/subregion.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subset a region of a Pedigree — subregion","text":"","code":"subregion(df, subreg = NULL)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/subregion.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Subset a region of a Pedigree — subregion","text":"df data frame plot coordinates subreg 4-element vector (min x, max x, min depth, max depth), used edit away portions plot coordinates returned ped_to_plotdf(). useful zooming particular region Pedigree.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/subregion.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Subset a region of a Pedigree — subregion","text":"subset plot coordinates","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/unrelated.html","id":null,"dir":"Reference","previous_headings":"","what":"Find Unrelated subjects — unrelated","title":"Find Unrelated subjects — unrelated","text":"Determine set maximum number unrelated available subjects Pedigree.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/unrelated.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find Unrelated subjects — unrelated","text":"","code":"# S4 method for class 'Ped' unrelated(obj, avail = NULL) # S4 method for class 'Pedigree' unrelated(obj, avail = NULL)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/unrelated.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find Unrelated subjects — unrelated","text":"obj Pedigree Ped object. avail logical vector availability status individuals (.e. FALSE = available, TRUE = available, NA = unknown).","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/unrelated.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find Unrelated subjects — unrelated","text":"vector ids subjects unrelated.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/unrelated.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find Unrelated subjects — unrelated","text":"Determine set maximum number unrelated available subjects Pedigree, given vectors id, father, mother Pedigree structure, status vector TRUE / FALSE whether subject available (e.g. DNA). greedy algorithm uses kinship matrix, sequentially removing rows/cols non-zero subjects number zero kinship coefficients (greedy choosing row kinship matrix number zeros, remove cols corresponding rows non-zero. account ties count zeros rows, random choice made. Hence, running function multiple times can return different sets unrelated subjects. avail NULL, extracted corresponding accessor Ped object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/unrelated.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Find Unrelated subjects — unrelated","text":"Dan Schaid Shannon McDonnell updated Jason Sinnwell","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/unrelated.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find Unrelated subjects — unrelated","text":"","code":"data(sampleped) fam1 <- sampleped[sampleped$famid == 1, ] ped1 <- Pedigree(fam1) unrelated(ped1) #> [1] \"1_109\" \"1_113\" \"1_116\" \"1_140\" ## some possible vectors ## [1] '110' '113' '133' '109' ## [1] '113' '118' '141' '109' ## [1] '113' '118' '140' '109' ## [1] '110' '113' '116' '109' ## [1] '113' '133' '141' '109'"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/upd_famid.html","id":null,"dir":"Reference","previous_headings":"","what":"Update family prefix in individuals id — upd_famid","title":"Update family prefix in individuals id — upd_famid","text":"Update family prefix individuals identifiers. Individuals identifiers constructed follow famid_id. Therefore update family prefix ids split first underscore first part overwritten famid.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/upd_famid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Update family prefix in individuals id — upd_famid","text":"","code":"# S4 method for class 'character,ANY' upd_famid(obj, famid, missid = NA_character_) # S4 method for class 'Ped,character_OR_integer' upd_famid(obj, famid) # S4 method for class 'Ped,missing' upd_famid(obj) # S4 method for class 'Rel,character_OR_integer' upd_famid(obj, famid) # S4 method for class 'Rel,missing' upd_famid(obj) # S4 method for class 'Pedigree,character_OR_integer' upd_famid(obj, famid) # S4 method for class 'Pedigree,missing' upd_famid(obj)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/upd_famid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Update family prefix in individuals id — upd_famid","text":"obj Ped Pedigree object character vector individual ids famid character vector family identifiers individuals. provide, aggregated individuals identifiers separated underscore. missid character vector missing values identifiers. id, dadid momid corresponding values set NA_character_.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/upd_famid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Update family prefix in individuals id — upd_famid","text":"character vector individual ids family prefix updated","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/upd_famid.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Update family prefix in individuals id — upd_famid","text":"famid missing, famid() function called object.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/upd_famid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Update family prefix in individuals id — upd_famid","text":"","code":"upd_famid(c(\"1\", \"2\", \"B_3\"), c(\"A\", \"B\", \"A\")) #> [1] \"A_1\" \"B_2\" \"A_3\" upd_famid(c(\"1\", \"B_2\", \"C_3\", \"4\"), c(\"A\", NA, \"A\", NA)) #> [1] \"A_1\" \"2\" \"A_3\" \"4\" data(sampleped) ped1 <- Pedigree(sampleped[,-1]) id(ped(ped1)) #> [1] \"101\" \"102\" \"103\" \"104\" \"105\" \"106\" \"107\" \"108\" \"109\" \"110\" \"111\" \"112\" #> [13] \"113\" \"114\" \"115\" \"116\" \"117\" \"118\" \"119\" \"120\" \"121\" \"122\" \"123\" \"124\" #> [25] \"125\" \"126\" \"127\" \"128\" \"129\" \"130\" \"131\" \"132\" \"133\" \"134\" \"135\" \"136\" #> [37] \"137\" \"138\" \"139\" \"140\" \"141\" \"201\" \"202\" \"203\" \"204\" \"205\" \"206\" \"207\" #> [49] \"208\" \"209\" \"210\" \"211\" \"212\" \"213\" \"214\" new_fam <- make_famid(id(ped(ped1)), dadid(ped(ped1)), momid(ped(ped1))) id(ped(upd_famid(ped1, new_fam))) #> [1] \"1_101\" \"1_102\" \"1_103\" \"1_104\" \"1_105\" \"1_106\" \"1_107\" \"1_108\" \"1_109\" #> [10] \"1_110\" \"1_111\" \"1_112\" \"113\" \"1_114\" \"1_115\" \"1_116\" \"1_117\" \"1_118\" #> [19] \"1_119\" \"1_120\" \"1_121\" \"1_122\" \"1_123\" \"1_124\" \"1_125\" \"1_126\" \"1_127\" #> [28] \"1_128\" \"1_129\" \"1_130\" \"1_131\" \"1_132\" \"1_133\" \"1_134\" \"1_135\" \"1_136\" #> [37] \"1_137\" \"1_138\" \"1_139\" \"1_140\" \"1_141\" \"2_201\" \"2_202\" \"2_203\" \"2_204\" #> [46] \"2_205\" \"2_206\" \"2_207\" \"2_208\" \"2_209\" \"2_210\" \"2_211\" \"2_212\" \"2_213\" #> [55] \"2_214\" data(sampleped) ped1 <- Pedigree(sampleped[,-1]) make_famid(ped1) #> Pedigree object with: #> Ped object with 55 individuals and 13 metadata columns: #> id dadid momid sex famid steril #> col_class #> 1_101 1_101 male 1 #> 1_102 1_102 female 1 #> 1_103 1_103 1_135 1_136 male 1 #> 1_104 1_104 female 1 #> 1_105 1_105 male 1 #> ... ... ... ... ... ... ... #> 2_210 2_210 2_203 2_204 male 2 #> 2_211 2_211 2_203 2_204 male 2 #> 2_212 2_212 2_209 2_208 female 2 #> 2_213 2_213 2_209 2_208 male 2 #> 2_214 2_214 2_209 2_208 male 2 #> status avail affected useful kin isinf #> col_class #> 1_101 FALSE FALSE #> 1_102 FALSE TRUE #> 1_103 FALSE TRUE #> 1_104 FALSE FALSE #> 1_105 FALSE #> ... ... ... ... ... ... ... #> 2_210 FALSE FALSE #> 2_211 TRUE FALSE #> 2_212 TRUE FALSE #> 2_213 FALSE FALSE #> 2_214 TRUE TRUE #> num_child_tot num_child_dir num_child_ind | indId fatherId #> col_class #> 1_101 1 1 0 101 #> 1_102 1 1 0 102 #> 1_103 4 4 0 103 135 #> 1_104 4 4 0 104 #> 1_105 4 4 0 105 #> ... ... ... ... ... ... #> 2_210 0 0 0 210 203 #> 2_211 0 0 0 211 203 #> 2_212 0 0 0 212 209 #> 2_213 0 0 0 213 209 #> 2_214 0 0 0 214 209 #> motherId gender affection available num #> col_class #> 1_101 1 0 0 2 #> 1_102 2 1 0 3 #> 1_103 136 1 1 0 2 #> 1_104 2 0 0 4 #> 1_105 1 0 6 #> ... ... ... ... ... ... #> 2_210 204 1 0 0 2 #> 2_211 204 1 0 1 1 #> 2_212 208 2 0 1 3 #> 2_213 208 1 0 0 2 #> 2_214 208 1 1 1 0 #> error family sterilisation vitalStatus affection_mods #> col_class #> 1_101 0 #> 1_102 1 #> 1_103 1 #> 1_104 0 #> 1_105 NA #> ... ... ... ... ... ... #> 2_210 0 #> 2_211 0 #> 2_212 0 #> 2_213 0 #> 2_214 1 #> avail_mods #> col_class #> 1_101 0 #> 1_102 0 #> 1_103 0 #> 1_104 0 #> 1_105 0 #> ... ... #> 2_210 0 #> 2_211 1 #> 2_212 1 #> 2_213 0 #> 2_214 1 #> Rel object with 0 relationshipswith 0 MZ twin, 0 DZ twin, 0 UZ twin, 0 Spouse: #> id1 id2 code famid #> "},{"path":"https://louislenezet.github.io/Pedixplorer/reference/useful_inds.html","id":null,"dir":"Reference","previous_headings":"","what":"Usefulness of individuals — useful_inds","title":"Usefulness of individuals — useful_inds","text":"Compute usefulness individuals","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/useful_inds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Usefulness of individuals — useful_inds","text":"","code":"# S4 method for class 'character' useful_inds( obj, dadid, momid, avail, affected, num_child_tot, id_inf, keep_infos = FALSE ) # S4 method for class 'Pedigree' useful_inds( obj, informative = \"AvAf\", keep_infos = FALSE, reset = FALSE, max_dist = NULL ) # S4 method for class 'Ped' useful_inds( obj, informative = \"AvAf\", keep_infos = FALSE, reset = FALSE, max_dist = NULL )"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/useful_inds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Usefulness of individuals — useful_inds","text":"obj character vector id individuals data.frame informations corresponding columns. dadid vector containing subject, identifiers biologicals fathers. momid vector containing subject, identifiers biologicals mothers. avail logical vector availability status individuals (.e. FALSE = available, TRUE = available, NA = unknown). affected logical vector affection status individuals (.e. FALSE = unaffected, TRUE = affected, NA = unknown). num_child_tot numeric vector number children individuals id_inf identifiers vector informative individuals. keep_infos Boolean indicate parents unknown status available reverse kept informative Informative individuals selection can take 5 values: 'AvAf' (available affected), 'AvOrAf' (available affected), 'Av' (available ), 'Af' (affected ), '' (individuals) numeric/character vector individuals id boolean reset Boolean indicate useful column reset max_dist maximum distance informative individuals","code":""},{"path":[]},{"path":"https://louislenezet.github.io/Pedixplorer/reference/useful_inds.html","id":"when-obj-is-a-vector","dir":"Reference","previous_headings":"","what":"When obj is a vector","title":"Usefulness of individuals — useful_inds","text":"vector useful individuals identifiers","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/useful_inds.html","id":"when-obj-is-a-pedigree-or-ped-object","dir":"Reference","previous_headings":"","what":"When obj is a Pedigree or Ped object","title":"Usefulness of individuals — useful_inds","text":"Pedigree Ped object slot 'useful' containing TRUE useful individuals FALSE otherwise.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/useful_inds.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Usefulness of individuals — useful_inds","text":"Check informativeness individuals based informative parameter given, number children usefulness parents. useful slot added Ped object usefulness individual.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/useful_inds.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Usefulness of individuals — useful_inds","text":"","code":"data(sampleped) ped1 <- Pedigree(sampleped[sampleped$famid == \"1\",]) ped(useful_inds(ped1, informative = \"AvAf\")) #> Ped object with 41 individuals and 13 metadata columns: #> id dadid momid sex famid steril #> col_class #> 1_101 1_101 male 1 #> 1_102 1_102 female 1 #> 1_103 1_103 1_135 1_136 male 1 #> 1_104 1_104 female 1 #> 1_105 1_105 male 1 #> ... ... ... ... ... ... ... #> 1_137 1_137 male 1 #> 1_138 1_138 1_135 1_136 female 1 #> 1_139 1_139 1_137 1_138 male 1 #> 1_140 1_140 1_137 1_138 female 1 #> 1_141 1_141 1_137 1_138 female 1 #> status avail affected useful kin isinf #> col_class #> 1_101 FALSE FALSE TRUE 3 FALSE #> 1_102 FALSE TRUE TRUE 3 FALSE #> 1_103 FALSE TRUE TRUE 2 FALSE #> 1_104 FALSE FALSE TRUE 2 FALSE #> 1_105 FALSE TRUE 2 FALSE #> ... ... ... ... ... ... ... #> 1_137 FALSE TRUE Inf FALSE #> 1_138 FALSE TRUE 3 FALSE #> 1_139 FALSE TRUE TRUE 4 FALSE #> 1_140 TRUE FALSE TRUE 4 FALSE #> 1_141 TRUE FALSE TRUE 4 FALSE #> num_child_tot num_child_dir num_child_ind | family indId #> col_class #> 1_101 1 1 0 1 101 #> 1_102 1 1 0 1 102 #> 1_103 4 4 0 1 103 #> 1_104 4 4 0 1 104 #> 1_105 4 4 0 1 105 #> ... ... ... ... ... ... #> 1_137 3 3 0 1 137 #> 1_138 3 3 0 1 138 #> 1_139 0 0 0 1 139 #> 1_140 0 0 0 1 140 #> 1_141 0 0 0 1 141 #> fatherId motherId gender affection available #> col_class #> 1_101 1 0 0 #> 1_102 2 1 0 #> 1_103 135 136 1 1 0 #> 1_104 2 0 0 #> 1_105 1 0 #> ... ... ... ... ... ... #> 1_137 1 0 #> 1_138 135 136 2 0 #> 1_139 137 138 1 1 0 #> 1_140 137 138 2 0 1 #> 1_141 137 138 2 0 1 #> num error sterilisation vitalStatus affection_mods #> col_class #> 1_101 2 0 #> 1_102 3 1 #> 1_103 2 1 #> 1_104 4 0 #> 1_105 6 NA #> ... ... ... ... ... ... #> 1_137 3 NA #> 1_138 2 NA #> 1_139 3 1 #> 1_140 1 0 #> 1_141 0 0 #> avail_mods #> col_class #> 1_101 0 #> 1_102 0 #> 1_103 0 #> 1_104 0 #> 1_105 0 #> ... ... #> 1_137 0 #> 1_138 0 #> 1_139 0 #> 1_140 1 #> 1_141 1"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/vect_to_binary.html","id":null,"dir":"Reference","previous_headings":"","what":"Vector variable to binary vector — vect_to_binary","title":"Vector variable to binary vector — vect_to_binary","text":"Transform vector binary vector. values 0, 1, TRUE, FALSE, NA transformed NA.","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/vect_to_binary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Vector variable to binary vector — vect_to_binary","text":"","code":"vect_to_binary(vect, logical = FALSE)"},{"path":"https://louislenezet.github.io/Pedixplorer/reference/vect_to_binary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Vector variable to binary vector — vect_to_binary","text":"vect character, factor, logical numeric vector corresponding binary variable (.e. 0 1). following values recognized: character() factor() : \"TRUE\", \"FALSE\", \"0\", \"1\", \"NA\" respectively transformed 1, 0, 0, 1, NA. Spaces case ignored. values transformed NA. numeric() : 0 1 kept, values transformed NA. logical() : TRUE FALSE tansformed 1 and0. logical Boolean defining output logical vector instead numeric vector (.e. 0 1 becomes FALSE `TRUE).","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/vect_to_binary.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Vector variable to binary vector — vect_to_binary","text":"numeric binary vector size vect 0 1","code":""},{"path":"https://louislenezet.github.io/Pedixplorer/reference/vect_to_binary.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Vector variable to binary vector — vect_to_binary","text":"","code":"vect_to_binary( c(0, 1, 2, 3.6, \"TRUE\", \"FALSE\", \"0\", \"1\", \"NA\", \"B\", TRUE, FALSE, NA) ) #> Warning: NAs introduced by coercion #> [1] 0 1 NA NA 1 0 0 1 NA NA 1 0 NA"}]