Skip to content

Commit

Permalink
Merge pull request #32 from sanjaynagi/support-for-primer3py-2-01-06-23
Browse files Browse the repository at this point in the history
Support for and pin primer3-py v2.0.0
  • Loading branch information
sanjaynagi authored Jun 1, 2023
2 parents 6295c8b + c1f1c1a commit 9716a9a
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 35 deletions.
11 changes: 4 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
# https://pre-commit.com/
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
# isort should run before black as black sometimes tweaks the isort output
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
# https://github.com/python/black#version-control-integration
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
Expand All @@ -20,7 +17,7 @@ repos:
rev: v0.3.8
hooks:
- id: blackdoc
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
# - repo: https://github.com/pycqa/flake8
# rev: 6.0.0
# hooks:
# - id: flake8
9 changes: 3 additions & 6 deletions AgamPrimer/AgamPrimer.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ def primer_params(
amplicon_size_range=None,
generate_defaults=False,
):

"""
adds necessary parameters depending on assay_type, or can
generate the default parameters
Expand Down Expand Up @@ -646,7 +645,6 @@ def designPrimers(


def _get_primer_arrays(contig, gdna_pos, sample_sets, assay_type, sample_query=None):

if any(item in assay_type for item in ["gDNA", "probe"]):
span_str = f"{contig}:{gdna_pos.min()}-{gdna_pos.max()}"
snps = ag3.snp_calls(
Expand Down Expand Up @@ -744,7 +742,6 @@ def _plotly_primers(
target,
out_dir=None,
):

oligos, _ = _return_oligo_list(assay_type)
if len(oligos) == 2:
plt_title = ["Forward primer", "Reverse primer"]
Expand Down Expand Up @@ -933,13 +930,13 @@ def _get_qPCR_locs(gff, contig, transcript):
def _return_oligo_list(assay_type):
if assay_type == "probe":
oligos = ["probe"]
row_start = 5
row_start = 9
elif any(item == assay_type for item in ["gDNA primers", "cDNA primers"]):
oligos = ["forward", "reverse"]
row_start = 7
row_start = 11
elif assay_type == "gDNA primers + probe":
oligos = ["forward", "reverse", "probe"]
row_start = 8
row_start = 12
return (oligos, row_start)


Expand Down
40 changes: 20 additions & 20 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "AgamPrimer"
version = "0.6.0"
version = "0.6.1"
description = "A package to design primers in Anopheles gambiae whilst considering genetic variation with malariagen_data"
authors = [
"Sanjay Nagi <[email protected]>",
Expand All @@ -12,7 +12,7 @@ license = "MIT"

[tool.poetry.dependencies]
python = ">=3.8,<3.12"
primer3-py = "*"
primer3-py = "2.0.0"
malariagen_data = "*"
openpyxl = "*"
gget = "*"
Expand Down

0 comments on commit 9716a9a

Please sign in to comment.