nunofonseca / irap

integrated RNA-seq Analysis Pipeline
GNU General Public License v3.0
82 stars 33 forks source link

Added fix for case where no mappings exist to contamination indices #65

Closed pinin4fjords closed 6 years ago

pinin4fjords commented 6 years ago

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 ;-).