SMOLR_IMPORT: Import Single Molecule Localization Data into R

View source: R/smolr_import.R

SMOLR_IMPORTR Documentation

Import Single Molecule Localization Data into R

Description

From different data formats the SMOLR_IMPORT function can import data from a chosen directory into a list of data.frames and saves it to a .Rdata file in the same directory. For different single molecule localization microscopy software packages profiles have been made which should make importing data straightforward. The SMOLR_LOAD function can subsequently be used to load the data from the directory into the R environment.

Usage

SMOLR_IMPORT(folder, basename, sep_chfiles, channel, length_statistics, condition, profile, remove_empty_ROI, extension, prename)
SMOLR_LOAD(folder, statistics)

Arguments

folder

The folder/directory containing the localization data (text) files.

basename

The part of the file name which every text file to be imported contains. This is followed by an ID/number.

sep_chfiles

If the data contains multiple image channels are they present in one text file or separate files, default=FALSE. If TRUE the channel names should be idicated with channel and should be present in the to-be imported filenames after the basename.

channel

Which channels are presents, default=1. If multiple channels are present give their names in a vector.

length_statistics

If statistics of the ROIs are present, under the localization data in the text files, the number of lines that should be converted into a statistics data.frame should be the input here. This is used in combination with the Erasmus OIC ImageJ SMLM_viewer plugin to organize localization data. Those channel names should be present in the to-be imported filenames after the basename.

condition

The data can be labelled with a condition, which allows comparing different experimental conditions, when different datasets are imported.

profile

Profiles with correct settings for different data types. Currently available: default="default".Using SMLM_viewer macro in ImageJ/Fiji: "loc" and "roiloc". For Zeiss Elyra: "elyra". For the ImageJ/Fiji plugin Thunderstorm: 'thunderstorm'.

remove_empty_ROI

If ROIs are present that do not contain any localization they will be removed

extension

File extension of the to-be imported localization files. default is txt .

prename

Is there any name in the file names of the localization files that can be used to filter the to-be imported files from the folders.

statistics

Using SMOLR_LOAD should the attached statistics file be loaded, default is FALSE.

Author(s)

Optical Imaging Centre ErasmusMC Rotterdam

References

ImageJ/Fiji plugin Thunderstorm: https://github.com/zitmen/thunderstorm .

Examples

#see for example files SMoLR_data github
#https://github.com/ErasmusOIC/SMoLR_data/raw/master/loc.zip

download.file("https://github.com/ErasmusOIC/SMoLR_data/raw/master/loc.zip","loc.zip")
unzip("loc.zip")

SMOLR_IMPORT(file.path(getwd(),"loc"),profile="roiloc")
SMOLR_LOAD(file.path(getwd(),"loc"),statistics=T)
head(localizations[[1]])

#Example Thuderstorm file:
#https://github.com/ErasmusOIC/SMoLR_data/raw/master/thunderstorm.zip

download.file("https://github.com/ErasmusOIC/SMoLR_data/raw/master/thunderstorm.zip","thunderstorm.zip")
unzip("thunderstorm.zip")

SMOLR_IMPORT(file.path(getwd(),"thunderstorm"),profile="thunderstorm")
SMOLR_LOAD(file.path(getwd(),"thunderstorm"),statistics=F)
head(localizations[[1]])

ErasmusOIC/SMoLR documentation built on Aug. 20, 2024, 8:50 p.m.