reworkhow / JWAS.jl

Julia for Whole-genome Analysis Software
http://QTL.rocks
GNU General Public License v2.0
96 stars 44 forks source link

problems with get_genotypes #82

Closed MPILESROVIRA closed 3 years ago

MPILESROVIRA commented 3 years ago

Hello, I get the following error when applying the get_genotypes function

genotypes = get_genotypes("C:/Users/mpiles/OneDrive - IRTA/AnalisisEnCurso/Microbiota/mtmlSEM_microbiota_conejosIRTA/snp_col2.txt",method="BayesC",Pi = 0.0,estimatePi = true, estimateVariance=true, estimateScale=true,separator=",",header=true)

The delimiter in snp_col2.txt is ','. The header (marker IDs) is provided in snp_col2.txt. MethodError: no method matching findfirst(::Vector{Any}, ::String) Closest candidates are: findfirst(::Function, ::Union{AbstractString, AbstractArray}) at array.jl:1906 findfirst(::AbstractString, ::AbstractString) at strings/search.jl:104 findfirst(::AbstractChar, ::AbstractString) at strings/search.jl:124 ...

Stacktrace: [1] _split(str::String, splitter::Vector{Any}, limit::Int64, keepempty::Bool, strs::Vector{SubString{String}}) @ Base .\strings\util.jl:419 [2] split(str::String, splitter::Vector{Any}; limit::Int64, keepempty::Bool) @ Base .\strings\util.jl:403 [3] get_genotypes(file::String, G::Bool; method::String, Pi::Float64, estimatePi::Bool, estimateVariance::Bool, estimateScale::Bool, separator::String, header::Bool, rowID::Bool, center::Bool, G_is_marker_variance::Bool, df::Float64, starting_value::Bool, quality_control::Bool) @ JWAS ~.julia\packages\JWAS\Ue4VK\src\1.JWAS\src\markers\readgenotypes.jl:95 [4] top-level scope @ In[20]:1 [5] eval @ .\boot.jl:360 [inlined] [6] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String) @ Base .\loading.jl:1094

Could you please tell me what can I do? Many thanks

reworkhow commented 3 years ago

Can you post your question to https://groups.io/g/qtlrocks ?