Closed koenvandenberge closed 4 years ago
This could be fixed using @time genes = get_nodes(dataset_name, delim=',', discretizer = "uniform_width");
However, using a bigger dataset the following error then pops up:
julia> @time genes = get_nodes(dataset_name, delim=',');
ERROR: ArgumentError: indexed assignment with a single value to many locations is not supported; perhaps use broadcasting `.=` instead?
Stacktrace:
[1] setindex_shape_check(::Int64, ::Int64) at ./indices.jl:258
[2] macro expansion at ./multidimensional.jl:779 [inlined]
[3] _unsafe_setindex!(::IndexLinear, ::Array{Int64,1}, ::Int64, ::UnitRange{Int64}) at ./multidimensional.jl:774
[4] _setindex! at ./multidimensional.jl:769 [inlined]
[5] setindex! at ./abstractarray.jl:1073 [inlined]
[6] get_bin_ids!(::Array{Float64,1}, ::String, ::Int64, ::Array{Int64,1}) at /Users/koenvandenberge/.julia/packages/InformationMeasures/fdfJk/src/Discretization.jl:111
[7] Node(::Array{Any,2}, ::String, ::String, ::Int64) at /Users/koenvandenberge/.julia/packages/NetworkInference/z8pnG/src/common.jl:32
[8] get_nodes(::String; delim::Char, discretizer::String, estimator::String, number_of_bins::Int64) at /Users/koenvandenberge/.julia/packages/NetworkInference/z8pnG/src/infer_network.jl:35
[9] top-level scope at ./util.jl:175
Hi,
This could be fixed using @time genes = get_nodes(dataset_name, delim=',', discretizer = "uniform_width");
Glad you got this working - the delimiter defaults to tab.
For the error with the bigger dataset: how big is the dataset, and does the error still occur without @time
?
It is fairly large though not huge, ~16K cells and as many genes.
The error indeed occurs also without @time
.
I have shared the dataset here for reference.
Hi, just checking in whether you have any ideas on whether you have an idea on how this problem may be solved.
Thanks, Koen
@koenvandenberge Apologies for the delay, and thanks for reporting. The error was happening because of a deprecation in Julia 7.0.
After fixing, calling @time genes = get_nodes(dataset_name, delim=',', discretizer = "uniform_width");
with the linked dataset worked with no errors.
The size wasn't a problem; the error was only happening if there were genes in the dataset that had all identical values.
Hi,
I'm trying to estimate a GRN on a dataset matrix that can be found here.
However, I get an error in the first step, also when I use uniform widths as discretizer. Any ideas on how to fix this?
Note that reading the dataset using CSV works: