diff --git a/Project.toml b/Project.toml index 9e20171..75b10cd 100644 --- a/Project.toml +++ b/Project.toml @@ -37,8 +37,15 @@ JSON = "0.21" Graphs = "1, 1.6" SimpleWeightedGraphs = "1, 1.1, 1.2" StatsBase = "0.32, 0.33" -julia = "1.6" StableRNGs = "1" +julia = "1.6" +DelimitedFiles = "1.6" +Distributed = "1.6" +Logging = "1.6" +Random = "1.6" +SparseArrays = "1.6" +Statistics = "1.6" +Test = "1.6" [extras] DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab" diff --git a/README.md b/README.md index 9588566..7e3eaa1 100644 --- a/README.md +++ b/README.md @@ -133,7 +133,7 @@ BIOM 2.0 ([description](http://biom-format.org/documentation/format_versions/bio ### Meta data tables ### -Meta data should generally be provided as delimited format (see for instance [example1](https://github.com/meringlab/FlashWeave.jl/blob/master/test/data/HMP_SRA_gut/HMP_SRA_gut_tiny_meta.tsv) or [example2](https://github.com/meringlab/FlashWeave.jl/blob/master/test/data/HMP_SRA_gut/HMP_SRA_gut_tiny_meta_oneHotTest.tsv)), separately from the OTU table. Notably, this implies that FlashWeave does not yet support reading meta data directly from BIOM files, but requires a separate delimited meta data file (support will be added in an upcoming version). +Meta data should generally be provided as delimited format (see for instance [example1](https://github.com/meringlab/FlashWeave.jl/blob/master/test/data/HMP_SRA_gut/HMP_SRA_gut_tiny_meta.tsv) or [example2](https://github.com/meringlab/FlashWeave.jl/blob/master/test/data/HMP_SRA_gut/HMP_SRA_gut_tiny_meta_oneHotTest.tsv)), separately from the OTU table. Notably, this implies that FlashWeave does not yet support reading meta data directly from BIOM files, but requires a separate delimited meta data file (support will be added in an upcoming version). **NOTE: OTU table and metadata table must be aligned such that each row corresponds to the same sample in both files (i.e. sample 1 data is found in row 1 in both files, etc.).** For JLD2, however, you can already provide HDF5 keys linked to meta data tables (and optionally headers): diff --git a/src/learning.jl b/src/learning.jl index cc4ac26..a1d0b51 100644 --- a/src/learning.jl +++ b/src/learning.jl @@ -13,7 +13,7 @@ function prepare_lgl(data::AbstractMatrix{ElType}, test_name::String, time_limit if time_limit == -1.0 - if parallel == "multi_il" + if parallel == "multi_il" && max_k > 0 time_limit = round(log2(size(data, 2))) verbose && println("Setting 'time_limit' to $time_limit s.") else diff --git a/src/tests.jl b/src/tests.jl index 4d58213..cf85670 100644 --- a/src/tests.jl +++ b/src/tests.jl @@ -61,14 +61,7 @@ function test(X::Int, Y::Int, data::AbstractMatrix{<:Integer}, test_obj::Abstrac pval = 1.0 suff_power = false else - try - mi_stat = mutual_information(sub_ctab, levels_x, levels_y, test_obj.marg_i, test_obj.marg_j) - catch DomainError - display(test_obj.ctab) - display(sub_ctab) - @show X Y test_obj.marg_i test_obj.marg_j levels_x levels_y n_obs - error("debug") - end + mi_stat = mutual_information(sub_ctab, levels_x, levels_y, test_obj.marg_i, test_obj.marg_j) df = adjust_df(test_obj.marg_i, test_obj.marg_j, levels_x, levels_y) pval = mi_pval(abs(mi_stat), df, n_obs)