Skip to main content

Strain disambiguation methods for mixed DNA samples. Built upon strainpycon package

Project description

Introduction

The Strain Inference Methods (SIM)(strainpycon_inferencemethods) are a fork of the Python 3 strainpycon package used to disambiguate multiple strains in mixed samples of DNA. SIM builds upon strainpycon with methods to: -disambiguate samples with many genetic markers (tested up to 2461 markers) -fix a particular strain within a sample reconstruction -compare samples for shared strains -detect the presence or absence of particular strains in samples

Contacts

Please direct questions to: Gary Vestal, mojihaka@protonmail.com

Installation

$pip install strainpycon_inferencemethods

Test usage

import numpy as np from strainpycon_inferencemethods import StrainRecon, StrainMatchB, StrainMatchT

S = StrainRecon() m, n = 24, 3 # SNP sites, number of strains

(meas1, strains1, freq1), (meas2, strains2, freq2) = S.random_data_with_shared_strain( m, n, shared_index=0, gamma=0.00 )

strainmat, freqvec = S.compute_fixed(meas1, 4, strain_of_interest) strainmat, freqvec = S.compute_fixed(meas2, 4, strain_of_interest)

strain_of_interest = strains1[0] smb = StrainMatchB(S)

smb.is_strain_in_sample( meas1, strain_of_interest, k=5, gamma=0.01, bayes_k_threshold=0.1, fixed_proportion_threshold=0.05 )

smt = StrainMatchT(S)

smt.determine_similarity_of_samples( meas1, meas2, maxK=3, gamma=0.01, STIMThresh=1.8e-7, alpha=0.05, neutral_is_positive=True )

Test cases...

...are in the /test/ folder

Strainpycon

This library was forked from strainpycon by Ymir Vigfusson, Lars Ruthotto, Rebecca M. Mitchell, Lauri Mustonen, and Xiangxi Gao, under the MIT License.

Please refer to the full documentation of StrainPycon at: https://www.ymsir.com/strainpycon/

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

strainpycon_inferencemethods-1.0.0.dev2.tar.gz (24.0 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file strainpycon_inferencemethods-1.0.0.dev2.tar.gz.

File metadata

File hashes

Hashes for strainpycon_inferencemethods-1.0.0.dev2.tar.gz
Algorithm Hash digest
SHA256 bdeae2155bfb6256f651239ae245e74cf02c0fd41e939d4c21c0edc87348cde9
MD5 4e205a81895002264f2c0dfb8e95f786
BLAKE2b-256 3089032d1641fc55254bfcfb463843cd2735d6a02409ac78b356a0e8b3d93613

See more details on using hashes here.

File details

Details for the file strainpycon_inferencemethods-1.0.0.dev2-py3-none-any.whl.

File metadata

File hashes

Hashes for strainpycon_inferencemethods-1.0.0.dev2-py3-none-any.whl
Algorithm Hash digest
SHA256 537e1f7d9585a7db596c60380b7625f3fe39b1a15525772d49cf6d741028465b
MD5 f61a03593ef33740a87cfb5fedec5daf
BLAKE2b-256 32c5e123e7dab14b16a7479ca51b52b73bd96d44690f7464e3c4cebe4721f15c

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