Nik-Zainal-Group / signature.tools.lib

R package containing useful functions for mutational signature analysis
Other
80 stars 26 forks source link

bedpeToRearrCatalogue will crash if it filters out all variants #57

Closed felixbeaudry closed 9 months ago

felixbeaudry commented 11 months ago

Hi!

Great package! Just a little bug:

Somewhere around L87 of bedpeToRearrCatalogue, the list of SVs is filtered on size. If all variants do not pass this filter (eg. all SVs are < 1kb) the code crashes.

https://github.com/Nik-Zainal-Group/signature.tools.lib/blob/master/R/bedpeToRearrCatalogue.R#L87

I'm sure this could be fixed with an extra if statement along the lines of if (sum(toberemoved) != nrow(all_sv_annotated))

andreadega commented 11 months ago

Thanks so much for reporting this. We have already fixed it in our dev branch and will be available in the next update.

andreadega commented 9 months ago

Should be fixed now in v2.4.4.