-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from sanjaynagi/move-ag3-af1-17-05-24
move ag3/af1 to after species selection
- Loading branch information
Showing
4 changed files
with
656 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
"id": "view-in-github" | ||
}, | ||
"source": [ | ||
"<a href=\"https://colab.research.google.com/github/sanjaynagi/AgamPrimer/blob/main/notebooks/AgamPrimer-long.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>" | ||
"<a href=\"https://colab.research.google.com/github/sanjaynagi/AnoPrimer/blob/main/notebooks/AnoPrimer-long.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>" | ||
] | ||
}, | ||
{ | ||
|
@@ -25,24 +25,40 @@ | |
"outputs": [], | ||
"source": [ | ||
"# First, install some packages we require\n", | ||
"! pip install AgamPrimer -q " | ||
"! pip install AnoPrimer -q " | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"execution_count": 2, | ||
"id": "528ae85d", | ||
"metadata": { | ||
"id": "528ae85d" | ||
}, | ||
"outputs": [], | ||
"outputs": [ | ||
{ | ||
"ename": "ModuleNotFoundError", | ||
"evalue": "No module named 'AnoPrimer'", | ||
"output_type": "error", | ||
"traceback": [ | ||
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", | ||
"\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)", | ||
"Cell \u001b[0;32mIn[2], line 2\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# Import libraries \u001b[39;00m\n\u001b[0;32m----> 2\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mAnoPrimer\u001b[39;00m\n\u001b[1;32m 3\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mmalariagen_data\u001b[39;00m\n\u001b[1;32m 4\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mprimer3\u001b[39;00m\n", | ||
"\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'AnoPrimer'" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"# Import libraries \n", | ||
"import AgamPrimer\n", | ||
"import AnoPrimer\n", | ||
"import malariagen_data\n", | ||
"import primer3\n", | ||
"import pandas as pd\n", | ||
"import numpy as np" | ||
"import numpy as np\n", | ||
"\n", | ||
"import google.auth\n", | ||
"\n", | ||
"credentials, project = google.auth.default()" | ||
] | ||
}, | ||
{ | ||
|
@@ -53,11 +69,11 @@ | |
"id": "47bde61a" | ||
}, | ||
"source": [ | ||
"##**[AgamPrimer](https://github.com/sanjaynagi/AgamPrimer): Primer design considering genomic variation in *Anopheles gambiae* s.l and *Anopheles funestus*** \n", | ||
"##**[AnoPrimer](https://github.com/sanjaynagi/AnoPrimer): Primer design considering genomic variation in *Anopheles gambiae* s.l and *Anopheles funestus*** \n", | ||
"**Author**: [Sanjay Curtis Nagi](https://sanjaynagi.github.io/) \n", | ||
"**Email**: [email protected] \n", | ||
"\n", | ||
"Welcome to the AgamPrimer notebook. This is the long version of the notebook which designs primers in steps. Alternatively, there is a all-in-one function in a [short version of the notebook](https://colab.research.google.com/github/sanjaynagi/AgamPrimer/blob/main/notebooks/AgamPrimer-short.ipynb).\n", | ||
"Welcome to the AnoPrimer notebook. This is the long version of the notebook which designs primers in steps. Alternatively, there is a all-in-one function in a [short version of the notebook](https://colab.research.google.com/github/sanjaynagi/AnoPrimer/blob/main/notebooks/AnoPrimer-short.ipynb).\n", | ||
"\n", | ||
"We would like to design primers for PCR applications, such as genotyping or gene expression (qPCR). However, single nucleotide polymorphisms (SNPs) in primer binding sites can result in differences or failures in PCR amplification, referred to as null alleles. \n", | ||
"\n", | ||
|
@@ -128,9 +144,9 @@ | |
}, | ||
"outputs": [], | ||
"source": [ | ||
"data_resource = AgamPrimer.retrieve_data_resource(species)\n", | ||
"data_resource = AnoPrimer.retrieve_data_resource(species)\n", | ||
"# Connect to the malariagen_data ag3 API\n", | ||
"contig, target = AgamPrimer.check_and_split_target(species=species, target=primer_target, assay_type=assay_type)\n", | ||
"contig, target = AnoPrimer.check_and_split_target(species=species, target=primer_target, assay_type=assay_type)\n", | ||
"genome_seq = data_resource.genome_sequence(region=contig)\n", | ||
"print(f\"Our genome sequence for {contig} is {genome_seq.shape[0]} bp long\")" | ||
] | ||
|
@@ -143,7 +159,7 @@ | |
"id": "144a37ce" | ||
}, | ||
"source": [ | ||
"Now we need to extract the bit of sequence we need. We will use functions in the [AgamPrimer](https://pypi.org/project/AgamPrimer/) package." | ||
"Now we need to extract the bit of sequence we need. We will use functions in the [AnoPrimer](https://pypi.org/project/AnoPrimer/) package." | ||
] | ||
}, | ||
{ | ||
|
@@ -159,7 +175,7 @@ | |
}, | ||
"outputs": [], | ||
"source": [ | ||
"target_sequence, gdna_pos, seq_parameters = AgamPrimer.prepare_sequence(\n", | ||
"target_sequence, gdna_pos, seq_parameters = AnoPrimer.prepare_sequence(\n", | ||
" species=species,\n", | ||
" target=target,\n", | ||
" assay_type=assay_type,\n", | ||
|
@@ -236,7 +252,7 @@ | |
" # In the same format as above \n", | ||
" }\n", | ||
"\n", | ||
"primer_parameters = AgamPrimer.primer_params(primer_parameters=primer_parameters, assay_type=assay_type, n_primer_pairs=n_primer_pairs, amplicon_size_range=amplicon_size_range) ## adds some parameters depending on assay type" | ||
"primer_parameters = AnoPrimer.primer_params(primer_parameters=primer_parameters, assay_type=assay_type, n_primer_pairs=n_primer_pairs, amplicon_size_range=amplicon_size_range) ## adds some parameters depending on assay type" | ||
] | ||
}, | ||
{ | ||
|
@@ -285,7 +301,7 @@ | |
}, | ||
"outputs": [], | ||
"source": [ | ||
"AgamPrimer.primer3_run_statistics(primer_dict, assay_type)" | ||
"AnoPrimer.primer3_run_statistics(primer_dict, assay_type)" | ||
] | ||
}, | ||
{ | ||
|
@@ -312,7 +328,7 @@ | |
}, | ||
"outputs": [], | ||
"source": [ | ||
"primer_df = AgamPrimer.primer3_to_pandas(primer_dict=primer_dict, assay_type=assay_type)\n", | ||
"primer_df = AnoPrimer.primer3_to_pandas(primer_dict=primer_dict, assay_type=assay_type)\n", | ||
"primer_df" | ||
] | ||
}, | ||
|
@@ -474,7 +490,7 @@ | |
}, | ||
"outputs": [], | ||
"source": [ | ||
"results_dict = AgamPrimer.plot_primer_snp_frequencies(\n", | ||
"results_dict = AnoPrimer.plot_primer_snp_frequencies(\n", | ||
" species=species,\n", | ||
" primer_df=primer_df,\n", | ||
" gdna_pos=gdna_pos,\n", | ||
|
@@ -511,7 +527,7 @@ | |
}, | ||
"outputs": [], | ||
"source": [ | ||
"AgamPrimer.plot_primer_locs(\n", | ||
"AnoPrimer.plot_primer_locs(\n", | ||
" species=species,\n", | ||
" primer_df=primer_df, \n", | ||
" primer_res_dict=results_dict,\n", | ||
|
@@ -567,7 +583,7 @@ | |
"outputs": [], | ||
"source": [ | ||
"if species == 'gambiae_sl':\n", | ||
" blat_result_df = AgamPrimer.gget_blat_genome(\n", | ||
" blat_result_df = AnoPrimer.gget_blat_genome(\n", | ||
" primer_df, \n", | ||
" assay_type, \n", | ||
" assembly='anoGam3'\n", | ||
|
@@ -596,7 +612,7 @@ | |
"outputs": [], | ||
"source": [ | ||
"#view help for function\n", | ||
"AgamPrimer.designPrimers?" | ||
"AnoPrimer.designPrimers?" | ||
] | ||
}, | ||
{ | ||
|
@@ -613,7 +629,7 @@ | |
}, | ||
"outputs": [], | ||
"source": [ | ||
"# primer_df, blat_df = AgamPrimer.designPrimers(\n", | ||
"# primer_df, blat_df = AnoPrimer.designPrimers(\n", | ||
"# species=species,\n", | ||
"# assay_type='gDNA primers + probe',\n", | ||
"# target='X:2422652' ,\n", | ||
|
@@ -651,7 +667,7 @@ | |
"\n", | ||
"####**Future development**\n", | ||
"\n", | ||
"Any contributions or suggestions on how we can improve this notebook are more than welcome. Please [email](mailto:[email protected]) or log an [issue on github](https://github.com/sanjaynagi/primerDesignAg/issues). This notebook and source code for AgamPrimer are located here - https://github.com/sanjaynagi/AgamPrimer/ \n", | ||
"Any contributions or suggestions on how we can improve this notebook are more than welcome. Please [email](mailto:[email protected]) or log an [issue on github](https://github.com/sanjaynagi/primerDesignAg/issues). This notebook and source code for AnoPrimer are located here - https://github.com/sanjaynagi/AnoPrimer/ \n", | ||
"\n", | ||
"\\\n", | ||
"####**References**\n", | ||
|
@@ -684,7 +700,7 @@ | |
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.7.13 (default, Mar 29 2022, 02:18:16) \n[GCC 7.5.0]" | ||
"version": "3.10.12" | ||
}, | ||
"vscode": { | ||
"interpreter": { | ||
|
Oops, something went wrong.