Skip to main content

A utility package that can be used to upload data to a curtain backend server.

Project description

CurtainUtils

A utility package for converting different MS output files into a format usable by Curtain (https://curtain.proteo.info) and CurtainPTM (https://curtainptm.proteo.info).

Table of Contents

Installation

The package can be installed using the following command:

pip install curtainutils

Prerequisites

  • Python 3.6 or higher
  • pip package manager

Usage

Convert MSFragger PTM single site output to CurtainPTM input

This script should be used to convert a differential analysis file that contains the index column and peptide column. The index column should also be the original index column output by MS-Fragger that contains both the Accession ID as well as the position of the PTM within the protein sequence.

msf-curtainptm -f <MSFragger PTM single site output file> -i <index column with site information> -o <output file> -p <peptide column> -a <fasta file>

Convert DIA-NN PTM output to CurtainPTM input

This script should be used to convert a differential analysis file that contains the following columns: "Modified.Sequence", "Precursor.Id", "Protein.Group" from the pr report file by combining the file with the Report file which contains the column "PTM.Site.Confidence".

diann-curtainptm -p <differential analysis file> -r <report file> -o <output file> -m <modification_of_interests from the Modified.Sequence column>

Convert Spectronaut output to Curtain input

This script should be used to convert a differential analysis file that contains the "PTM_collapse_key" and "PEP.StrippedSequence" columns from the original Spectronaut output.

spn-curtainptm -f <differential analysis file> -o <output file>

Submit data to a Curtain server

from curtainutils.client import CurtainClient

de_file = r"differential-file-path"
raw_file = r"raw-file-path"

fc_col = "foldchange-column-name"
transform_fc = False
transform_significant = False
reverse_fc = False
p_col = "significance-column-name"

comp_col = ""  # Leave empty if no comparison column is used
comp_select = []  # Leave empty if no comparison column is used

primary_id_de_col = "primary-id-column-name-in-differential-file"
primary_id_raw_col = "primary-id-column-name-in-raw-file"

sample_cols = ["4Hr-AGB1.01", "4Hr-AGB1.02", "4Hr-AGB1.03", "4Hr-AGB1.04", "4Hr-AGB1.05", "24Hr-AGB1.01",
               "24Hr-AGB1.02", "24Hr-AGB1.03", "24Hr-AGB1.04", "24Hr-AGB1.05", "4Hr-Cis.01", "4Hr-Cis.02", "4Hr-Cis.03",
               "24Hr-Cis.01", "24Hr-Cis.02", "24Hr-Cis.03"]
c = CurtainClient("curtain-backend-url")
payload = c.create_curtain_session_payload(
    de_file,
    raw_file,
    fc_col,
    transform_fc,
    transform_significant,
    reverse_fc,
    p_col,
    comp_col,
    comp_select,
    primary_id_de_col,
    primary_id_raw_col,
    sample_cols
)

package = {
    "enable": "True",
    "description": payload["settings"]["description"],
    "curtain_type": "TP",
}

result = c.post_curtain_session(package, payload)
print(result)

Submit data to a CurtainPTM server

from curtainutils.client import CurtainClient

de_file = r"differential-file-path"
raw_file = r"raw-file-path"

fc_col = "foldchange-column-name"
transform_fc = False
transform_significant = False
reverse_fc = False
p_col = "significance-column-name"
comp_col = ""  # Leave empty if no comparison column is used
comp_select = []  # Leave empty if no comparison column is used
primary_id_de_col = "primary-id-column-name-in-differential-file"
primary_id_raw_col = "primary-id-column-name-in-raw-file"
sample_cols = []
peptide_col = "peptide-sequence-column-name"
acc_col = "protein-accession-column-name"
position_col = "position-in-protein-column-name"
position_in_peptide_col = "position-in-peptide-column-name"
sequence_window_col = "sequence-window-column-name"
score_col = "score-column-name"

c = CurtainClient("curtain-backend-url")

payload = c.create_curtain_ptm_session_payload(
    de_file,
    raw_file,
    fc_col,
    transform_fc,
    transform_significant,
    reverse_fc,
    p_col,
    comp_col,
    comp_select,
    primary_id_de_col,
    primary_id_raw_col,
    sample_cols,
    peptide_col,
    acc_col,
    position_col,
    position_in_peptide_col,
    sequence_window_col,
    score_col
)

package = {
    "enable": "True",
    "description": payload["settings"]["description"],
    "curtain_type": "PTM",
}

result = c.post_curtain_session(package, payload)
print(result)

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

curtainutils-0.1.18.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

curtainutils-0.1.18-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file curtainutils-0.1.18.tar.gz.

File metadata

  • Download URL: curtainutils-0.1.18.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.11 Windows/10

File hashes

Hashes for curtainutils-0.1.18.tar.gz
Algorithm Hash digest
SHA256 a1636a7a9a1872e2a5349d1fb9a07959f87775a85d439a683d08456c10bb92ec
MD5 1cd058566d93df828288739e069c76d2
BLAKE2b-256 e9c494b0204d7ee0d6f8c6444668da82e6cb40cbf84a3fcede50db4171be5599

See more details on using hashes here.

File details

Details for the file curtainutils-0.1.18-py3-none-any.whl.

File metadata

  • Download URL: curtainutils-0.1.18-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.11 Windows/10

File hashes

Hashes for curtainutils-0.1.18-py3-none-any.whl
Algorithm Hash digest
SHA256 216ecf67f84c79140ae443c8fa4b2bf7985f5cd9e8a31be5a5d3269c55f03059
MD5 2e636a365ec3f014a88b4c7ed54f07fd
BLAKE2b-256 5d6d97e47f48b078c34195e803aa3ce9208209c41e98e27de9fab565005c58f5

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