IJMacro16: Run an imageJ analysis macro on the folder that contains the...

View source: R/IJMacro16.R

IJMacro16R Documentation

Run an imageJ analysis macro on the folder that contains the photograph of the plate with 16 disks on it to be analyzed.

Description

IJMacro16 is used to run the imageJ analysis component of diskImageR and then load in the acquired output from imageJ into R.

Usage

IJMacro16(
  projectName,
  projectDir = NA,
  photoDir = NA,
  imageJLoc = NA,
  diskDiam = 6,
  drugs = c("AMC30", "CTX30", "S10", "CIP5", "CAZ30", "NA30", "IPM10", "AZM15", "C30",
    "FOX30", "TET30", "F300", "ATM30", "AM10", "CPD10", "SXT25")
)

Arguments

projectName

the short name you want use for the project

projectDir

the path to the project directory where all analyses will be saved. If left as NA (the default) you will be able to specify the locaion through a pop-up box. (default=NA)

photoDir

the path to the directory where the photographs are to be analyzed. If left as NA (the default) you will be able to specify the locaion through a pop-up box. (default=NA)

imageJLoc

the absolute path to ImageJ (ImageJ) on your computer. Leave as NA (the default) if you have downloaded ImageJ to a standard location (Mac: /Applications/ImageJ.app or /Applications/ImageJ/ImageJ.app/; Windows: Program Files/ImageJ). If you wish to run imageJ from an alternative path use imageJLoc to specify the absolute path.

diskDiam

the diameter of the diffusion disk in mm, defaults to 6.

drugs

a vector that indicates the order of drug disks from top left to bottom right. Defaults to c("CIP5", "S10", "FOX30", "NA30", "CT10", "IPM10", "AMC30", "CTX30", "F300", "TE30", "CAZ30", "C30", "SXT25", "CPD10", "AM10", "ATM30")

Details

Each photograph in the directory specified by photoDir is input into ImageJ, where the built-in 'find particles' macro is used to find the center of a drug diffusion disk of the size specified by diskDiam. The disk centers are saved, and used to match up the correct data to each disk (ImageJ will authomatically number disks by their X and Y position, and since there is subtle variation in the Y position that disks end up, the order will change for each plate – this happens in the background of the function. Lines are drawn every 2 degrees out from the center of the disk, and the pixel intensity, which corresponds to cell density, is measured using the 'plot-profile' macro along each line. The results from all lines are saved into the "imageJ-out" directory in the specified projectDir. An additional step is needed to correct for additional complications from mulit-disk plates. Disks on the outside of the plates (particularly those in the corners) will have fewer lines with full profiles that are not influenced by the edges. There is also the strong potential influence of drug interactions, yielding lower intensity areas (as can be seen above for NA30 and IPM10. To correct for these complications, rather than averaging across all lines, the average pixel intensity is determined from the data at each point that corresponds to within the 0.55 and 0.75 quantile intensities. The average line for each photograph and saved to projectName.
Note that the photograph names can be fairly important downstream and should follow a fairly strict convention to be able to take advantage of some of the built-in functions. Photographs should be named "line_factor1_factor2_factor3_...".

Value

A .csv file is saved to the directory "imageJ_out" in the directory specified by projectDir. The average line for each photograph is saved to the list projectName in the global environment.

Important

There can not be any spaces or special characters in any of the folder names that are in the path that lead to either the main project directory or the photograph directory. If there are an error box titled "Macro Error" will pop up and the script will not run. The project name should ideally be fairly short (easy to type without typos!) and specific to the project. It must start with a letter, not a number or special character, but can otherwise be anything. The project name must always be specified with quotation marks around it (a surprisingly common error).

Examples

## Not run: 
IJMacro16("myProject")

## End(Not run)

acgerstein/diskImageR documentation built on May 18, 2024, 4:15 a.m.