7
7
8
8
# cstag
9
9
10
- ` cstag ` is a Python library tailored for the manipulation and handling of [ minimap2's CS tags] ( https://github.com/lh3/minimap2#cs ) .
10
+ ` cstag ` is a Python library tailored for for manipulating and visualizing [ minimap2's cs tags] ( https://github.com/lh3/minimap2#cs ) .
11
11
12
12
13
13
## 🌟 Features
14
14
15
- - ` cstag.call() ` : Generate a CS tag
16
- - ` cstag.shorten() ` : Convert a CS tag from its long to short format
17
- - ` cstag.lengthen() ` : Convert a CS tag from its short to long format
18
- - ` cstag.consensus() ` : Create a consensus CS tag from multiple CS tags
19
- - ` cstag.mask() ` : Mask low-quality bases within a CS tag
20
- - ` cstag.split() ` : Break down a CS tag into its constituent parts
21
- - ` cstag.revcomp() ` : Convert a CS tag to its reverse complement
15
+ - ` cstag.call() ` : Generate a cs tag
16
+ - ` cstag.shorten() ` : Convert a cs tag from its long to short format
17
+ - ` cstag.lengthen() ` : Convert a cs tag from its short to long format
18
+ - ` cstag.consensus() ` : Create a consensus cs tag from multiple cs tags
19
+ - ` cstag.mask() ` : Mask low-quality bases within a cs tag
20
+ - ` cstag.split() ` : Break down a cs tag into its constituent parts
21
+ - ` cstag.revcomp() ` : Convert a cs tag to its reverse complement
22
22
- ` cstag.to_sequence() ` : Reconstruct a reference subsequence from the alignment
23
23
- ` cstag.to_vcf() ` : Generate a VCF representation
24
24
- ` cstag.to_html() ` : Generate an HTML representation
25
25
- ` cstag.to_pdf() ` : Produce a PDF file
26
26
27
27
For comprehensive documentation, please visit [ our docs] ( https://akikuno.github.io/cstag/cstag/ ) .
28
- To add CS tags to SAM/BAM files, check out [ ` cstag-cli ` ] ( https://github.com/akikuno/cstag-cli ) .
28
+ To add cs tags to SAM/BAM files, check out [ ` cstag-cli ` ] ( https://github.com/akikuno/cstag-cli ) .
29
29
30
30
31
31
## 🛠 Installation
@@ -44,7 +44,7 @@ conda install -c bioconda cstag
44
44
45
45
## 💡 Usage
46
46
47
- ### Generating CS Tags
47
+ ### Generating cs Tags
48
48
49
49
``` python
50
50
import cstag
@@ -60,19 +60,19 @@ print(cstag.call(cigar, md, seq, long=True))
60
60
# =AC*ag=TACGT-ag=ACGT+ac~nn3nn=G
61
61
```
62
62
63
- ### Shortening or Lengthening CS Tags
63
+ ### Shortening or Lengthening cs Tags
64
64
65
65
``` python
66
66
import cstag
67
67
68
- # Convert a CS tag from long to short
68
+ # Convert a cs tag from long to short
69
69
cs_tag = " =ACGT*ag=CGT"
70
70
71
71
print (cstag.shorten(cs_tag))
72
72
# :4*ag:3
73
73
74
74
75
- # Convert a CS tag from short to long
75
+ # Convert a cs tag from short to long
76
76
cs_tag = " :4*ag:3"
77
77
cigar = " 8M"
78
78
seq = " ACGTACGT"
@@ -106,7 +106,7 @@ print(cstag.mask(cs_tag, cigar, qual, phred_threshold))
106
106
# =ACNN*an+ng-cc=T
107
107
```
108
108
109
- ### Splitting a CS Tag
109
+ ### Splitting a cs Tag
110
110
111
111
``` python
112
112
import cstag
@@ -116,7 +116,7 @@ print(cstag.split(cs_tag))
116
116
# ['=ACGT', '*ac', '+gg', '-cc', '=T']
117
117
```
118
118
119
- ### Reverse Complement of a CS Tag
119
+ ### Reverse Complement of a cs Tag
120
120
121
121
``` python
122
122
import cstag
@@ -152,7 +152,7 @@ chr1 5 . C CTT . . .
152
152
"""
153
153
```
154
154
155
- The multiple CS tags enable reporting of the variant allele frequency (VAF).
155
+ The multiple cs tags enable reporting of the variant allele frequency (VAF).
156
156
157
157
``` python
158
158
import cstag
@@ -186,7 +186,7 @@ Path("report.html").write_text(cs_tag_html)
186
186
# Output "report.html"
187
187
```
188
188
189
- You can visualize mutations indicated by the CS tag using the generated ` report.html ` file as shown below:
189
+ You can visualize mutations indicated by the cs tag using the generated ` report.html ` file as shown below:
190
190
191
191
<img width =" 511 " alt =" image " src =" https://user-images.githubusercontent.com/15861316/265405607-a3cc1b76-f6a2-441d-b282-6f2dc06fc03d.png " >
192
192
0 commit comments