Skip to main content

transformapy: A Toolkit for Identifying Transformation Product Structures of Emerging Contaminants Using HRMS Data

transformapy is a Python toolkit engineered to process molecular structures, pinpointing potential transformation products of specified compounds by leveraging observed monoisotopic masses.

Contributor: Rui Wang

First release date: Feb.28.2024

Update

May.25.2024: transformapy 0.0.6

  1. Updated the is_valid_formula function to account for cases without carbon (C).

  2. Included a requirement to update pyhrms to the latest version.

  3. Enhanced generate_possible_TP_structures to generate the most similar molecules based on molecular fingerprint similarity and to return intermediate steps.

  4. Added the one_step_reaction_based_on_fp function.

  5. Added the stepwise_reaction_single_tp function.

  6. Added the unfold_formula_result function.

  7. Added the get_formula_elements_range function.

  8. Updated the combine_fragments_and_generate_smiles function.

Dependencies

transformapy requires the following major dependencies:

  • rdkit

  • pyhrms

Features

transformapy provides the following functions:

  • Identifying Transformation Product Structures of Emerging Contaminants Using HRMS Data

Paper Published Utilizing transformapy

  • Preparing

Licensing

The package is open source and can be utilized under the MIT license. Please find the detail in the license file.

transformapy Documentation

Getting Started with transformapy

from transformapy.transformapy import *

Project Structure:

transformapy/
Step 1:
|- from_mass_to_formula
   |- get_formula_elements_range

Step 2:
|- unfold_formula_result

Step 3:
|- generate_possible_TP_structures_to_df
   |- generate_possible_TP_structures
      |- modify_chemical_formula
      |- generate_fragments
      |- calculate_formula_differences
      |- combine_two_frags
      |- calculate_changed_num
         |- parse_formula
      |- stepwise_reaction_single_tp
         |- one_step_reaction_based_on_fp
            |- reaction_type
               |- combine_fragments_and_generate_smiles
               |- replace_dummies_with_hydrogens
               |- replace_hydrogen_with_substituent
               |- split_molecule_at_bond
               |- Remove_2H
                  |- is_atom_in_double_bond
                  |- add_or_modify_bond
                  |- has_hydrogen_count
               |- Add_2H
               |- remove_additional_H
                  |- check_bad_valance_Hidx
               |- add_missing_H

|- remove_explicit_hydrogens
|- draw_molecule_with_atom_indices
|- GetIdxOfDummy
|- adjust_valence_by_removing_hydrogen

Acknowledgment

During the development of this package, Liu Huangrui from the South China Institute of Environmental Science offered essential support by conducting comprehensive tests on its functionality.

Note

Please note that the documentation is currently a work in progress, and there is more content that is being written. I apologize for any inconvenience this may cause, but rest assured that I am continually updating the documentation to provide you with the most comprehensive guide to using transformapy.

Metadata

Release files for transformapy 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for transformapy 0.0.6
File Size Uploaded
transformapy-0.0.6.zip 30.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for transformapy 0.0.6
File Interpreter ABI Platform
transformapy-0.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 56.2 kB

Release files / transformapy-0.0.6.zip

Download URL transformapy-0.0.6.zip
Size 30.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a6793d64ae9338075998c53e0f07925fa2063e379345c6f3f70873ddb15ed61d
BLAKE2b-256 checksum
How to use checksums
95fdb064ee5e3c5aa22ff6e74beeeeafc45e2ec47f24e2f690209bc50241bc21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.10

Release files / transformapy-0.0.6-py3-none-any.whl

Download URL transformapy-0.0.6-py3-none-any.whl
Size 25.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6f23c40af92771835b2ad5e6315e5b164ee2c92e17612ab981933d187a793c71
BLAKE2b-256 checksum
How to use checksums
56bd8074a56a881ff33f711de9611e1b7b29a1f45a8675635ed6483abf98b687
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.10

Release history Release notifications | RSS feed

This release

0.0.6 This release

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page