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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file strainpycon_inferencemethods-1.0.0.dev2.tar.gz.
File metadata
- Download URL: strainpycon_inferencemethods-1.0.0.dev2.tar.gz
- Upload date:
- Size: 24.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bdeae2155bfb6256f651239ae245e74cf02c0fd41e939d4c21c0edc87348cde9
|
|
| MD5 |
4e205a81895002264f2c0dfb8e95f786
|
|
| BLAKE2b-256 |
3089032d1641fc55254bfcfb463843cd2735d6a02409ac78b356a0e8b3d93613
|
File details
Details for the file strainpycon_inferencemethods-1.0.0.dev2-py3-none-any.whl.
File metadata
- Download URL: strainpycon_inferencemethods-1.0.0.dev2-py3-none-any.whl
- Upload date:
- Size: 25.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
537e1f7d9585a7db596c60380b7625f3fe39b1a15525772d49cf6d741028465b
|
|
| MD5 |
f61a03593ef33740a87cfb5fedec5daf
|
|
| BLAKE2b-256 |
32c5e123e7dab14b16a7479ca51b52b73bd96d44690f7464e3c4cebe4721f15c
|