Skip to main content

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

Project description

SNPrimer

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

Installation

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)]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

snprimer-0.1.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

snprimer-0.1.0-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file snprimer-0.1.0.tar.gz.

File metadata

  • Download URL: snprimer-0.1.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.8.10 Linux/5.19.0-14.3-liquorix-amd64

File hashes

Hashes for snprimer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 014efe8bd50d486ce6d102e71f9ae20297b07f4f7b2768e45231c82089d2e853
MD5 50a0468a28fed02b01e99f292675748b
BLAKE2b-256 acad273ca0f8b90ffce6b652b53acd93f463053409535c928d08ef3f7be1a938

See more details on using hashes here.

File details

Details for the file snprimer-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: snprimer-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.8.10 Linux/5.19.0-14.3-liquorix-amd64

File hashes

Hashes for snprimer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 46190d4fcda69dbb1aa515603c326efd08c0e3af40115e76d19b7c5131533de0
MD5 855f2e7afcad24d1fe1a62c2a511ca0c
BLAKE2b-256 2faa4dc3c728813418c2cf5ad1eb1c7a07da350971abb1f6ec300dc060db5201

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page