makeGeneBins: makeGeneBins

Description Usage Arguments Details Value See Also Examples

Description

This function bins genes based on their size (number of SNPs assigned to the gene), and then combines bins to create final bins containing (approximately) a minimum number of genes as specified by the user.

Usage

1
makeGeneBins(geneSnpCounts, minBinSize = 25)

Arguments

geneSnpCounts

A list specifying the number of SNPs assigned to each gene, as created with the function getGeneSizes.

minBinSize

The minimum number of genes to be placed in each bin. The default is 25 genes per bin.

Details

It is guaranteed that each bin will contain at least 0.75*minBinSize genes. If 0.75*minBinSize is greater than the number of genes in geneSnpCounts an error will be returned.

Value

Returns a list with two components: simpleBins and binBounds.

simpleBins

A list containing vectors of geneIDs for each gene size (number of SNPs).

binBounds

A matrix with two columns specifying the final bin boundaries. Each row of the matrix specifies the gene size limits for each final bin. For instance if the values of a row are 50 and 55, there should be at least 0.75*minBinSize genes containing between 50 and 55 SNPs.

See Also

getGeneSizes

Examples

1
2
3
data(sampleGSA)
snpCounts = getGeneSizes(snpMap)
geneBins = makeGeneBins(snpCounts, 25)

mooneymi/gsaPermute documentation built on May 23, 2019, 6:11 a.m.