export.groups: Export the ipcaps result to a text file

Description Usage Arguments Details Value Examples

View source: R/export.groups.R

Description

Export clustering result of ipcaps to text file called 'groups.txt'.

Usage

1
export.groups(result.dir, silence.mode = FALSE)

Arguments

result.dir

A result directory as the $output object returned from the ipcaps function.

silence.mode

To enable or disable silence mode. If silence mode is enabled, the fuction is processed without printing any message on the screen, and it is slightly faster. Default = TRUE.

Details

After running, this function exports the file called 'groups.txt' to the same result directory. If 'groups.txt' already exists in the result directory, the exported file is changed to 'groups1.txt', 'groups2.txt', 'groups3.txt', ..., accordingly.

Value

A data frame of exported data containing 4 columns; group, node, label, row.number, as described below for more details:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Importantly, bed file, bim file, and fam file are required
# Use the example files embedded in the package

BED.file <- system.file('extdata',
                        'ipcaps_example.bed',
                        package = 'IPCAPS.BIOC')

LABEL.file <- system.file('extdata',
                          'ipcaps_example_individuals.txt.gz',
                          package = 'IPCAPS.BIOC')

my.cluster <- ipcaps(bed = BED.file,
                     label.file = LABEL.file,
                     lab.col = 2,
                     out = tempdir(),
                     max.thread = 1,
                     seed = 1234)

#Here, to export the ipcaps result to a text file
exported.data <- export.groups(my.cluster$output.dir)
print(dim(exported.data))
head(exported.data)

kridsadakorn/ipcaps.bioc documentation built on Jan. 22, 2020, 11:18 p.m.