annotate ranger_wrapper.py @ 6:c983230e1ef8 draft

Uploaded
author modencode-dcc
date Thu, 17 Jan 2013 16:18:42 -0500
parents a8e81a2e6bf8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
1 #purpose: python wrapper to run peak ranger
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
2 #author: Ziru Zhou
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
3 #Date: November 2012
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
4
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
5 import sys, subprocess, tempfile, shutil, glob, os, os.path, gzip
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
6 from galaxy import eggs
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
7 import pkg_resources
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
8 pkg_resources.require( "simplejson" )
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
9 import simplejson
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
10 import glob
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
11 import datetime
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
12
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
13 CHUNK_SIZE = 1024
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
14
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
15 def main():
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
16 options = simplejson.load( open( sys.argv[1] ) )
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
17 outputs = simplejson.load( open( sys.argv[2] ) )
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
18
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
19
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
20 #sets experiment name and sets the chip/input files
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
21 #========================================================================================
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
22 experiment_name = '_'.join( options['experiment_name'].split() ) #save experiment name
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
23
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
24 #cmdline = "bash /mnt/galaxyTools/galaxy-central/tools/modENCODE_DCC_tools/peakranger/peakranger %s -d %s --format bam" % ( options['action'], options['chip_file'] )
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
25 cmdline = "peakranger %s -d %s" % ( options['action'], options['chip_file'] )
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
26 if 'input_file' in options:
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
27 cmdline = "%s -c %s" % ( cmdline, options['input_file'] )
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
28
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
29 #set additional options
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
30 #========================================================================================
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
31 if (options['action'] == "nr"):
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
32 output_ranger_file = outputs['output_ranger_file']
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
33
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
34 cmdline = "%s --format bam -l %s --verbose > default_output.txt" % ( cmdline, options['extension'] )
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
35 elif (options['action'] == "lc"):
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
36 output_ranger_file = outputs['output_ranger_file']
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
37
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
38 cmdline = "%s --verbose > default_output.txt" % ( cmdline )
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
39 elif (options['action'] == "wig"):
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
40 output_wigzip_file = outputs['output_wigzip_file']
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
41
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
42 cmdline = "%s --format bam -l %s %s %s %s -o ranger_wig" % ( cmdline, options['extension'], options['split'], options['strand'], options['gzip'] )
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
43 elif (options['action'] == "wigpe"):
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
44 output_wigzip_file = outputs['output_wigzip_file']
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
45
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
46 cmdline = "%s -l %s %s %s %s -o ranger_wig" % ( cmdline, options['extension'], options['split'], options['strand'], options['gzip'] )
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
47 elif (options['action'] == "ranger"):
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
48 output_summit_file = outputs['output_summit_file']
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
49 output_region_file = outputs['output_region_file']
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
50 output_details_file = outputs['output_details_file']
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
51 output_report_file = outputs['output_report_file']
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
52
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
53 if (options['gene_annotate_file'] != "None"):
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
54 gene_annotate_file = "--gene_annot_file /mnt/galaxyTools/galaxy-central/tools/modENCODE_DCC_tools/peakranger/gene_annotation_files/%s" % options['gene_annotate_file']
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
55 report = "--report"
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
56 elif (options['gene_annotate_file'] == "Upload"):
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
57 gene_annotate_file = options['usr_annot_file']
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
58 report = "--report"
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
59 else:
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
60 gene_annotate_file = ""
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
61 report = ""
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
62
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
63 cmdline = "%s -t %s --format bam %s --plot_region %s -l %s -p %s -q %s -r %s -b %s %s %s -o ranger_peak" % ( cmdline, options['threads'], gene_annotate_file, options['plot_region'], options['extension'], options['pvalue'], options['fdr'], options['delta'], options['bandwith'], options['pad'], report )
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
64 elif (options['action'] == "ccat"):
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
65 output_summit_file = outputs['output_summit_file']
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
66 output_region_file = outputs['output_region_file']
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
67 output_details_file = outputs['output_details_file']
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
68 output_report_file = outputs['output_report_file']
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
69 output_ranger_file = outputs['output_ranger_file']
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
70
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
71 if (options['gene_annotate_file'] != "None"):
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
72 gene_annotate_file = "--gene_annot_file /mnt/galaxyTools/galaxy-central/tools/modENCODE_DCC_tools/peakranger/gene_annotation_files/%s" % options['gene_annotate_file']
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
73 report = "--report"
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
74 elif (options['gene_annotate_file'] == "Upload"):
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
75 gene_annotate_file = options['usr_annot_file']
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
76 report = "--report"
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
77 else:
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
78 gene_annotate_file = ""
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
79 report = ""
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
80
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
81 cmdline = "%s --format bam %s --plot_region %s -l %s -q %s --win_size %s --win_step %s --min_count %s --min_score %s %s -o ranger_peak > default_output.txt" % ( cmdline, gene_annotate_file, options['plot_region'], options['extension'], options['fdr'], options['winsize'], options['winstep'], options['mincount'], options['minscore'], report )
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
82
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
83 #run cmdline
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
84 #========================================================================================
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
85 tmp_dir = tempfile.mkdtemp()
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
86 stderr_name = tempfile.NamedTemporaryFile().name
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
87 proc = subprocess.Popen( args=cmdline, shell=True, cwd=tmp_dir, stderr=open( stderr_name, 'wb' ) )
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
88 proc.wait()
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
89
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
90 #Do not terminate if error code, allow dataset (e.g. log) creation and cleanup
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
91 #========================================================================================
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
92 if proc.returncode:
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
93 stderr_f = open( stderr_name )
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
94 while True:
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
95 chunk = stderr_f.read( CHUNK_SIZE )
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
96 if not chunk:
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
97 stderr_f.close()
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
98 break
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
99 sys.stderr.write( chunk )
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
100
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
101
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
102 #determine if the outputs are there, copy them to the appropriate dir and filename
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
103 #========================================================================================
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
104 if(options['action'] == "nr" or options['action'] == "lc" or options['action'] == "ccat"):
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
105 created_ranger_file = os.path.join( tmp_dir, "default_output.txt" )
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
106 if os.path.exists( created_ranger_file ):
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
107 shutil.move( created_ranger_file, output_ranger_file )
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
108
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
109 if(options['action'] == "wig" or options['action'] == "wigpe"):
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
110 if(options['split'] == "-s" or options['strand'] == "-x"):
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
111 if(options['gzip'] == "-z"):
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
112 files = str( glob.glob('%s/*.wig.gz' % tmp_dir) )
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
113 files = files.replace("[", "")
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
114 files = files.replace("]", "")
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
115 files = files.replace(",", "")
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
116 files = files.replace("'", "")
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
117 cmd = "zip -j %s/ranger_wig.zip %s > /dev/null" % (tmp_dir, files)
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
118 #cmd = "tar -czvf %s/ranger_wig.tar %s > /dev/null" % (tmp_dir, files)
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
119 os.system(cmd)
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
120 created_wigzip_file = os.path.join( tmp_dir, "ranger_wig.zip" )
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
121 else:
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
122 files = str( glob.glob('%s/*.wig' % tmp_dir) )
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
123 files = files.replace("[", "")
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
124 files = files.replace("]", "")
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
125 files = files.replace(",", "")
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
126 files = files.replace("'", "")
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
127 cmd = "zip -j %s/ranger_wig.zip %s > /dev/null" % (tmp_dir, files)
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
128 #cmd = "tar -czvf %s/ranger_wig.tar %s > /dev/null" % (tmp_dir, files)
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
129 os.system(cmd)
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
130 created_wigzip_file = os.path.join( tmp_dir, "ranger_wig.zip" )
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
131 else:
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
132 if(options['gzip'] == "-z"):
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
133 created_wigzip_file = os.path.join( tmp_dir, "ranger_wig.wig.gz" )
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
134 else:
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
135 created_wigzip_file = os.path.join( tmp_dir, "ranger_wig.wig" )
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
136
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
137 if os.path.exists( created_wigzip_file ):
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
138 shutil.move( created_wigzip_file, output_wigzip_file )
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
139
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
140 if(options['action'] == "ranger" or options['action'] == "ccat"):
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
141 created_summit_file = os.path.join( tmp_dir, "ranger_peak_summit.bed" )
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
142 if os.path.exists( created_summit_file ):
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
143 shutil.move( created_summit_file, output_summit_file )
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
144
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
145 created_region_file = os.path.join( tmp_dir, "ranger_peak_region.bed" )
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
146 if os.path.exists( created_region_file ):
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
147 shutil.move( created_region_file, output_region_file )
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
148
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
149 created_details_file = os.path.join( tmp_dir, "ranger_peak_details" )
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
150 if os.path.exists( created_details_file ):
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
151 shutil.move( created_details_file, output_details_file )
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
152
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
153 #zips the html report and puts it in history, whole report is too big and display in galaxy is very unformatted
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
154 filename = os.path.splitext(os.path.basename(options['chip_file']))[0]
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
155 filename = filename.upper()
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
156 extension = os.path.splitext(options['chip_file'])[1]
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
157 extension = extension.replace(".", "")
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
158 extension = extension.upper()
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
159 now = datetime.datetime.now()
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
160 date = now.strftime("%Y-%m-%d")
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
161 foldername = "%s_%s_REPORT_%s" % (filename, extension, date)
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
162
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
163 created_report_file = os.path.join( tmp_dir, foldername )
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
164 if os.path.exists ( created_report_file ):
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
165 #os.system("cp -rf %s %s" % (created_report_file, "/mnt/galaxyData/files/000/"))
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
166 os.system("cp -rf %s ." % created_report_file)
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
167 os.system("zip -r created_report.zip %s > /dev/null" % foldername)
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
168 #os.system("zip -r created_report.zip /mnt/galaxyData/files/000/%s > /dev/null" % foldername)
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
169 shutil.move( "created_report.zip", output_report_file)
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
170
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
171
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
172 #os.system("ln -fs %s/index.html %s" %( foldername, output_report_file ))
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
173 #datafoldername = os.path.splitext(os.path.basename(output_report_file))
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
174 #datafolder = os.path.join ("/mnt/galaxyData/files/000/" datafoldername)
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
175 #print "datafolder %s" % datafolder
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
176 #if os.path.exists( datafolder )
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
177 # os.system("rm -rf %s" % datafolder)
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
178 # os.system("cp -rf %s/%s/imgs /mnt/galaxyData/files/000/%s" % (tmp_dir, foldername, datafolder))
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
179 # os.system("cp -rf %s/%s/scripts /mnt/galaxyData/files/000/%s" % (tmp_dir, foldername, datafolder))
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
180
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
181 os.unlink( stderr_name )
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
182 shutil.rmtree( tmp_dir )
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
183
a8e81a2e6bf8 Uploaded
modencode-dcc
parents:
diff changeset
184 if __name__ == "__main__": main()