annotate goseq.r @ 5:49b3558dbf68 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 11d5198120837fa4eecb0bef8e2c04106eab63c2
author iuc
date Sat, 09 Feb 2019 09:06:20 -0500
parents 9e6226b6d2ad
children 85f3b5ab2bf8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
1 options( show.error.messages=F, error = function () { cat( geterrmessage(), file=stderr() ); q( "no", 1, F ) } )
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
2
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
3 # we need that to not crash galaxy with an UTF8 error on German LC settings.
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
4 loc <- Sys.setlocale("LC_MESSAGES", "en_US.UTF-8")
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
5
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
6 suppressPackageStartupMessages({
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
7 library("goseq")
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
8 library("optparse")
2
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
9 library("dplyr")
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
10 library("ggplot2")
0
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
11 })
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
12
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
13 option_list <- list(
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
14 make_option(c("-d", "--dge_file"), type="character", help="Path to file with differential gene expression result"),
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
15 make_option(c("-w","--wallenius_tab"), type="character", help="Path to output file with P-values estimated using wallenius distribution."),
2
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
16 make_option(c("-s","--sampling_tab"), type="character", default=FALSE, help="Path to output file with P-values estimated using sampling distribution."),
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
17 make_option(c("-n","--nobias_tab"), type="character", default=FALSE, help="Path to output file with P-values estimated using hypergeometric distribution and no correction for gene length bias."),
0
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
18 make_option(c("-l","--length_bias_plot"), type="character", default=FALSE, help="Path to length-bias plot."),
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
19 make_option(c("-sw","--sample_vs_wallenius_plot"), type="character", default=FALSE, help="Path to plot comparing sampling with wallenius p-values."),
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
20 make_option(c("-r", "--repcnt"), type="integer", default=100, help="Number of repeats for sampling"),
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
21 make_option(c("-lf", "--length_file"), type="character", default="FALSE", help = "Path to tabular file mapping gene id to length"),
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
22 make_option(c("-cat_file", "--category_file"), default="FALSE", type="character", help = "Path to tabular file with gene_id <-> category mapping."),
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
23 make_option(c("-g", "--genome"), default=NULL, type="character", help = "Genome [used for looking up correct gene length]"),
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
24 make_option(c("-i", "--gene_id"), default=NULL, type="character", help = "Gene ID format of genes in DGE file"),
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
25 make_option(c("-p", "--p_adj_method"), default="BH", type="character", help="Multiple hypothesis testing correction method to use"),
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
26 make_option(c("-cat", "--use_genes_without_cat"), default=FALSE, type="logical",
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
27 help="A large number of gene may have no GO term annotated. If this option is set to FALSE, genes without category will be ignored in the calculation of p-values(default behaviour). If TRUE these genes will count towards the total number of genes outside the tested category (default behaviour prior to version 1.15.2)."),
2
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
28 make_option(c("-plots", "--make_plots"), default=FALSE, type="logical", help="produce diagnostic plots?"),
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
29 make_option(c("-fc", "--fetch_cats"), default=NULL, type="character", help="Categories to get can include one or more of GO:CC, GO:BP, GO:MF, KEGG"),
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
30 make_option(c("-rd", "--rdata"), default=NULL, type="character", help="Path to RData output file."),
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
31 make_option(c("-tp", "--top_plot"), default=NULL, type="logical", help="Output PDF with top10 over-rep GO terms?")
0
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
32 )
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
33
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
34 parser <- OptionParser(usage = "%prog [options] file", option_list=option_list)
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
35 args = parse_args(parser)
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
36
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
37 # Vars:
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
38 dge_file = args$dge_file
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
39 category_file = args$category_file
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
40 length_file = args$length_file
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
41 genome = args$genome
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
42 gene_id = args$gene_id
3
d93aa41a7522 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 0798278a90c08228a386516881680b328fc33f0c
iuc
parents: 2
diff changeset
43 wallenius_tab = args$wallenius_tab
0
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
44 sampling_tab = args$sampling_tab
3
d93aa41a7522 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 0798278a90c08228a386516881680b328fc33f0c
iuc
parents: 2
diff changeset
45 nobias_tab = args$nobias_tab
0
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
46 length_bias_plot = args$length_bias_plot
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
47 sample_vs_wallenius_plot = args$sample_vs_wallenius_plot
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
48 repcnt = args$repcnt
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
49 p_adj_method = args$p_adj_method
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
50 use_genes_without_cat = args$use_genes_without_cat
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
51 make_plots = args$make_plots
2
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
52 rdata = args$rdata
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
53
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
54 if (!is.null(args$fetch_cats)) {
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
55 fetch_cats = unlist(strsplit(args$fetch_cats, ","))
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
56 } else {
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
57 fetch_cats = "Custom"
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
58 }
0
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
59
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
60 # format DE genes into named vector suitable for goseq
2
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
61 # check if header is present
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
62 first_line = read.delim(dge_file, header = FALSE, nrow=1)
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
63 second_col = toupper(first_line[, ncol(first_line)])
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
64 if (second_col == TRUE || second_col == FALSE) {
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
65 dge_table = read.delim(dge_file, header = FALSE, sep="\t")
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
66 } else {
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
67 dge_table = read.delim(dge_file, header = TRUE, sep="\t")
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
68 }
0
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
69 genes = as.numeric(as.logical(dge_table[,ncol(dge_table)])) # Last column contains TRUE/FALSE
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
70 names(genes) = dge_table[,1] # Assuming first column contains gene names
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
71
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
72 # gene lengths, assuming last column
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
73 if (length_file != "FALSE" ) {
2
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
74 first_line = read.delim(length_file, header = FALSE, nrow=1)
0
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
75 if (is.numeric(first_line[, ncol(first_line)])) {
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
76 length_table = read.delim(length_file, header=FALSE, sep="\t", check.names=FALSE)
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
77 } else {
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
78 length_table = read.delim(length_file, header=TRUE, sep="\t", check.names=FALSE)
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
79 }
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
80 row.names(length_table) = length_table[,1]
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
81 gene_lengths = length_table[names(genes),][,ncol(length_table)]
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
82 } else {
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
83 gene_lengths = getlength(names(genes), genome, gene_id)
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
84 }
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
85
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
86 # Estimate PWF
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
87
2
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
88 if (make_plots != 'false') {
0
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
89 pdf(length_bias_plot)
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
90 }
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
91 pwf=nullp(genes, genome = genome, id = gene_id, bias.data = gene_lengths, plot.fit=make_plots)
2
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
92 if (make_plots != 'false') {
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
93 dev.off()
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
94 }
0
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
95
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
96 # Fetch GO annotations if category_file hasn't been supplied:
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
97 if (category_file == "FALSE") {
2
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
98 go_map=getgo(genes = names(genes), genome=genome, id=gene_id, fetch.cats=fetch_cats)
0
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
99 } else {
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
100 # check for header: first entry in first column must be present in genes, else it's a header
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
101 first_line = read.delim(category_file, header = FALSE, nrow=1)
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
102 if (first_line[,1] %in% names(genes)) {
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
103 go_map = read.delim(category_file, header = FALSE)
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
104 } else {
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
105 go_map = read.delim(category_file, header= TRUE)
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
106 }
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
107 }
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
108
2
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
109 results <- list()
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
110
0
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
111 # wallenius approximation of p-values
3
d93aa41a7522 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 0798278a90c08228a386516881680b328fc33f0c
iuc
parents: 2
diff changeset
112 if (wallenius_tab != FALSE) {
0
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
113 GO.wall=goseq(pwf, genome = genome, id = gene_id, use_genes_without_cat = use_genes_without_cat, gene2cat=go_map)
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
114 GO.wall$p.adjust.over_represented = p.adjust(GO.wall$over_represented_pvalue, method=p_adj_method)
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
115 GO.wall$p.adjust.under_represented = p.adjust(GO.wall$under_represented_pvalue, method=p_adj_method)
2
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
116 write.table(GO.wall, args$wallenius_tab, sep="\t", row.names = FALSE, quote = FALSE)
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
117 results[['Wallenius']] <- GO.wall
0
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
118 }
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
119
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
120 # hypergeometric (no length bias correction)
3
d93aa41a7522 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 0798278a90c08228a386516881680b328fc33f0c
iuc
parents: 2
diff changeset
121 if (nobias_tab != FALSE) {
0
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
122 GO.nobias=goseq(pwf, genome = genome, id = gene_id, method="Hypergeometric", use_genes_without_cat = use_genes_without_cat, gene2cat=go_map)
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
123 GO.nobias$p.adjust.over_represented = p.adjust(GO.nobias$over_represented_pvalue, method=p_adj_method)
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
124 GO.nobias$p.adjust.under_represented = p.adjust(GO.nobias$under_represented_pvalue, method=p_adj_method)
2
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
125 write.table(GO.nobias, args$nobias_tab, sep="\t", row.names = FALSE, quote = FALSE)
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
126 results[['Hypergeometric']] <- GO.nobias
0
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
127 }
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
128
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
129 # Sampling distribution
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
130 if (repcnt > 0) {
2
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
131
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
132 # capture the sampling progress so it doesn't fill stdout
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
133 zz <- file("/dev/null", open = "wt")
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
134 sink(zz)
0
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
135 GO.samp=goseq(pwf, genome = genome, id = gene_id, method="Sampling", repcnt=repcnt, use_genes_without_cat = use_genes_without_cat, gene2cat=go_map)
2
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
136 sink()
4
9e6226b6d2ad planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 2dffcdff171ebf695ef0fc7eb8f8264f0d132115
iuc
parents: 3
diff changeset
137
0
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
138 GO.samp$p.adjust.over_represented = p.adjust(GO.samp$over_represented_pvalue, method=p_adj_method)
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
139 GO.samp$p.adjust.under_represented = p.adjust(GO.samp$under_represented_pvalue, method=p_adj_method)
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
140 write.table(GO.samp, sampling_tab, sep="\t", row.names = FALSE, quote = FALSE)
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
141 # Compare sampling with wallenius
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
142 if (make_plots == TRUE) {
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
143 pdf(sample_vs_wallenius_plot)
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
144 plot(log10(GO.wall[,2]), log10(GO.samp[match(GO.samp[,1],GO.wall[,1]),2]),
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
145 xlab="log10(Wallenius p-values)",ylab="log10(Sampling p-values)",
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
146 xlim=c(-3,0))
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
147 abline(0,1,col=3,lty=2)
2
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
148 dev.off()
0
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
149 }
2
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
150 results[['Sampling']] <- GO.samp
0
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
151 }
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
152
2
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
153 if (!is.null(args$top_plot)) {
3
d93aa41a7522 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 0798278a90c08228a386516881680b328fc33f0c
iuc
parents: 2
diff changeset
154 cats_title <- gsub("GO:","", args$fetch_cats)
2
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
155 # modified from https://bioinformatics-core-shared-training.github.io/cruk-summer-school-2018/RNASeq2018/html/06_Gene_set_testing.nb.html
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
156 pdf("top10.pdf")
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
157 for (m in names(results)) {
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
158 p <- results[[m]] %>%
4
9e6226b6d2ad planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 2dffcdff171ebf695ef0fc7eb8f8264f0d132115
iuc
parents: 3
diff changeset
159 top_n(10, wt=-over_represented_pvalue) %>%
2
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
160 mutate(hitsPerc=numDEInCat*100/numInCat) %>%
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
161 ggplot(aes(x=hitsPerc,
3
d93aa41a7522 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 0798278a90c08228a386516881680b328fc33f0c
iuc
parents: 2
diff changeset
162 y=substr(term, 1, 40), # only use 1st 40 chars of terms otherwise squashes plot
4
9e6226b6d2ad planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 2dffcdff171ebf695ef0fc7eb8f8264f0d132115
iuc
parents: 3
diff changeset
163 colour=over_represented_pvalue,
2
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
164 size=numDEInCat)) +
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
165 geom_point() +
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
166 expand_limits(x=0) +
4
9e6226b6d2ad planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 2dffcdff171ebf695ef0fc7eb8f8264f0d132115
iuc
parents: 3
diff changeset
167 labs(x="% DE in category", y="Category", colour="P value", size="Count", title=paste("Top over-represented categories in", cats_title), subtitle=paste(m, " method")) +
2
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
168 theme(plot.title = element_text(hjust = 0.5), plot.subtitle = element_text(hjust = 0.5))
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
169 print(p)
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
170 }
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
171 dev.off()
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
172 }
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
173
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
174 # Output RData file
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
175 if (!is.null(args$rdata)) {
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
176 save.image(file = "goseq_analysis.RData")
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
177 }
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
178
25e1e7b40e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 46c4278d292ab4d76dc5f3f74c3109c3179be7ef
iuc
parents: 0
diff changeset
179
0
084d77515343 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit b7dcd020c6a15fa55f392cc09cbc37580d6e75c4
iuc
parents:
diff changeset
180 sessionInfo()