fileHTS: Get access to screen data files

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/imageHTS.R

Description

fileHTS builds the path or URL pointing to a screen data file. readHTS reads the file pointed by fileHTS.

Usage

1
2
  fileHTS(x, type, ..., createPath=FALSE, access='cache')
  readHTS(x, type, ..., access='cache', format=NULL)

Arguments

x

An imageHTS object.

type

A character vector, indicating the requested file type. See Details.

...

Optional arguments. See Details.

createPath

A logical value specifying if the directories along the path should be created. Default is FALSE.

access

A character string indicating how to access the data. Valid values are cache (the default), local and server. See Details.

format

An optional character string indicating the format of the designated file. Valid formats are tab, a tab-separated file with headers; rda, a R data file; dcf, an imageHTS DCF configuration file.

Details

In imageHTS, all screen data files are accessed through the function fileHTS. Screen data can be accessed at two locations: the localPath, which is local writable directory, and serverURL, which is a server URL. localPath and serverURL are set during the instantiation of the imageHTS object with parseImageConf.

If access equals local, fileHTS returns a local path pointing to the requested file. If server, fileHTS returns a server URL pointing to the requested file. If cache (the default), fileHTS tests if the file is present at the local path. If not, fileHTS tries to download the file from the server and copies it in the local path. fileHTS always returns a local path if access equals cache.

A file is designated by its type and optional arguments. Known file types are:

readHTS reads and returns the corresponding file. format must be specified if type is file or source.

Value

fileHTS returns a character vector containing the path or URL of the requested file. readHTS returns the content of the requested file.

Author(s)

Gregoire Pau, gregoire.pau@embl.de, 2010

See Also

parseImageConf, getUnames

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## initialize imageHTS object using the local submorph screen
local = tempdir()
server = system.file('submorph', package='imageHTS')
x = parseImageConf('conf/imageconf.txt', localPath=local, serverURL=server)

## fileHTS and readHTS examples
fileHTS(x, 'file', filename='conf/imageconf.txt')
fileHTS(x, 'source', uname='001-01-C05', channel=1)
readHTS(x, 'file', filename='conf/featurepar.txt', format='dcf')

## initialize imageHTS object using the remote kimorph screen
local = tempdir()
server = 'http://www.ebi.ac.uk/huber-srv/cellmorph/kimorph/'
x = parseImageConf('conf/imageconf.txt', localPath=local, serverURL=server)

## get cell features for well '002-02-D06'
f = readHTS(x, 'ftrs', uname='002-02-D06')
cat('nb cells=', nrow(f), '\n')

imageHTS documentation built on Nov. 8, 2020, 8:29 p.m.