diff --git a/.gitignore b/.gitignore
index 8d98bb0351e9b95e5de18393c2101b00e143fbd8..bfcdccda4cc8ba2a676c9a9a0f88f90815bd7221 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 *.h5
 __pycache__/
+tmp*
diff --git a/scripts/attributes/master.py b/scripts/attributes/master.py
index e466b7f76983bdb3ada7d09e242f459811618561..ce8a00a5d8fbedf27092e80213e8e1896ad57dec 100644
--- a/scripts/attributes/master.py
+++ b/scripts/attributes/master.py
@@ -50,7 +50,7 @@ def make_cell_tables(folder, name, tmp_folder, resolution,
     if not os.path.exists(aux_gene_path):
         raise RuntimeError("Can't find auxiliary gene file")
     gene_out = os.path.join(table_folder, 'genes.csv')
-    # write_genes_table(seg_path, aux_gene_path, gene_out, label_ids)
+    write_genes_table(seg_path, aux_gene_path, gene_out, label_ids)
 
     # make table with morphology
     morpho_out = os.path.join(table_folder, 'morphology.csv')
diff --git a/test/attributes/test_morphology.py b/test/attributes/test_morphology.py
new file mode 100644
index 0000000000000000000000000000000000000000..f92f87ed58bec4fa489d10fabc4d02e73f5b5e47
--- /dev/null
+++ b/test/attributes/test_morphology.py
@@ -0,0 +1,60 @@
+import unittest
+import sys
+import os
+import numpy as np
+sys.path.append('../..')
+
+
+# check new version of gene mapping against original
+class TestMorphologyAttributes(unittest.TestCase):
+    test_file = 'test_table.csv'
+
+    def tearDown(self):
+        try:
+            os.remove(self.test_file)
+        except OSError:
+            pass
+
+    def load_table(self, table_file):
+        table = np.genfromtxt(table_file, delimiter='\t', skip_header=1,
+                              dtype='float32')
+        return table
+
+    def test_nucleus_morphology(self):
+        from scripts.attributes.morphology import write_morphology_nuclei
+
+        # compute and load the morpho table
+        seg_path = '../../data/0.0.0/segmentations/em-segmented-nuclei-labels.h5'
+        table_in_path = '../../data/0.0.0/tables/em-segmented-nuclei-labels/default.csv'
+        table_out_path = self.test_file
+        print("Start computation ...")
+        write_morphology_nuclei(seg_path, table_in_path, table_out_path)
+        table = self.load_table(table_out_path)
+
+        # load original table, make sure new and old table agree
+        original_table_file = '../../data/0.0.0/tables/em-segmented-nuclei-labels/morphology.csv'
+        original_table = self.load_table(original_table_file)
+        self.assertEqual(table.shape, original_table.shape)
+        self.assertTrue(np.allclose(table, original_table))
+
+    def test_cell_morphology(self):
+        from scripts.attributes.morphology import write_morphology_cells
+
+        # compute and load the morpho table
+        seg_path = '../../data/0.0.0/segmentations/em-segmented-cells-labels.h5'
+        mapping_path = '../../data/0.0.0/tables/em-segmented-cells-labels/objects.csv'
+        table_in_path = '../../data/0.0.0/tables/em-segmented-cells-labels/default.csv'
+        table_out_path = self.test_file
+        print("Start computation ...")
+        write_morphology_cells(seg_path, table_in_path, mapping_path, table_out_path)
+        table = self.load_table(table_out_path)
+
+        # load original table, make sure new and old table agree
+        original_table_file = '../../data/0.0.0/tables/em-segmented-cells-labels/morphology.csv'
+        original_table = self.load_table(original_table_file)
+        self.assertEqual(table.shape, original_table.shape)
+        self.assertTrue(np.allclose(table, original_table))
+
+
+if __name__ == '__main__':
+    unittest.main()