Skip to content

Commit

Permalink
namechange
Browse files Browse the repository at this point in the history
  • Loading branch information
kedhammar committed Jul 1, 2024
1 parent 5b7e770 commit 6685fe8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions anglerfish/demux/samplesheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __init__(self, input_csv: str, ont_barcodes_enabled: bool):
fastq files are located in "barcode##" folders.
"""

self.samplesheet = []
self.rows = []
with open(input_csv) as csvfile:
csv_first_line: str = csvfile.readline()
dialect = csv.Sniffer().sniff(csv_first_line, ",;\t")
Expand Down Expand Up @@ -83,7 +83,7 @@ def __init__(self, input_csv: str, ont_barcodes_enabled: bool):
row["fastq_path"],
ont_barcode,
)
self.samplesheet.append(ss_entry)
self.rows.append(ss_entry)
row_number += 1

# Explanation: Don't mess around with the globs too much.
Expand Down Expand Up @@ -111,7 +111,7 @@ def minimum_bc_distance(self) -> int:
"""

ont_bc_to_adaptors: dict = {}
for entry in self.samplesheet:
for entry in self.rows:
if entry.ont_barcode in ont_bc_to_adaptors:
ont_bc_to_adaptors[entry.ont_barcode].append(entry.adaptor)
else:
Expand Down Expand Up @@ -147,7 +147,7 @@ def minimum_bc_distance(self) -> int:

def get_fastastring(self, adaptor_name: str | None = None) -> str:
fastas = {}
for entry in self.samplesheet:
for entry in self.rows:
if entry.adaptor.name == adaptor_name or adaptor_name is None:
fastas[entry.adaptor.name + "_i7"] = entry.adaptor.i7.get_mask()
fastas[entry.adaptor.name + "_i5"] = entry.adaptor.i5.get_mask()
Expand Down Expand Up @@ -193,7 +193,7 @@ def map_adaptor_barcode_pairs_to_sample_info(
return samplesheet_map

def __iter__(self):
return iter(self.samplesheet)
return iter(self.rows)

def __next__(self):
pass

0 comments on commit 6685fe8

Please sign in to comment.