omarwagih / gitter Goto Github PK
View Code? Open in Web Editor NEWan R package for quantification of pinned microbial cultures
Home Page: gitter.ccbr.utoronto.ca
an R package for quantification of pinned microbial cultures
Home Page: gitter.ccbr.utoronto.ca
I am getting plenty of warning messages while running gitter.demo() command. Please see below.
Sathish
gitter.demo()
Processing sample.jpg ...
|======================================================================================| 100%gitter v1.0.3 data file
Function call: gitter(image.file = f, verbose = "p")
Elapsed time: 5.63 secs
Plate format: 32 x 48 (1536)
Colony size statistics:
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.0 196.8 303.0 262.7 356.0 670.0
Dat file (first 6 rows):
row col size circularity flags
1 1 1 357 0.5387 C
2 1 2 160 0.8029
3 1 3 393 0.8130
4 1 4 378 0.4710 C
5 1 5 261 0.1836 C
6 1 6 389 0.1588 S,C
Plate warnings:
high count of small colony sizes, high count of low colony circularity
There were 50 or more warnings (use warnings() to see the first 50)warnings()
Warning messages:
1: In cor(ref, z, method = "spearman") : the standard deviation is zero
2: In cor(ref, z, method = "spearman") : the standard deviation is zero
3: In cor(ref, z, method = "spearman") : the standard deviation is zero
4: In cor(ref, z, method = "spearman") : the standard deviation is zero
5: In cor(ref, z, method = "spearman") : the standard deviation is zero
6: In cor(ref, z, method = "spearman") : the standard deviation is zero
7: In cor(ref, z, method = "spearman") : the standard deviation is zero
8: In cor(ref, z, method = "spearman") : the standard deviation is zero
9: In cor(ref, z, method = "spearman") : the standard deviation is zero
10: In cor(ref, z, method = "spearman") : the standard deviation is zero
11: In cor(ref, z, method = "spearman") : the standard deviation is zero
12: In cor(ref, z, method = "spearman") : the standard deviation is zero
13: In cor(ref, z, method = "spearman") : the standard deviation is zero
14: In cor(ref, z, method = "spearman") : the standard deviation is zero
15: In cor(ref, z, method = "spearman") : the standard deviation is zero
16: In cor(ref, z, method = "spearman") : the standard deviation is zero
17: In cor(ref, z, method = "spearman") : the standard deviation is zero
18: In cor(ref, z, method = "spearman") : the standard deviation is zero
19: In cor(ref, z, method = "spearman") : the standard deviation is zero
20: In cor(ref, z, method = "spearman") : the standard deviation is zero
21: In cor(ref, z, method = "spearman") : the standard deviation is zero
22: In cor(ref, z, method = "spearman") : the standard deviation is zero
23: In cor(ref, z, method = "spearman") : the standard deviation is zero
24: In cor(ref, z, method = "spearman") : the standard deviation is zero
25: In cor(ref, z, method = "spearman") : the standard deviation is zero
26: In cor(ref, z, method = "spearman") : the standard deviation is zero
27: In cor(ref, z, method = "spearman") : the standard deviation is zero
28: In cor(ref, z, method = "spearman") : the standard deviation is zero
29: In cor(ref, z, method = "spearman") : the standard deviation is zero
30: In cor(ref, z, method = "spearman") : the standard deviation is zero
31: In cor(ref, z, method = "spearman") : the standard deviation is zero
32: In cor(ref, z, method = "spearman") : the standard deviation is zero
33: In cor(ref, z, method = "spearman") : the standard deviation is zero
34: In cor(ref, z, method = "spearman") : the standard deviation is zero
35: In cor(ref, z, method = "spearman") : the standard deviation is zero
36: In cor(ref, z, method = "spearman") : the standard deviation is zero
37: In cor(ref, z, method = "spearman") : the standard deviation is zero
38: In cor(ref, z, method = "spearman") : the standard deviation is zero
39: In cor(ref, z, method = "spearman") : the standard deviation is zero
40: In cor(ref, z, method = "spearman") : the standard deviation is zero
41: In cor(ref, z, method = "spearman") : the standard deviation is zero
42: In cor(ref, z, method = "spearman") : the standard deviation is zero
43: In cor(ref, z, method = "spearman") : the standard deviation is zero
44: In cor(ref, z, method = "spearman") : the standard deviation is zero
45: In cor(ref, z, method = "spearman") : the standard deviation is zero
46: In cor(ref, z, method = "spearman") : the standard deviation is zero
47: In cor(ref, z, method = "spearman") : the standard deviation is zero
48: In cor(ref, z, method = "spearman") : the standard deviation is zero
49: In cor(ref, z, method = "spearman") : the standard deviation is zero
50: In cor(ref, z, method = "spearman") : the standard deviation is zerosessionInfo()
R version 3.1.2 (2014-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] gitter_1.0.4
loaded via a namespace (and not attached):
[1] abind_1.4-0 BiocGenerics_0.12.1 colorspace_1.2-4 digest_0.6.8
[5] EBImage_4.8.3 ggplot2_1.0.0 grid_3.1.2 gtable_0.1.2
[9] jpeg_0.1-8 labeling_0.3 lattice_0.20-29 locfit_1.5-9.1
[13] logging_0.7-103 MASS_7.3-35 munsell_0.4.2 parallel_3.1.2
[17] PET_0.4.9 plyr_1.8.1 png_0.1-7 proto_0.3-10
[21] Rcpp_0.11.3 reshape2_1.4.1 scales_0.2.4 stringr_0.6.2
[25] tiff_0.1-5 tools_3.1.2
Auto resize any image less than 1000 pixels in width to 1500. This avoids an error generated if a small size image is used.
Hi Omar,
Thanks for answering my previous issue.
I am getting the following error when I run gitter function.
gitter(image.file = "example_plate.tif", plate.format = c(32, 48), autorotate = F)
2015-03-25 19:19:00:INFO::Reading image from: example_plate.tif
Error in array(NA, dim = d[c(2, 1, 3)]) :
negative length vectors are not allowed
In addition: Warning message:
In readTIFF(x, all = all, ...) :
TIFFReadDirectory: Unknown field with tag 59932 (0xea1c) encountered
After some inspection, I found that the error comes from tiff::readTIFF function. I do not understand the error per se. Is there a way to solve this issue? please let me know.
a1 <- tiff::readTIFF("example_plate.tif")
Warning message:
In tiff::readTIFF("example_plate.tif") :
TIFFReadDirectory: Unknown field with tag 59932 (0xea1c) encountered
The "example_plate.tif" file is greater than 10MB which prevents me to attach it here. Please let me know if I need to send it through email.
Thank you
Sathish
Hi Omar
First of all, thanks for developing and maintaining the very useful R tool “gitter”.
I am using it to analyze our microbial plate images.
I just noticed that the Grayscales generated from gitter are a bit different than others.
After I checked the source code of gitter, I found there might be a problem in luminosity grey scale from GIMP.
Here are some problematic lines in your main.R
.readImage <- function(file){ n = basename(file) if(grepl('*.jpg$|*.jpeg$', file, ignore.case=T)){ return( readJPEG(file) ) }else if(grepl('*.tiff$', file, ignore.case=T)){ return( readTIFF(file) ) }else{ im = imageData( readImage(file) ) d = dim(im) M = array(NA, dim=d[c(2,1,3)]) M[,,1] = t(im[,,1]) if(d[3] > 1){ M[,,2] = t(im[,,2]) M[,,3] = t(im[,,3]) } return(M) } }
When it reads a JPEG or TIFF file by calling the function ” readJPEG”, the RGB order should be: 1:Red, 2: Green, 3:Blue
# Extract greyscale if(is.color){ if(prog) setTxtProgressBar(pb, 9) loginfo('\tDetected color image, extracting greyscale') # Luminosity grey scale from GIMP im.grey = (im[,,1]*0.72) + (im[,,2]*0.21) + (im[,,3]*0.07) #im.grey = im[,,1] }else{ loginfo('\tDetected greyscale image') im.grey = im # no color information }
Based on the Luminosity rule: https://en.wikipedia.org/wiki/Relative_luminance
Luminosity = 0.21 × Red + 0.72 × Green + 0.07 × Blue
so I suspected that the code here should be:
im.grey = (im[,,1]*0.21) + (im[,,2]*0.72) + (im[,,3]*0.07)
Is this correct??
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.