# HG changeset patch
# User geert-vandeweyer
# Date 1367931722 14400
# Node ID 837fafa672d248fe7a0efc7da2c8ef45a59e47f9
# Parent 47070a3859dfadcfafa13b2a058861ca2bbe46d8
common uncompressed files are now gzipped upons transfer to the ftp directory to save space.
diff -r 47070a3859df -r 837fafa672d2 DownloadFiles.py
--- a/DownloadFiles.py Thu Jan 10 04:09:38 2013 -0500
+++ b/DownloadFiles.py Tue May 07 09:02:02 2013 -0400
@@ -29,7 +29,7 @@
fout.write("
")
now = datetime.datetime.now()
date=str(now)[:10]
- fout.write("- %s
" %(len(sys.argv)))
+ #fout.write("- %s
" %(len(sys.argv)))
# compose ftp storage location
ftpdir="%s/%s/" %(ftpdirconfig,useremail)
if len(folder) == 0:
@@ -46,9 +46,15 @@
while filecounter < len(sys.argv):
inp = sys.argv[filecounter]
name = sys.argv[(filecounter+1)]
+ name = name.replace(':','_')
+ name = name.replace(' ','_')
+ name = name.replace('@','_AT_')
ext = sys.argv[(filecounter+2)]
# copy files to tmp dir & filenames
os.system("cp '%s' '%s/%s.%s'" %(inp, storedir,name,ext))
+ ## gzip if fastq/fastqsanger/vcf
+ if ( ext == "fastq" or ext == "fastqsanger" or ext == "vcf" or ext == "sam" or ext == "txt"):
+ os.system("gzip -9 '%s/%s.%s'" %(storedir,name,ext))
fout.write("- %s.%s
" %(name,ext))
filecounter +=3