-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/ samtools typehinted wrappers #26
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -198,13 +198,14 @@ class SamFileType(enum.Enum): | |||||
ext (str): The standard file extension for this file type. | ||||||
""" | ||||||
|
||||||
def __init__(self, mode: str, ext: str) -> None: | ||||||
def __init__(self, mode: str, ext: str, index_ext: Optional[str]) -> None: | ||||||
self.mode = mode | ||||||
self.extension = ext | ||||||
self.index_extension = index_ext | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I prefer keeping the parameter and attribute names the same as it makes things more obvious/readable:
Suggested change
Although I see the convention has already broken for |
||||||
|
||||||
SAM = ("", ".sam") | ||||||
BAM = ("b", ".bam") | ||||||
CRAM = ("c", ".cram") | ||||||
SAM = ("", ".sam", None) | ||||||
BAM = ("b", ".bam", ".bai") | ||||||
CRAM = ("c", ".cram", ".crai") | ||||||
|
||||||
@classmethod | ||||||
def from_path(cls, path: Union[Path, str]) -> "SamFileType": | ||||||
|
@@ -911,3 +912,5 @@ class SamOrder(enum.Enum): | |||||
Coordinate = "coordinate" #: coordinate sorted | ||||||
QueryName = "queryname" #: queryname sorted | ||||||
Unknown = "unknown" # Unknown SAM / BAM / CRAM sort order | ||||||
# Sort by template-coordinate, SO is unsorted, GO is query, SS is template-coordinate: | ||||||
TemplateCoordinate = "unsorted" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we move/upgrade comments to become attributes docs in the main class docstring for auto documentation? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add
index_ext
to attributes docs.