annotate customProDB.R @ 0:8ccfff69dd57 draft

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
author galaxyp
date Tue, 14 Mar 2017 14:14:38 -0400
parents
children ad130eaa3a05
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
1 #!/usr/bin/env Rscript
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
2
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
3 initial.options <- commandArgs(trailingOnly = FALSE)
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
4 script_parent_dir <- dirname(sub("--file=", "", initial.options[grep("--file=", initial.options)]))
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
5
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
6 ## begin warning handler
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
7 withCallingHandlers({
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
8
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
9 library(methods) # Because Rscript does not always do this
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
10
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
11 options('useFancyQuotes' = FALSE)
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
12
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
13 suppressPackageStartupMessages(library("optparse"))
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
14 suppressPackageStartupMessages(library("RGalaxy"))
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
15
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
16
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
17 option_list <- list()
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
18
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
19 option_list$bam <- make_option('--bam', type='character')
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
20 option_list$bai <- make_option('--bai', type='character')
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
21 option_list$vcf <- make_option('--vcf', type='character')
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
22 option_list$exon_anno <- make_option('--exon_anno', type='character')
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
23 option_list$proteinseq <- make_option('--proteinseq', type='character')
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
24 option_list$procodingseq <- make_option('--procodingseq', type='character')
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
25 option_list$ids <- make_option('--ids', type='character')
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
26 option_list$dbsnpinCoding <- make_option('--dbsnpinCoding', type='character')
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
27 option_list$cosmic <- make_option('--cosmic', type='character')
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
28 option_list$annotationFromHistory <- make_option('--annotationFromHistory', type='logical', action="store_true", default=FALSE)
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
29 option_list$rpkmCutoff <- make_option('--rpkmCutoff', type='character')
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
30 #option_list$outputIndels <- make_option('--outputIndels', type='logical', action="store_true", default=FALSE)
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
31 #option_list$outputNovelJunctions <- make_option('--outputNovelJunctions', type='logical', action="store_true", default=FALSE)
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
32 option_list$outputFile <- make_option('--outputFile', type='character')
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
33
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
34
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
35 opt <- parse_args(OptionParser(option_list=option_list))
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
36
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
37
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
38 customProDB <- function(
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
39 bam_file = GalaxyInputFile(required=TRUE),
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
40 bai_file = GalaxyInputFile(required=TRUE),
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
41 vcf_file = GalaxyInputFile(required=TRUE),
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
42 exon_anno_file = GalaxyInputFile(required=TRUE),
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
43 proteinseq_file = GalaxyInputFile(required=TRUE),
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
44 procodingseq_file = GalaxyInputFile(required=TRUE),
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
45 ids_file = GalaxyInputFile(required=TRUE),
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
46 dbsnpinCoding_file = GalaxyInputFile(required=FALSE),
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
47 cosmic_file = GalaxyInputFile(required=FALSE),
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
48 annotationFromHistory = GalaxyLogicalParam(required=FALSE),
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
49 rpkmCutoff = GalaxyNumericParam(required=TRUE),
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
50 #outputIndels = GalaxyLogicalParam(required=FALSE),
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
51 #outputNovelJunctions = GalaxyLogicalParam(required=FALSE),
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
52 outputFile = GalaxyOutput("FASTA","fasta"))
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
53 {
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
54 file.symlink(exon_anno_file, paste(getwd(), "exon_anno.RData", sep="/"))
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
55 file.symlink(proteinseq_file, paste(getwd(), "proseq.RData", sep="/"))
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
56 file.symlink(procodingseq_file, paste(getwd(), "procodingseq.RData", sep="/"))
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
57 file.symlink(ids_file, paste(getwd(), "ids.RData", sep="/"))
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
58
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
59 if (length(dbsnpinCoding_file) > 0)
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
60 {
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
61 file.symlink(dbsnpinCoding_file, paste(getwd(), "dbsnpinCoding.RData", sep="/"))
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
62 labelrsid = T
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
63 }
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
64 else
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
65 {
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
66 labelrsid = F
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
67 }
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
68
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
69 if (length(cosmic_file) > 0)
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
70 {
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
71 file.symlink(cosmic_file, paste(getwd(), "cosmic.RData", sep="/"))
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
72 cosmic = T
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
73 }
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
74 else
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
75 {
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
76 cosmic = F
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
77 }
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
78
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
79 bamLink = "input.bam"
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
80 file.symlink(bam_file, bamLink)
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
81 file.symlink(bai_file, paste(bamLink, ".bai", sep=""))
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
82
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
83 suppressPackageStartupMessages(library(customProDB))
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
84
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
85 easyRun(bamFile=bamLink, vcfFile=vcf_file, annotation_path=getwd(),
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
86 rpkm_cutoff=rpkmCutoff, outfile_path=".", outfile_name="output",
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
87 nov_junction=F, INDEL=T, lablersid=labelrsid, COSMIC=cosmic)
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
88 }
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
89
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
90
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
91 params <- list()
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
92 for(param in names(opt))
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
93 {
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
94 if (!param == "help")
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
95 params[param] <- opt[param]
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
96 }
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
97
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
98 setClass("GalaxyRemoteError", contains="character")
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
99 wrappedFunction <- function(f)
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
100 {
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
101 tryCatch(do.call(f, params),
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
102 error=function(e) new("GalaxyRemoteError", conditionMessage(e)))
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
103 }
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
104
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
105
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
106 suppressPackageStartupMessages(library(RGalaxy))
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
107 do.call(customProDB, params)
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
108
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
109 ## end warning handler
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
110 }, warning = function(w) {
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
111 cat(paste("Warning:", conditionMessage(w), "\n"))
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
112 invokeRestart("muffleWarning")
8ccfff69dd57 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/custom_pro_db commit 4bb5b663989d5f04e8fb74b111456f16d6edaa66
galaxyp
parents:
diff changeset
113 })