snps_vs_genes: Make a summary of the observed snps by gene ID.

View source: R/variants.R

snps_vs_genesR Documentation

Make a summary of the observed snps by gene ID.

Description

Instead of cross referencing variant positions against experimental condition, one might be interested in seeing what variants are observed per gene. This function attempts to answer that question.

Usage

snps_vs_genes(
  expt,
  snp_result,
  start_col = "start",
  end_col = "end",
  snp_name_col = "seqnames",
  observed_in = NULL,
  expt_name_col = "chromosome",
  ignore_strand = TRUE
)

Arguments

expt

The original expressionset.

snp_result

The result from get_snp_sets().

start_col

Which column provides the start of each gene?

end_col

and the end column of each gene?

snp_name_col

Name of the column in the metadata with the sequence names.

observed_in

Minimum proportion of samples required before this is deemed real.

expt_name_col

Name of the metadata column with the chromosome names.

ignore_strand

Ignore strand information when returning?

Value

List with some information by gene.

See Also

[GenomicRanges::makeGRangesFromDataFrame()] [IRanges::subsetByOverlaps()] [IRanges::mergeByOverlaps()] [IRanges::countOverlaps()]

Examples

 ## Not run: 
 expt <- create_expt(metadata, gene_information)
 snp_expt <- count_expt_snps(expt)
 snp_result <- get_snp_sets(snp_expt)
 gene_intersections <- snps_vs_genes(expt, snp_result)

## End(Not run)

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