Mercurial > repos > johnheap > vapper
comparison Vap.py @ 0:36cb22bd911d draft
planemo upload for repository https://github.com/johnheap/VAPPER-Galaxy
author | johnheap |
---|---|
date | Wed, 04 Jul 2018 16:39:13 -0400 |
parents | |
children | c4463e84a7ea |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:36cb22bd911d |
---|---|
1 """ | |
2 * Copyright 2018 University of Liverpool | |
3 * Author: John Heap, Computational Biology Facility, UoL | |
4 * Based on original scripts of Sara Silva Pereira, Institute of Infection and Global Health, UoL | |
5 * | |
6 * Licensed under the Apache License, Version 2.0 (the "License"); | |
7 * you may not use this file except in compliance with the License. | |
8 * You may obtain a copy of the License at | |
9 * | |
10 * http://www.apache.org/licenses/LICENSE-2.0 | |
11 * | |
12 * Unless required by applicable law or agreed to in writing, software | |
13 * distributed under the License is distributed on an "AS IS" BASIS, | |
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
15 * See the License for the specific language governing permissions and | |
16 * limitations under the License. | |
17 * | |
18 """ | |
19 #import subprocess | |
20 #import re | |
21 import os | |
22 import sys | |
23 #import pandas as pd | |
24 #import numpy as np | |
25 #import seaborn as sns | |
26 #import matplotlib.pyplot as plt | |
27 #from matplotlib.mlab import PCA | |
28 import Tryp_G | |
29 import Tryp_T | |
30 import Tryp_V | |
31 import argparse | |
32 #Entry .sort out the arguments | |
33 | |
34 pdfExport = False | |
35 #parser = argparse.ArgumentParser(description='Variant Antigen Profiler - the VAP.') | |
36 #parser.add_argument('name') | |
37 #parser.add_argument('-t','-T', action = 'store_true', default = False, help = "Transciptomic Pathway") | |
38 #parser.add_argument('-p','-P', action = 'store_true', default = False, help = "Export PDFs to HTML directory") | |
39 #parser.add_argument('strain') | |
40 #parser.add_argument('Forward_Read_File') | |
41 #parser.add_argument('Reverse_Read_File') | |
42 #parser.add_argument('htmlfile') | |
43 #parser.add_argument('htmlresource') | |
44 #parser.add_argument('heatmapFile') | |
45 #parser.add_argument('PCAFile') | |
46 #parser.add_argument('devheatmapFile') | |
47 #args = parser.parse_args() | |
48 | |
49 #we have numerous parameters.... | |
50 #hard code it for differnt types? | |
51 | |
52 | |
53 arguments = sys.argv | |
54 htmldir = arguments[len(arguments)-1] #last argument is always html_resource | |
55 if not os.path.exists(htmldir): | |
56 os.mkdir(htmldir) | |
57 | |
58 if arguments[1] == 'g_assemble': | |
59 argdict = {'name':2, 'pdfexport':3, 'kmers':4,'inslen':5, 'covcut':6, 'forward':7, 'reverse':8, 'html_file':9, 'html_resource':10} | |
60 Tryp_G.assemble(arguments,argdict) | |
61 if arguments[1] == 'g_contigs': | |
62 argdict = {'name':2, 'pdfexport':3, 'contigs':4, 'html_file':5, 'html_resource':6} | |
63 Tryp_G.contigs(arguments,argdict) | |
64 if arguments[1] == 'transcipt': | |
65 argdict = {'name':2, 'pdfexport': 3, 'strain': 4, 'forward': 5, 'reverse': 6, 'html_file': 7, 'html_resource': 8} | |
66 Tryp_T.transcriptomicProcess(arguments,argdict) | |
67 if arguments[1] == 'v_assemble': | |
68 argdict = {'name':2, 'pdfexport':3, 'kmers':4,'inslen':5, 'covcut':6, 'forward':7, 'reverse':8, 'html_file':9, 'html_resource':10} | |
69 Tryp_V.vivax_assemble(arguments,argdict) | |
70 if arguments[1] == 'v_contigs': | |
71 argdict = {'name':2, 'pdfexport':3, 'contigs':4, 'html_file':5, 'html_resource':6} | |
72 Tryp_V.vivax_contigs(arguments,argdict) | |
73 | |
74 | |
75 sys.exit() | |
76 | |
77 | |
78 | |
79 #if not os.path.exists(args.htmlresource): | |
80 # os.mkdir(args.htmlresource) | |
81 #if args.p: | |
82 # pdfExport = True | |
83 #if args.t: | |
84 # print ("Transcriptomic Pathway") | |
85 # Tryp_T.transcriptomicProcess(args.name, pdfExport, args.strain, args.Forward_Read_File, args.Reverse_Read_File, args.htmlfile, args.htmlresource) | |
86 #else: | |
87 #print ('Genomic Pathway') | |
88 #Tryp_G.test_output(args.name, args.htmlfile, args.htmlresource, args.heatmapFile, args.PCAFile,args.devheatmapFile) | |
89 # Tryp_G.genomicProcess(args.name, pdfExport, args.Forward_Read_File, args.Reverse_Read_File, args.htmlfile, args.htmlresource) | |
90 | |
91 |