diff --git a/chipathlon/jobs/scripts/download_fastq.py b/chipathlon/jobs/scripts/download_fastq.py index 556b14e1ff8d85562dd3519e24d6ad381b32fa88..9b79b4b7cfb4f230aa339718d5d59d050f796e1b 100644 --- a/chipathlon/jobs/scripts/download_fastq.py +++ b/chipathlon/jobs/scripts/download_fastq.py @@ -7,7 +7,7 @@ parser.add_argument("-u", "--url", dest="url", required=True, help="Target url." parser.add_argument("-p", "--path", dest="path", required=True, help="Local path to file.") parser.add_argument("-t", "--url_type", dest="url_type", default="ftp://", help="Type of url to access.") parser.add_argument("-r", "--retries", dest="retries", default=3, type=int, help="Number of retries.") -parser.add_argument("-o", "--overwrite", dest="overwrite", default=False, action="store_true", help="Overwrite local file if exists.") +parser.add_argument("-n", "--overwrite", dest="overwrite", default=True, action="store_false", help="Dont' overwrite local file if exists.") parser.add_argument("-m", "--md5", dest="md5", help="Check md5 value against passed value.") args = parser.parse_args() diff --git a/chipathlon/utils.py b/chipathlon/utils.py index a0a93b65de8a2d2dc6b7cb3ff911a30493ba34b9..62152d3204d0668d5ef2f0b76f55279918bc7f74 100644 --- a/chipathlon/utils.py +++ b/chipathlon/utils.py @@ -13,7 +13,7 @@ def progress(current, end, length=20): sys.stdout.flush() -def downloadFile(url, localpath, urltype="ftp://", retries=3, overwrite=False, checkmd5=False, md5=None): +def downloadFile(url, localpath, urltype="ftp://", retries=3, overwrite=True, checkmd5=False, md5=None): success = False if url[:7] == "http://": urltype = "" diff --git a/chipathlon/workflow.py b/chipathlon/workflow.py index 6921c58cb37c2c18798f090f23bfe3da989249a8..c6c534c170a058d63863fe0e50f934bfe0f214c5 100644 --- a/chipathlon/workflow.py +++ b/chipathlon/workflow.py @@ -253,7 +253,7 @@ class Workflow(object): self.files[output_name] = output_file job = Job(self.executables["download_fastq.py"]) job.uses(output_file, link=Link.OUTPUT, transfer=True) - job.addArguments("-u", f["url"], "-p", output_file, "-t http://", "-m", f["content_md5sum"]) + job.addArguments("-u", f["url"], "-p", output_file, "-t http://", "-m", f["md5sum"]) self.jobs[output_name] = job self.dax.addJob(job) return