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
PS:The entry of At4g08850 in uniprot is Q8VZG8.
The entry of AT1G01050.1 in uniprot is Q93V56 The entry of AT5G47910 in uniprot is Q9FIJ0.