Commits

Johannes Köster  committed 091e504 Merge

Merge branch 'master' of bitbucket.org:johanneskoester/snakemake

  • Participants
  • Parent commits f1c3796, e03922d

Comments (0)

Files changed (3)

File snakemake/__init__.py

     print_compilation=False,
     debug=False,
     notemp=False,
+    nodeps=False,
     jobscript=None):
     """
     Run snakemake on a given snakefile.
                     unlock=unlock,
                     resources=resources,
                     notemp=notemp,
+                    nodeps=nodeps,
                     cleanup_metadata=cleanup_metadata
                     )
 
             print_compilation=args.print_compilation,
             debug=args.debug,
             jobscript=args.jobscript,
-            notemp=args.notemp
-            )
+            notemp=args.notemp)
     sys.exit(0 if success else 1)

File snakemake/scheduler.py

                 self.rule_weight,
                 maxcores=1)
             if immediate_submit:
+                self.rule_reward = self.dryrun_rule_reward
                 self._submit_callback = partial(
                     self._proceed,
                     update_dynamic=False,

File snakemake/workflow.py

         list_version_changes=False, list_code_changes=False,
         list_input_changes=False, list_params_changes=False,
         summary=False, output_wait=3, nolock=False, unlock=False,
-        resources=None, notemp=False,
+        resources=None, notemp=False, nodeps=False,
         cleanup_metadata=None):
 
         self.global_resources = dict() if cluster or resources is None else resources
         dag.check_incomplete()
         dag.postprocess()
 
+        if nodeps:
+            missing_input = [f for job in dag.targetjobs for f in job.input if dag.needrun(job) and not os.path.exists(f)]
+            logger.critical("Dependency resolution disabled (--nodeps) "
+                "but missing input " 
+                "files detected. If this happens on a cluster, please make sure "
+                "that you handle the dependencies yourself or turn of "
+                "--immediate-submit. Missing input files:\n{}".format(
+                    "\n".join(missing_input)))
+            
+            return False
+
         if printdag:
             print(dag)
             return True