count_expt_snps: Gather snp information for an expt

View source: R/variants.R

count_expt_snpsR Documentation

Gather snp information for an expt

Description

I made some pretty significant changes to the set of data which I retain when using mpileup/freebayes. As a result, this function needs to be reworked.

Usage

count_expt_snps(
  expt,
  annot_column = "bcftable",
  tolower = TRUE,
  snp_column = NULL,
  numerator_column = "PAO",
  denominator_column = "DP",
  reader = "table",
  verbose = FALSE
)

Arguments

expt

an expressionset from which to extract information.

annot_column

Column in the metadata for getting the table of bcftools calls.

tolower

Lowercase stuff like 'HPGL'?

snp_column

Which column of the parsed bcf table contains our interesting material?

numerator_column

When provided, use this column as the numerator of a proportion.

denominator_column

When provided, use this column as the denominator of a proportion.#'

Details

This function attempts to gather a set of variant positions using an extant expressionset. This therefore seeks to keep the sample metadata consistent with the original data. In its current iteration, it therefore makes some potentially bad assumptions about the naming conventions for its input files. It furthermore assumes inputs from the variant calling methods in cyoa.

Value

A new expt object

See Also

[Biobase] freebayes:DOI:10.48550/arXiv.1207.3907, mpileup:DOI:10.1093/gigascience/giab008

Examples

  ## Not run: 
 expt <- create_expt(metadata, gene_information)
 snp_expt <- count_expt_snps(expt)
 ## This assumes that the metadata has a column named 'bcftable' with one file per
 ## cell.  These files in turn should have a column named 'diff_count' which will
 ## be the source of the numbers found when doing exprs(snp_expt).

## End(Not run)

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