Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

one based numbering of primer pairs #53

Merged
merged 2 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions AnoPrimer/design.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,9 @@ def primer3_to_pandas(primer_dict, assay_type):
# Create a column which is primer pair #, and a column for primer
# parameter which does not contain primer pair #
primer_df = primer_df.iloc[row_start:, :].copy()
primer_df["primer_pair"] = primer_df["parameter"].str.extract("([0-9][0-9]|[0-9])")
primer_df["primer_pair"] = (
primer_df["parameter"].str.extract("([0-9][0-9]|[0-9])").astype(int) + 1
)
primer_df["parameter"] = primer_df["parameter"].str.replace(
"(_[0-9][0-9]|_[0-9])", "", regex=True
)
Expand All @@ -446,7 +448,8 @@ def primer3_to_pandas(primer_dict, assay_type):
required_info = [string.lower() for string in required_info]

# Subset data frame
primer_df = primer_df.loc[required_info, np.arange(primer_df.shape[1]).astype(str)]
primer_df = primer_df.loc[required_info, np.arange(1, primer_df.shape[1] + 1)]
primer_df.columns = primer_df.columns.astype(str)
return primer_df


Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "AnoPrimer"
version = "2.0.0"
version = "2.0.1"
description = "A package to design primers in Anopheles gambiae whilst considering genetic variation with malariagen_data"
readme = "README.md"
documentation = "https://sanjaynagi.github.io/anoprimer/latest/"
Expand Down
9 changes: 9 additions & 0 deletions tests/run_ci_notebooks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

papermill notebooks/AnoPrimer-long.ipynb qPCR_run.ipynb -k AnoPrimer -f tests/cDNA_Params_fun.json &&
papermill notebooks/AnoPrimer-long.ipynb qPCR2_run.ipynb -k AnoPrimer -f tests/cDNA_Params_2_fun.json &&
papermill notebooks/AnoPrimer-long.ipynb gDNA_run.ipynb -k AnoPrimer -f tests/gDNA_probe_Params_fun.json &&
papermill notebooks/AnoPrimer-long.ipynb qPCR_run.ipynb -k AnoPrimer -f tests/cDNA_Params.json &&
papermill notebooks/AnoPrimer-long.ipynb qPCR2_run.ipynb -k AnoPrimer -f tests/cDNA_Params_2.json &&
papermill notebooks/AnoPrimer-long.ipynb gDNA_run.ipynb -k AnoPrimer -f tests/gDNA_probe_Params.json &&
papermill notebooks/AnoPrimer-long.ipynb probe_run.ipynb -k AnoPrimer -f tests/probe_Params.json &&
papermill notebooks/AnoPrimer-short.ipynb short_run.ipynb -k AnoPrimer
Loading