Skip to content

Commit

Permalink
wrong order with if not
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisSch committed Apr 10, 2020
1 parent b7389d8 commit bd53e8d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions SingleCellDataExtraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bd53e8d

Please sign in to comment.