Last data update: 2014.03.03

R: Function to summarize the extracted features per cell for...
summarizeWellsExtendedR Documentation

Function to summarize the extracted features per cell for each well

Description

The function extends the imageHTS function summarizeWells. It calculates summary statistics over all cells for each well. In particular the trimmed mean (trim = 0.1) and sd is calculated for each extracted feature. Additionally the 1 calculated for features that are not the standard deviation, median absolut deviation or Halralick statistics calculated over each cell.

Usage

summarizeWellsExtended(x, uname, featurePar,
  profileFilename = file.path("data", "profiles.tab"), access = "cache")

Arguments

x

A imageHTS object.

uname

A character vector, containing the well names that will be summarized.

featurePar

File containing the feature parameters used for summarizing the wells.

profileFilename

File name to save the summarized features.

access

Access parameter passed to fileHTS

Value

None, writes the summarized well profiles into the specified files on disk.

Author(s)

Felix A. Klein, felix.klein@embl.de

See Also

imageHTS, summarizeWells

Examples

## see section 2.1 Image processing on cluster for a working example
localPath = tempdir()
serverURL = system.file("extdata", package = "PGPC")

imageConfFile = file.path("conf", "imageconf.txt")

## circumvent memory problem on 32bit windows by segementing only spot 1.
if(.Platform$OS.type == "windows" & R.Version()$arch == "i386")
    imageConfFile = file.path("conf", "imageconf_windows32.txt")

x = parseImageConf(imageConfFile,
                   localPath=localPath,
                   serverURL=serverURL)

well = "045-01-C23"

segmentWells(x, well, file.path("conf", "segmentationpar.txt"))
PGPC:::extractFeaturesWithParameter(x,
                                    well,
                                    file.path("conf", "featurepar.txt"))

summary <- summarizeWellsExtended(x,
                                  well,
                                  file.path("conf", "featurepar.txt"))

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(PGPC)
Loading required package: EBImage
Loading required package: imageHTS
Loading required package: cellHTS2
Loading required package: RColorBrewer
Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
    get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
    match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
    rbind, rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit

Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.


Attaching package: 'Biobase'

The following object is masked from 'package:EBImage':

    channel

Loading required package: genefilter
Loading required package: splots
Loading required package: vsn
Loading required package: hwriter
Loading required package: locfit
locfit 1.5-9.1 	 2013-03-22
Loading required package: grid
Loading required package: SearchTrees
Loading required package: limma

Attaching package: 'limma'

The following object is masked from 'package:BiocGenerics':

    plotMA

Loading required package: gplots

Attaching package: 'gplots'

The following object is masked from 'package:stats':

    lowess

Loading required package: ggplot2

Attaching package: 'ggplot2'

The following object is masked from 'package:cellHTS2':

    annotate

Loading required package: geneplotter
Loading required package: lattice
Loading required package: annotate
Loading required package: AnnotationDbi
Loading required package: stats4
Loading required package: IRanges
Loading required package: S4Vectors

Attaching package: 'S4Vectors'

The following object is masked from 'package:gplots':

    space

The following objects are masked from 'package:base':

    colMeans, colSums, expand.grid, rowMeans, rowSums


Attaching package: 'IRanges'

The following objects are masked from 'package:EBImage':

    resize, tile

Loading required package: XML
Loading required package: ChemmineR

Attaching package: 'ChemmineR'

The following object is masked from 'package:S4Vectors':

    fold

The following object is masked from 'package:limma':

    makeUnique

Loading required package: reshape2
Loading required package: plyr

Attaching package: 'plyr'

The following object is masked from 'package:IRanges':

    desc

The following object is masked from 'package:S4Vectors':

    rename

> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/PGPC/summarizeWellsExtended.Rd_%03d_medium.png", width=480, height=480)
> ### Name: summarizeWellsExtended
> ### Title: Function to summarize the extracted features per cell for each
> ###   well
> ### Aliases: summarizeWellsExtended
> 
> ### ** Examples
> 
> ## see section 2.1 Image processing on cluster for a working example
> localPath = tempdir()
> serverURL = system.file("extdata", package = "PGPC")
> 
> imageConfFile = file.path("conf", "imageconf.txt")
> 
> ## circumvent memory problem on 32bit windows by segementing only spot 1.
> if(.Platform$OS.type == "windows" & R.Version()$arch == "i386")
+     imageConfFile = file.path("conf", "imageconf_windows32.txt")
> 
> x = parseImageConf(imageConfFile,
+                    localPath=localPath,
+                    serverURL=serverURL)
File "conf/imageconf.txt" read.
Number of plates= 48 
Number of replicates= 2 
Number of wells= 384 
Number of channels= 2 
Number of spots= 4 
> 
> well = "045-01-C23"
> 
> segmentWells(x, well, file.path("conf", "segmentationpar.txt"))
045-01-C23: segmentAllSpots 48 24 0.0007 0.00025 0.0001 0.005 100 3000 15000 150 724 1324 724 1324 400 TRUE TRUE TRUE TRUE 
read images 
smooth image 
computing nseg 
segmenting cells using Voronoi tesselation 
segmentation OK 
segmentAllSpots 48 24 0.0007 0.00025 0.0001 0.005 100 3000 15000 150 724 1324 724 1324 400 TRUE TRUE TRUE TRUE 
read images 
smooth image 
computing nseg 
segmenting cells using Voronoi tesselation 
segmentation OK 
segmentAllSpots 48 24 0.0007 0.00025 0.0001 0.005 100 3000 15000 150 724 1324 724 1324 400 TRUE TRUE TRUE TRUE 
read images 
smooth image 
computing nseg 
segmenting cells using Voronoi tesselation 
segmentation OK 
segmentAllSpots 48 24 0.0007 0.00025 0.0001 0.005 100 3000 15000 150 724 1324 724 1324 400 TRUE TRUE TRUE TRUE 
read images 
smooth image 
computing nseg 
segmenting cells using Voronoi tesselation 
segmentation OK 
 nbcells=10754 OK
Warning messages:
1: In readTIFF(x, all = all, ...) :
  TIFFReadDirectory: Unknown field with tag 65400 (0xff78) encountered
2: In readTIFF(x, all = all, ...) :
  TIFFReadDirectory: Unknown field with tag 65400 (0xff78) encountered
3: In readTIFF(x, all = all, ...) :
  TIFFReadDirectory: Unknown field with tag 65400 (0xff78) encountered
4: In readTIFF(x, all = all, ...) :
  TIFFReadDirectory: Unknown field with tag 65400 (0xff78) encountered
5: In readTIFF(x, all = all, ...) :
  TIFFReadDirectory: Unknown field with tag 65400 (0xff78) encountered
6: In readTIFF(x, all = all, ...) :
  TIFFReadDirectory: Unknown field with tag 65400 (0xff78) encountered
7: In readTIFF(x, all = all, ...) :
  TIFFReadDirectory: Unknown field with tag 65400 (0xff78) encountered
8: In readTIFF(x, all = all, ...) :
  TIFFReadDirectory: Unknown field with tag 65400 (0xff78) encountered
> PGPC:::extractFeaturesWithParameter(x,
+                                     well,
+                                     file.path("conf", "featurepar.txt"))
045-01-C23: Feature Extraction  ...        [1] 1
Calcualting lcd for spot 1 
[1] 2
Calcualting lcd for spot 2 
[1] 3
Calcualting lcd for spot 3 
[1] 4
Calcualting lcd for spot 4 
finished. Time:  1.803995 mins .
 OK
> 
> summary <- summarizeWellsExtended(x,
+                                   well,
+                                   file.path("conf", "featurepar.txt"))
045-01-C23: OK
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>