removeGene: Remove genes from a pangenome

Description Usage Arguments Value Methods (by class) Note Examples

Description

This method makes it possible to safely remove genes from a pangenome using a variaty of selection mechanisms depending on the supplied parameters. The name parameter refers to the gene name, organism refers to either organism name or index, group refers to either gene group name or index and ind refers to the gene index. See examples for details of the different possibilities.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
removeGene(object, name, organism, group, ind, ...)

## S4 method for signature 'pgInMem,missing,missing,missing,numeric'
removeGene(object,
  name, organism, group, ind)

## S4 method for signature 'pgVirtual,character,missing,missing,missing'
removeGene(object,
  name, organism, group, ind)


  ## S4 method for signature 'pgVirtual,character,character,missing,missing'
removeGene(object,
  name, organism, group, ind)

## S4 method for signature 'pgVirtual,character,numeric,missing,missing'
removeGene(object,
  name, organism, group, ind)

## S4 method for signature 'pgVirtual,missing,character,missing,missing'
removeGene(object,
  name, organism, group, ind)

## S4 method for signature 'pgVirtual,missing,numeric,missing,missing'
removeGene(object,
  name, organism, group, ind)

## S4 method for signature 'pgVirtual,missing,character,missing,numeric'
removeGene(object,
  name, organism, group, ind)

## S4 method for signature 'pgVirtual,missing,numeric,missing,numeric'
removeGene(object,
  name, organism, group, ind)

## S4 method for signature 'pgVirtual,missing,missing,character,missing'
removeGene(object,
  name, organism, group, ind)

## S4 method for signature 'pgVirtual,missing,missing,numeric,missing'
removeGene(object,
  name, organism, group, ind)

## S4 method for signature 'pgVirtual,missing,missing,character,numeric'
removeGene(object,
  name, organism, group, ind)

## S4 method for signature 'pgVirtual,missing,missing,numeric,numeric'
removeGene(object,
  name, organism, group, ind)

Arguments

object

A pgVirtual subclass

name

A character vector of names of genes to remove

organism

Either an integer or character vector of orgnanisms to remove genes from. If neither name nor ind is given all genes in the organisms are removed.

group

Either an integer or character vector of gene groups to remove genes from. If ind is not given all genes in the groups are removed.

ind

Indexes of the selections to remove. If both name, organism and group is not given, it indexes into the raw gene index, otherwise it indexes into the element defined by organism or group.

...

parameters passed on (currently ignored).

Value

An object of the same class as object without the genes that should be removed.

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
testPG <- .loadPgExample(withGroups=TRUE)
nGenes(testPG)

# Remove gene number 6
removeGene(testPG, ind=5)

# Remove all genes from organism 'AE017244'
removeGene(testPG, organism='AE017244')

# Remove first gene in gene group 10
removeGene(testPG, group=10, ind=1)

thomasp85/FindMyFriends documentation built on April 25, 2020, 1:06 p.m.