Skip to content

Commit

Permalink
doc: add quickstart
Browse files Browse the repository at this point in the history
  • Loading branch information
msto committed Apr 11, 2024
1 parent 428a003 commit c96e603
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
38 changes: 37 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,40 @@ SAM tags

## Quickstart

TODO
The `sam_tags` decorator permits the specification of custom enumerations that adhere to the conventions described in the SAM specification.

```py
from enum import StrEnum
from sam_tags import sam_tag


@sam_tag
class CustomTag(StrEnum):
"""Custom SAM tags."""

XF = "XF"
"""Some filter."""

vl = "vl"
"""Some value."""
```

The predefined standard tags are available as a built-in class.

```py
from sam_tags import StandardTag

# read: pysam.AlignedSegment
read.get_tag(StandardTag.RX)
```

Docstrings on each predefined tag permit simple reference within an IDE.

![](assets/screenshot.png)

Built-in classes are also available for sets of tags used in popular bioinformatics software.

```py
from sam_tags.community import BwaTag
from sam_tags.community import CellrangerTag
```
Binary file added assets/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c96e603

Please sign in to comment.