Closed kevinwang09 closed 4 years ago
SEG computation will occasionally throw up an error because of the random initialisation of the z variable: https://github.com/SydneyBioX/scMerge/blob/98a362c7c94b0f45c0173292c56fcf9c0e30dd87/R/scSEGIndex.R#L221
z
Due to random chances, z could be a sequence of zeroes. This creates a problem of division by zero here: https://github.com/SydneyBioX/scMerge/blob/98a362c7c94b0f45c0173292c56fcf9c0e30dd87/R/scSEGIndex.R#L252
As such, this breaks the while condition in line 235.
while
This issue seems to be fixed by forcing a 1 in the first position of a sequence of all zeroes.
1
https://github.com/SydneyBioX/scMerge/blob/9f572c7c792383bb17bd9ce79ccca8d1dd097932/R/scSEGIndex.R#L222
More tests might be necessary in the future.
SEG computation will occasionally throw up an error because of the random initialisation of the
z
variable: https://github.com/SydneyBioX/scMerge/blob/98a362c7c94b0f45c0173292c56fcf9c0e30dd87/R/scSEGIndex.R#L221Due to random chances,
z
could be a sequence of zeroes. This creates a problem of division by zero here: https://github.com/SydneyBioX/scMerge/blob/98a362c7c94b0f45c0173292c56fcf9c0e30dd87/R/scSEGIndex.R#L252As such, this breaks the
while
condition in line 235.