keithwhor / NtSeq

JavaScript (node + browser) bioinformatics library for nucleotide sequence manipulation and analysis.
MIT License
208 stars 25 forks source link

.alignment gives incorrect values for negative offsets #7

Open keithwhor opened 7 years ago

keithwhor commented 7 years ago

Due to .replicate() behavior, use:

new Nt.Seq('-').repeat(-position).polymerize(seq.replicate(0, query.length + position))

if negative