Skip to content

Loading order of TwoBit and BioSequences seems to matter. #3

@CiaranOMara

Description

@CiaranOMara

The order in which TwoBit and BioSequences are loaded seems to matter.

Loading TwoBit before BioSequences is fine.

(TestTwoBit.jl) pkg> st
      Status `~/Projects/TestTwoBit.jl/Project.toml`
  [7e6ae17a] BioSequences v2.0.5
  [75842c30] TwoBit v0.1.0

julia> using TwoBit

julia> using BioSequences

julia> TwoBit.Record("test", dna"GATC")
TwoBit.WriteRecord{LongDNASeq}("test", GATC, nothing)

However, with a fresh session, loading BioSequences before TwoBit raises the following warnings and errors.

julia> using BioSequences

julia> using TwoBit
┌ Warning: Replacing module `BioSequences`
└ @ Base loading.jl:1036

julia> TwoBit.Record("test", dna"GATC")
ERROR: MethodError: no method matching TwoBit.Record(::String, ::LongDNASeq)
Closest candidates are:
  TwoBit.Record(::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any) at ~/.julia/packages/TwoBit/yminl/src/record.jl:5
  TwoBit.Record(::AbstractString, ::BioSequences.BioSequence) at ~/.julia/packages/TwoBit/yminl/src/record.jl:233
  TwoBit.Record(::AbstractString, ::BioSequences.BioSequence, ::Union{Nothing, Vector{UnitRange{Int64}}}) at ~/.julia/packages/TwoBit/yminl/src/record.jl:233
Stacktrace:
 [1] top-level scope
   @ none:1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions