Skip to content

Error in matrixFromBam() (no method matching Array{Int8,2}) #2

@Christopher-Peterson

Description

@Christopher-Peterson

I've encountered an error when trying to use the matrixFromBam() function.

Input:

matrixFromBam("X5_genome1", "NC_058066.1"; 
                     reference_path = "genomes/A13",
                     bamfile_path="split_bams")

After running for a minute or so, I get this error:

ERROR: MethodError: no method matching Array{Int8,2}(::Array{Int64,1})
Closest candidates are:
  Array{Int8,2}(::AbstractArray{S,N}) where {T, N, S} at array.jl:498
  Array{Int8,2}(::UndefInitializer, ::Int64, ::Int64) where T at boot.jl:406
  Array{Int8,2}(::UndefInitializer, ::Int64...) where {T, N} at boot.jl:410
  ...
Stacktrace:
 [1] (::Base.var"#732#734")(::Task) at ./asyncmap.jl:178
 [2] foreach(::Base.var"#732#734", ::Array{Any,1}) at ./abstractarray.jl:1920
 [3] maptwice(::Function, ::Channel{Any}, ::Array{Any,1}, ::StepRange{Int64,Int64}) at ./asyncmap.jl:178
 [4] wrap_n_exec_twice(::Channel{Any}, ::Array{Any,1}, ::Distributed.var"#208#211"{WorkerPool}, ::Function, ::StepRange{Int64,Int64}) at ./asyncmap.jl:154
 [5] #async_usemap#717(::Function, ::Nothing, ::typeof(Base.async_usemap), ::InformMe.var"#15#16"{Bool,Int64,Int64,Int64,String,String,Array{Int64,1},Bool}, ::StepRange{Int64,Int64}) at ./asyncmap.jl:103
 [6] (::Base.var"#kw##async_usemap")(::NamedTuple{(:ntasks, :batch_size),Tuple{Distributed.var"#208#211"{WorkerPool},Nothing}}, ::typeof(Base.async_usemap), ::Function, ::StepRange{Int64,Int64}) at ./none:0
 [7] #asyncmap#716 at ./asyncmap.jl:81 [inlined]
 [8] #asyncmap at ./none:0 [inlined]
 [9] #pmap#207(::Bool, ::Int64, ::Nothing, ::Array{Any,1}, ::Nothing, ::typeof(pmap), ::Function, ::WorkerPool, ::StepRange{Int64,Int64}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Distributed/src/pmap.jl:126
 [10] pmap(::Function, ::WorkerPool, ::StepRange{Int64,Int64}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Distributed/src/pmap.jl:101
 [11] #pmap#217(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(pmap), ::Function, ::StepRange{Int64,Int64}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Distributed/src/pmap.jl:156
 [12] pmap(::Function, ::StepRange{Int64,Int64}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Distributed/src/pmap.jl:156
 [13] #matrixFromBam#14(::String, ::String, ::String, ::Bool, ::Int64, ::Int64, ::Int64, ::Int64, ::typeof(matrixFromBam), ::String, ::String) at /home1/04386/crpeters/.julia/packages/InformMe/5Rkri/src/matrixFromBam.jl:204
 [14] (::InformMe.var"#kw##matrixFromBam")(::NamedTuple{(:reference_path, :bamfile_path),Tuple{String,String}}, ::typeof(matrixFromBam), ::String, ::String) at ./none:0
 [15] top-level scope at REPL[10]:1

This is running on Julia v. 1.3.0; all tests were passed after installation. The relevant fasta files have previously been processed with fastaToCpG(). Changing the bam inputs or the chromosome ID results in no change to the error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions