get_proportion_snp_sets: Create all possible sets of variants by sample (types).

View source: R/variants.R

get_proportion_snp_setsR Documentation

Create all possible sets of variants by sample (types).

Description

I like this function. It generates an exhaustive catalog of the snps by chromosome for all the various categories as defined by factor.

Usage

get_proportion_snp_sets(
  snp_expt,
  factor = "pathogenstrain",
  stringency = NULL,
  do_save = FALSE,
  savefile = "variants.rda",
  minmax_cutoff = 0.05,
  hetero_cutoff = 0.3
)

Arguments

snp_expt

Expressionset of variants.

factor

Use this metadata factor to split the data.

stringency

Allow for some wiggle room in the calls.

do_save

Save the results to an rda fil.

savefile

This is redundant with do_save.

minmax_cutoff

Cutoffs used to define homozygous vs. no-observation.

hetero_cutoff

Cutoff to define heterozygous vs. observed/homozygous

Value

A funky list by chromosome containing: 'medians', the median number of hits / position by sample type; 'possibilities', the; 'intersections', the groupings as detected by Vennerable; 'chr_data', the raw data; 'set_names', a character list of the actual names of the groupings; 'invert_names', the opposite of set_names which is to say the names of groups which do _not_ include samples x,y,z; 'density', a list of snp densities with respect to chromosomes. Note that this last one is approximate as I just calculate with the largest chromosome position number, not the explicit number of nucleotides in the chromosome.

See Also

[medians_by_factor()]

Examples

  ## Not run: 
 expt <- create_expt(metadata, gene_information)
 snp_expt <- count_expt_snps(expt)
 snp_sets <- get_snp_sets(snp_expt, factor = "condition")
 ## This assumes a column in the metadata for the expt named 'condition'.

## End(Not run)

elsayed-lab/hpgltools documentation built on May 9, 2024, 5:02 a.m.