BioSequences Multiplexer only looks at first 5 letters of DNA Sequence

Viewed 37

I am currently playing around with Julia's Biosequences.jl library and wanted to demultiplex things. I tried to create an array of LongDNASequences like this

barcodes = LongDNASeq.(barcodeArray[1:3])
  3-element Array{LongSequence{DNAAlphabet{4}},1}:
   GAGAGTGT
   GAGATCAG
   GAGATCTC

But when I try to run it through the Demultiplexer I get a "ERROR: Duplicated Sequences".

dplxr = Demultiplexer(unique(barcodes),n_max_errors=1,distance=:hamming)
  ERROR: duplicated sequences
  Stacktrace:
   [1] BioSequences.BarcodeTrie(::Array{LongSequence{DNAAlphabet{4}},1}, ::Array{Int64,1}) at 
   /home/kos/.julia/packages/BioSequences/k4j4J/src/demultiplexer.jl:22
   [2] Demultiplexer(::Array{LongSequence{DNAAlphabet{4}},1}; n_max_errors::Int64, 
   distance::Symbol) at /home/kos/.julia/packages/BioSequences/k4j4J/src/demultiplexer.jl:168
   [3] top-level scope at REPL[38]:1

The Demultiplexer works when I only have the first 2 elements in the array. So I suspect that the Demultiplexer is only reading up to the first 6 characters?

Any solution around this?

EDIT:

The error goes away when I set n_max_errors=0. I'm confused why this works though. It would make sense if GAGATCAG and GAGATCTC where one letter away. But they're not.

0 Answers
Related