Skip to content

Commit

Permalink
Fix sample name assignment in DesignIP class
Browse files Browse the repository at this point in the history
  • Loading branch information
alsmith151 committed Apr 13, 2024
1 parent 5e9d7d6 commit 7b9b5bf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion seqnado/design.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
)
Expand Down

0 comments on commit 7b9b5bf

Please sign in to comment.