diff --git a/NAMESPACE b/NAMESPACE index 5a26e13..dad7d18 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -26,6 +26,7 @@ export(ped2maternal) export(ped2mit) export(ped2paternal) export(plotPedigree) +export(recodeSex) export(related_coef) export(relatedness) export(repairSex) diff --git a/R/checkSex.R b/R/checkSex.R index 888c819..8bed24a 100644 --- a/R/checkSex.R +++ b/R/checkSex.R @@ -4,11 +4,11 @@ #' 1. Optionally recodes the 'sex' variable based on given codes for males and females. #' 2. Optionally repairs the sex coding based on specified logic, facilitating the accurate construction of genetic pedigrees. #' -#' @details This function uses the terms 'male' and 'female' in a biological context, based on chromosomes and other biologically-based characteristics relevant to genetic studies. +#' @details This function uses the terms 'male' and 'female' in a biological context, based on chromosomes and other biologically-based characteristics relevant to genetic studies. #' This usage is not intended to negate the personal gender identity of any individual. -#' -#' We recognize the importance of using language and methodologies that affirm and respect all gender identities. While this function focuses on chromosomal information necessary for constructing genetic pedigrees, we affirm that gender is a spectrum, encompassing a wide range of identities beyond the binary. -#' The developers of this package express unequivocal support for folx in the transgender and LGBTQ+ communities. We respect the complexity of gender identity and acknowledge the distinction between the biological aspect of sex used for genetic analysis (genotype) and the broader, richer concept of gender identity (phenotype). +#' +#' We recognize the importance of using language and methodologies that affirm and respect all gender identities. While this function focuses on chromosomal information necessary for constructing genetic pedigrees, we affirm that gender is a spectrum, encompassing a wide range of identities beyond the binary. +#' The developers of this package express unequivocal support for folx in the transgender and LGBTQ+ communities. We respect the complexity of gender identity and acknowledge the distinction between the biological aspect of sex used for genetic analysis (genotype) and the broader, richer concept of gender identity (phenotype). #' #' #' @param ped A dataframe representing the pedigree data with a 'sex' column. @@ -38,7 +38,7 @@ checkSex <- function(ped, code_male = NULL, code_female = NULL, verbose = FALSE, if (verbose) { cat("Step 1: Checking how many sexes/genders...\n") } - + # Check unique values in 'sex' validation_results$sex_unique <- unique(ped$sex) validation_results$sex_length <- length(unique(ped$sex)) @@ -135,14 +135,14 @@ repairSex <- function(ped, verbose = FALSE, code_male = NULL) { #' Recodes Sex Variable in a Pedigree Dataframe #' #' This function serves as a wrapper around `checkSex` to specifically handle -#' the repair of the sex coding in a pedigree dataframe. +#' the repair of the sex coding in a pedigree dataframe. #' It sets the `repair` flag to TRUE automatically and forwards any additional parameters to `checkSex`. #' #' @inheritParams checkSex #' @inheritParams plotPedigree #' @inherit checkSex details #' @return A modified version of the input data.frame \code{ped}, containing an additional or modified 'sex_recode' column where the 'sex' values are recoded according to \code{code_male}. NA values in the 'sex' column are preserved. -#' @keywords internal +#' @export #' @seealso \code{\link{plotPedigree}} recodeSex <- function( ped, verbose = FALSE, code_male = NULL, code_na = NULL, code_female = NULL, diff --git a/man/checkSex.Rd b/man/checkSex.Rd index 5bea054..0536899 100644 --- a/man/checkSex.Rd +++ b/man/checkSex.Rd @@ -32,10 +32,10 @@ This function performs two main tasks: 2. Optionally repairs the sex coding based on specified logic, facilitating the accurate construction of genetic pedigrees. } \details{ -This function uses the terms 'male' and 'female' in a biological context, based on chromosomes and other biologically-based characteristics relevant to genetic studies. +This function uses the terms 'male' and 'female' in a biological context, based on chromosomes and other biologically-based characteristics relevant to genetic studies. This usage is not intended to negate the personal gender identity of any individual. -We recognize the importance of using language and methodologies that affirm and respect all gender identities. While this function focuses on chromosomal information necessary for constructing genetic pedigrees, we affirm that gender is a spectrum, encompassing a wide range of identities beyond the binary. +We recognize the importance of using language and methodologies that affirm and respect all gender identities. While this function focuses on chromosomal information necessary for constructing genetic pedigrees, we affirm that gender is a spectrum, encompassing a wide range of identities beyond the binary. The developers of this package express unequivocal support for folx in the transgender and LGBTQ+ communities. We respect the complexity of gender identity and acknowledge the distinction between the biological aspect of sex used for genetic analysis (genotype) and the broader, richer concept of gender identity (phenotype). } \examples{ diff --git a/man/recodeSex.Rd b/man/recodeSex.Rd index ae3ec58..3d9f07a 100644 --- a/man/recodeSex.Rd +++ b/man/recodeSex.Rd @@ -29,17 +29,16 @@ A modified version of the input data.frame \code{ped}, containing an additional } \description{ This function serves as a wrapper around `checkSex` to specifically handle -the repair of the sex coding in a pedigree dataframe. +the repair of the sex coding in a pedigree dataframe. It sets the `repair` flag to TRUE automatically and forwards any additional parameters to `checkSex`. } \details{ -This function uses the terms 'male' and 'female' in a biological context, based on chromosomes and other biologically-based characteristics relevant to genetic studies. +This function uses the terms 'male' and 'female' in a biological context, based on chromosomes and other biologically-based characteristics relevant to genetic studies. This usage is not intended to negate the personal gender identity of any individual. -We recognize the importance of using language and methodologies that affirm and respect all gender identities. While this function focuses on chromosomal information necessary for constructing genetic pedigrees, we affirm that gender is a spectrum, encompassing a wide range of identities beyond the binary. +We recognize the importance of using language and methodologies that affirm and respect all gender identities. While this function focuses on chromosomal information necessary for constructing genetic pedigrees, we affirm that gender is a spectrum, encompassing a wide range of identities beyond the binary. The developers of this package express unequivocal support for folx in the transgender and LGBTQ+ communities. We respect the complexity of gender identity and acknowledge the distinction between the biological aspect of sex used for genetic analysis (genotype) and the broader, richer concept of gender identity (phenotype). } \seealso{ \code{\link{plotPedigree}} } -\keyword{internal} diff --git a/man/repairSex.Rd b/man/repairSex.Rd index 017af74..f4f1e43 100644 --- a/man/repairSex.Rd +++ b/man/repairSex.Rd @@ -21,10 +21,10 @@ This function serves as a wrapper around `checkSex` to specifically handle the repair of the sex coding in a pedigree dataframe. } \details{ -This function uses the terms 'male' and 'female' in a biological context, based on chromosomes and other biologically-based characteristics relevant to genetic studies. +This function uses the terms 'male' and 'female' in a biological context, based on chromosomes and other biologically-based characteristics relevant to genetic studies. This usage is not intended to negate the personal gender identity of any individual. -We recognize the importance of using language and methodologies that affirm and respect all gender identities. While this function focuses on chromosomal information necessary for constructing genetic pedigrees, we affirm that gender is a spectrum, encompassing a wide range of identities beyond the binary. +We recognize the importance of using language and methodologies that affirm and respect all gender identities. While this function focuses on chromosomal information necessary for constructing genetic pedigrees, we affirm that gender is a spectrum, encompassing a wide range of identities beyond the binary. The developers of this package express unequivocal support for folx in the transgender and LGBTQ+ communities. We respect the complexity of gender identity and acknowledge the distinction between the biological aspect of sex used for genetic analysis (genotype) and the broader, richer concept of gender identity (phenotype). } \examples{