tractatus / wholebrain

R package for segmentation, registration and generating web-based brain atlases from microscope images
GNU General Public License v3.0
81 stars 42 forks source link

Problems with dot.plot() #4

Open FelixAntonSchneider opened 6 years ago

FelixAntonSchneider commented 6 years ago

Hi,

first of all thank you for writing this package. I just started using it and I think it will potentially be very helpful in the future.

I noticed a problem with the dot.plot() function. If all detected cells are only in one hemisphere there will be an error.

> dot.plot(Ntsr1Cre_2018_0003_23)
Error in rep(2.5, nrow(counts)) : invalid 'times' argument

I could come over this error by changing one value in right.hemisphere from False to True. But then I get another error message

> Ntsr1Cre_2018_0003_23$right.hemisphere[1]<-TRUE
> dot.plot(Ntsr1Cre_2018_0003_23)
Error in plot.new() : figure margins too large
tractatus commented 6 years ago

Hi @FelixAntonSchneider,

Sorry for replying so late.

As you correctly pointed out the first error is due to the dataset it doesn't contain any cells on the right hemisphere. I'll correct that.

For the other error this is more related to the size of your data. If you have more regions that would be possible to plot you might want to aggregate first.

What is the output of: length(unique(Ntsr1Cre_2018_0003_23$acronym))