Skip to content

Tutorial

Arne edited this page May 24, 2022 · 2 revisions

Step 0: Preparation

Install KICS with Plugins → Install/Uninstall Plugins…, enter KICS into the search field and install the plugin.

Activate KICS by Plugins → napari-kics: Karyotype Widget. The KICS panel appears on the right side of napari.

Step 1: Loading data

Start by loading the example karyotype image File → Open Sample → napari-kics: sample.

step-1-load

Step 2: Preprocessing and segementation

Adjust the threshold and blur until the highlighted (red) segmentation neatly fits the chromosome outlines.

step-2-preprocessing

Step 3: Labelling

Enter the genome size 3100 Mb and assign labels to each segmented area by clicking on Label.

step-3-label

Step 4: Manual curation of labels

You may notice that some chromosomes are labelled with several labels. These labels should be joined into one so all parts contribute to the same chromosome.

  1. Use the pan & zoom tool (magnifying glass or press 5) to locate defective labels.
  2. Pick the numerical value of one of the labels with the picker tool (pipette or press 4) and transfer to the remaining fragments using the fill tool (fill bucket or press 3).
  3. Generally, some defects may require using the paint brush (paint brush or press 2) or eraser (eraser or press 1) tool. Use them as required.
  4. Repeat until all defects are fixed.

step-4-label-curation

Step 5: Noise removal

The sample image contains embedded text labels that should not be labelled. To remove the corresponding labels efficiently, we scroll through the table to identify the biggest of the undesired labels.

Hint: it can be useful the activate the checkbox show selected in layer controls.

Once we found it, we select all smaller labels in addition using ⇧ Shift + Click. Hitting ⌫ Backspace removes the labels from the image.

Hint: the FAQ lists another method for removing undesired labels

step-5-noise-removal

Step 6: Chromosome naming

The final step is to establish chromosome names for the labels and annotate the image with the estimated sizes.

In our example this is as simple as clicking the button Automatically guess order. The X and Y chromosome will receive names 23a and 23b which must be manually corrected by double clicking on the name in the table and entering X and Y, respectively.

The annotations can be adjusted for better readability in step 4 of the widget. However, the settings have no effect on the SVG that is generated when saving. See next step for more details.

step-6-annotations

Step 7: Saving the results

The results can be saved by pressing the Save button at the bottom of the widget.

step-7-saving-detail

This will generated the following files in the specified folder:

Filename Description Example (detail)
annotated.svg Original karyotype with overlayed annotations annotated
screenshot.png Screenshot of the viewer screenshot
params.csv List of parameters params
labelled_color.png Image of the labels in RGB colors labelled_color
data.csv Table of estimates, chromosome names, data
thresholded.png Result of segmentation by threshold thresholded
labelled.tiff Labels stored as integer (image not visible in viewers) labelled
inverted.png Gray-scale-transformed karyotype; possibly inverted inverted
blurred.png Image after applying blur to inverted.png blurred