Skip to content

Commit f326f74

Browse files
committed
add more doc
1 parent 5f82b78 commit f326f74

5 files changed

Lines changed: 26 additions & 15 deletions

File tree

primerdiffer/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__= "0.1.1"
1+
__version__= "0.1.2"

primerdiffer/primer_check.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from Bio.Blast import NCBIXML
1717

1818
from primerdiffer.general_settings import primer3_general_settings
19-
from primerdiffer.utils import fasta2dic,dic2dic,chr_select, reverse_complement
19+
from primerdiffer.utils import chr_select, reverse_complement
2020

2121

2222
def my_design_primer(name,seq,primer3_settings=primer3_general_settings):
@@ -33,7 +33,6 @@ def my_design_primer(name,seq,primer3_settings=primer3_general_settings):
3333
return myprimer
3434

3535

36-
3736
def primer_blast(query, db):
3837
# query = myprimer['PRIMER_LEFT_0_SEQUENCE'] # The sequence
3938
blastn_cline = NcbiblastnCommandline(db=db, outfmt=5, task="blastn-short") #Blast command
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
- -> primers specific for other strain
1616

1717
3. The pair-wised design can be extended to 3 or more sequence
18-
- later works
18+
- merge the ref files to ref2 would be a workaround

readme.md

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
![PyPI](https://img.shields.io/pypi/v/primerdiffer?color=green)
33

44
## Installation:
5+
The package worked with python version >=3.4.
6+
Only tested in linux x64 system.
7+
58
python package:
69
- primer3-py>=0.6.1
710
- biopython>=1.7.8
@@ -17,9 +20,9 @@ conda install -c bioconda blast # install ncbi blast, which is not included in p
1720

1821
## Case example: primerdesign.py for primerdiffer
1922
Design genome-wide specific primers for two species/sub-species/divergent sequences:
20-
- Greedy design primers for a region in genome1 and make a specifiy check using genome2
21-
- The dis-similarity between genome1 and genome2 >5%.
22-
```bash
23+
- Greedy design primers for a region in genome1 and make a specificity check using genome2
24+
- The dis-similarity between genome1 and genome2 >= 5%.
25+
```
2326
usage: primerdesign.py [-h] [-d WKDIR] [-g1 GENOME1] [-g2 GENOME2] [-pos POSITION] [--alignlen ALIGNLEN]
2427
[--free3len FREE3LEN] [--productlen PRODUCTLEN] [-h1 HIT1] [-h2 HIT2]
2528
[-i INTERVAL] [-j JUMP] [--prefix PREFIX]
@@ -54,13 +57,18 @@ optional arguments:
5457
--prefix PREFIX prefix of output file, default is primers
5558
```
5659

57-
Use C. nigoni and C.briggsae genome as example:
58-
```bash
59-
# the C. nigoni genome is cn3_new.fa and C. briggsae genome is cb5.fa
60-
# design C. briggsae unique primer, which would not amplify any region in C. nigoni,
61-
# in the region of ChrX:12881200-15106660
62-
# inside every 4kb interval
60+
Use _C. nigoni_ and _C.briggsae_ genomes as example. The two fasta files can be downloaded separately
61+
from [cb4.fa](https://github.com/Runsheng/cbgenome/releases/download/cb5pre_cn3pre/cb5.fa.gz) and
62+
[cn3_new.fa](https://github.com/Runsheng/cbgenome/releases/download/cb5pre_cn3pre/cn3_new.fa.gz).
63+
64+
The _C. nigoni_ genome is cn3_new.fa and _C. briggsae_ genome is cb5.fa. To design _C. briggsae_ unique primer,
65+
which would not amplify any region in _C. nigoni_, and amplify only one region in _C. briggsae_.
66+
The targeted region for C. briggsae is ChrX:12881200-15106660 (-pos),
67+
one primer is designed for every 4kb interval (--interval).
68+
```
6369
primerdesign.py -g1 cb5.fa -g2 cn3_new.fa -pos "ChrX:12881200-15106660" --interval 4000
70+
71+
# check the result in file "primers_ChrX:12881200-15106660.txt"
6472
head primers_ChrX\:12881200-15106660.txt
6573
#ChrX:12881200-12881700 GATCCAAAACATGAGTGGCC CGAGATCATTGGCTCAAAGT 287
6674
#ChrX:12886200-12886700 GTTTTCTCTTCAAGTGCCCG CTCCCACATCTTGTAGGTCC 416
@@ -70,7 +78,7 @@ head primers_ChrX\:12881200-15106660.txt
7078

7179

7280
Use in silico PCR to get the position and the product of the primer
73-
```bash
81+
```
7482
usage: ispcr.py [-h] [-d WKDIR] [-f FORWARD] [-r REVERSE] [-g GENOME] [--alignlen ALIGNLEN]
7583
[--free3len FREE3LEN] [--productlen PRODUCTLEN] [-o OUT]
7684
@@ -105,5 +113,9 @@ head ispcr.fa
105113
#ATGATGATGATGATGGTGGGGTGAGAATAGAGT
106114
```
107115

116+
## Roadmap for other functions:
117+
1. To use user-provided primer parameters.Primer design parameter now is fine-tuned for general purpose PCR, which can be found in "general_settings.py".This file may need be modified to generate primers for specific purpose PCR like real-time qPCR.
118+
2. To update the RFLP method for primer design to differ sequences with almost identical sequence.
119+
3. To update the primer design using VCF file.
108120

109121

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
license='GPL-2',
1010
author='runsheng',
1111
author_email='runsheng.lee@gmail.com',
12-
description='batch design of primers for genotyping',
12+
description='batch design of primers for genotyping two or more haplotypes in hybrids',
1313
install_requires = ["primer3-py>=0.6.1",
1414
"biopython>=1.78"],
1515
scripts = ['bin/primerdesign.py',

0 commit comments

Comments
 (0)