Skip to content

Commit

Permalink
Update dependencies, clean debug statement
Browse files Browse the repository at this point in the history
  • Loading branch information
jtackm committed Mar 28, 2024
1 parent 0416c2a commit 9c1fe58
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
9 changes: 8 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):

Expand Down
2 changes: 1 addition & 1 deletion src/learning.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 1 addition & 8 deletions src/tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9c1fe58

Please sign in to comment.