diff --git a/seqnado/design.py b/seqnado/design.py index 7d92d53d..dc193e75 100644 --- a/seqnado/design.py +++ b/seqnado/design.py @@ -717,11 +717,19 @@ def from_design( subset_column: Optional[str] = "scale_group", subset_value: Optional[List[str]] = None, ): - df = ( - design.to_dataframe() - .assign(sample_fullname=lambda df: df.sample_name + "_" + df.ip) - .set_index("sample_fullname") - ) + + if isinstance(design, Design): + df = ( + design.to_dataframe() + .assign(sample_fullname=lambda df: df.sample_name) + .set_index("sample_fullname") + ) + else: + df = ( + design.to_dataframe() + .assign(sample_fullname=lambda df: df.sample_name + "_" + df.ip) + .set_index("sample_fullname") + ) if subset_value: df = df.query(f"{subset_column} in {subset_value}")