Skip to main content

SNPrimer

Small python library to search snp in primer by position or by sequence.

Installation

pip install snprimer

Usage

🎯 By position 🎯

from snprimer import PositionRange

position = PositionRange("chr8",19818430, 19818440)
print(position)
# PositionRange(chr='chr8', start=19818430, end=19818440, strand=None, snp=[SNP(id='chr8:g.19818436C>G', rsid='rs316', vaf=0.15300000000000002), SNP(id='chr8:g.19818436C>T', rsid='rs316', vaf=0.15300000000000002)])
for snp in position.get_snp(max_vaf=0.05):
    print(snp)
#SNP(id='chr8:g.19818436C>G', rsid='rs316', vaf=0.15300000000000002)
#SNP(id='chr8:g.19818436C>T', rsid='rs316', vaf=0.15300000000000002)

🔤 By sequence 🔤

from snprimer import Primer

primer = Primer("CACACAGATCAGAGGGCCAAC")
print(primer)
#Primer(seq='CACACAGATCAGAGGGCCAAC', position_ranges=[PositionRange(chr='chr1', start=26774827, end=26774847, strand='+', snp=[SNP(id='chr1:g.26774827G>A', rsid='rs2075289787', vaf=0), SNP(id='chr1:g.26774830A>G', rsid='rs986550282', vaf=0.0), SNP(id='chr1:g.26774842T>C', rsid='rs1440652363', vaf=0.0)])])
primer.infos(max_vaf=0)
#CACACAGATCAGAGGGCCAAC has snp with vaf > 0 : [SNP(id='chr1:g.26774827G>A', rsid='rs2075289787', vaf=0), SNP(id='chr1:g.26774830A>G', rsid='rs986550282', vaf=0.0), SNP(id='chr1:g.26774842T>C', rsid='rs1440652363', vaf=0.0)]

🖥️In silico PCR🖥️

from pathlib import Path
from snprimer import Primer, PrimerPair

a = Primer("GGAGATGTACAGCGTGCCATAC", "hg19")
b = Primer("TACATCTTGCTGAGGGGAAGGC", "hg19")
pp = PrimerPair(a, b)
pcr = pp.make_pcr(Path('/path/to/hg19.fa'))
print(pcr)

Metadata

Release files for snprimer 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for snprimer 0.2.0
File Size Uploaded Provenance Actions
snprimer-0.2.0.tar.gz 4.1 kB Without provenance Details for snprimer-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for snprimer 0.2.0
File Interpreter ABI Platform Actions
snprimer-0.2.0-py3-none-any.whl Python 3 none any Details for snprimer-0.2.0-py3-none-any.whl

Total release size: 9.2 kB

Release files / snprimer-0.2.0.tar.gz

Download URL snprimer-0.2.0.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
052e8d663fdb24549c19b0d70320101634cc38080c1d1d506ee193780c28f3bc
BLAKE2b-256 checksum
How to use checksums
e6dba434c3bea74a628c106e9ca61c28e7fd032c4c21a72dfb54415b34634292
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.2 CPython/3.8.10 Linux/5.19.0-14.3-liquorix-amd64

Release files / snprimer-0.2.0-py3-none-any.whl

Download URL snprimer-0.2.0-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5a413773e378706aaa512f4be1bf6f639ddf5518c0dc093ac96e9f2756eab8de
BLAKE2b-256 checksum
How to use checksums
a035c0e551011b22e9e91519b62949e0f2ba2f3bd1d29743a3e87ccb8bd33dfb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.2 CPython/3.8.10 Linux/5.19.0-14.3-liquorix-amd64

Security for snprimer 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page