Skip to main content

seqwalk

seqwalk is a package for designing orthogonal DNA sequence libraries. It can efficiently generate libraries of sequences that satisfy sequence symmetry minimization constraints (i.e. minimizing longest common substrings). seqwalk additionally includes off-the-shelf orthogonal sequence libraries, as well as some tools for analyzing orthogonal sequence libraries. A code-free, interactive version of seqwalk can be found here.

For more details, see the paper.

Installation

$ pip install seqwalk

Usage

Designing a set of barcodes with minimal sequence symmetry

If you want a certain number of barcodes with maximum orthogonality, you can use the max_orthogonality function from the design module. You must specify the length of desired sequences (L) and the number of desired sequences (N). Optionally, specify the prevention of reverse complementary sequences, GC content limits, allowable alphabet, and specific prevented patterns. By default, reverse complementary sequences are allowed, there are no GC content constraints, a 3 letter (A/C/T, no G) code is used and any 4N sequence is prevented.

For example, if you want 100 barcodes with length 25, with prevented reverse complements, and a 4 letter alphabet, and between 10 and 15 G/C bases, you can use the following code:

from seqwalk import design

library = design.max_orthogonality(100, 25, alphabet="ACGT", RCfree=True, GClims=(10, 15))

This will generate a library of at least the specified size, with the strongest possible sequence symmetry constraint.

Designing a set of orthogonal barcodes with maximum size

If you have an orthogonality constraint in mind, you can use the max_size function from the design module to generate a maximally sized library with the given sequence symmetry minimization k values. That is, the shortest k for which no substring of length k appears twice.

If you want sequences that satisfy SSM for k=12, and you want barcodes of length 25, without considering reverse complementarity, and using a 4 letter alphabet, with no GC constraints, you can use the following code:

from seqwalk import design

library = design.max_size(25, 12, alphabet="ACGT")

Importing "off-the-shelf" experimentally characterized libraries

The io module provides the ability to import libraries that have been previously experimentally characterized, using code of the following format.

from seqwalk import io

PERprimers = io.load_library("kishi2018")

We provide the following libraries, accessible with the identifier tag.

identifier # of seqs seq length original use case ref
kishi2018 50 9nt PER primers Kishi et al, 2018

If you have an orthogonal library you would like to add, please submit a PR!

Quality control using pairwise comparisons

Once you have a library in the form of a list of sequences, you can use the analysis module to perform additional quality control. For example, we provide a function to compute pairwise Hamming distances.

from seqwalk import analysis

h_crosstalk = analysis.hamming_matrix(seqs)

Since sequence symmetry minimization does not explicitly guarantee low off-target hybridization strength, a simple function for using NUPACK to identify "bad" sequences is included in the analysis.py file. However, it is commented out to avoid the NUPACK dependency in the package (problematic due to NUPACK licensing).

License

seqwalk is licensed under the terms of the MIT license.

Credits

seqwalk was created with cookiecutter and the py-pkgs-cookiecutter template.

Metadata

Release files for seqwalk 0.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for seqwalk 0.3.3
File Size Uploaded
seqwalk-0.3.3.tar.gz 10.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for seqwalk 0.3.3
File Interpreter ABI Platform
seqwalk-0.3.3-py3-none-any.whl Python 3 none any Details

Total release size: 21.1 kB

Release files / seqwalk-0.3.3.tar.gz

Download URL seqwalk-0.3.3.tar.gz
Size 10.7 kB
Tags Source
SHA-256 checksum
How to use checksums
82a84a2bc8b4dbe6eef67b400b1a3004cebeb01574648756014f63ccf658f4f9
BLAKE2b-256 checksum
How to use checksums
c7a0a04f4e675d4398ba771d46698293da565b6e204aef1e88c82ccaa31085ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.9.12 Darwin/23.5.0

Release files / seqwalk-0.3.3-py3-none-any.whl

Download URL seqwalk-0.3.3-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
77c7d24916ef2117067998a0b67714eb979e5fb1e60309ec5835b06632a7485e
BLAKE2b-256 checksum
How to use checksums
f4a5ba690480519bf71caa5a5eb44751bcea41b680e8fe3a4e5c82b81a0cba2b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.9.12 Darwin/23.5.0

Release history Release notifications | RSS feed

This release

0.3.3 This release

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page