Skip to content

SampleSheet write method Dialect Options #130

@Spill-Tea

Description

@Spill-Tea

Currently, the method to write a sample sheet from given data uses the csv.writer from python stdlib. At current, the default formatting uses the "excel" dialect. Meaning newline characters default to "\r\n".

Adding keyword arguments to override the default dialect behavior would be helpful.

def write(self, handle: TextIO, blank_lines: int = 1, **kwargs: Mapping) -> None:
    ...
    writer = csv.writer(handle, **kwargs)
    ...
    

Which can be used like so, for example:

sheet = SampleSheet(...)
sheet.write(handle, lineterminator="/n")

# --or--
sheet.write(handle, dialect="unix")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions