diff --git a/seqnado/design.py b/seqnado/design.py index e59c9bde..d32982db 100644 --- a/seqnado/design.py +++ b/seqnado/design.py @@ -562,7 +562,7 @@ def to_dataframe(self) -> pd.DataFrame: data = [] for experiment, metadata in zip(self.experiments, self.metadata): row = { - "sample_name": experiment.ip.sample_name, + "sample_name": experiment.ip.name, "ip": experiment.ip.ip_or_control_name, "control": experiment.control.ip_or_control_name if experiment.control else None, "ip_r1": experiment.ip.r1.path, @@ -602,11 +602,13 @@ def from_dataframe(cls, df: pd.DataFrame, **kwargs): for _, row in df.iterrows(): ip = FastqSetIP( + name=row["sample_name"], r1=FastqFileIP(path=row["ip_r1"]), r2=FastqFileIP(path=row["ip_r2"]) if row["ip_r2"] else None, ) control = ( FastqSetIP( + name=row["sample_name"], r1=FastqFileIP(path=row["control_r1"]), r2=FastqFileIP(path=row["control_r2"]) if row["control_r2"] else None, )