Dear List,
Im analysing DGGE-gels but doing the numerical analysis (baseline subtraction, peak detection etc) externaly using R (http://cran.r-project.org/). ImageJs "Analyze-Gels" is great, but has a graphical output and no (obvious) access to the numerical data. As a work-around I rotated the gels to orient the lanes horizontally, marked the first lane with a rectangular ROI, analysed with "Analyze-Plot Profile", and got the plot values with "List". From here I saved the date to import it to R. After moving the ROI with the arrow keys, the process was repeated. In summary, it works, but with many lanes and/or gels it can be quite tedious. I would appreciate very much any support to improve the overall procedure. (i) If the lanes are not perfectly perpendicular to the edge of the image, I rotate the image accordingly before analysis. The Angle-Tool allows to measure arbitrary angles, but not directly the deviation of an arbitraty line from from a horizontal line. A solution like that in Photoshop would be great (in Photoshop: draw any line with the Measure-Tool, do Image-Rotate-Arbitrary, and the deviation of the arbitrary from a horizontal line is offered as default for rotation). (ii) Making the process of gel analysis faster e.g. by adding a table output to Analyze-Gels. N.b.: Im requesting a table of the x/y data and NOT of peak areas. Kind regards, Peter |
On Tuesday 14 February 2006 08:29, Peter Frenzel wrote:
> Im analysing DGGE-gels but doing the numerical analysis (baseline > subtraction, peak detection etc) externaly using R > (http://cran.r-project.org/). Hm... I have been wondering about how to interface IJ with R. If you can give some hints, I would be interested. > (i) If the lanes are not perfectly perpendicular to the edge of the image, > I rotate the image accordingly before analysis. > A solution like that in Photoshop would > be great (in Photoshop: draw any line with the Measure-Tool, do > Image-Rotate-Arbitrary, and the deviation of the arbitrary from a > horizontal line is offered as default for rotation). This is quite easy: First draw a line, then run this macro: ---------------------8<----------------------- //Rotate_from_line.txt //G. Landini 14/Feb/2006 // // Rotates an image using a line selection as reference. // The direction of the line selection is considered the "horizontal" // and the image is rotated accordingly. // The first point drawn on the line is considered the // origin point to calculate the angle (so one line can produce 2 // different rotations depending on how it is drawn). getLine(x1, y1, x2, y2,lineW); if (x1!=-1){ a=-atan2( (y2-y1),(x2-x1))*(180/PI); //print(a); run("Arbitrarily...", "angle="+a+" interpolate fill"); } ---------------------8<----------------------- Cheers, Gabriel |
Thanks, Gabriel!
Arbitrary rotation works fine! About interfacing to R: a real "interface" may be beautiful but not necessarily what's needed. A compact *.csv file for importing to R would be enough. There are routines available for importing *.csv-files recursively, but analysis is less error prone if only one file has to be handled. I'll come back to these analyses in March, so if somebody is interested, I can share the R-code. Regards, Peter -----Original Message----- From: ImageJ Interest Group [mailto:[hidden email]]On Behalf Of Gabriel Landini Sent: Dienstag, 14. Februar 2006 11:19 To: [hidden email] Subject: Re: gel analysis On Tuesday 14 February 2006 08:29, Peter Frenzel wrote: > Im analysing DGGE-gels but doing the numerical analysis (baseline > subtraction, peak detection etc) externaly using R > (http://cran.r-project.org/). Hm... I have been wondering about how to interface IJ with R. If you can give some hints, I would be interested. > (i) If the lanes are not perfectly perpendicular to the edge of the image, > I rotate the image accordingly before analysis. > A solution like that in Photoshop would > be great (in Photoshop: draw any line with the Measure-Tool, do > Image-Rotate-Arbitrary, and the deviation of the arbitrary from a > horizontal line is offered as default for rotation). This is quite easy: First draw a line, then run this macro: ---------------------8<----------------------- //Rotate_from_line.txt //G. Landini 14/Feb/2006 // // Rotates an image using a line selection as reference. // The direction of the line selection is considered the "horizontal" // and the image is rotated accordingly. // The first point drawn on the line is considered the // origin point to calculate the angle (so one line can produce 2 // different rotations depending on how it is drawn). getLine(x1, y1, x2, y2,lineW); if (x1!=-1){ a=-atan2( (y2-y1),(x2-x1))*(180/PI); //print(a); run("Arbitrarily...", "angle="+a+" interpolate fill"); } ---------------------8<----------------------- Cheers, Gabriel |
Free forum by Nabble | Edit this page |