Previous changeset 1:47070a3859df (2013-01-10) Next changeset 3:fe42761670f1 (2014-03-25) |
Commit message:
common uncompressed files are now gzipped upons transfer to the ftp directory to save space. |
modified:
DownloadFiles.py |
b |
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("<p><ol> ") now = datetime.datetime.now() date=str(now)[:10] - fout.write("<li>%s</li>" %(len(sys.argv))) + #fout.write("<li>%s</li>" %(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("<li>%s.%s</li>" %(name,ext)) filecounter +=3 |