Mercurial > repos > eschen42 > mqppep_preproc
comparison MaxQuantProcessingScript.R @ 23:7560a4e80a1e draft
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/mqppep commit 0c7ca054e77e042c8a584c9903073da064df7d8b
author | eschen42 |
---|---|
date | Thu, 30 Jun 2022 16:15:57 +0000 |
parents | 36f183e5e4ed |
children | 29775869faba |
comparison
equal
deleted
inserted
replaced
22:43f1fd0ff86b | 23:7560a4e80a1e |
---|---|
84 vector() # keep track of phosphorylation positions in peptide | 84 vector() # keep track of phosphorylation positions in peptide |
85 score_diff <- "" | 85 score_diff <- "" |
86 for (chara in phosphoprobsequence) { | 86 for (chara in phosphoprobsequence) { |
87 # build peptide sequence | 87 # build peptide sequence |
88 if (!( | 88 if (!( |
89 chara == " " | | 89 chara == " " || |
90 chara == "(" | | 90 chara == "(" || |
91 chara == ")" | | 91 chara == ")" || |
92 chara == "." | | 92 chara == "." || |
93 chara == "-" | | 93 chara == "-" || |
94 chara == "0" | | 94 chara == "0" || |
95 chara == "1" | | 95 chara == "1" || |
96 chara == "2" | | 96 chara == "2" || |
97 chara == "3" | | 97 chara == "3" || |
98 chara == "4" | | 98 chara == "4" || |
99 chara == "5" | | 99 chara == "5" || |
100 chara == "6" | | 100 chara == "6" || |
101 chara == "7" | | 101 chara == "7" || |
102 chara == "8" | | 102 chara == "8" || |
103 chara == "9") | 103 chara == "9") |
104 ) { | 104 ) { |
105 phosphopeptide <- paste(phosphopeptide, chara, sep = "") | 105 phosphopeptide <- paste(phosphopeptide, chara, sep = "") |
106 counter <- counter + 1 | 106 counter <- counter + 1 |
107 } | 107 } |
108 # generate score_diff | 108 # generate score_diff |
109 if (chara == "-" | | 109 if (chara == "-" || |
110 chara == "." | | 110 chara == "." || |
111 chara == "0" | | 111 chara == "0" || |
112 chara == "1" | | 112 chara == "1" || |
113 chara == "2" | | 113 chara == "2" || |
114 chara == "3" | | 114 chara == "3" || |
115 chara == "4" | | 115 chara == "4" || |
116 chara == "5" | | 116 chara == "5" || |
117 chara == "6" | | 117 chara == "6" || |
118 chara == "7" | | 118 chara == "7" || |
119 chara == "8" | | 119 chara == "8" || |
120 chara == "9" | 120 chara == "9" |
121 ) { | 121 ) { |
122 score_diff <- paste(score_diff, chara, sep = "") | 122 score_diff <- paste(score_diff, chara, sep = "") |
123 } | 123 } |
124 # evaluate score_diff | 124 # evaluate score_diff |
386 # --- | 386 # --- |
387 full_data <- | 387 full_data <- |
388 read.table( | 388 read.table( |
389 file = input_file_name, | 389 file = input_file_name, |
390 sep = "\t", | 390 sep = "\t", |
391 header = T, | 391 header = TRUE, |
392 quote = "" | 392 quote = "" |
393 ) | 393 ) |
394 | 394 |
395 # Filter out contaminant rows and reverse rows | 395 # Filter out contaminant rows and reverse rows |
396 filtered_data <- subset(full_data, !grepl("CON__", Proteins)) | 396 filtered_data <- subset(full_data, !grepl("CON__", Proteins)) |