Previous changeset 21:7ce59d092bae (2015-11-20) Next changeset 23:cb7223752458 (2016-01-29) |
Commit message:
Deleted selected files |
removed:
Bubblebeam_For_SAINT_wrapper.py Bubblebeam_For_SAINT_wrapper.xml bubbles_v9_NSAF_natural_log.R tool_dependencies.xml |
b |
diff -r 7ce59d092bae -r 503f1c1bac0c Bubblebeam_For_SAINT_wrapper.py --- a/Bubblebeam_For_SAINT_wrapper.py Fri Nov 20 12:04:24 2015 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
[ |
@@ -1,49 +0,0 @@ -import os -import sys -import time - - -list_file = sys.argv[1] -prey_file = sys.argv[2] -crapome = sys.argv[3] -color = sys.argv[4] -label = sys.argv[5] -cutoff = sys.argv[6] -mq_sc = sys.argv[7] -inc_file = sys.argv[8] -exc_file = sys.argv[9] -output_file_name = sys.argv[10] -bub_zoom_NSAF = sys.argv[11] -bub_zoom_SAINT =sys.argv[12] -bub_SAINT = sys.argv[13] -bub_NSAF = sys.argv[14] -ins_path =sys.argv[15] - -if crapome == "None": - crapome = "FALSE" - - -if label == "false": - label = "FALSE" -elif label == "true": - label = "TRUE" - -cmd = r"Rscript "+ str(ins_path) + r"/bubbles_v9_NSAF_natural_log.R " + str(list_file) + r" " + str(prey_file) + r" " + str(crapome) + r" " + str(color) + r" " + str(label) + r" " + str(cutoff) + r" " + str(mq_sc) + r" " + str(inc_file) + r" " + str(exc_file) -os.system(cmd) -time.sleep(3) - -open('./output.txt') -os.rename('output.txt', str(output_file_name)) - -open('./bubble_zoom_NSAF.png') -os.rename('bubble_zoom_NSAF.png', str(bub_zoom_NSAF)) - -open('./bubble_zoom_SAINT.png') -os.rename('bubble_zoom_SAINT.png', str(bub_zoom_SAINT)) - -open('./bubble_SAINT.png') -os.rename('bubble_SAINT.png', str(bub_SAINT)) - -open('./bubble_NSAF.png') -os.rename('bubble_NSAF.png', str(bub_NSAF)) - |
b |
diff -r 7ce59d092bae -r 503f1c1bac0c Bubblebeam_For_SAINT_wrapper.xml --- a/Bubblebeam_For_SAINT_wrapper.xml Fri Nov 20 12:04:24 2015 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
b |
@@ -1,132 +0,0 @@ -<tool id="Bubblebeam_For_SAINT" name="Bubblebeam For SAINT"> - <description></description> - <command interpreter="python">Bubblebeam_For_SAINT_wrapper.py $list_file $prey_file $crapome $color $label $cutoff $type $inc_file $exc_file $outfile $NSAF_zoom $SAINT_zoom $SAINT $NSAF \$INSTALL_RUN_PATH/</command> - <requirements> - <requirement type="set_environment">INSTALL_RUN_PATH</requirement> - <requirement type="package" version="3.2.1">package_r_3_2_1</requirement> - </requirements> - <inputs> - <param type="select" name="type" label="MaxQuant or Scaffold"> - <option value="MQ">MaxQuant</option> - <option value="SC">Scaffold</option> - </param> - <param format="txt" name="list_file" type="data" label="List File"/> - <param format="txt" name="prey_file" type="data" label="Prey File"/> - <param format="txt" name="crapome" type="data" label="Crapome File" optional="true"/> - <param name="color" type="select" label="Color"> - <option value="crapome">Crapome</option> - <option value="red">Red</option> - <option value="blue">Blue</option> - </param> - <param type="boolean" name="label" checked="true" label="Use Labels"/> - <param type="float" name="cutoff" label="SAINT Score Cutoff" help="Select a value between 0 and 1 written like 0.8." value="0.8"/> - <param format="txt" name="inc_file" type="data" label="List of Uniprot IDs to Include" optional="true"/> - <param format="txt" name="exc_file" type="data" label="List of Uniprot IDs to Include" optional="true"/> - </inputs> - <outputs> - <data format="txt" name="outfile" label="Outfile"/> - <data format="png" name="NSAF_zoom" label="Zoom NSAF" /> - <data format="png" name="SAINT_zoom" label="Zoom SAINT" /> - <data format="png" name="NSAF" label="NSAF" /> - <data format="png" name="SAINT" label="SAINT" /> - </outputs> - <stdio> - <regex match="error" - source="stdout" - level="fatal" - description="Unknown error"/> - </stdio> - - <tests> - <test> - <param name="input" value="fa_gc_content_input.fa"/> - <output name="out_file1" file="fa_gc_content_output.txt"/> - </test> - </tests> - <help> -Post-processing: -Once SAINTexpress has been run, APOSTL is able to read the resulting "list.txt" file. Fromhere APOSTL does a number of things: - -APOSTL calculates NSAF values for each prey based on the average spectra observed for each bait - -OPTIONAL: APOSTL calculates the probability of a specific interaction based on prey revalence in the CRAPome - -Bubble graphs are generated for each bait where: - -- x axis is the natural log of the NSAF values - -- y axis is the observed log2 fold change (as compared to control) - -- bubble radius is proportional to the average observed spectra - -OPTIONAL: bubble color corresponds to the CRAPome probability of a specific interaction in which an 80% cutoff is applied where prey with less than 80% are colored tan - -APOSTL queries ConsensusPathDB for protein-protein interactions within your data and then formats the resulting network for simple cytoscape import using the "import network from file" option. - -INPUTS: - -List File: - -- SAINTexpress generated "list.txt" file - -Prey File: - -- SAINT pre-processing generated "prey.txt" file used to run SAINTexpress - -Crapome File: - -- raw output from Crapome Workflow 1 query (http://www.crapome.org) - -Color: - -- Specify the color of the bubbles within the graph. - -- If "crapome" is chosen and 'crapome' file is specified, bubbles will be color based on crapome specificity - -Use labels: - -- Adds gene name labels to bubbles within the "zoomed in" graphs -SAINT Score Cutoff: - -- Choose Saintscore cutoff (between 0-1) to be used for filtering the "zoomed in" graphs (default = 0.8) - -- Also used for filtering during the generation of the cytoscape network - -Species: - -- Human, mouse, or yeast - -Interaction Confidence: - -- Interaction confidence value (0-1) used to filter the interactions with the ConsensusPathDB database - -- Suggestions: - -* low: 0 - -* medium: 0.5 - -* high: 0.7 - -* very high: 0.9 - -OUTPUTS: - -Bubble Graphs: - -- Unfiltered Data: - -* NSAF v. Log2(FoldChange) - -* SAINTscore v. Log2(FoldChange) - -- Filtered by SAINT Score - -* NSAF v. Log2(FoldChange) - -* SAINTscore v. Log2(FoldChange) - -Output.txt -- SAINTexpress "list.txt" output with additional columns that were used during the analysis - </help> -</tool> |
b |
diff -r 7ce59d092bae -r 503f1c1bac0c bubbles_v9_NSAF_natural_log.R --- a/bubbles_v9_NSAF_natural_log.R Fri Nov 20 12:04:24 2015 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
[ |
b'@@ -1,252 +0,0 @@\n-rm(list=ls())\r\n-###################################################################################################\r\n-# R-code: Multi-bubble graph generation from SAINTexpress output\r\n-# Author: Brent Kuenzi\r\n-###################################################################################################\r\n-ins_check_run <- function(){\r\n- if (\'dplyr\' %in% rownames(installed.packages())){}\r\n- else {\r\n- install.packages(\'dplyr\', repos=\'http://cran.us.r-project.org\')\r\n- }\r\n- if (\'tidyr\' %in% rownames(installed.packages())){}\r\n- else {\r\n- install.packages(\'tidyr\', repos=\'http://cran.us.r-project.org\')\r\n- }\r\n- if (\'ggplot2\' %in% rownames(installed.packages())){}\r\n- else {\r\n- install.packages(\'ggplot2\', repos=\'http://cran.us.r-project.org\')\r\n- }\r\n-}\r\n-ins_check_run()\r\n-library(dplyr); library(tidyr); library(ggplot2)\r\n-###################################################################################################\r\n-### Run program ###\r\n-\r\n-## REQUIRED INPUT ##\r\n-# 1) listfile: SAINTexpress generated "list.txt" file\r\n-# 2) preyfile: SAINT pre-processing generated "prey.txt" file used to run SAINTexpress\r\n-## OPTIONAL INPUT ##\r\n-# 3) crapome: raw output from crapome Workflow 1 query (http://www.crapome.org)\r\n-# 4) color: bubble color (default = "red")\r\n-# - color= "crapome": color bubbles based on Crapome(%)\r\n-# - Also recognizes any color within R\'s built-in colors() vector\r\n-# 5) label: Adds gene name labels to bubbles within the "zoomed in" graphs (default = FALSE)\r\n-# 6) cutoff: Saintscore cutoff to be assigned for filtering the "zoomed in" graphs (default = 0.8)\r\n-###################################################################################################\r\n-main <- function(listfile, preyfile , crapome=FALSE, color="red", label=FALSE, cutoff=0.8, type="SC", inc_file = "None", exc_file = "None" ) {\r\n- cutoff_check(cutoff)\r\n- listfile <- list_type(listfile, inc_file, exc_file)\r\n- if(type == "SC") {\r\n- df <- merge_files_sc(listfile, preyfile, crapome)\r\n- }\r\n- if(type == "MQ") {\r\n- df <- merge_files_mq(listfile, preyfile, crapome)\r\n- }\r\n- bubble_NSAF(df,color)\r\n- bubble_SAINT(df,color)\r\n- bubble_zoom_SAINT(df, color, label, cutoff)\r\n- bubble_zoom_NSAF(df, color, label, cutoff)\r\n- write.table(df,"output.txt",sep="\\t",quote=FALSE, row.names=FALSE)\r\n-}\r\n-\r\n-list_type <- function(df, inc_file, exc_file) {\r\n- Saint <- read.delim(df, stringsAsFactors=FALSE)\r\n- if (inc_file != "None") {\r\n- if (exc_file == "None"){\r\n- inc_prots <- read.delim(inc_file, sep=\'\\t\', header=FALSE, stringsAsFactors=FALSE)\r\n- print(inc_prots[,1])\r\n- print(Saint$Prey)\r\n- filtered_df = subset(Saint, Saint$Prey == inc_prots[,1])\r\n- }\r\n- else {\r\n- inc_prots <- read.delim(inc_file, sep=\'\\t\', header=FALSE, stringsAsFactors=FALSE)\r\n- exc_prots <- read.delim(exc_file, sep=\'\\t\', header=FALSE, stringsAsFactors=FALSE)\r\n- filtered_df = subset(Saint, Saint$Prey == inc_prots[,1])\r\n- filtered_df = subset(filtered_df, filtered_df$Prey != exc_prots[,1])\r\n- }\r\n- }\r\n- else if (exc_file != "None") {\r\n- exc_prots <- read.delim(exc_file, sep=\'\\t\', header=FALSE, stringsAsFactors=FALSE)\r\n- filtered_df = subset(Saint, Saint$Prey != exc_prots[,1])\r\n- }\r\n- else {\r\n- filtered_df = Saint\r\n- }\r\n- return(filtered_df)\r\n- \r\n-}\r\n-###################################################################################################\r\n-# Merge input files and caculate Crapome(%) and NSAF for each protein for each bait\r\n-###################################################################################################\r\n-merge_files_mq <- function(SAINT, prey_DF, crapome=FALSE) {\r\n- #SAINT <- read.table(SAINT_DF, sep=\'\\t\', header=TRUE)\r\n- prey <- read.table(prey_DF, sep=\'\\t\', header=FALSE); colnames(prey) <- c("Prey", "Length", "PreyGene")\r\n- DF <- merge(SAINT,prey)\r\n- DF$SpecSum <- log2(DF$SpecSum)\r\n- \r\n- if(crapome!=FALSE) {\r\n- crapome <- read.table(c'..b' +\r\n- scale_size(range=c(1,10)) + ggtitle("Filtered on SAINT score") + \r\n- geom_point(aes(x=SaintScore,y=log2(FoldChange), size=SpecSum), colour="black", shape=21, data=a)\r\n- if(label==TRUE & length(a$NSAF!=0)) {\r\n- p <- p + geom_text(data=a, aes(label=PreyGene, size=10, vjust=0, hjust=0),colour="black", show_guide=FALSE)\r\n- }\r\n- if(length(levels(data$Bait) > 1)) {p <- p + facet_wrap(~Bait, scales="free_y")}\r\n- return(ggsave(p, width=8,height=4,filename = "bubble_zoom_SAINT.png"))\r\n- }\r\n-}\r\n-###################################################################################################\r\n-# Filter proteins on Saintscore cutoff and plot for each bait x=log(NSAF), y=Log2(FoldChange)\r\n-###################################################################################################\r\n-bubble_zoom_NSAF <- function(data, color, label=FALSE, cutoff=0.8) {\r\n- if(color=="crapome") {\r\n- a <- subset(data, CrapomePCT <80 & SaintScore>=cutoff, select = c(NSAF,SpecSum, CrapomePCT, FoldChange, SaintScore, Bait, PreyGene))\r\n- b <- subset(data, CrapomePCT >=80 & SaintScore >=cutoff, select = c(NSAF,SpecSum, CrapomePCT, FoldChange, SaintScore, Bait, PreyGene))\r\n- p <- qplot(x=log(NSAF), y=log2(FoldChange), data=a, colour=I("tan"),size=SpecSum) + \r\n- scale_size(range=c(1,10)) + ggtitle("Filtered on SAINT score") + \r\n- geom_point(aes(x=log(NSAF),y=log2(FoldChange), size=SpecSum), colour="black", shape=21, data=a)\r\n- if(label==TRUE & length(a$NSAF!=0)) {\r\n- p <- p + geom_text(data=a, aes(label=PreyGene, size=10, vjust=0, hjust=0),colour="black")\r\n- }\r\n- if(length(levels(a$Bait) > 1)) {p <- p + facet_wrap(~Bait, scales="free_y")}\r\n- p <- p + geom_point(aes(x=log(NSAF),y=log2(FoldChange), size=SpecSum, color=CrapomePCT), data=b) + \r\n- scale_colour_gradient(limits=c(80, 100), low="tan", high="red") + \r\n- labs(colour="CRAPome Probability \\nof Specific Interaction (%)", x="ln(NSAF)") + \r\n- geom_point(aes(x=log(NSAF),y=log2(FoldChange), size=SpecSum), colour="black", shape=21, data=b)\r\n- if(label==TRUE & length(b$NSAF!=0)) {\r\n- p <- p + geom_text(data=b, aes(label=PreyGene, size=10, vjust=0, hjust=0),colour="black", show_guide=FALSE)\r\n- }\r\n- return(ggsave(p, width=8,height=4,filename = "bubble_zoom_NSAF.png"))\r\n- }\r\n- if(color != "crapome") {\r\n- a <- subset(data, SaintScore>=cutoff, select = c(NSAF,SpecSum, FoldChange, SaintScore, Bait, PreyGene))\r\n- p <- qplot(x=log(NSAF), y=log2(FoldChange), data=a, colour=I(color), size=SpecSum) +\r\n- scale_size(range=c(1,10)) + ggtitle("Filtered on SAINT score") + \r\n- geom_point(aes(x=log(NSAF),y=log2(FoldChange), size=SpecSum), colour="black", shape=21, data=a) + \r\n- labs(x="ln(NSAF)")\r\n- if(label==TRUE & length(a$NSAF!=0)) {\r\n- p <- p + geom_text(data=a, aes(label=PreyGene, size=10, vjust=0, hjust=0),colour="black", show_guide=FALSE)\r\n- }\r\n- if(length(levels(data$Bait) > 1)) {p <- p + facet_wrap(~Bait, scales="free_y")}\r\n- return(ggsave(p, width=8,height=4,filename = "bubble_zoom_NSAF.png"))\r\n- }\r\n-}\r\n-###################################################################################################\r\n-# Check Saintscore cutoff and stop program if not between 0 and 1\r\n-###################################################################################################\r\n-cutoff_check <- function(cutoff){\r\n- if( any(cutoff < 0 | cutoff > 1) ) stop(\'SAINT score cutoff not between 0 and 1. Please correct and try again\')\r\n-}\r\n-\r\n-\r\n-\r\n-args <- commandArgs(trailingOnly = TRUE)\r\n-main(args[1],args[2],args[3],args[4],args[5],args[6],args[7],args[8],args[9])\r\n-\r\n-#main("test_list.txt", "preytest.txt", crapome="craptest.txt", color="crapome", label=TRUE)\r\n-#main("Crizo_list.txt", "prey_cr.txt", crapome = "crizo_crap.txt", color="crapome", label=TRUE, cutoff=0.7)\r\n-#main("test_list.txt", "preytest.txt", crapome=FALSE, color="magenta", label=FALSE, cutoff=1.1)\n\\ No newline at end of file\n' |
b |
diff -r 7ce59d092bae -r 503f1c1bac0c tool_dependencies.xml --- a/tool_dependencies.xml Fri Nov 20 12:04:24 2015 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
b |
@@ -1,11 +0,0 @@ -<?xml version="1.0"?> -<tool_dependency> - <install version="1.0"> - <package name="package_r_3_2_1" version="3.2.1"> - <repository toolshed="toolshed.g2.bx.psu.edu" name="package_r_3_2_1" owner="iuc" changeset_revision="fae49a02a848" prior_installation_required="True"/> - </package> - </install> - <set_environment version="1.0"> - <environment_variable name="INSTALL_RUN_PATH" action="set_to">$REPOSITORY_INSTALL_DIR</environment_variable> - </set_environment> -</tool_dependency> \ No newline at end of file |