genes: Extract gene sequences from a pangenome

Description Usage Arguments Value Methods (by class) Note Examples

Description

This method is used to extract the genomic sequences that is the basis for the pangenome. Genes can be split and subsetted upfront based on other information in the pangenome, such as gene groups and organisms. For some pgVirtual subclasses the subset parameter is mandatory in order to avoid reading all genes into memory at once.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
genes(object, split, subset)

## S4 method for signature 'pgLM,missing'
genes(object, split, subset)

## S4 method for signature 'pgLM,character'
genes(object, split, subset)

## S4 method for signature 'pgFull,missing'
genes(object, split, subset)

## S4 method for signature 'pgFull,character'
genes(object, split, subset)

## S4 method for signature 'pgSlim,missing'
genes(object, split, subset)

## S4 method for signature 'pgSlim,character'
genes(object, split, subset)

Arguments

object

A pgVirtual subclass

split

A string giving the optional splitting type. Either 'organism', 'group' or 'paralogue'.

subset

A subsetting of the result equal to using '[]' on the result. It is generally recommended to use this instead of subsetting the result, as it avoids unneeded memory allocation.

Value

An XStringSet if split is missing or an XStringSetList if it is present

Methods (by class)

Note

Required for subclasses of pgVirtual in order to extend the class system of FindMyFriends

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
testPG <- .loadPgExample(withGroups=TRUE, withParalogues=TRUE)
# Direct gene access
genes(testPG)

# Early subsetting
genes(testPG, subset=1:10)

# Split by membership
genes(testPG, split='organism')
genes(testPG, split='group')
genes(testPG, split='paralogue')

# Split and subset - get genes from the first organism
genes(testPG, split='organism', subset=1)

FindMyFriends documentation built on Nov. 8, 2020, 6:46 p.m.