McGranahanLab / TcellExTRECT

Other
45 stars 20 forks source link

Purity Number Mistakenly Converted Into A Boolean Value #7

Closed DarioS closed 3 years ago

DarioS commented 3 years ago

https://github.com/McGranahanLab/TcellExTRECT/blob/c155d9fd1082621aae8eedaa2a15f4cb5900c524/R/adjustTcellExTRECT.R#L19

any(x) is a test for x being non-zero. Corrected code is if(purity > 1 || purity < 0). Use | for vectors and || for scalars.

rbentham commented 3 years ago

Thanks, there is a bug here with the brackets in the wrong place, the code was meant to read: if(any(purity > 1) | any(purity < 0))