Commit 3244f77d authored by Sander Bollen's avatar Sander Bollen
Browse files

update readme

parent 097bfea5
PRINIA
=======
Prinia is a python package for designing primers from genomic regions or LOVD import format files.
Prinia is a python package for designing primers from genomic regions
or LOVD import format files.
Requirements
-------------
You must have a recent version of [primer3](http://primer3.sourceforge.net/), [samtools](http://www.htslib.org/download/) and [bwa](https://github.com/lh3/bwa)
## Python version
Furthermore, the following python packages are required:
3.5+
### Python packages
* future >= 0.15.2
* biopython >= 1.66
* lxml >= 3.4.4
* pyfaidx >= 0.4.4
* pyvcf >= 0.6.7
* pyvcf >= 0.6.7
* jsonschema >= 2.6.0
* Jinja2 >= 2.9.5
## Other dependencies
You must have a recent version of [primer3](http://primer3.sourceforge.net/), [samtools](http://www.htslib.org/download/)
and [bwa](https://github.com/lh3/bwa)
Installation
-------------
It is recommended you use a [virtual environment](https://virtualenv.readthedocs.org), such that the risk of dependency hell is minimized.
It is recommended you use a [virtual environment](https://virtualenv.readthedocs.org),
such that the risk of dependency hell is minimized.
After creating your virtualenv, clone this repository.
Install all the required python packages with:
......@@ -32,15 +43,16 @@ pip install -r requirements.txt
Then install PRINIA with:
```
python setup.py develop
python setup.py install
```
Primer design
-------------
A `primerdesign` tool will be be added to your path upon installation of prinia.
This tool will generate your primers from BED records (regions) or LOVD import file format files.
A `primerdesign` tool will be be added to your path upon installation
of prinia. This tool will generate your primers from BED records
(regions) or LOVD import file format files.
### Help
......@@ -48,16 +60,12 @@ This tool will generate your primers from BED records (regions) or LOVD import f
```
usage: primerdesign [-h] (-l LOVD | --region REGION) [-p PADDING]
(-x XML | -t TSV) -b BAM [-s SAMPLE]
[--product_size PRODUCT_SIZE] [--min-margin MIN_MARGIN]
[--strict] [--n_raw_primers N_RAW_PRIMERS] [--m13]
[--min-margin MIN_MARGIN] [--strict] [--m13]
[--m13-forward M13_FORWARD] [--m13-reverse M13_REVERSE]
[-f FIELD] [-af ALLELE_FREQ] [-fq1 FQ1] [-fq2 FQ2] -R
REFERENCE --dbsnp DBSNP --primer3 PRIMER3 [--bwa BWA]
[--samtools SAMTOOLS] [--ignore-errors]
[--opt-primer-length OPT_PRIMER_LENGTH]
[--opt-gc-perc OPT_GC_PERC]
[--min-melting-temperature MIN_MELTING_TEMPERATURE]
[--max-melting-temperature MAX_MELTING_TEMPERATURE]
REFERENCE [--dbsnp DBSNP] --primer3 PRIMER3 [--bwa BWA]
[--samtools SAMTOOLS] [--settings-json SETTINGS_JSON]
[--ignore-errors]
optional arguments:
-h, --help show this help message and exit
......@@ -71,16 +79,10 @@ optional arguments:
-b BAM, --bam BAM Path to output BAM file containing primers
-s SAMPLE, --sample SAMPLE
Same ID for regions
--product_size PRODUCT_SIZE
Size range of desired product. Defaults to 200-450
This will be taken as a minimum product size in the
case of regions
--min-margin MIN_MARGIN
Minimum distance from region or variant. Default = 10
--strict Enable strict mode. Primers with products larger than
max product size will NOT be returned
--n_raw_primers N_RAW_PRIMERS
Legacy option. Will be ignored
--m13 Output primers with m13 tails
--m13-forward M13_FORWARD
Sequence of forward m13 tail
......@@ -102,16 +104,9 @@ optional arguments:
--primer3 PRIMER3 Path to primer3_core exe
--bwa BWA Path to BWA exe
--samtools SAMTOOLS Path to samtools exe
--settings-json SETTINGS_JSON
Optional path to primer3 settings json file.
--ignore-errors Ignore errors
--opt-primer-length OPT_PRIMER_LENGTH
Optimum primer length (default = 25)
--opt-gc-perc OPT_GC_PERC
Optimum primer GC percentage (default = 50)
--min-melting-temperature MIN_MELTING_TEMPERATURE
Minimum primer melting temperature (default = 58)
--max-melting-temperature MAX_MELTING_TEMPERATURE
Maximum primer melting temperature (default = 62)
```
### Usage
......@@ -137,7 +132,48 @@ The following arguments are mandatory:
Recommended arguments:
* `--samtools`: Path to samtools. If not given, will simply assume `samtools` is on the PATH.
* `--bwa`: Path to bwa. If not given, will simply assume `bwa` is on the PATH.
* `--bwa`: Path to bwa. If not given, will simply assume `bwa` is on the PATH.
### Primer3 settings
Some settings that are passed on to primer3 can be provided with a json
file. Said json file must conform to the json schema provided
[here](prinia/static/primer3_settings_schema.json). A validation error
is thrown if the provided json does not conform to the schema.
Parameters not given in the settings file are supplied default values.
In case no settings file is given at all, only the default values are
used.
The schema defines all default values. For convenience, they are listed
here as well:
| parameter | explanation | default |
| --------- | ----------- | ------- |
| `primer_min_gc` | Minimum GC-percentage of primers | 20 |
| `primer_internal_min_gc` | Equivalent parameter of primer_min_gc for the internal oligo. | 20 |
| `primer_opt_gc_percent` | Optimum GC-percentage of primers | 50 |
| `primer_max_gc` | Maximum GC-percentage of primers. | 80 |
| `primer_internal_max_gc` | Equivalent parameter of primer_max_gc for the internal oligo. | 80 |
| `primer_wt_gc_percent_lt` | Penalty weight for primers with GC-percentage lower than primer_opt_gc_percent | 0 |
| `primer_internal_wt_gc_percent_lt` | Equivalent parameter of primer_wt_gc_percent_lt for the interal oligo. | 0 |
| `primer_wt_gc_percent_gt` | Penalty weight for primers with GC-percentage higher than primer_opt_gc_percent | 0 |
| `primer_internal_wt_gc_percent_gt` | Equivalent parameter of primer_wt_gc_percent_gt for the internal oligo. | 0 |
| `primer_gc_clamp` | Require the specified number of consecutive Gs and Cs at the 3' end of both the left and right primer. | 0 |
| `primer_max_end_gc` | The maximum number of Gs or Cs allowed in the last five 3' bases of a left or right primer. | 5 |
| `primer_opt_size` | Optimum size of primers in bases. | 25 |
| `primer_min_size` | Minimum size of primers in bases. | 20 |
| `primer_max_size` | Maximum size of primers in bases. | 30 |
| `primer_max_ns_accepted` | Maximum number of unknown bases (N) accepted in a primer | 0 |
| `primer_product_size_range` | Accepted size range of the product size. | 200-450 |
| `primer_product_opt_size` | Optimum size of product. Will default to the midpoint in primer_product_size_range unless specified | 325 |
| `primer_pair_wt_product_size_gt` | Penalty weight for products larger than primer_product_opt_size | 0.1 |
| `primer_pair_wt_product_size_lt` | Penalty weight for products smaller than primer_product_opt_size | 0.1 |
| `primer_min_tm` | Minimum melting temperature of primer degrees Celsius | 58 |
| `primer_max_tm` | Maximum melting temperature in degrees Celsius | 62 |
| `primer_num_return` | Number of returned primers. Increase to increase search space | 200 |
Known issues
......
......@@ -51,7 +51,7 @@
"minimum": 0
},
"primer_wt_gc_percent_gt": {
"description": "Penality weight for primers with GC-percentage higher than primer_opt_gc_percent",
"description": "Penalty weight for primers with GC-percentage higher than primer_opt_gc_percent",
"type": "number",
"default": 0,
"minimum": 0
......
......@@ -5,7 +5,7 @@ setup(
version='0.1',
packages=find_packages(),
install_requires=["biopython", "pysam", "pyfaidx",
"lxml", "pyvcf"],
"lxml", "pyvcf", "jsonschema>=2.6.0", "Jinja2>=2.9.5"],
url='',
license='',
author='sander bollen',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment