A library for processing and interpreting DNA high-resolution melt and amplification curves for the meningoencephalitis panel.
Project description
PyPCR
A Python library for processing and interpreting DNA High-Resolution Melt and Amplification Curves for the Meningoencephalitis Panel
Installation • Features • Documentation • Help
PyPCR
PyPCR primarily focuses on feature extraction and interpreting results from parsed data. here the first step is to parses files into the .rex format, extracting essential information such as HRM (High Resolution Melting) data, cycle threshold (CT) values, and sample details. It facilitates feature extraction from HRM data by converting it into melt curves, and for parsed CT data, it identifies take-off points crucial for determining the severity of affected pathogens. PyPCR integrates these features to interpret results and generate comprehensive reports for respective identifiers.
Installing with PIP
python -m pip install PyPCR
or
pip3 install PyPCR
Classifiers
Development Status | 5 - Production/Stable |
Intened Audience | Healthcare |
License | OSI Approved :: MIT License |
Operating System | Microsoft :: Windows :: Windows 10 |
Programming Language | Python 3 |
Features
- Rextractor
- Extract the data from Rotor Gene Experiment(.rex) files.
- High Resolution Melt (HRM)
- Amplification Curve - Cycle Time (CT)
- Processing Data
- Filter Only MEP Pathogens
- Separate by patients
- Extract the data from Rotor Gene Experiment(.rex) files.
- MEP panel
- Feature Extraction
- Target – Pathogen Name
- Temperature (Peak of the Melt Curve)
- Width
- Prominence
- Take of Point
- Take down Point
- Area Under the curve
- Interactive Visulization.
- High Resolution Melt
- Melt Curve
- Amplification Curve
- Result
- Interpreting the results of the pathogens
- Generate report for test Results
- Feature Extraction
Input Data format
The input file for the library is the run file from the Rotor-Gene machine, which is in the format of a Rotor-Gene Experiment (.rex) file, and we can directly provide the .rex file without any preprocessing.
Documentation
Importing Library
from PyPCR.Rextractor import rex_reader
from PyPCR.Mep_panel import Mep_diagnoser
PyPCR.Rextractor.rex_reader()
PyPCR.Rextractor.rex_reader(path = None)
Parameters:
path : Rotor Gene Experiment file path (.rex)
Returns:
A dictionary containing various patient ID for each separate patients: class 'dict_keys'
A dictionary containing various dataframes (HRM) for respective patient ID's: class 'dict_keys'
A dictionary containing various dataframes (CT) for respective patient ID's: class 'dict_keys'
Example
from PyPCR.Rextractor import rex_reader
Patient_ids,raw_hrm,raw_ct = rex_reader("your .rex file path")
PyPCR.Mep_panel.Mep_diagnoser
md = Mep_diagnoser()
hrm_data = md.transform_hrm(dataframe: Any,figure: bool = False)
ct_data = md.transform_ct(dataframe: Any,figure: bool = False)
melt = md.hrm_to_melt(figure: bool = False)
hrm_features = md.hrm_feature_extraction()
ct_values = md.ct_value()
md.Tm_threshold()
result = md.predict_result()
report = md.report( output_fie_path: Any,patient_id: Any)
Function Documentation
transform_hrm
Parameters:
dataframe
: HRM data obtained fromrex_reader()
.figure
(optional): Boolean flag indicating whether to generate an HRM graph.
Returns:
- Processed HRM data.
- If
figure
isTrue
, an HRM graph is also returned.
transform_ct
Parameters:
dataframe
: CT data acquired fromrex_reader()
.figure
(optional): Boolean flag to specify if a CT graph should be produced.
Returns:
- Processed CT data.
- If
figure
isTrue
, a CT graph is included in the output.
hrm_to_melt
Parameters:
figure
(optional): Boolean flag for generating a melt graph.
Returns:
- Melted data.
- If
figure
isTrue
, a melt graph is also provided.
hrm_feature_extraction
No Parameters Needed
Returns:
- HRM features extracted from the data.
ct_value
No Parameters Needed
Returns:
- CT values derived from the data.
predict_result
No Parameters Needed
Returns:
- Predicted result based on the processed data.
report
Parameters:
output_file_path
: Path to save the generated report.patient_id
: Identifier for the patient.
Returns:
- Generated report based on the analysis.
Sample code Snippet for interpreting individual result
from PyPCR.Rextractor import rex_reader
from PyPCR.Mep_panel import Mep_diagnoser
# File extraction from the rex file
patient_id,hrm,ct = rex_reader("Your .rex file path")
print(patient_id)
# Create Object
md = Mep_diagnoser()
# Interpreting the results by providing patient ID manually
hrm_data = md.transform_hrm(hrm[id])
ct_data = md.transform_ct(ct[id])
melt = md.hrm_to_melt(figure: False)
hrm_features = md.hrm_feature_extraction()
ct_values = md.ct_value()
md.Tm_threshold()
result = md.predict_result()
report = md.report( output_fie_path=f"{id}.pdf",patient_id={id})
Sample code Snippet for interpreting all individual result
from PyPCR.Rextractor import rex_reader
from PyPCR.Mep_panel import Mep_diagnoser
# File extraction from the rex file
patient_id,hrm,ct = rex_reader("Your .rex file path")
# Create Object
md = Mep_diagnoser()
# Interpreting the results
for id in patient_id:
hrm_data = md.read_hrm(hrm[id])
ct_data = md.read_ct(ct[id])
melt = md.hrm_to_melt(figure: False)
hrm_features = md.hrm_feature_extraction()
ct_values = md.ct_value()
md.Tm_threshold()
result = md.predict_result()
report = md.report( output_fie_path=f"{id}.pdf",patient_id={id})
Getting Help
If you need to get in touch with the team, please contact through email address:
chandruganeshan24@gmail.com
vikramsekar2305@gmail.com
Developers
The developer of this Software are M.Sc Data Analytics Students in Department of Computer Application at Bharathiar University
Chandru Ganeshan |
Vikram Sekar |
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
File details
Details for the file pyPCR-0.0.1.tar.gz
.
File metadata
- Download URL: pyPCR-0.0.1.tar.gz
- Upload date:
- Size: 12.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56a39c08ed679daa80d49bc6b271d526a600988ecc3360e67535923ef8e3eefd |
|
MD5 | 041962bc8399cfe78920411844ce8eb1 |
|
BLAKE2b-256 | b0f2e95d69acda3b889d0c5fd5ce958e07e9430622eadd5195f357cc00a142c9 |
File details
Details for the file pyPCR-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: pyPCR-0.0.1-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59b4dba5e1e0e40fdc8fe419cdfac05f3031516d04be8813141359b64d171bd1 |
|
MD5 | 5e35908fef907997e9e76660a9712693 |
|
BLAKE2b-256 | 274eedb1ba82b2325a5deece2810e882e2934b39ce67f545f934b0ab03ab15f4 |