README
======

Dataset title: Image files from neuronal autoantibody screening for patients undergoing memory impairment investigations

Recommended Citation: See the Researchdata.se catalogue entry for this dataset - accessible via the DOI link above - for compete metadata, including the dataset description, contact information and information about how to obtain the dataset. 


Responsible organization: Karolinska Institutet, Sweden

Description: This dataset contains image files from 1021 patients that have undergone screening for 5 different neuronal autoantibodies. The files are in the .nd2 format, owned by Nikon, but can be accessed through multiple open-source platforms, for example ImageJ, BioFormats or RBioFormats. For each individual, there are five files, one for each antigen. Each file contains three images, 2048+2048 pixels in size, that have been taken from random locations in a well in a microscopy-grade 96-well plate. The cells in the images are 293 MSR cells (ThermoFisher). For the full protocol, see https://github.com/jtheorell/Laboratory-protocols.

Access: This dataset may contain sensitive data (legal status unclear) and might be subject to legal protections. This dataset can be requested from the Researchdata.se research data catalog using the link above.

Essential information for dataset reuse.
----------------------------------------

This is a dataset of .nd2 image files. This is a format developed and maintained by Nikon. The files can be opened using e.g. imageJ, or BioFormats. There is also a Java-R-inferface package called RBioFormats, that I have been using when processing these files. It sadly does not allow for parallelisation. For broader analysis purposes, including importing and creating png files for simpler visualisation, you can also use the R-BioConductor package islify (https://bioconductor.org/packages//release/bioc/html/islify.html), which I have developed for analysis of these kinds of files.  

Dataset organization
--------------------

The data is organised according to the antigen that has been screened for in each case. Furthermore, the data is divided into plates, and repeats. Including positive and negative controls, each plate contains sixty samples. Complicating the matter, on the individual plate-level, the files are only called according to the position they held in the plate at the time, so the folder hierarchy is necessary to keep the files apart, with no individual per-file identifiers separating them on the file level. In some cases, an initial plate was determined to be of too low quality to be useful for analysis. In these cases, this plate is not included in the listing, and therefore, only e.g. repeat 2 and 3 might be included. 

An example for IgLON5 is shown below

IgLON5/
 Plate_A_repeat_1
 Plate_A_repeat_2
 Plate_B_repeat_2
 Plate_B_repeat_3
 ...

There are in total 24 positions files that are duplicates, meaning that the complete dataset contains 1045 positions (one position made up of plate letter and plate position, e.g. plate A, G08). These additional positions are not listed in the patient-image connector file but have been kept in to keep the full project together. 

Finally, for about 1/3 of the runs there are a few extra images taken. They are in separate folders called "Additional wells", "Not used" or "Positive controls" and similar. These do not need to be considered - it is the file in the "nd2-files"-folders that contain the the files of interest. But these additional wells are also kept for completeness. 

Datafile descriptions
----------------------

There are two files apart from the .nd2-files. These are: 

Patient-image_connector.csv: this comma-separated file contains information about age, sex, diagnostic group, memory screening tests and a few lab parameters and which plate and well that the sample is placed in.

file_list_2026_60.csv: this comma-separated file lists all files in all directories. However, to navigate the data, the combination of the Patient-image_connector and the file directory setup is probably more helpful. 

The .nd2 files contain three 2048+2048 pixel images in two or three colors (either red-blue or red-green-blue). In other words, on top of metadata, the data is made up of three parallel 2048*2048*3 arrays with a 16-bit range. The order of the colors is shown in the name of the individual files, e.g. "WellB02_ChannelWF K AF568 ,WF K eGFP,WF K DAPI_S19629-01.nd2". Here, "WF K AF568" indicates that the first color in the frame is Alexa fluor 568, which is a red fluorofore, in this case attached to the secondary or tertiary antibody and representing the antigen binding, the second color is "WF K eGFP", or enhanced GFP, a green fluorescent protein which is used for transfection control as well as protein localisation, and the third is "WF K DAPI", a blue, nuclear dye. 
When analysing the data in islify, the three nested frames are collapsed into one, large 6144x2048x3 array. 


Data Quality:
The image quality is rather constant. However, the quality of the cell-based assays vary, with the CASPR2 assay showing the highest and most constant quality, followed by LGI1, IgLON5 GABAB and finally NMDA-R, where the quality is uneven and separating positive from negative samples is therefore a challenge, both visually and computationally. With the setup in the original publication, where a low bar for passing the NMDA-R serum screening but with extended secondary controls, the two cases that are identified as antibody-positive are very likely truly positive, but it is not impossible that other cases might be positive as well, even though they had not been detected either visually or computationally at the time of dataset publication. 

