Package: primalscheme
primalschemeaboutprimalscheme is a tool for designing primer panels for multiplex PCR. It uses a greedy algorithm to find primers for tiling amplicon generation for multiple reference genomes. It works best on viral isolates of known lineages e.g. outbreak strains.web interfacea web interface is available atprimalscheme.com, although it does not currently support all available options.requirementsLinux, macOS or WindowsPython 3.7+installation from PyPI using pipCreate & activate a virtual environment (recommended):python3-mvenv/path/to/primal-venvsource/path/to/primal-venv/bin/activateor on Windows:python-mvenvc:\path\to\primal-venv
c:\path\to\primal-venv\Scripts\activate.batInstall primalscheme with pip:pipinstallprimalschemeinstallation from sourcegitclonehttps://github.com/aresti/primalscheme.gitprimalschemecdprimalscheme
python3-mvenvvenvsourcevenv/bin/activate
pipinstall.Note: if you'd like your installation to be editable, use:pipinstallflit
flitinstall--pth-file(--pth-filevs--symlink: maintains module visibility for IDE debuggers, and works on Windows.)command line interfaceTo design a multiplex scheme runprimalscheme multiplex <FASTA>.If you're looking for test inputs you can tryCHIKV_demo.fa,Ebov-10-Pan.fastaornCov-2019.fastaoptional arguments--amplicon-size, -a: Amplicon size target. Pass twice to set an exact range (e.g, -a 220 -a 250), otherwise expect +/- 5% (default 380, 420).--outpath, -o: Path to output directory (default: ./output).--name, -n: Prefix name for your outputs (default: scheme).--target-overlap, -t: Target insert overlap size (default: 0).--debug, -d: Set log level DEBUG.--force, -f: Force output to an existing directory, overwrite files.--pinned, -p: Only consider primers from the first reference.--high-gc, -g: Use config suitable for high-GC sequences.--help, -h: Show help message and exit.modifying configMany parameters are not directly exposed in the CLI as we believe they are necessary for successful multiplex PCR. However, most values can be modified inconfig.pyif you install the package from source in editable mode withflit install --pth-file(see above).output{output_dir}/{prefix}.reference.fasta- all input references{output_dir}/{prefix}.primer.bed- coordinates of primer positions{output_dir}/{prefix}.insert.bed- coordinates of trimmed amplicons{output_dir}/{prefix}.primer.tsv- primer sequences and information{output_dir}/{prefix}.plot.pdf- diagrammatic overview of scheme (PDF){output_dir}/{prefix}.plot.svg- diagrammatic overview of scheme (SVG){output_dir}/{prefix}.report.json- run report (reference ids, regions, gaps, coverage){output_dir}/{prefix}.pickle- pickled Python objects (if --debug){output_dir}/{prefix}.log- run logs (more detail if --debug)how to design a schemeDownload complete genomes from GenBank and concatenate into a single FASTA file.e.g.cat "sequence (1).fasta" "sequence (2).fasta" > input.fastaAlign all sequences usingClustal Omega.The genomes should be complete and roughly the same length.Primers are only designed within the limits of the alignment.Thefirst referencewill be used for the coordinate system in the output scheme.Check the 'Result Summary' tab then the 'Percent Identity Matrix' link to check the identity matrix of all sequences.Check that the maximum sequence divergence is not more than 5%.If your sequences are more divergent, it may be necessary to separate them into multiple independent schemes; the 'Phylogenetic Tree' tab may be useful for this.Remove sequences with 99-100% identity to other genomes in the file as these will bias the primer selectionRun primalscheme on your FASTA file.Optionally, set amplicon min/max length as required by your sequencing technology.protocolWe strongly recommend using the PCR conditions outlined in theNature Protocols paper.description of the algorithmSet the first reference as primary, to be used for the coordinate system.Open a region window of width AMPLICON_SIZE_MAX onto the primary reference.Align the flanks of this reference slice to all other references using parasail.Take all aligned flanks and digest them into K-mers (primers) of length PRIMER_SIZE_MIN to PRIMER_SIZE_MAX.Hard filter the primers to eliminate those with unacceptable GC, Tm, hairpin structures & homopolymer length.Filter out any primers with > PRIMER_MAX_MISMATCHES against any reference.Sort left and right primers according to base penalty plus weighted mismatch score.Check for heterodimers in same pool using primer3-py; select top scoring, non-interacting pair.Open new window position set to maintain overlap if region is successful.Repeat routine until end of genome is reached.If during the above routine there is a) failed alignment b) no primers after filtering then:Move window position left by STEP_DISTANCE before retrying.Continue stepping left until a hard-left limit is reached (start of genome, primer collision or no progress).Reset window position to initial value.Move window position right (to open a gap or reduce overlap) before retrying.Exclude secondary reference on repeated flank alignment failure.citingIf you use primalscheme please cite:Quick J et al. Multiplex PCR method for MinION and Illumina sequencing of Zika and other virus genomes directly from clinical samples. Nat Protoc. 2017 Jun;12(6):1261-1276.