DiltheyLab / MetaMaps

Long-read metagenomic analysis
Other
96 stars 23 forks source link

plotIdentities_EM.R minimum frequency not working as intended #78

Open Kamranaway opened 1 month ago

Kamranaway commented 1 month ago

I have found that the minimum frequency command line argument is not being cast to a numeric type, and as a result when the following comparison is made:

if(iFreq >= minimumPlotFreq) the minimumPlotFreq is not treated numerically. This will allow taxonIDs to be plotted which have a frequency below the minimum.

I made a run of the program with a minimumPlotFreq of 0.0001 and taxonIDs with frequencies well below that were allowed to be plotted. The minimumPlotFreq itself was "0.0001" instead of 0.0001.

I believe the following change should fix the issue: minimumPlotFreq <- as.double(args[[2]])