Hi everyone!
I’m developing a module within several functions. I found some troubles with the type definition at some inputs functions. I don’t know why but I cannot use SparseMatrixCSC type as the input type. After build and compile the module I have the following error:
ERROR: LoadError: LoadError: UndefVarError: SparseMatrixCSC not defined
I included the SparseMatrixCSC at the module, so I do not understand what is happening
Here are the module load and the functions.
module Analytical
include("parameters.jl")
include("fixations.jl")
include("polymorphism.jl")
include("summaryStatistics.jl")
include("inferTools.jl")
include("readFasta.jl")
using Parameters, NLsolve, SpecialFunctions, Distributions, Roots, ArbNumerics, StatsBase, LsqFit, PoissonRandom, SparseArrays
import CSV: read
import CSV: write
import DataFrames: DataFrame
import GZip: open
import Parsers: parse
import OrderedCollections: OrderedDict
import FastaIO: readfasta
import SparseArrays: SparseMatrixCSC
end
function DiscSFSNeutDown(param::parameters,binom::SparseMatrixCSC{Float64,Int64})
NN2 = convert(Int64,ceil(param.NN*param.B))
# Allocating variables
neutralSfs(i::Int64) = 1.0/(i)
x = collect(0:NN2)
solvedNeutralSfs = neutralSfs.(x)
replace!(solvedNeutralSfs, Inf => 0.0)
# subsetDict = get(param.bn,param.B,1)
# subsetDict = binom
out = param.B*(param.theta_mid_neutral)*0.255*(binom*solvedNeutralSfs)
# out = @view out[2:end-1,:]
return out[2:end-1,:]
end
Does anyone know how to deal with it?
Thanks in advance, Jesús!