From 287da0856f5c8ab79708163b639c1cf5f21566fe Mon Sep 17 00:00:00 2001 From: luc Date: Wed, 20 Nov 2024 14:55:49 -0500 Subject: [PATCH] update for new cellranger template --- scripts/cellranger_multi.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/cellranger_multi.py b/scripts/cellranger_multi.py index b11301d..f1713bd 100644 --- a/scripts/cellranger_multi.py +++ b/scripts/cellranger_multi.py @@ -190,6 +190,11 @@ def ch_file_generation(project_id, sample_name): line_number = df[df[df.columns[0]] == "Your Submission:"].index.values with open(in_file_location, "rb") as f: df = pd.read_excel(f, engine="openpyxl", skiprows=line_number + 1, header=line_number + 1) + + # update column name for new template + df.columns = ['Sample Name' if col == 'Sample Name Pre-Hashing' else col for col in df.columns] + df.columns = ['Sample Name in IGO' if col == 'Sample ID from Sample Submission' else col for col in df.columns] + sample_tag_dict = pd.Series(df['Hashtag Name'].values,index=df['Sample Name']).to_dict() tag_seq_dict = pd.Series(df['Hashtag sequence'].values,index=df['Hashtag Name']).to_dict()