Learn R Programming

FindMyFriends (version 1.2.2)

genes: Extract gene sequences from a pangenome

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

genes(object, split, subset)
"genes"(object, split, subset)
"genes"(object, split, subset)
"genes"(object, split, subset)
"genes"(object, split, subset)
"genes"(object, split, subset)
"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)

  • 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

Examples

Run this code
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)

Run the code above in your browser using DataLab