comparison add_protein_features.R @ 8:aca66c3b8fbb draft

planemo upload commit 3e8aad84b7fe9218370364b1aef3ea5779475f9f-dirty
author proteore
date Fri, 10 May 2019 03:59:23 -0400
parents bb4a5f1b415f
children 564e620ba3cb
comparison
equal deleted inserted replaced
7:69c70e45d5ab 8:aca66c3b8fbb
192 } else { 192 } else {
193 res <- get_nextprot_info(nextprot,NextprotID,pc_features,localization,diseases_info) 193 res <- get_nextprot_info(nextprot,NextprotID,pc_features,localization,diseases_info)
194 res = res[!duplicated(res$NextprotID),] 194 res = res[!duplicated(res$NextprotID),]
195 output_content = merge(file, res,by.x=ncol,by.y="NextprotID",incomparables = NA,all.x=T) 195 output_content = merge(file, res,by.x=ncol,by.y="NextprotID",incomparables = NA,all.x=T)
196 output_content = order_columns(output_content,ncol,id_type,file) 196 output_content = order_columns(output_content,ncol,id_type,file)
197 output_content = output_content[,-which(colnames(output_content)=="NextprotID")] #remove nextprotID column 197 if (id_type=="Uniprot_AC"){output_content = output_content[,-which(colnames(output_content)=="NextprotID")]} #remove nextprotID column
198 output_content <- as.data.frame(apply(output_content, c(1,2), function(x) gsub("^$|^ $", NA, x))) #convert "" et " " to NA 198 output_content <- as.data.frame(apply(output_content, c(1,2), function(x) gsub("^$|^ $", NA, x))) #convert "" et " " to NA
199 write.table(output_content, output, row.names = FALSE, sep = "\t", quote = FALSE) 199 write.table(output_content, output, row.names = FALSE, sep = "\t", quote = FALSE)
200 } 200 }
201 201
202 } 202 }