count_per_gene: Count number of points per gene

Description Usage Arguments Details Value Examples

Description

Count number of points per gene

Usage

1
count_per_gene(pos, chr, gene_start, gene_end, gene_chr)

Arguments

pos

positions

chr

chromosome numbers of positions

gene_start

left endpoints of gene intervals

gene_end

right endpoints of gene intervals

gene_chr

chromosome numbers of gene intervals

Details

If 'pos', 'gene_start', or 'gene_end' are not of type "integer", they are internally converted via as.integer.

Value

An integer vector of the same length as 'gene_start' containing the number of points falling into each of the gene intervals.

Examples

1
stopifnot(count_per_gene(0, 0, 0, 0, 0) == 1)

cbaumbach/genFun documentation built on May 13, 2019, 1:47 p.m.