From bd53e8d43635638ca0001fc4be6448e2dde760ea Mon Sep 17 00:00:00 2001 From: DenisSch Date: Thu, 9 Apr 2020 23:26:47 -0400 Subject: [PATCH] wrong order with if not --- SingleCellDataExtraction.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/SingleCellDataExtraction.py b/SingleCellDataExtraction.py index 0394a04..ae8d5eb 100644 --- a/SingleCellDataExtraction.py +++ b/SingleCellDataExtraction.py @@ -170,15 +170,17 @@ def ExtractSingleCells(mask,image,channel_names,output): sniffer.has_header(open(channel_names).readline()) #If header not available if not sniffer: + #If header available + channel_names_loaded = pd.read_csv(channel_names) + channel_names_loaded_list = list(channel_names_loaded.marker_name) + else: + print("negative") #old one column version channel_names_loaded = pd.read_csv(channel_names,header=None) #Add a column index for ease channel_names_loaded.columns = ["marker"] channel_names_loaded = list(channel_names_loaded.marker.values) - else: - #If header available - channel_names_loaded = pd.read_csv(channel_names) - channel_names_loaded_list = list(channel_names_loaded.marker_name) + #Check for unique marker names -- create new list to store new names