nunofonseca / irap

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

aux/R/irap_de.R::process.cmdline.args mis-casts --min (opt$min_count) as a string, should be integer #101

Closed vviyer closed 5 years ago

vviyer commented 5 years ago

aux/R/irap_de.R line 30 currently looks like this:

make_option(c("-m", "--min"), type="character", dest="min_count", default=NULL,help="exclude genes with counts < min")

But I think it should look like this:

make_option(c("-m", "--min"), type="integer", dest="min_count", default=NULL,help="exclude genes with counts < min")

The result of mis-casting opt$min_count as a character is that currently this line makes a wrong comparison for the pre-filtering:

aux/R/irap_de.R line 218: rows.sel <- apply(data,1,max)>opt$min_count

If the right-side of the ">" is a string, then the comparison is not correct, which will lead to unexpected filtering.

nunofonseca commented 5 years ago

Hi! Thanks for reporting the issue. The issue has been fixed in the devel branch, I will release a new version with the fix in the coming days. Cheers.