Giter VIP home page Giter VIP logo

olivar's People

Contributors

mxwang66 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

liushuailong

olivar's Issues

Ambiguous bases in primer design?

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

The --*-prefix flags cause issues

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:

  • including both prefix flags (error)
  • including only one prefix flag (error)
  • quoting the input eg --rp-prefix "HAVSeq" (error)
  • not including any prefix flag - works!

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.

Optimization for short input genome

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.

Validate module errors out with "KeyError: 'r'"

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.