IanevskiAleksandr / sc-type

GNU General Public License v3.0
234 stars 44 forks source link

duplicate vertex names" error when visualizing a bubble plot by ScType #6

Open RENXI-NUS opened 2 years ago

RENXI-NUS commented 2 years ago

Hi,

Thanks for the useful software. May I ask how to solve the "duplicate vertex names" error when visualizing a bubble plot by ScType please?

> mygraph <- graph_from_data_frame(edges, vertices=nodes)
Error in graph_from_data_frame(edges, vertices = nodes) : 
  Duplicate vertex names
> head(nodes)
                 cluster    ncells  Colour ord     shortName            realname
1  Memory CD8+ T cells_0 5929.9743 #5f75ae   2 Memory CD8+ T Memory CD8+ T cells
2 Memory CD8+ T cells_12   68.1659 #cab2d6   2 Memory CD8+ T Memory CD8+ T cells
3  Memory CD8+ T cells_9  107.7350 #b15928   2 Memory CD8+ T Memory CD8+ T cells
4 Memory CD8+ T cells_10  135.5011 #ffff99   2 Memory CD8+ T Memory CD8+ T cells
5  Memory CD8+ T cells_5 1264.1852 #eccf5a   2 Memory CD8+ T Memory CD8+ T cells
6 Memory CD8+ T cells_11    1.0000 #6a3d9a   2 Memory CD8+ T Memory CD8+ T cells
>  head(edges,2)
       from                    to
1 cluster 0 Memory CD8+ T cells_0
2 cluster 0  Naive CD8+ T cells_0
IanevskiAleksandr commented 2 years ago

Hi,

Can you show the ouput of print(nodes) to see all the node data you have?

Thanks, Aleksandr

RENXI-NUS commented 2 years ago

Sure. This is all the node data:

> print(nodes)
                       cluster       ncells  Colour ord        shortName                realname
1        Memory CD8+ T cells_0  5929.974269 #5f75ae   2    Memory CD8+ T     Memory CD8+ T cells
2       Memory CD8+ T cells_12    68.165898 #cab2d6   2    Memory CD8+ T     Memory CD8+ T cells
3        Memory CD8+ T cells_9   107.735041 #b15928   2    Memory CD8+ T     Memory CD8+ T cells
4       Memory CD8+ T cells_10   135.501122 #ffff99   2    Memory CD8+ T     Memory CD8+ T cells
5        Memory CD8+ T cells_5  1264.185179 #eccf5a   2    Memory CD8+ T     Memory CD8+ T cells
6       Memory CD8+ T cells_11     1.000000 #6a3d9a   2    Memory CD8+ T     Memory CD8+ T cells
7        Naive CD8+ T cells_11    58.671935 #6a3d9a   2     Naive CD8+ T      Naive CD8+ T cells
8         Naive CD8+ T cells_2     1.000000 #64a841   2     Naive CD8+ T      Naive CD8+ T cells
9        Naive CD8+ T cells_12    39.056222 #cab2d6   2     Naive CD8+ T      Naive CD8+ T cells
10        Naive CD8+ T cells_8     1.000000 #7ba39d   2     Naive CD8+ T      Naive CD8+ T cells
11        Naive CD8+ T cells_3     1.000000 #e5486e   2     Naive CD8+ T      Naive CD8+ T cells
12        Naive CD8+ T cells_0  5000.859816 #5f75ae   2     Naive CD8+ T      Naive CD8+ T cells
13        Naive CD8+ T cells_6     1.000000 #b5aa0f   2     Naive CD8+ T      Naive CD8+ T cells
14       Naive CD8+ T cells_10   153.365503 #ffff99   2     Naive CD8+ T      Naive CD8+ T cells
15        Naive CD8+ T cells_9     1.000000 #b15928   2     Naive CD8+ T      Naive CD8+ T cells
16        Naive CD8+ T cells_5  1429.376909 #eccf5a   2     Naive CD8+ T      Naive CD8+ T cells
17         <U+03B3>d-T cells_4     1.000000 #de8e06   2      <U+03B3>d-T       <U+03B3>d-T cells
18         <U+03B3>d-T cells_9     1.000000 #b15928   2      <U+03B3>d-T       <U+03B3>d-T cells
19         <U+03B3>d-T cells_0  4304.082581 #5f75ae   2      <U+03B3>d-T       <U+03B3>d-T cells
20        <U+03B3>d-T cells_10    76.297035 #ffff99   2      <U+03B3>d-T       <U+03B3>d-T cells
21         <U+03B3>d-T cells_5   789.043994 #eccf5a   2      <U+03B3>d-T       <U+03B3>d-T cells
22        <U+03B3>d-T cells_11    27.200183 #6a3d9a   2      <U+03B3>d-T       <U+03B3>d-T cells
23     Effector CD8+ T cells_0  4165.662905 #5f75ae   2  Effector CD8+ T   Effector CD8+ T cells
24     Effector CD8+ T cells_5   992.117888 #eccf5a   2  Effector CD8+ T   Effector CD8+ T cells
25     Effector CD8+ T cells_2     1.000000 #64a841   2  Effector CD8+ T   Effector CD8+ T cells
26    Effector CD8+ T cells_11    22.453698 #6a3d9a   2  Effector CD8+ T   Effector CD8+ T cells
27    Effector CD8+ T cells_10   102.811108 #ffff99   2  Effector CD8+ T   Effector CD8+ T cells
28      CD8+ NKT-like cells_10   185.969145 #ffff99   2         CD8+ NKT     CD8+ NKT-like cells
29       CD8+ NKT-like cells_0  1930.771376 #5f75ae   2         CD8+ NKT     CD8+ NKT-like cells
30      CD8+ NKT-like cells_12    36.488631 #cab2d6   2         CD8+ NKT     CD8+ NKT-like cells
31       CD8+ NKT-like cells_4  2196.150886 #de8e06   2         CD8+ NKT     CD8+ NKT-like cells
32       CD8+ NKT-like cells_5  1995.301472 #eccf5a   2         CD8+ NKT     CD8+ NKT-like cells
33              Cancer cells_0     1.000000 #5f75ae   2           Cancer            Cancer cells
34              Cancer cells_6    28.799347 #b5aa0f   2           Cancer            Cancer cells
35             Cancer cells_11     4.369094 #6a3d9a   2           Cancer            Cancer cells
36              Cancer cells_3  2103.388839 #e5486e   2           Cancer            Cancer cells
37              Cancer cells_9    33.814999 #b15928   2           Cancer            Cancer cells
38              Cancer cells_8   241.768124 #7ba39d   2           Cancer            Cancer cells
39              Cancer cells_2     1.000000 #64a841   2           Cancer            Cancer cells
40              Cancer cells_4     1.000000 #de8e06   2           Cancer            Cancer cells
41              Cancer cells_5     1.000000 #eccf5a   2           Cancer            Cancer cells
42                Mast cells_0     1.000000 #5f75ae   2             Mast              Mast cells
43                Mast cells_2     1.000000 #64a841   2             Mast              Mast cells
44                Mast cells_0     1.000000 #5f75ae   2             Mast              Mast cells
45                Mast cells_9   115.985219 #b15928   2             Mast              Mast cells
46                Mast cells_6     1.000000 #b5aa0f   2             Mast              Mast cells
47                Mast cells_5     1.000000 #eccf5a   2             Mast              Mast cells
48                Mast cells_1  2189.034192 #92bbb8   2             Mast              Mast cells
49                Mast cells_7   801.513102 #e4b680   2             Mast              Mast cells
50                Mast cells_1  2189.034192 #92bbb8   2             Mast              Mast cells
51                Mast cells_9   115.985219 #b15928   2             Mast              Mast cells
52                Mast cells_8     1.000000 #7ba39d   2             Mast              Mast cells
53                Mast cells_4     1.000000 #de8e06   2             Mast              Mast cells
54                Mast cells_4     1.000000 #de8e06   2             Mast              Mast cells
55                Mast cells_8     1.000000 #7ba39d   2             Mast              Mast cells
56                Mast cells_6     1.000000 #b5aa0f   2             Mast              Mast cells
57                Mast cells_7   801.513102 #e4b680   2             Mast              Mast cells
58                Mast cells_2     1.000000 #64a841   2             Mast              Mast cells
59                 Monocytes_0     1.000000 #5f75ae   2        Monocytes               Monocytes
60                 Monocytes_4     1.000000 #de8e06   2        Monocytes               Monocytes
61                 Monocytes_6     1.000000 #b5aa0f   2        Monocytes               Monocytes
62                 Monocytes_3   233.497361 #e5486e   2        Monocytes               Monocytes
63                 Monocytes_1  2850.473189 #92bbb8   2        Monocytes               Monocytes
64                 Monocytes_8     1.000000 #7ba39d   2        Monocytes               Monocytes
65                 Monocytes_5     1.000000 #eccf5a   2        Monocytes               Monocytes
66               Pre-B cells_9   273.405072 #b15928   2            Pre-B             Pre-B cells
67               Pre-B cells_0     1.000000 #5f75ae   2            Pre-B             Pre-B cells
68               Pre-B cells_8     1.000000 #7ba39d   2            Pre-B             Pre-B cells
69               Pre-B cells_3     1.000000 #e5486e   2            Pre-B             Pre-B cells
70               Pre-B cells_1  2136.511173 #92bbb8   2            Pre-B             Pre-B cells
71               Pre-B cells_7   493.365862 #e4b680   2            Pre-B             Pre-B cells
72               Pre-B cells_4     2.334262 #de8e06   2            Pre-B             Pre-B cells
73               Pre-B cells_6     1.000000 #b5aa0f   2            Pre-B             Pre-B cells
74               Pre-B cells_5     1.000000 #eccf5a   2            Pre-B             Pre-B cells
75             Kupffer cells_7   616.170813 #e4b680   2          Kupffer           Kupffer cells
76             Kupffer cells_1 12313.277806 #92bbb8   2          Kupffer           Kupffer cells
77               Macrophages_1 10078.778436 #92bbb8   2               MF             Macrophages
78               Macrophages_7   717.097822 #e4b680   2               MF             Macrophages
79   Non-classical monocytes_7   535.182624 #e4b680   2      N_Monocytes Non-classical monocytes
80   Non-classical monocytes_1  9456.779044 #92bbb8   2      N_Monocytes Non-classical monocytes
81  Non-classical monocytes_12     6.087715 #cab2d6   2      N_Monocytes Non-classical monocytes
82   Myeloid Dendritic cells_7  1497.933147 #e4b680   2             mDCs Myeloid Dendritic cells
83  Myeloid Dendritic cells_12   108.686473 #cab2d6   2             mDCs Myeloid Dendritic cells
84   Myeloid Dendritic cells_1  7620.180904 #92bbb8   2             mDCs Myeloid Dendritic cells
85   Myeloid Dendritic cells_2     1.000000 #64a841   2             mDCs Myeloid Dendritic cells
86   Myeloid Dendritic cells_9   162.289399 #b15928   2             mDCs Myeloid Dendritic cells
87  Myeloid Dendritic cells_11     1.000000 #6a3d9a   2             mDCs Myeloid Dendritic cells
88              Granulocytes_7   618.507170 #e4b680   2               Gs            Granulocytes
89              Granulocytes_1  5798.071007 #92bbb8   2               Gs            Granulocytes
90              Granulocytes_9     1.000000 #b15928   2               Gs            Granulocytes
91             Granulocytes_12     1.203136 #cab2d6   2               Gs            Granulocytes
92              Granulocytes_3     1.000000 #e5486e   2               Gs            Granulocytes
93               Neutrophils_8     1.000000 #7ba39d   2      Neutrophils             Neutrophils
94               Neutrophils_1  4882.408766 #92bbb8   2      Neutrophils             Neutrophils
95               Neutrophils_3   736.620560 #e5486e   2      Neutrophils             Neutrophils
96               Neutrophils_4     1.000000 #de8e06   2      Neutrophils             Neutrophils
97               Neutrophils_6     1.000000 #b5aa0f   2      Neutrophils             Neutrophils
98               Neutrophils_7   235.076039 #e4b680   2      Neutrophils             Neutrophils
99         Endothelial cell_10   201.558556 #ffff99   2 Endothelial cell        Endothelial cell
100        Endothelial cell_10   201.558556 #ffff99   2      Endothelial        Endothelial cell
101        Endothelial cell_11   179.498811 #6a3d9a   2 Endothelial cell        Endothelial cell
102        Endothelial cell_11   179.498811 #6a3d9a   2      Endothelial        Endothelial cell
103        Endothelial cell_12    22.225843 #cab2d6   2 Endothelial cell        Endothelial cell
104        Endothelial cell_12    22.225843 #cab2d6   2      Endothelial        Endothelial cell
105         Endothelial cell_2 10796.720396 #64a841   2 Endothelial cell        Endothelial cell
106         Endothelial cell_2 10796.720396 #64a841   2      Endothelial        Endothelial cell
107             Endothelial_11    56.153587 #6a3d9a   2              ECs             Endothelial
108              Endothelial_2  9153.015708 #64a841   2              ECs             Endothelial
109             Endothelial_10   224.401644 #ffff99   2              ECs             Endothelial
110           HSC/MPP cells_10   227.608255 #ffff99   2          HSC/MPP           HSC/MPP cells
111            HSC/MPP cells_3     1.000000 #e5486e   2          HSC/MPP           HSC/MPP cells
112           HSC/MPP cells_11   159.728225 #6a3d9a   2          HSC/MPP           HSC/MPP cells
113            HSC/MPP cells_2  3920.796905 #64a841   2          HSC/MPP           HSC/MPP cells
114  Hepatic stellate cells_11  2424.171345 #6a3d9a   2             HSCs  Hepatic stellate cells
115  Hepatic stellate cells_10     4.164938 #ffff99   2             HSCs  Hepatic stellate cells
116   Hepatic stellate cells_6     1.000000 #b5aa0f   2             HSCs  Hepatic stellate cells
117   Hepatic stellate cells_2  2457.543702 #64a841   2             HSCs  Hepatic stellate cells
118  Hepatic stellate cells_12    33.251052 #cab2d6   2             HSCs  Hepatic stellate cells
119   Hepatic stellate cells_3   194.450838 #e5486e   2             HSCs  Hepatic stellate cells
120              Hepatocytes_6  1682.545120 #b5aa0f   2      Hepatocytes             Hepatocytes
121              Hepatocytes_3 23653.016087 #e5486e   2      Hepatocytes             Hepatocytes
122              Hepatocytes_8  1398.015667 #7ba39d   2      Hepatocytes             Hepatocytes
123           Memory B cells_4     1.000000 #de8e06   2         Memory B          Memory B cells
124           Memory B cells_7   263.827108 #e4b680   2         Memory B          Memory B cells
125           Memory B cells_8   188.009481 #7ba39d   2         Memory B          Memory B cells
126           Memory B cells_9   786.106144 #b15928   2         Memory B          Memory B cells
127          Memory B cells_12    41.586705 #cab2d6   2         Memory B          Memory B cells
128           Memory B cells_3  2569.625694 #e5486e   2         Memory B          Memory B cells
129    Natural killer  cells_6     1.000000 #b5aa0f   2               NK   Natural killer  cells
130    Natural killer  cells_5  1830.932576 #eccf5a   2               NK   Natural killer  cells
131    Natural killer  cells_8     1.000000 #7ba39d   2               NK   Natural killer  cells
132   Natural killer  cells_12    39.871433 #cab2d6   2               NK   Natural killer  cells
133    Natural killer  cells_4  3745.213922 #de8e06   2               NK   Natural killer  cells
134   Natural killer  cells_10    49.623020 #ffff99   2               NK   Natural killer  cells
135                  cluster 5   916.000000 #f1f1ef   1        cluster 5               cluster 5
136                  cluster 0  4552.000000 #f1f1ef   1        cluster 0               cluster 0
137                  cluster 1  3691.000000 #f1f1ef   1        cluster 1               cluster 1
138                  cluster 7   341.000000 #f1f1ef   1        cluster 7               cluster 7
139                  cluster 4  1933.000000 #f1f1ef   1        cluster 4               cluster 4
140                 cluster 10   239.000000 #f1f1ef   1       cluster 10              cluster 10
141                  cluster 3  2474.000000 #f1f1ef   1        cluster 3               cluster 3
142                  cluster 9   241.000000 #f1f1ef   1        cluster 9               cluster 9
143                 cluster 12    42.000000 #f1f1ef   1       cluster 12              cluster 12
144                  cluster 2  3366.000000 #f1f1ef   1        cluster 2               cluster 2
145                  cluster 8   283.000000 #f1f1ef   1        cluster 8               cluster 8
146                  cluster 6   632.000000 #f1f1ef   1        cluster 6               cluster 6
147                 cluster 11   175.000000 #f1f1ef   1       cluster 11              cluster 11

And this is my edge data:

> print(edges)
          from                         to
1    cluster 0      Memory CD8+ T cells_0
2    cluster 0       Naive CD8+ T cells_0
3    cluster 0        <U+03B3>d-T cells_0
4    cluster 0    Effector CD8+ T cells_0
5    cluster 0      CD8+ NKT-like cells_0
6    cluster 0             Cancer cells_0
7    cluster 0               Mast cells_0
8    cluster 0               Mast cells_0
9    cluster 0                Monocytes_0
10   cluster 0              Pre-B cells_0
11   cluster 1            Kupffer cells_1
12   cluster 1              Macrophages_1
13   cluster 1  Non-classical monocytes_1
14   cluster 1  Myeloid Dendritic cells_1
15   cluster 1             Granulocytes_1
16   cluster 1              Neutrophils_1
17   cluster 1                Monocytes_1
18   cluster 1               Mast cells_1
19   cluster 1               Mast cells_1
20   cluster 1              Pre-B cells_1
21   cluster 2         Endothelial cell_2
22   cluster 2              Endothelial_2
23   cluster 2            HSC/MPP cells_2
24   cluster 2   Hepatic stellate cells_2
25   cluster 2       Naive CD8+ T cells_2
26   cluster 2             Cancer cells_2
27   cluster 2  Myeloid Dendritic cells_2
28   cluster 2               Mast cells_2
29   cluster 2               Mast cells_2
30   cluster 2    Effector CD8+ T cells_2
31   cluster 3              Hepatocytes_3
32   cluster 3           Memory B cells_3
33   cluster 3             Cancer cells_3
34   cluster 3              Neutrophils_3
35   cluster 3                Monocytes_3
36   cluster 3   Hepatic stellate cells_3
37   cluster 3            HSC/MPP cells_3
38   cluster 3              Pre-B cells_3
39   cluster 3       Naive CD8+ T cells_3
40   cluster 3             Granulocytes_3
41   cluster 4    Natural killer  cells_4
42   cluster 4      CD8+ NKT-like cells_4
43   cluster 4              Pre-B cells_4
44   cluster 4               Mast cells_4
45   cluster 4               Mast cells_4
46   cluster 4             Cancer cells_4
47   cluster 4           Memory B cells_4
48   cluster 4                Monocytes_4
49   cluster 4        <U+03B3>d-T cells_4
50   cluster 4              Neutrophils_4
51   cluster 5      CD8+ NKT-like cells_5
52   cluster 5    Natural killer  cells_5
53   cluster 5       Naive CD8+ T cells_5
54   cluster 5      Memory CD8+ T cells_5
55   cluster 5    Effector CD8+ T cells_5
56   cluster 5        <U+03B3>d-T cells_5
57   cluster 5             Cancer cells_5
58   cluster 5              Pre-B cells_5
59   cluster 5                Monocytes_5
60   cluster 5               Mast cells_5
61   cluster 6              Hepatocytes_6
62   cluster 6             Cancer cells_6
63   cluster 6       Naive CD8+ T cells_6
64   cluster 6              Neutrophils_6
65   cluster 6                Monocytes_6
66   cluster 6               Mast cells_6
67   cluster 6               Mast cells_6
68   cluster 6    Natural killer  cells_6
69   cluster 6              Pre-B cells_6
70   cluster 6   Hepatic stellate cells_6
71   cluster 7  Myeloid Dendritic cells_7
72   cluster 7               Mast cells_7
73   cluster 7               Mast cells_7
74   cluster 7              Macrophages_7
75   cluster 7             Granulocytes_7
76   cluster 7            Kupffer cells_7
77   cluster 7  Non-classical monocytes_7
78   cluster 7              Pre-B cells_7
79   cluster 7           Memory B cells_7
80   cluster 7              Neutrophils_7
81   cluster 8              Hepatocytes_8
82   cluster 8             Cancer cells_8
83   cluster 8           Memory B cells_8
84   cluster 8              Neutrophils_8
85   cluster 8                Monocytes_8
86   cluster 8       Naive CD8+ T cells_8
87   cluster 8    Natural killer  cells_8
88   cluster 8               Mast cells_8
89   cluster 8               Mast cells_8
90   cluster 8              Pre-B cells_8
91   cluster 9           Memory B cells_9
92   cluster 9              Pre-B cells_9
93   cluster 9  Myeloid Dendritic cells_9
94   cluster 9               Mast cells_9
95   cluster 9               Mast cells_9
96   cluster 9      Memory CD8+ T cells_9
97   cluster 9             Cancer cells_9
98   cluster 9       Naive CD8+ T cells_9
99   cluster 9             Granulocytes_9
100  cluster 9        <U+03B3>d-T cells_9
101 cluster 10           HSC/MPP cells_10
102 cluster 10             Endothelial_10
103 cluster 10        Endothelial cell_10
104 cluster 10     CD8+ NKT-like cells_10
105 cluster 10      Naive CD8+ T cells_10
106 cluster 10     Memory CD8+ T cells_10
107 cluster 10   Effector CD8+ T cells_10
108 cluster 10       <U+03B3>d-T cells_10
109 cluster 10   Natural killer  cells_10
110 cluster 10  Hepatic stellate cells_10
111 cluster 11  Hepatic stellate cells_11
112 cluster 11        Endothelial cell_11
113 cluster 11           HSC/MPP cells_11
114 cluster 11      Naive CD8+ T cells_11
115 cluster 11             Endothelial_11
116 cluster 11       <U+03B3>d-T cells_11
117 cluster 11   Effector CD8+ T cells_11
118 cluster 11            Cancer cells_11
119 cluster 11 Myeloid Dendritic cells_11
120 cluster 11     Memory CD8+ T cells_11
121 cluster 12 Myeloid Dendritic cells_12
122 cluster 12     Memory CD8+ T cells_12
123 cluster 12          Memory B cells_12
124 cluster 12   Natural killer  cells_12
125 cluster 12      Naive CD8+ T cells_12
126 cluster 12     CD8+ NKT-like cells_12
127 cluster 12  Hepatic stellate cells_12
128 cluster 12        Endothelial cell_12
129 cluster 12 Non-classical monocytes_12
130 cluster 12            Granulocytes_12
smk5g5 commented 2 years ago

+1 to this error!

I am also getting this error!

PottsC commented 2 years ago

I am having this error as well! Just +1-ing this

mnagy1716 commented 2 years ago

Also having this error, would be grateful to use this feature!

katkoad commented 2 years ago

Also having this error and have not found a fix yet

smk5g5 commented 2 years ago

I think just using

mygraph <- graph_from_data_frame(unique(edges), vertices=unique(nodes))

will solve the problem but I am not sure if it would give the right answer. i.e. it will help generate the plot but not sure if that plot would be right.

gmcregis commented 2 years ago

I think just using

mygraph <- graph_from_data_frame(unique(edges), vertices=unique(nodes))

will solve the problem but I am not sure if it would give the right answer. i.e. it will help generate the plot but not sure if that plot would be right.

this didn't work for me, if anyone has any other ideas would be greatly appreciated

IanevskiAleksandr commented 2 years ago

@smk5g5 @RENXI-NUS @gmcregis @katkoad I tried from two different PCs, but cannot replicate the error. Could you please share sessionInfo(); output?

It would be also very helpful if you can share save.image(file = "test.RData") file.

Thanks, Aleksandr

gmcregis commented 2 years ago

mygraph1 <- graph_from_data_frame(unique(edges1), vertices=unique(nodes1)) Error in graph_from_data_frame(unique(edges1), vertices = unique(nodes1)) : Duplicate vertex names mygraph1 <- graph_from_data_frame(edges1, vertices=nodes1) Error in graph_from_data_frame(edges1, vertices = nodes1) : Duplicate vertex names sessionInfo() R version 4.0.1 (2020-06-06) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: OS X 12.3.1

Matrix products: default LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] data.tree_1.0.0 igraph_1.3.0 ggraph_2.0.5
[4] HGNChelper_0.8.1 scales_1.2.0 survival_3.3-1
[7] progress_1.2.2 preprocessCore_1.50.0 SeuratData_0.2.1
[10] SeuratDisk_0.0.0.9019 Scissor_2.0.0 Matrix_1.4-1
[13] SeuratObject_4.0.4 Seurat_4.1.0 knitr_1.38
[16] janitor_2.1.0 forcats_0.5.1 stringr_1.4.0
[19] dplyr_1.0.9 purrr_0.3.4 readr_2.1.2
[22] tidyr_1.2.0 tibble_3.1.7 ggplot2_3.3.6
[25] tidyverse_1.3.1

loaded via a namespace (and not attached): [1] readxl_1.4.0 backports_1.4.1 plyr_1.8.7
[4] lazyeval_0.2.2 splines_4.0.1 listenv_0.8.0
[7] scattermore_0.8 digest_0.6.29 htmltools_0.5.2
[10] viridis_0.6.2 fansi_1.0.3 magrittr_2.0.3
[13] memoise_2.0.1 tensor_1.5 cluster_2.1.3
[16] ROCR_1.0-11 limma_3.44.3 tzdb_0.3.0
[19] openxlsx_4.2.5 graphlayouts_0.8.0 globals_0.14.0
[22] modelr_0.1.8 matrixStats_0.62.0 spatstat.sparse_2.1-0 [25] prettyunits_1.1.1 colorspace_2.0-3 rappdirs_0.3.3
[28] blob_1.2.3 rvest_1.0.2 ggrepel_0.9.1
[31] haven_2.4.3 xfun_0.30 crayon_1.5.1
[34] jsonlite_1.8.0 spatstat.data_2.1-4 zoo_1.8-9
[37] glue_1.6.2 polyclip_1.10-0 gtable_0.3.0
[40] leiden_0.3.9 future.apply_1.8.1 BiocGenerics_0.36.1
[43] abind_1.4-5 DBI_1.1.2 spatstat.random_2.2-0 [46] miniUI_0.1.1.1 Rcpp_1.0.8.3 viridisLite_0.4.0
[49] xtable_1.8-4 reticulate_1.24 spatstat.core_2.4-2
[52] bit_4.0.4 stats4_4.0.1 DT_0.22
[55] htmlwidgets_1.5.4 httr_1.4.3 RColorBrewer_1.1-3
[58] ellipsis_0.3.2 ica_1.0-2 farver_2.1.0
[61] pkgconfig_2.0.3 uwot_0.1.11 deldir_1.0-6
[64] dbplyr_2.1.1 utf8_1.2.2 here_1.0.1
[67] labeling_0.4.2 tidyselect_1.1.2 rlang_1.0.2
[70] reshape2_1.4.4 later_1.3.0 AnnotationDbi_1.52.0 [73] munsell_0.5.0 cellranger_1.1.0 tools_4.0.1
[76] cachem_1.0.6 cli_3.3.0 generics_0.1.2
[79] RSQLite_2.2.14 broom_0.7.12 ggridges_0.5.3
[82] evaluate_0.15 fastmap_1.1.0 goftest_1.2-3
[85] yaml_2.3.5 bit64_4.0.5 fs_1.5.2
[88] tidygraph_1.2.0 fitdistrplus_1.1-8 zip_2.2.0
[91] RANN_2.6.1 nlme_3.1-157 pbapply_1.5-0
[94] future_1.24.0 mime_0.12 xml2_1.3.3
[97] hdf5r_1.3.5 compiler_4.0.1 rstudioapi_0.13
[100] plotly_4.10.0 png_0.1-7 spatstat.utils_2.3-0 [103] reprex_2.0.1 tweenr_1.0.2 stringi_1.7.6
[106] lattice_0.20-45 vctrs_0.4.1 pillar_1.7.0
[109] lifecycle_1.0.1 spatstat.geom_2.4-0 lmtest_0.9-40
[112] RcppAnnoy_0.0.19 data.table_1.14.2 cowplot_1.1.1
[115] irlba_2.3.5 httpuv_1.6.5 patchwork_1.1.1
[118] R6_2.5.1 promises_1.2.0.1 KernSmooth_2.23-20
[121] gridExtra_2.3 IRanges_2.24.1 parallelly_1.30.0
[124] codetools_0.2-18 MASS_7.3-56 assertthat_0.2.1
[127] rprojroot_2.0.3 withr_2.5.0 sctransform_0.3.3
[130] S4Vectors_0.28.1 mgcv_1.8-40 parallel_4.0.1
[133] hms_1.1.1 rpart_4.1.16 grid_4.0.1
[136] rmarkdown_2.13 snakecase_0.11.0 Rtsne_0.15
[139] ggforce_0.3.3 Biobase_2.50.0 shiny_1.7.1
[142] lubridate_1.8.0

IanevskiAleksandr commented 2 years ago

Do you get this error with an example data?

kythol commented 2 years ago

Hi, I'm having the same issue. It is not the case with example data. In my case I see that there are duplicates in the nodes$cluster column (246 total rows vs 231 unique rows). I was using the Lung gene set

Screenshot 2022-07-11 at 23 24 12

Since I knew my issue was with only two short names (Immune system / Immune and Endothelial cells / Endothelial), I ran this loop to pick the shortest string and it worked

for( i in unique(nodes$realname)){ a<-subset(nodes, realname == i) if( length(unique(a$shortName)) > 1){ nodes[nodes["realname"] == i,"shortName"]<-min(char(unique(a$shortName))) } } nodes<-nodes[!duplicated(nodes),]

Hope it helps and thanks a lot for the package, it is wonderful. Lisa

elisaudayani commented 1 year ago

Hi Lisa, thank you so much for sharing the loop codes! Now the code works for me as well. I found the same duplicates issue in the nodes$cluster, I used the Brain gene set. -Juli