| Cape-class {cape} | R Documentation |
The CAPE data object
Description
The CAPE data object
The CAPE data object
Details
Class Cape defines a CAPE analysis object.
Slots
parameter_filestring, full path to YAML file with initialization parameters
yaml_parametersstring representing YAML CAPE parameters. See the vignette for more descriptions of individual parameter settings.
results_pathstring, full path to directory for storing results (optional, a directory will be created if one is not specified)
save_resultsWhether to save cape results. Defaults to FALSE.
use_saved_resultsWhether to use existing results from a previous run. This can save time if re-running an analysis, but can lead to problems if the old run and new run have competing settings. If errors arise, and use_saved_results is set to TRUE, try setting it to FALSE, or deleting previous results.
phenoA matrix containing the traits to be analyzed. Traits are in columns and individuals are in rows.
chromosomeA vector the same length as the number of markers indicating which chromosome each marker lives on.
marker_numA vector the same length as the number of markers indicating the index of each marker
marker_locationA vector the same length as the number of markers indicating the genomic position of each marker. The positions are primarily used for plotting and can be in base pairs, centiMorgans, or dummy variables.
marker_selection_methodA string indicating how markers should be selected for the pairscan. Options are "top_effects" or "from_list." If "top_effects," markers are selected using main effect sizes. If "from_list" markers are specified using a vector of marker names. See
select_markers_for_pairscan.geno_namesThe dimnames of the genotype array. The genotype array is a three-dimensional array in which rows are individuals, columns are alleles, and the third dimension houses the markers. Genotypes are pulled for analysis using
get_genobased on geno_names. Only the individuals, alleles, and markers listed in geno_names are taken from the genotype matrix. Functions that remove markers and individuals from analysis always operate on geno_names in addition to other relevant slots. The names of geno_names must be "mouse", "allele", "locus."genoA three dimensional array holding genotypes for each animal for each allele at each marker. The genotypes are continuously valued probabilities ranging from 0 to 1. The dimnames of geno must be "mouse", "allele", and "locus," even if the individuals are not mice.
geno_for_pairscanA two-dimensional matrix holding the genotypes that will be analyzed in the pairscan. Alleles are in columns and individuals are in rows. As in the geno array, values are continuous probabilities ranging from 0 to 1.
peak_densityThe density parameter for
select_markers_for_pairscan. Determines how densely markers under an individual effect size peak are selected for the pairscan if marker_selection_method is TRUE. Defaults to 0.5.window_sizeThe window size used by
select_markers_for_pairscan. It specifies how many markers are used to smooth effect size curves for automatic peak identification. If set to NULL, window_size is determined automatically. Used when marker_selection_method is TRUE.toleranceThe wiggle room afforded to
select_markers_for_pairscanin finding a target number of markers. If num_alleles_in_pairscan is 100 and the tolerance is 5, the algorithm will stop when it identifies anywhere between 95 and 105 markers for the pairscan.ref_alleleA string of length 1 indicating which allele to use as the reference allele. In two-parent crosses, this is usually allele A. In DO/CC populations, we recommend using B as the reference allele. B is the allele from the C57Bl6/J mouse, which is often used as a reference strain.
alphaThe significance level for calculating effect size thresholds in the
singlescan. If singlescan_perm is 0, this parameter is ignored.covar_tableA matrix of covariates with covariates in columns and individuals in rows. Must be numeric.
num_alleles_in_pairscanThe number of alleles to test in the pairwise scan. Because Cape is computationally intensive, we usually need to test only a subset of available markers in the pairscan, particularly if the kinship correction is being used.
max_pair_corthe maximum Pearson correlation between two markers. If their correlation exceeds this value, they will not be tested against each other in the pairscan. This threshold is set to prevent false positive arising from testing highly correlated markers. If this value is set to NULL, min_per_genotype must be specified.
min_per_genotypeminimum The minimum number of individuals allowable per genotype combination in the pair scan. If for a given marker pair, one of the genotype combinations is underrepresented, the marker pair is not tested. If this value is NULL, max_pair_cor must be specified.
pairscan_null_sizeThe total size of the null distribution. This is DIFFERENT than the number of permutations to run. Each permutation generates n choose 2 elements for the pairscan. So for example, a permutation that tests 100 pairs of markers will generate a null distribution of size 4950. This process is repeated until the total null size is reached. If the null size is set to 5000, two permutations of 100 markers would be done to get to a null distribution size of 5000.
p_covarA vector of strings specifying the names of covariates derived from traits. See
pheno2covar.g_covarA vector of strings specifying the names of covariates derived from genetic markers. See
marker2covar.p_covar_tableA matrix holding the individual values for each trait-derived covariate. See
pheno2covar.g_covar_tableA matrix holding the individual values for each marker-derived covariate. See
marker2covar.model_familyIndicates the model family of the phenotypes This can be either "gaussian" or "binomial". If this argument is length 1, all phenotypes will be assigned to the same family. Phenotypes can be assigned different model families by providing a vector of the same length as the number of phenotypes, indicating how each phenotype should be modeled. See
singlescan.scan_whatA string indicating whether "eigentraits", "normalized_traits", or "raw_traits" should be analyzed. See
get_pheno.ETA matrix holding the eigentraits to be analyzed.
singular_valuesAdded by
get_eigentraits. A vector holding the singular values from the singular value decomposition of the trait matrix. They are used in rotating the final direct influences back to trait space from eigentrait space. Seeget_eigentraitsanddirect_influence.right_singular_vectorsAdded by
get_eigentraits. A matrix containing the right singular vectors from the singular value decomposition of the trait matrix. They are used in rotating the final direct influences back to trait space from eigentrait space. Seeget_eigentraitsanddirect_influence.traits_scaledWhether the traits should be mean-centered and standardized before analyzing.
traits_normalizedWhether the traits should be rank Z normalized before analyzing.
var_to_var_influences_permadded in
error_propThe list of results from the error propagation of permuted coefficients.var_to_var_influencesadded in
error_propThe list of results from the error propagation of coefficients.pval_correctionOptions are "holm", "hochberg", "hommel", "bonferroni", "BH", "BY","fdr", "none"
linkage_blocks_collapsedA list containing assignments of markers to linkage blocks calculated by
linkage_blocks_networkandplot_network. In this list there can be multiple markers assigned to a single linkage block.linkage_blocks_fullA list containing assignments of markers to linkage blocks when no linkage blocks are calculated. In this list there can only be one marker per "linkage block". See
linkage_blocks_networkandplot_network.var_to_var_p_valThe final table of cape interaction results calculated by
error_prop.max_var_to_pheno_influenceThe final table of cape direct influences of markers to traits calculated by
direct_influence.collapsed_netAn adjacency matrix holding significant cape interactions between linkage blocks. See
plot_networkandget_network.full_netAn adjacency matrix holding significant cape interactions between individual markers. See
plot_networkandget_network.use_kinshipWhether to use a kinship correction in the analysis.
kinship_typeWhich type of kinship matrix to use. Either "overall" for the overall kinship matrix or "ltco" for leave-two-chromosomes-out.
transform_to_phenospacewhether to transform to phenospace or not.
Public fields
parameter_filefull path to YAML file with initialization parameters.
yaml_parametersstring representing YAML CAPE parameters. See the vignette for more descriptions of individual parameter settings.
results_pathstring, full path to directory for storing results (optional, a directory will be created if one is not specified).
save_resultsWhether to save cape results. Defaults to FALSE.
use_saved_resultsWhether to use existing results from a previous run. This can save time if re-running an analysis, but can lead to problems if the old run and new run have competing settings. If errors arise, and use_saved_results is set to TRUE, try setting it to FALSE, or deleting previous results.
phenoA matrix containing the traits to be analyzed. Traits are in columns and individuals are in rows.
chromosomeA vector the same length as the number of markers indicating which chromosome each marker lives on.
marker_numA vector the same length as the number of markers indicating the index of each marker.
marker_locationA vector the same length as the number of markers indicating the genomic position of each marker. The positions are primarily used for plotting and can be in base pairs, centiMorgans, or dummy variables.
geno_namesThe dimnames of the genotype array. The genotype array is a three-dimensional array in which rows are individuals, columns are alleles, and the third dimension houses the markers. Genotypes are pulled for analysis using
get_genobased on geno_names. Only the individuals, alleles, and markers listed in geno_names are taken from the genotype matrix. Functions that remove markers and individuals from analysis always operate on geno_names in addition to other relevant slots. The names of geno_names must be "mouse", "allele", "locus."genoA three dimensional array holding genotypes for each animal for each allele at each marker. The genotypes are continuously valued probabilities ranging from 0 to 1. The dimnames of geno must be "mouse", "allele", and "locus," even if the individuals are not mice.
peak_densityThe density parameter for
select_markers_for_pairscan. Determines how densely markers under an individual effect size peak are selected for the pairscan if marker_selection_method is TRUE. Defaults to 0.5.window_sizeThe window size used by
select_markers_for_pairscan. It specifies how many markers are used to smooth effect size curves for automatic peak identification. If set to NULL, window_size is determined automatically. Used when marker_selection_method is TRUE.toleranceThe wiggle room afforded to
select_markers_for_pairscanin finding a target number of markers. If num_alleles_in_pairscan is 100 and the tolerance is 5, the algorithm will stop when it identifies anywhere between 95 and 105 markers for the pairscan.ref_alleleA string of length 1 indicating which allele to use as the reference allele. In two-parent crosses, this is usually allele A. In DO/CC populations, we recommend using B as the reference allele. B is the allele from the C57Bl6/J mouse, which is often used as a reference strain.
alphaThe significance level for calculating effect size thresholds in the
singlescan. If singlescan_perm is 0, this parameter is ignored.covar_tableA matrix of covariates with covariates in columns and individuals in rows. Must be numeric.
num_alleles_in_pairscanThe number of alleles to test in the pairwise scan. Because Cape is computationally intensive, we usually need to test only a subset of available markers in the pairscan, particularly if the kinship correction is being used.
max_pair_corThe maximum Pearson correlation between two markers. If their correlation exceeds this value, they will not be tested against each other in the pairscan. This threshold is set to prevent false positive arising from testing highly correlated markers. If this value is set to NULL, min_per_genotype must be specified.
min_per_genotypeminimum The minimum number of individuals allowable per genotype combination in the pair scan. If for a given marker pair, one of the genotype combinations is underrepresented, the marker pair is not tested. If this value is NULL, max_pair_cor must be specified.
pairscan_null_sizeThe total size of the null distribution. This is DIFFERENT than the number of permutations to run. Each permutation generates n choose 2 elements for the pairscan. So for example, a permutation that tests 100 pairs of markers will generate a null distribution of size 4950. This process is repeated until the total null size is reached. If the null size is set to 5000, two permutations of 100 markers would be done to get to a null distribution size of 5000.
p_covarA vector of strings specifying the names of covariates derived from traits. See
pheno2covar.g_covarA vector of strings specifying the names of covariates derived from genetic markers. See
marker2covar.p_covar_tableA matrix holding the individual values for each trait-derived covariate. See
pheno2covar.g_covar_tableA matrix holding the individual values for each marker-derived covariate. See
marker2covar.model_familyIndicates the model family of the phenotypes. This can be either "gaussian" or "binomial". If this argument is length 1, all phenotypes will be assigned to the same family. Phenotypes can be assigned different model families by providing a vector of the same length as the number of phenotypes, indicating how each phenotype should be modeled. See
singlescan.scan_whatA string indicating whether "eigentraits", "normalized_traits", or "raw_traits" should be analyzed. See
get_pheno.ETA matrix holding the eigentraits to be analyzed.
singular_valuesAdded by
get_eigentraits. A vector holding the singular values from the singular value decomposition of the trait matrix. They are used in rotating the final direct influences back to trait space from eigentrait space. Seeget_eigentraitsanddirect_influence.right_singular_vectorsAdded by
get_eigentraits. A matrix containing the right singular vectors from the singular value decomposition of the trait matrix. They are used in rotating the final direct influences back to trait space from eigentrait space. Seeget_eigentraitsanddirect_influence.traits_scaledWhether the traits should be mean-centered and standardized before analyzing.
traits_normalizedWhether the traits should be rank Z normalized before analyzing.
var_to_var_influences_permadded in
error_prop. The list of results from the error propagation of permuted coefficients.var_to_var_influencesadded in
error_prop. The list of results from the error propagation of coefficients.pval_correctionOptions are "holm", "hochberg", "hommel", "bonferroni", "BH", "BY","fdr", "none".
var_to_var_p_valThe final table of cape interaction results calculated by
error_prop.max_var_to_pheno_influenceThe final table of cape direct influences of markers to traits calculated by
direct_influence.full_netAn adjacency matrix holding significant cape interactions between individual markers. See
plot_networkandget_network.use_kinshipWhether to use a kinship correction in the analysis.
kinship_typewhich type of kinship matrix to use
transform_to_phenospacewhether to transform to phenospace or not.
Active bindings
geno_for_pairscangeno for pairscan
marker_selection_methodmarker selection method
linkage_blocks_collapsedlinkage blocks collapsed
linkage_blocks_fulllinkage blocks full
collapsed_netcollapsed net
Methods
Public methods
Method assign_parameters()
Assigns variables from the parameter file to attributes in the Cape object.
Usage
Cape$assign_parameters()
Method check_inputs()
Checks the dimensionality of inputs and its consistency.
Usage
Cape$check_inputs()
Method check_geno_names()
Checks genotype names.
Usage
Cape$check_geno_names()
Method new()
Initialization method.
Usage
Cape$new( parameter_file = NULL, yaml_parameters = NULL, results_path = NULL, save_results = FALSE, use_saved_results = TRUE, pheno = NULL, chromosome = NULL, marker_num = NULL, marker_location = NULL, geno_names = NULL, geno = NULL, .geno_for_pairscan = NULL, peak_density = NULL, window_size = NULL, tolerance = NULL, ref_allele = NULL, alpha = NULL, covar_table = NULL, num_alleles_in_pairscan = NULL, max_pair_cor = NULL, min_per_genotype = NULL, pairscan_null_size = NULL, p_covar = NULL, g_covar = NULL, p_covar_table = NULL, g_covar_table = NULL, model_family = NULL, scan_what = NULL, ET = NULL, singular_values = NULL, right_singular_vectors = NULL, traits_scaled = NULL, traits_normalized = NULL, var_to_var_influences_perm = NULL, var_to_var_influences = NULL, pval_correction = NULL, var_to_var_p_val = NULL, max_var_to_pheno_influence = NULL, full_net = NULL, use_kinship = NULL, kinship_type = NULL, transform_to_phenospace = NULL, plot_pdf = NULL )
Arguments
parameter_filestring, full path to YAML file with initialization parameters
yaml_parametersstring representing YAML CAPE parameters. See the vignette for more descriptions of individual parameter settings.
results_pathstring, full path to directory for storing results (optional, a directory will be created if one is not specified)
save_resultsWhether to save cape results. Defaults to TRUE.
use_saved_resultsWhether to use existing results from a previous run. This can save time if re-running an analysis, but can lead to problems if the old run and new run have competing settings. If errors arise, and use_saved_results is set to TRUE, try setting it to FALSE, or deleting previous results.
phenoA matrix containing the traits to be analyzed. Traits are in columns and individuals are in rows.
chromosomeA vector the same length as the number of markers indicating which chromosome each marker lives on.
marker_numA vector the same length as the number of markers indicating the index of each marker
marker_locationA vector the same length as the number of markers indicating the genomic position of each marker. The positions are primarily used for plotting and can be in base pairs, centiMorgans, or dummy variables.
geno_namesThe dimnames of the genotype array. The genotype array is a three-dimensional array in which rows are individuals, columns are alleles, and the third dimension houses the markers. Genotypes are pulled for analysis using
get_genobased on geno_names. Only the individuals, alleles, and markers listed in geno_names are taken from the genotype matrix. Functions that remove markers and individuals from analysis always operate on geno_names in addition to other relevant slots. The names of geno_names must be "mouse", "allele", "locus."genoA three dimensional array holding genotypes for each animal for each allele at each marker. The genotypes are continuously valued probabilities ranging from 0 to 1. The dimnames of geno must be "mouse", "allele", and "locus," even if the individuals are not mice.
.geno_for_pairscanA two-dimensional matrix holding the genotypes that will be analyzed in the pairscan. Alleles are in columns and individuals are in rows. As in the geno array, values are continuous probabilities ranging from 0 to 1.
peak_densityThe density parameter for
select_markers_for_pairscan. Determines how densely markers under an individual effect size peak are selected for the pairscan if marker_selection_method is TRUE. Defaults to 0.5.window_sizeThe window size used by
select_markers_for_pairscan. It specifies how many markers are used to smooth effect size curves for automatic peak identification. If set to NULL, window_size is determined automatically. Used when marker_selection_method is TRUE.toleranceThe wiggle room afforded to
select_markers_for_pairscanin finding a target number of markers. If num_alleles_in_pairscan is 100 and the tolerance is 5, the algorithm will stop when it identifies anywhere between 95 and 105 markers for the pairscan.ref_alleleA string of length 1 indicating which allele to use as the reference allele. In two-parent crosses, this is usually allele A. In DO/CC populations, we recommend using B as the reference allele. B is the allele from the C57Bl6/J mouse, which is often used as a reference strain.
alphaThe significance level for calculating effect size thresholds in the
singlescan. If singlescan_perm is 0, this parameter is ignored.covar_tableA matrix of covariates with covariates in columns and individuals in rows. Must be numeric.
num_alleles_in_pairscanThe number of alleles to test in the pairwise scan. Because Cape is computationally intensive, we usually need to test only a subset of available markers in the pairscan, particularly if the kinship correction is being used.
max_pair_corthe maximum Pearson correlation between two markers. If their correlation exceeds this value, they will not be tested against each other in the pairscan. This threshold is set to prevent false positive arising from testing highly correlated markers. If this value is set to NULL, min_per_genotype must be specified.
min_per_genotypeminimum The minimum number of individuals allowable per genotype combination in the pair scan. If for a given marker pair, one of the genotype combinations is underrepresented, the marker pair is not tested. If this value is NULL, max_pair_cor must be specified.
pairscan_null_sizeThe total size of the null distribution. This is DIFFERENT than the number of permutations to run. Each permutation generates n choose 2 elements for the pairscan. So for example, a permutation that tests 100 pairs of markers will generate a null distribution of size 4950. This process is repeated until the total null size is reached. If the null size is set to 5000, two permutations of 100 markers would be done to get to a null distribution size of 5000.
p_covarA vector of strings specifying the names of covariates derived from traits. See
pheno2covar.g_covarA vector of strings specifying the names of covariates derived from genetic markers. See
marker2covar.p_covar_tableA matrix holding the individual values for each trait-derived covariate. See
pheno2covar.g_covar_tableA matrix holding the individual values for each marker-derived covariate. See
marker2covar.model_familyIndicates the model family of the phenotypes This can be either "gaussian" or "binomial". If this argument is length 1, all phenotypes will be assigned to the same family. Phenotypes can be assigned different model families by providing a vector of the same length as the number of phenotypes, indicating how each phenotype should be modeled. See
singlescan.scan_whatA string indicating whether "eigentraits", "normalized_traits", or "raw_traits" should be analyzed. See
get_pheno.ETA matrix holding the eigentraits to be analyzed.
singular_valuesAdded by
get_eigentraits. A vector holding the singular values from the singular value decomposition of the trait matrix. They are used in rotating the final direct influences back to trait space from eigentrait space. Seeget_eigentraitsanddirect_influence.right_singular_vectorsAdded by
get_eigentraits. A matrix containing the right singular vectors from the singular value decomposition of the trait matrix. They are used in rotating the final direct influences back to trait space from eigentrait space. Seeget_eigentraitsanddirect_influence.traits_scaledWhether the traits should be mean-centered and standardized before analyzing.
traits_normalizedWhether the traits should be rank Z normalized before analyzing.
var_to_var_influences_permadded in
error_propThe list of results from the error propagation of permuted coefficients.var_to_var_influencesadded in
error_propThe list of results from the error propagation of coefficients.pval_correctionOptions are "holm", "hochberg", "hommel", "bonferroni", "BH", "BY","fdr", "none"
var_to_var_p_valThe final table of cape interaction results calculated by
error_prop.max_var_to_pheno_influenceThe final table of cape direct influences of markers to traits calculated by
direct_influence.full_netAn adjacency matrix holding significant cape interactions between individual markers. See
plot_networkandget_network.use_kinshipWhether to use a kinship correction in the analysis.
kinship_typeWhich type of kinship matrix to use. Either "overall" or "ltco."
transform_to_phenospacewhether to transform to phenospace or not.
plot_pdflogical. If TRUE, results are generated as pdf
Method plotSVD()
Plot Eigentraits
Usage
Cape$plotSVD(filename)
Arguments
filenamefilename of result plot
Method plotSinglescan()
Plot results of single-locus scans
Usage
Cape$plotSinglescan( filename, singlescan_obj, width = 20, height = 6, units = "in", res = 300, standardized = TRUE, allele_labels = NULL, alpha = alpha, include_covars = TRUE, line_type = "l", pch = 16, cex = 0.5, lwd = 3, traits = NULL )
Arguments
filenamefilename of result plot.
singlescan_obja singlescan object from
singlescanwidthwidth of result plot, default is 20.
heightheight of result plot, default is 6.
unitsunits of result plot, default is "in".
resresolution of result plot, default is 300.
standardizedIf TRUE t statistics are plotted. If FALSE, effect sizes are plotted, default is TRUE
allele_labelsA vector of labels for the alleles if different that those stored in the data_object.
alphathe alpha significance level. Lines for significance values will only be plotted if n_perm > 0 when
singlescanwas run. And only alpha values specified insinglescancan be plotted.include_covarsWhether to include covariates in the plot.
line_typeas defined in plot
pchsee the "points()" R function. Default is 16 (a point).
cexsee the "points()" R function. Default is 0.5.
lwdline width, default is 3.
traitsa vector of trait names to plot. Defaults to all traits.
Method plotPairscan()
Plot the result of the pairwise scan
Usage
Cape$plotPairscan( filename, pairscan_obj, phenotype = NULL, show_marker_labels = TRUE, show_alleles = FALSE )
Arguments
filenamefilename of result plot.
pairscan_obja pairscan object from
pairscanphenotypeThe names of the phenotypes to be plotted. If NULL, all phenotypes are plotted.
show_marker_labelsIf TRUE marker labels are plotted along the axes. If FALSE, they are omitted.
show_allelesIf TRUE, the allele of each marker is indicated by color.
Method plotVariantInfluences()
Plot cape coefficients
Usage
Cape$plotVariantInfluences( filename, width = 10, height = 7, p_or_q = p_or_q, standardize = FALSE, not_tested_col = "lightgray", covar_width = NULL, pheno_width = NULL )
Arguments
filenamefilename of result plot.
widthwidth of result plot, default is 10.
heightheight of result plot, default is 7.
p_or_qA threshold indicating the maximum p value (or q value if FDR was used) of significant interactions and main effects.
standardizeWhether to plot effect sizes (FALSE) or standardized effect sizes (TRUE), default is TRUE.
not_tested_colThe color to use for marker pairs not tested. Takes the same values as pos_col and neg_col, default is "lightgray".
covar_widthSee pheno_width. This is the same effect for covariates.
pheno_widthEach marker and trait gets one column in the matrix. If there are many markers, this makes the effects on the traits difficult to see. pheno_width increases the number of columns given to the phenotypes. For example, if pheno_width = 11, the phenotypes will be shown 11 times wider than individual markers.
Method plotNetwork()
Plots cape results as a circular network
Usage
Cape$plotNetwork( filename, label_gap = 10, label_cex = 1.5, show_alleles = FALSE )
Arguments
filenamefilename of result plot.
label_gapA numeric value indicating the size of the gap the chromosomes and their labels, default is 10.
label_cexA numeric value indicating the size of the labels, default is 1.5.
show_allelesTRUE show the alleles, FALSE does not show alleles. Default is FALSE.
Method plotFullNetwork()
Plot the final epistatic network in a traditional network view.
Usage
Cape$plotFullNetwork( filename, zoom = 1.2, node_radius = 0.3, label_nodes = TRUE, label_offset = 0.4, label_cex = 0.5, bg_col = "lightgray", arrow_length = 0.1, layout_matrix = "layout_with_kk", legend_position = "topright", edge_lwd = 1, legend_radius = 2, legend_cex = 0.7, xshift = -1 )
Arguments
filenamefilename of result plot.
zoomAllows the user to zoom in and out on the image if the network is either running off the edges of the plot or too small in the middle of the plot, default is 1.2.
node_radiusThe size of the pie chart for each node, default is 0.3.
label_nodesA logical value indicating whether the nodes should be labeled. Users may want to remove labels for large networks, default is TRUE.
label_offsetThe amount by which to offset the node labels from the center of the nodes, default is 0.4.
label_cexThe size of the node labels, default is 0.5.
bg_colThe color to be used in pie charts for non-significant main effects. Takes the same values as pos_col, default is "lightgray".
arrow_lengthThe length of the head of the arrow, default is 0.1.
layout_matrixUsers have the option of providing their own layout matrix for the network. This should be a two column matrix indicating the x and y coordinates of each node in the network, default is "layout_with_kk".
legend_positionThe position of the legend on the plot, default is "topright".
edge_lwdThe thickness of the arrows showing the interactions, default is 1.
legend_radiusThe size of the legend indicating which pie piece corresponds to which traits, default is 2.
legend_cexThe size of the labels in the legend, default is 0.7.
xshiftA constant by which to shift the x values of all nodes in the network, default is -1.
Method writeVariantInfluences()
Write significant cape interactions to a csv file.
Usage
Cape$writeVariantInfluences( filename, p_or_q = 0.05, include_main_effects = TRUE )
Arguments
filenamefilename of csv file
p_or_qA threshold indicating the maximum adjusted p value considered significant. If an FDR method has been used to correct for multiple testing, this value specifies the maximum q value considered significant, default is 0.05.
include_main_effectsWhether to include main effects (TRUE) or only interaction effects (FALSE) in the output table, default is TRUE.
Method set_pheno()
Set phenotype
Usage
Cape$set_pheno(val)
Arguments
valphenotype value.
Method set_geno()
Set genotype
Usage
Cape$set_geno(val)
Arguments
valgenotype value.
Method create_covar_table()
Create covariate table
Usage
Cape$create_covar_table(value)
Arguments
valuecovariate values
Method save_rds()
Save to RDS file
Usage
Cape$save_rds(object, filename)
Arguments
objectdata to be saved.
filenamefilename of result RDS file.
Method read_rds()
Read RDS file
Usage
Cape$read_rds(filename)
Arguments
filenameRDS filename to be read.
Examples
## Not run:
param_file <- "cape_parameters.yml"
results_path = "."
cape_obj <- read_population("cross.csv")
combined_obj <- cape2mpp(cape_obj)
pheno_obj <- combined_obj$data_obj
geno_obj <- combined_obj$geno_obj
data_obj <- Cape$new(parameter_file = param_file,
results_path = results_path, pheno = pheno_obj$pheno, chromosome = pheno_obj$chromosome,
marker_num = pheno_obj$marker_num, marker_location = pheno_obj$marker_location,
geno_names = pheno_obj$geno_names, geno = geno_obj)
## End(Not run)