Skip to content

Commit

Permalink
docs(progenesis): Add sample input data from Progenesis for converter
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony Wu committed Jul 15, 2024
1 parent c516b99 commit f3d9db0
Show file tree
Hide file tree
Showing 6 changed files with 179 additions and 25 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ biocViews: ImmunoOncology, MassSpectrometry, Proteomics, Software, DifferentialE
BugReports: https://github.com/Vitek-Lab/MSstatsPTM/issues
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
25 changes: 13 additions & 12 deletions R/converters.R
Original file line number Diff line number Diff line change
Expand Up @@ -929,18 +929,19 @@ PDtoMSstatsPTMFormat = function(input,
#' required by MSstatsPTM.
#' @examples
#'
#' # Example annotation file
#' annotation = data.frame('Condition' = c('Control', 'Control', 'Control',
#' 'Treatment', 'Treatment', 'Treatment'),
#' 'BioReplicate' = c(1,2,3,4,5,6),
#' 'Run' = c('prot_run_1', 'prot_run_2', 'prot_run_3',
#' 'phos_run_1', 'phos_run_2', 'phos_run_3'),
#' 'Type' = c("Protein", "Protein", "Protein", "PTM",
#' "PTM", "PTM"))
#'
#' # The output should be in the following format.
#' head(raw.input$PTM)
#' head(raw.input$PROTEIN)
#' input = system.file("tinytest/raw_data/Progenesis/progenesis_peptide.csv",
#' package = "MSstatsPTM")
#' input = data.table::fread(input)
#' colnames(input) = unlist(input[1,])
#' input = input[-1,]
#' annot = system.file("tinytest/raw_data/Progenesis/phospho_annotation.csv",
#' package = "MSstatsPTM")
#' annot = data.table::fread(annot)
#' prog_imported = ProgenesistoMSstatsPTMFormat(
#' input,
#' annot
#' )
#' head(prog_imported$PTM)
ProgenesistoMSstatsPTMFormat = function(ptm_input,
annotation,
global_protein_input = FALSE,
Expand Down
10 changes: 10 additions & 0 deletions inst/tinytest/raw_data/Progenesis/phospho_annotation.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Run,Condition,BioReplicate,Type
001_PH003_G23,A,S1,PTM
002_PH003_G23,B,S2,PTM
003_PH003_G23,A,S3,PTM
004_PH003_G23,A,S4,PTM
005_PH003_G23,B,S5,PTM
006_PH003_G23,B,S6,PTM
007_PH003_G23,C,S7,PTM
008_PH003_G23,C,S8,PTM
009_PH003_G23,C,S9,PTM
Loading

0 comments on commit f3d9db0

Please sign in to comment.