# HG changeset patch # User bornea # Date 1447958300 18000 # Node ID 9e0a894d26761ff6a6f68a534368ddfbf3a646dc # Parent e21be041278985b091aac5666f7816c42bf9fa93 Uploaded diff -r e21be0412789 -r 9e0a894d2676 pre_process_protein_name_set.R --- a/pre_process_protein_name_set.R Thu Nov 19 13:31:59 2015 -0500 +++ b/pre_process_protein_name_set.R Thu Nov 19 13:38:20 2015 -0500 @@ -26,7 +26,7 @@ library(VennDiagram) ##### #data -main <- function(peptides_file) { +main <- function(peptides_file, db_path) { peptides_file = read.delim(peptides_file,header=TRUE,stringsAsFactors=FALSE,fill=TRUE) peptides_txt = peptides_file intensity_columns = names(peptides_txt[,str_detect(names(peptides_txt),"Intensity\\.*")]) #Pulls out all lines with Intensity in them. @@ -36,7 +36,7 @@ peptides_txt_mapped = subset(peptides_txt_mapped,!is.na(Uniprot)) #removes reverse sequences and any that didn't match a uniprot accession columns_comb = c("Uniprot", intensity_columns) peptides_mapped_intensity = subset(peptides_txt_mapped, select = columns_comb) #Subsets out only the needed cloumns for Tukeys (Uniprot IDS and baited intensities) - swissprot_fasta = scan("/home/philip/galaxy/tools/Moffitt_Tools/uniprot_names.txt",what="character") + swissprot_fasta = scan(db_path, what="character") peptides_txt_mapped_log2 = peptides_mapped_intensity # Takes the log2 of the intensities. for (i in intensity_columns) { @@ -95,4 +95,4 @@ } args <- commandArgs(trailingOnly = TRUE) -main(args[1]) +main(args[1], args[2])