Example #1
0
	def __init__(self):
		RunCommand.__init__(self,
			args_usage="<variants-file> [<variants-file> ...]",
			epilog=PROJECT_EPILOG)
		
		self.variants_files = []
		
		# Gather variants files from arguments

		for var_file in self.args.files:
			if not os.path.isabs(var_file):
				var_file = os.path.join(os.getcwd(), var_file)

			if not os.path.exists(var_file):
				self.log.error("Variants file not found: {}".format(var_file))
				exit(-1)

			if not os.path.isfile(var_file):
				self.log.error("A file is expected: {}".format(var_file))
				exit(-1)

			self.variants_files += [var_file]

		# Get project id

		if self.args.project_id is None:
			self.log.error("Project identifier not specified.")
			exit(-1)

		self.project_id = normalize_id(self.args.project_id)
Example #2
0
    def process_conf(self):
        RunCommand.process_conf(self)

        if "workflows_path" not in self.conf:
            self.conf_builder.add_value("workflows_path", self.workflows_path)

        if "results_path" not in self.conf:
            self.conf_builder.add_value("results_path", self.results_path)

        if "temp_path" not in self.conf:
            self.conf_builder.add_value("temp_path", self.temp_path)
Example #3
0
	def build_conf(self):
		if self.case_name is None:
			self.case_name = self.project_id

		RunCommand.build_conf(self)
		
		self.case_conf_builder.add_value("project.id", self.project_id)

		if self.args.single_tumor:
			self.case_conf_builder.add_value("variants_only", True)
			self.case_conf_builder.add_value("skip_oncodrivefm", True)
			self.case_conf_builder.add_value("skip_oncodriveclust", True)
Example #4
0
	def add_arguments(self, parser):
		RunCommand.add_arguments(self, parser)

		parser.add_argument("files", nargs="+",
			help="Variants files")

		parser.add_argument("-p", "--id", dest="project_id", metavar="NAME",
			help="Define the project identifier. Required.")
		
		parser.add_argument("-a", "--assembly", dest="assembly", metavar="ASSEMBLY",
			choices=["hg18", "hg19"], default="hg19",
			help="Define the assembly [hg18, hg19]. Default is hg19.")

		parser.add_argument("--single-tumor", dest="single_tumor", action="store_true", default=False,
			help="Run a single tumor analysis instead of the regular cohort analysis.")
Example #5
0
	def __init__(self):
		RunCommand.__init__(self,
			args_usage = "<projects-path> [<projects-path> ...]",
			epilog = PROJECT_EPILOG)
		
		self.scan_paths = []
		
		# Gather scan paths from arguments

		for scan_path in self.args.paths:
			if not os.path.isabs(scan_path):
				scan_path = os.path.join(os.getcwd(), scan_path)

			if not os.path.exists(scan_path):
				self.log.error("Path not found: {}".format(scan_path))
				exit(-1)

			self.scan_paths += [scan_path]
Example #6
0
	def add_arguments(self, parser):
		RunCommand.add_arguments(self, parser)

		parser.add_argument("paths", nargs="+",
							help="Projects paths")

		parser.add_argument("-i", "--include", dest = "include", metavar = "ID", action="append",
			help = "Include project which id=ID")

		parser.add_argument("-I", "--include-regex", dest = "include_regex", metavar = "REGEX", action="append",
			help = "Include project which id matches REGEX")

		parser.add_argument("--include-from", dest = "include_from", metavar = "FILE", action="append",
			help = "Include project which id found in file FILE")

		parser.add_argument("-e", "--exclude", dest = "exclude", metavar = "ID", action="append",
			help = "Exclude project which id=ID")

		parser.add_argument("-E", "--exclude-regex", dest = "exclude_regex", metavar = "REGEX", action="append",
			help = "Exclude project which id matches REGEX")

		parser.add_argument("--exclude-from", dest = "exclude_from", metavar = "FILE", action="append",
			help = "Exclude project which id found in file FILE")
Example #7
0
	def __init__(self):
		RunCommand.__init__(self,
			args_usage="<projects-path> [<projects-path> ...]",
			epilog=PROJECT_EPILOG)
Example #8
0
	def build_conf(self):
		RunCommand.build_conf(self)