imminfo / tcr

[DEPRECATED, see https://immunarch.com/] tcR: an R package for immune receptor repertoire advanced data analysis.
https://immunarch.com/
37 stars 22 forks source link

Cosine similiarity #98

Closed erobique closed 5 years ago

erobique commented 6 years ago

Hey, I was using your cosine.similiarity function and your function seems to lack a squareroot in the denominator: Instead of: function (.alpha, .beta, .do.norm = NA, .laplace = 0) { .alpha <- check.distribution(.alpha, .do.norm, .laplace) .beta <- check.distribution(.beta, .do.norm, .laplace) sum(.alpha .beta)/(sum(.alpha^2) sum(.beta^2)) } It should be function (.alpha, .beta, .do.norm = NA, .laplace = 0) { .alpha <- check.distribution(.alpha, .do.norm, .laplace) .beta <- check.distribution(.beta, .do.norm, .laplace) sum(.alpha * .beta)/*sqrt(sum(.alpha^2) sum(.beta^2))** }

vadimnazarov commented 5 years ago

Hi, tcR package is no longer supported and current issues will not be fixed. A new package is available that is designed to replace tcR called immunarch. We have solved most of the problems tcR package had and improved the overall pipeline, providing functions for painless repertoire file parsing and publication-ready plot making.

The mission of the immunarch is to make immune repertoire data analysis as easy and possible—even with R. Please feel free to check it here: https://immunarch.com/

If you have any suggestions, bugs, improvements, etc. -- please write us or create an issue in https://github.com/immunomind/immunarch/issues

Thank you! Sincerely, immunarch dev team and Vadim I. Nazarov, lead developer