diff --git a/seqnado/design.py b/seqnado/design.py index ce278c8b..3555fe67 100644 --- a/seqnado/design.py +++ b/seqnado/design.py @@ -718,7 +718,7 @@ def from_design( subset_value: Optional[List[str]] = None, include_controls: bool = False, ): - + if isinstance(design, Design): df = ( design.to_dataframe() @@ -745,13 +745,11 @@ def from_design( ) df = pd.concat([df_ip, df_control]) - if subset_value: df = df.query(f"{subset_column} in {subset_value}") samples = df.index.tolist() - reference_sample = reference_sample or df.index[0] return cls( @@ -875,7 +873,9 @@ def model_post_init(self, __context: Any) -> None: self.pileup_method = [self.pileup_method] if self.include_unscaled and not self.scale_method: - self.scale_method = ["unscaled",] + self.scale_method = [ + "unscaled", + ] elif self.include_unscaled and self.scale_method: self.scale_method = ["unscaled", self.scale_method] else: @@ -941,6 +941,7 @@ def files(self) -> List[str]: class HeatmapFiles(BaseModel): assay: Literal["ChIP", "ATAC", "RNA", "SNP"] + make_heatmaps: bool = False @property def heatmap_files(self) -> List[str]: @@ -952,7 +953,10 @@ def heatmap_files(self) -> List[str]: @computed_field @property def files(self) -> List[str]: - return self.heatmap_files + if self.make_heatmaps: + return self.heatmap_files + else: + return [] class HubFiles(BaseModel): @@ -1170,7 +1174,6 @@ def peaks(self) -> List[str]: files = pcf_samples.files + pcf_merged.files else: files = pcf_samples.files - return files or [] @computed_field @@ -1221,8 +1224,9 @@ def peaks(self): ip_sample_names = [ s for s in self.sample_names - if any([c not in s for c in self.control_names]) + if not any([c in s for c in self.control_names]) ] + pcf_samples = PeakCallingFiles( assay=self.assay, names=ip_sample_names, diff --git a/seqnado/workflow/envs/profiles/profile_slurm_singularity/config.yaml b/seqnado/workflow/envs/profiles/profile_slurm_singularity/config.yaml index 01a3f504..b6a37261 100644 --- a/seqnado/workflow/envs/profiles/profile_slurm_singularity/config.yaml +++ b/seqnado/workflow/envs/profiles/profile_slurm_singularity/config.yaml @@ -13,7 +13,7 @@ retries: 3 default-resources: - slurm_partition: "short" + slurm_partition: "gpu" runtime: "1h" mem: "3G" diff --git a/seqnado/workflow/rules/peak_call_chip.smk b/seqnado/workflow/rules/peak_call_chip.smk index 73303491..a9adbbcf 100644 --- a/seqnado/workflow/rules/peak_call_chip.smk +++ b/seqnado/workflow/rules/peak_call_chip.smk @@ -18,7 +18,7 @@ def format_macs_options(wildcards, options): options = check_options(options) if not is_paired: - options = re.sub(r"-f BAMPE", "", options) + options = re.sub(r"-f BAMPE", "-f BAM", options) if not options: return "" else: