treangenlab / olivar Goto Github PK
View Code? Open in Web Editor NEWOlivar: automated variant aware primer design for multiplex tiled amplicon sequencing
Home Page: https://doi.org/10.1101/2023.02.11.528155
License: MIT License
Olivar: automated variant aware primer design for multiplex tiled amplicon sequencing
Home Page: https://doi.org/10.1101/2023.02.11.528155
License: MIT License
Use the get_species_taxids.sh
script (comes with blast) to get all taxids below a non-leaf taxid.
Hi @treangen
Olivar is very interesting in it's approach to primer design. I'm testing it out for a few different organisms. I noticed that while reference can not contain an ambiguous bases, the variation file can have ambiguous bases. However, even if they are included in the variation file, it seems Olivar ignore them in the primers. Interestingly, the graphical output does include the SNP.
It would be super helpful if when Olivar decides on a primer in a particular location where an ambig base exists, the primer would also contain such a base.
Thanks!
Ammar
Shouldn't be hard, but how to format the risk array figure? Output multiple figures?
Hi,
Olivar is a great tool, thanks for creating and maintaining it. I'm using it to design primers for Hep A. This is the command I am running:
olivar tiling \
output/4.olivar_reference/olivar-ref.olvr \
-o output/5.olivar_primers \
--max-amp-len 1200 \
--min-amp-len 1000 \
--seed 1995 \
--fp-prefix HAVSeq \
--rp-prefix HAVSeq \
--check-var
It produces this error:
Successfully loaded reference file output/4.olivar_reference/olivar-ref.olvr
reference sequence length: 7478
design region: 16:7463
region length: 7448
number of PDR sets to be tested: 3115
Designing PDRs...
100%|>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>| 3115/3115 [01:19<00:00, 38.98it/s]
Finished in 79.921s
Best total risk: 1151.410
total amplicons: 10
covered region: 90:7217
coverage of reference sequence: 95.320%
Generating primer candidates...
0%| | 0/10 [00:00<?, ?it/s]ta
Traceback (most recent call last):
File "micromamba/bin/olivar", line 156, in <module>
tiling(
File "micromamba/lib/python3.10/site-packages/olivar/main.py", line 793, in tiling
all_plex_info_primer = get_primer(all_plex_info, config)
File "micromamba/lib/python3.10/site-packages/olivar/main.py", line 436, in get_primer
fP, fail = fP_generator.get(fP_design, fP_prefix, check_BLAST=check_BLAST, **fP_setting)
File "micromamba/lib/python3.10/site-packages/olivar/design.py", line 226, in get
primer_arr.append(basic.seq2arr(s))
File "micromamba/lib/python3.10/site-packages/olivar/basic.py", line 76, in seq2arr
seq_list = [dic[s] for s in list(seq_str)]
File "micromamba/lib/python3.10/site-packages/olivar/basic.py", line 76, in <listcomp>
seq_list = [dic[s] for s in list(seq_str)]
KeyError: 'H'
I modified the function seq2arr
causing the error to print the output seq_str
, this was the print out:
ct
gc
gg
ag
ta
ct
cc
gc
tg
tt
tt
gt
cg
cc
gc
cg
HAVSeqcgccgtttgcctaggcta
Note the last sequence has HAVSeq
inserted. Removing the prefix
flags solves the issue. It seems that somehow the primer names are being inserted into the sequence operation. I have tested the following:
--rp-prefix "HAVSeq"
(error)I am running on Linux Mint 21, with micromamba installing Olivar version 1.1.1. Also tested with the latest version 1.1.2, same issue.
Not a huge deal as the Olivar still runs, just need to manually rename the outputs.
When input genome is short compared to desired amplicon length (e.g., less than 20 amplicons to cover the whole genome), optimize for genome coverage. Loss should be multiplied by 1/coverage.
Hello,
I am trying to validate a primer scheme and I get a keyerror message, see below:
(olivar) cygnus@pop-os:/media/extra_drive1/XXXX_tiled_amplicon_assay/olivar_v1.1.3_XXXX_scheme_development/XXXX_olivar_nonspecific_genomes$ olivar validate /media/extra_drive1/XXXX_tiled_amplicon_assay/testing_XXXX_denv_primers/DENV4_primers.csv --pool 1 -d /media/extra_drive1/XXXX_tiled_amplicon_assay/olivar_v1.1.3_XXXX_scheme_development/XXXX_olivar_nonspecific_genomes/XXXX_olivar_nonspecific_db.fa -o /media/extra_drive1/XXXX_tiled_amplicon_assay/testing_XXXX_denv_primers/olivar_validate/denv4_pool1 -p 20
Successfully loaded /media/extra_drive1/XXXX_tiled_amplicon_assay/testing_XXXX_denv_primers/DENV4_primers.csv, pool-1.
Running blastn-short with 20 CPU(s), batch size 128...
100%|>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>| 36/36 [00:54<00:00, 1.51s/it]
finished in 54.47s
Non-specific amplicons saved as /media/extra_drive1/XXXX_tiled_amplicon_assay/testing_XXXX_denv_primers/olivar_validate/denv4_pool1/olivar-val_pool-1_ns-amp.csv
Non-specific primer pairs saved as /media/extra_drive1/XXXX_tiled_amplicon_assay/testing_XXXX_denv_primers/olivar_validate/denv4_pool1/olivar-val_pool-1_ns-pair.csv
Traceback (most recent call last):
File "/home/cygnus/mambaforge/envs/olivar/bin/olivar", line 187, in <module>
validate(
File "/home/cygnus/mambaforge/envs/olivar/lib/python3.12/site-packages/olivar/main.py", line 1150, in validate
_, all_bad = PrimerSetBadnessFast(seq_list)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cygnus/mambaforge/envs/olivar/lib/python3.12/site-packages/olivar/design.py", line 310, in PrimerSetBadnessFast
c = basic.revcomp(p)
^^^^^^^^^^^^^^^^
File "/home/cygnus/mambaforge/envs/olivar/lib/python3.12/site-packages/olivar/basic.py", line 36, in revcomp
bases = [complement[base] for base in seq]
~~~~~~~~~~^^^^^^
KeyError: 'r'
The output directory is created and the "olivar-val_pool-1_ns-amp.csv" and "olivar-val_pool-1_ns-pair.csv" are created but are empty (just have headers). Any help would be appreciated. Thanks!
-Alex
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.