Skip to content

Commit ba945ac

Browse files
authored
fix: add more identifier to webdataset samples
Avoid duplicate sample name error when loading webdataset
1 parent c5f9cf6 commit ba945ac

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

seqchromloader/writer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def dump_data_webdataset_worker(coords,
6969
sink = wds.TarWriter(filename, compress=compress)
7070
for rindex, item in enumerate(coords.itertuples()):
7171
feature_dict = defaultdict()
72-
feature_dict["__key__"] = f"{item.chrom}:{item.start}-{item.end}"
72+
feature_dict["__key__"] = f"{rindex}_{item.chrom}:{item.start}-{item.end}_{item.strand}"
7373

7474
try:
7575
feature = utils.extract_info(

0 commit comments

Comments
 (0)