Skip to content

Commit

Permalink
bug fix reading sample sheet headers
Browse files Browse the repository at this point in the history
  • Loading branch information
marcmaxson committed Aug 12, 2019
1 parent a318fcf commit bfa1cc0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions methpype/files/sample_sheets.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,12 +287,13 @@ def read(self, sample_sheet_file):
LOGGING.info("Finished scanning sample_sheet; did not find header info.")
break
raw_line = cur_line.decode()
if not raw_line:
if raw_line:
self.headers.append(raw_line)
cur_line = sample_sheet_file.readline()
rows_to_scan -= 1
reset_file(sample_sheet_file)


test_sheet = pd.read_csv(
sample_sheet_file,
header = None, # this ensures row[0] included as data -- [this is for looking for the header]
Expand All @@ -316,7 +317,6 @@ def read(self, sample_sheet_file):
start_row = idx
break
rows_to_scan -= 1
print(rows_to_scan)
if start_row == None:
raise ValueError("error - did not parse header right")

Expand Down

0 comments on commit bfa1cc0

Please sign in to comment.