Mercurial > repos > galaxyp > custom_pro_db
comparison customProDB.R @ 9:328a1e3b5261 draft
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot/customProDB commit 98f3323d4b92a4a3668788b3e1bad1a6529fd6df-dirty
author | galaxyp |
---|---|
date | Wed, 08 Jun 2016 14:04:54 -0400 |
parents | fa6aa0d5a27c |
children | 982fb2cde6c5 |
comparison
equal
deleted
inserted
replaced
8:fa6aa0d5a27c | 9:328a1e3b5261 |
---|---|
21 option_list$vcf <- make_option('--vcf', type='character') | 21 option_list$vcf <- make_option('--vcf', type='character') |
22 option_list$exon_anno <- make_option('--exon_anno', type='character') | 22 option_list$exon_anno <- make_option('--exon_anno', type='character') |
23 option_list$proteinseq <- make_option('--proteinseq', type='character') | 23 option_list$proteinseq <- make_option('--proteinseq', type='character') |
24 option_list$procodingseq <- make_option('--procodingseq', type='character') | 24 option_list$procodingseq <- make_option('--procodingseq', type='character') |
25 option_list$ids <- make_option('--ids', type='character') | 25 option_list$ids <- make_option('--ids', type='character') |
26 option_list$dbsnpinCoding <- make_option('--dbsnpinCoding', type='character') | |
27 option_list$cosmic <- make_option('--cosmic', type='character') | |
28 option_list$annotationFromHistory <- make_option('--annotationFromHistory', type='logical', action="store_true", default=FALSE) | |
26 option_list$rpkmCutoff <- make_option('--rpkmCutoff', type='character') | 29 option_list$rpkmCutoff <- make_option('--rpkmCutoff', type='character') |
30 #option_list$outputIndels <- make_option('--outputIndels', type='logical', action="store_true", default=FALSE) | |
31 #option_list$outputNovelJunctions <- make_option('--outputNovelJunctions', type='logical', action="store_true", default=FALSE) | |
27 option_list$outputFile <- make_option('--outputFile', type='character') | 32 option_list$outputFile <- make_option('--outputFile', type='character') |
28 | 33 |
29 | 34 |
30 opt <- parse_args(OptionParser(option_list=option_list)) | 35 opt <- parse_args(OptionParser(option_list=option_list)) |
31 | 36 |
35 bai_file = GalaxyInputFile(required=TRUE), | 40 bai_file = GalaxyInputFile(required=TRUE), |
36 vcf_file = GalaxyInputFile(required=TRUE), | 41 vcf_file = GalaxyInputFile(required=TRUE), |
37 exon_anno_file = GalaxyInputFile(required=TRUE), | 42 exon_anno_file = GalaxyInputFile(required=TRUE), |
38 proteinseq_file = GalaxyInputFile(required=TRUE), | 43 proteinseq_file = GalaxyInputFile(required=TRUE), |
39 procodingseq_file = GalaxyInputFile(required=TRUE), | 44 procodingseq_file = GalaxyInputFile(required=TRUE), |
45 ids_file = GalaxyInputFile(required=TRUE), | |
46 dbsnpinCoding_file = GalaxyInputFile(required=FALSE), | |
47 cosmic_file = GalaxyInputFile(required=FALSE), | |
48 annotationFromHistory = GalaxyLogicalParam(required=FALSE), | |
40 rpkmCutoff = GalaxyNumericParam(required=TRUE), | 49 rpkmCutoff = GalaxyNumericParam(required=TRUE), |
41 ids_file = GalaxyInputFile(required=TRUE), | 50 #outputIndels = GalaxyLogicalParam(required=FALSE), |
51 #outputNovelJunctions = GalaxyLogicalParam(required=FALSE), | |
42 outputFile = GalaxyOutput("FASTA","fasta")) | 52 outputFile = GalaxyOutput("FASTA","fasta")) |
43 { | 53 { |
44 file.symlink(exon_anno_file, "exon_anno.RData") | 54 file.symlink(exon_anno_file, paste(getwd(), "exon_anno.RData", sep="/")) |
45 file.symlink(proteinseq_file, "proseq.RData") | 55 file.symlink(proteinseq_file, paste(getwd(), "proseq.RData", sep="/")) |
46 file.symlink(procodingseq_file, "procodingseq.RData") | 56 file.symlink(procodingseq_file, paste(getwd(), "procodingseq.RData", sep="/")) |
47 file.symlink(ids_file, "ids.RData") | 57 file.symlink(ids_file, paste(getwd(), "ids.RData", sep="/")) |
58 | |
59 if (length(dbsnpinCoding_file) > 0) | |
60 { | |
61 file.symlink(dbsnpinCoding_file, paste(getwd(), "dbsnpinCoding.RData", sep="/")) | |
62 labelrsid = T | |
63 } | |
64 else | |
65 { | |
66 labelrsid = F | |
67 } | |
68 | |
69 if (length(cosmic_file) > 0) | |
70 { | |
71 file.symlink(cosmic_file, paste(getwd(), "cosmic.RData", sep="/")) | |
72 cosmic = T | |
73 } | |
74 else | |
75 { | |
76 cosmic = F | |
77 } | |
48 | 78 |
49 bamLink = "input.bam" | 79 bamLink = "input.bam" |
50 file.symlink(bam_file, bamLink) | 80 file.symlink(bam_file, bamLink) |
51 file.symlink(bai_file, paste(bamLink, ".bai", sep="")) | 81 file.symlink(bai_file, paste(bamLink, ".bai", sep="")) |
52 | 82 |
53 suppressPackageStartupMessages(library(customProDB)) | 83 suppressPackageStartupMessages(library(customProDB)) |
54 | 84 |
55 easyRun(bamFile=bamLink, vcfFile=vcf_file, annotation_path=dirname(exon_anno_file), | 85 easyRun(bamFile=bamLink, vcfFile=vcf_file, annotation_path=getwd(), |
56 rpkm_cutoff=rpkmCutoff, outfile_path=".", outfile_name="output", | 86 rpkm_cutoff=rpkmCutoff, outfile_path=".", outfile_name="output", |
57 nov_junction=F, INDEL=T, lablersid=F, COSMIC=F) | 87 nov_junction=F, INDEL=T, lablersid=labelrsid, COSMIC=cosmic) |
58 } | 88 } |
59 | 89 |
60 | 90 |
61 params <- list() | 91 params <- list() |
62 for(param in names(opt)) | 92 for(param in names(opt)) |