def run(self) -> List[str]: delete_output_dir_if_exists(self.context.output) # Create and save the configuration file config = "illumiprocessor.conf" csv = load_csv(self.context.csv_file) config_dict = parse_illumiprocessor_config( csv, double_index=not self.context.single_index) dump_config_file(config, config_dict) cmd = [ "--input", self.context.raw_fastq, "--output", self.context.output, "--cores", str(self.context.threads), "--config", config, "--log-path", self.context.log_dir, ] if self.context.min_len: cmd.extend(["--min-len", str(self.context.min_len)]) if self.context.r1_pattern: cmd.extend(["--r1-pattern", self.context.r1_pattern]) if self.context.r2_pattern: cmd.extend(["--r2-pattern", self.context.r2_pattern]) if self.context.phred64: cmd.extend(["--phred", "phred64"]) if self.context.single_end: cmd.append("--se") if self.context.no_merge: cmd.append("--no-merge") return self.adapters["illumiprocessor"]( cmd, capture_output=self.context.capture_output)
def config(context): csv_file = load_csv(context["csv_file"]) config = parse_illumiprocessor_config(csv_file) return config
def config_single_index(context): csv_file = load_csv(context["csv_file"]) config = parse_illumiprocessor_config(csv_file, double_index=False) return config
def test_load_csv_returns_a_list(context): csv = load_csv(context["csv_file"]) assert isinstance(csv, list)