Skip to content

How to use the code to analysis the data search from tair? #122

Open

Description

@manni227

Code:
library(MSstatsPTM)
library(MSstats)
library(data.table)

path_pro <- "/Users/PRO_1.tsv"
path_phos <- "/Users/PHOS_2.tsv"
path_fasta <- "/Users?TAIR10_pep.txt"

raw_ptm_df <- fread(path_phos)
raw_protein_df <- fread(path_pro)

ptm_proteins <- unique(raw_ptm_df$PG.ProteinAccessions)
raw_protein_df <- raw_protein_df[PG.ProteinAccessions %in% ptm_proteins, ]

raw_ptm_df[is.na(R.Replicate) | R.Replicate == "" | R.Replicate == 0, R.Replicate := R.FileName]
raw_protein_df[is.na(R.Replicate) | R.Replicate == "" | R.Replicate == 0, R.Replicate := R.FileName]

gc()

annot <- unique(rbind(
raw_ptm_df[, .(Run = R.FileName, Condition = R.Condition, BioReplicate = R.Replicate)],
raw_protein_df[, .(Run = R.FileName, Condition = R.Condition, BioReplicate = R.Replicate)]
))

msstats_input <- SpectronauttoMSstatsPTMFormat(
raw_ptm_df,
annotation = annot,
protein_input = raw_protein_df,
fasta_path = path_fasta,
use_unmod_peptides = TRUE,
mod_id = "\[Phospho \(STY\)\]",
fasta_protein_name = "uniprot_iso"
)

Error in [.data.table(data, , c(protein_name_col, unmod_pep_col, mod_pep_col, :
column not found: [Start]

PRO_1.tsv
TAIR10_pep.txt
PHOS_1.tsv

Activity

  1. tonywu1999 commented on Jan 14, 2026

    @tonywu1999
    Contributor

    Hi @manni227

    To assist us, can you provide a link to a uniprot entry for your protein of interest in your dataset (e.g. AT1G01050.1)? And did you download this FASTA via uniprot or somewhere else?

    If you run:

    path_fasta <- "/Users?TAIR10_pep.txt"
    fasta_df = MSstatsPTM::tidyFasta(path_fasta)
    

    You'll see that the code parses the FASTA file such that AT1G01050.1 corresponds to the uniprot ID T1G010, which I believe is incorrect (but would need confirmation of the uniprot entry to make the code fix).

  2. tonywu1999 commented on Jan 28, 2026

    @tonywu1999
    Contributor

    @manni227

    If you need more help, could you start a conversation on our msstats google groups page? We check that google groups page more periodically.

  3. manni227 commented on Feb 4, 2026

    @manni227
    Author
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions