Skip to main content

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

InstallationFeaturesDocumentationHelp

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 Status5 - Production/Stable
Intened AudienceHealthcare
LicenseOSI Approved :: MIT License
Operating SystemMicrosoft :: Windows :: Windows 10
Programming LanguagePython 3

Features

  1. Rextractor
    1. Extract the data from Rotor Gene Experiment(.rex) files.
      1. High Resolution Melt (HRM)
      2. Amplification Curve - Cycle Time (CT)
    2. Processing Data
      1. Filter Only MEP Pathogens
      2. Separate by patients
  2. MEP panel
    1. Feature Extraction
      1. Target – Pathogen Name
      2. Temperature (Peak of the Melt Curve)
      3. Width
      4. Prominence
      5. Take of Point
      6. Take down Point
      7. Area Under the curve
    2. Interactive Visulization.
      1. High Resolution Melt
      2. Melt Curve
      3. Amplification Curve
    3. Result
      1. Interpreting the results of the pathogens
      2. Generate report for test Results

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 from rex_reader().
  • figure (optional): Boolean flag indicating whether to generate an HRM graph.

Returns:

  • Processed HRM data.
  • If figure is True, an HRM graph is also returned.

transform_ct

Parameters:

  • dataframe: CT data acquired from rex_reader().
  • figure (optional): Boolean flag to specify if a CT graph should be produced.

Returns:

  • Processed CT data.
  • If figure is True, 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 is True, 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 G
Chandru Ganeshan
Vikram S
Vikram Sekar

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

pyPCR-0.0.2.tar.gz (15.4 kB view details)

Uploaded Source

Built Distributions

pyPCR-0.0.2-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

PyPCR-0.0.2-py3-none-any.whl (656.4 kB view details)

Uploaded Python 3

File details

Details for the file pyPCR-0.0.2.tar.gz.

File metadata

  • Download URL: pyPCR-0.0.2.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.4

File hashes

Hashes for pyPCR-0.0.2.tar.gz
Algorithm Hash digest
SHA256 604fa19ebe34251ef47a17474cda49f99df16eb2eda309fb5dcab7d1aef119b1
MD5 5ff639c8fab7ebbcea0965ed4e369088
BLAKE2b-256 9bd01386c182183cfd42939e7fb80ba0700e171449c82453a49e09ea8b90fa0f

See more details on using hashes here.

File details

Details for the file pyPCR-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: pyPCR-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.4

File hashes

Hashes for pyPCR-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c09c67b0f54f30b77a9d9a574d9ae64edab5240118d24a3fb7561cf89c98087b
MD5 adf753791bdc2f53f303fe7b04141ccb
BLAKE2b-256 94b50389ba225fd78a03352a1a0f49e8179bae6b0411f5a09793fe3f4ff191da

See more details on using hashes here.

File details

Details for the file PyPCR-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: PyPCR-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 656.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.4

File hashes

Hashes for PyPCR-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 266b1de4ee3c28147f7c5f19c81d15aac77fe4d05c0628f39accbf276ed1f21d
MD5 a93ffe143cb1abd26db09206585d5e6c
BLAKE2b-256 2355c088f4c88898306777c05e9c90905684dad267a13eff3dc58b96adb4bda8

See more details on using hashes here.

Supported by

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