Description Usage Arguments Value Methods (by class) Note Examples
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.
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)
|
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. |
An XStringSet if split is missing or an XStringSetList if it is present
object = pgLM,split = missing
: Gene access for pgLM and subclasses
object = pgLM,split = character
: Gene access for pgLM and subclasses with group splitting
object = pgFull,split = missing
: Gene access for pgFull and subclasses
object = pgFull,split = character
: Gene access for pgFull and subclasses with group splitting
object = pgSlim,split = missing
: Throws error for pgSlim
object = pgSlim,split = character
: Throws error for pgSlim
Required for subclasses of pgVirtual in order to extend the class system of FindMyFriends
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.