Currently iRAP fails when no mappings occur for input reads to a contamination index. Specifically, in irap_cont_stats.R, the file with counts per chromosome ends up empty, leading to 'z' at line 97 being set to NULL and the error "Error: is.list(x) is not TRUE" when this is written to file.
This PR allows for the possibility of that file being empty, in which case it just outputs the generic stats and omits the chromosome- and class- wise counts.
It also renames some variables to make things easier to read and understand ;-).
Currently iRAP fails when no mappings occur for input reads to a contamination index. Specifically, in irap_cont_stats.R, the file with counts per chromosome ends up empty, leading to 'z' at line 97 being set to NULL and the error "Error: is.list(x) is not TRUE" when this is written to file.
This PR allows for the possibility of that file being empty, in which case it just outputs the generic stats and omits the chromosome- and class- wise counts.
It also renames some variables to make things easier to read and understand ;-).