SystemsGenetics / KINC

Knowledge Independent Network Construction
MIT License
11 stars 4 forks source link

Post processing with KINC.R changes formatting #182

Open JohnHadish opened 3 years ago

JohnHadish commented 3 years ago

Here are the top 10 lines of the same network before and after going through the command kinc-filter-bias.R

image

Notice that the Similarity_Score and p_value are truncated from 8 to 4 significant digits. Notice that the r_squared is changed from nan to NA

bentsherman commented 3 years ago

By default, C++ prints NaN values as "nan", whereas R prints "NA". Not sure if you can change R but in C++ you would have to check every float before printing which would be a pain. You can also just mark both "nan" and "NA" as nan tokens whenever you load the network (e.g. with pandas).

In C++ you can specify the print format for floats. But again, I don't think it's a big deal because both formats are valid and widely recognized in C++, Python, R, etc.