Description Usage Arguments Details Value See Also Examples
Apply the dictionary to the data files and write the translated files to disk.
1 2 |
... |
input (see details). |
dict |
the PGCA dictionary to use. |
out.dir |
the directory to save the translated files in (see details).
If |
out.suffix, out.prefix |
suffix and prefix that will be added to the translated files. |
col.mapping |
the column mapping for the input files. Defaults to the same as used to build the dictionary. |
out.pg.col |
the name of the column to store the protein group. |
The dictionary is applied to the data specified argument.
If no input is provided, the dictionary is applied to the
files used to create the dictionary. The inputs can be
directory names, file names, or data.frames
s.
If the output directory out.dir
is specified, the translated files
will be saved in this directory. Otherwise the files will be written to the
same directory as the input files. The function will not overwrite existing
files and will fail if the files already exist. Parameters out.suffix
and out.prefix
can be used to ensure unique new file names.
In case the input is a list of data.frame
s and no output
directory is specified, the data.frame
s will be translated and
returned as a list. The function will also return the translated
data.frame
s as list if the out.dir=NULL
.
Either a list of data.frame
s or nothing (see details).
pgcaDict
to create the dictionary
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # Build PGCA dictionary from all files in a directory
dict <- pgcaDict(
system.file("extdata", package="pgca"),
col.mapping=c(gene.symbol="Gene_Symbol")
)
# Translate all files in the directory and return as a list of data.frames
trans <- applyDict(system.file("extdata", package="pgca"), dict=dict,
out.dir=NULL)
# Translate only some files in the directory and return as a list of
# data.frames
trans <- applyDict(
system.file("extdata", "BET1947_v339.txt", package="pgca"),
system.file("extdata", "BET2047_v339.txt", package="pgca"),
dict=dict
)
str(trans)
# Translate all files in the directory and save to another directory
out.dir <- tempdir()
applyDict(system.file("extdata", package="pgca"), dict=dict,
out.dir=out.dir)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.