import cstag
# Convert a cs tag from long to short
cs_tag = "=ACGT*ag=CGT"
print(cstag.shorten(cs_tag))
# :4*ag:3
# Convert a cs tag from short to long
cs_tag = ":4*ag:3"
cigar = "8M"
seq = "ACGTACGT"
print(cstag.lengthen(cs_tag, cigar, seq))
# =ACGT*ag=CGT
You can visualize mutations indicated by the cs tag using the generated report.html file as shown below:
📣 Feedback and Support
For questions, bug reports, or other forms of feedback, we’d love to hear from you! Please use GitHub Issues for all reporting purposes.
Please refer to CONTRIBUTING for how to contribute and how to verify your contributions.
🤝 Code of Conduct
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
📄 Citation
Kuno, A., (2024). cstag and cstag-cli: tools for manipulating and visualizing cs tags. Journal of Open Source Software, 9(93), 6066, https://doi.org/10.21105/joss.06066
cstagis a Python library tailored for manipulating and visualizing minimap2’s cs tags.🌟 Features
cstag.call(): Generate a cs tagcstag.shorten(): Convert a cs tag from its long to short formatcstag.lengthen(): Convert a cs tag from its short to long formatcstag.consensus(): Create a consensus cs tag from multiple cs tagscstag.mask(): Mask low-quality bases within a cs tagcstag.split(): Break down a cs tag into its constituent partscstag.revcomp(): Convert a cs tag to its reverse complementcstag.to_sequence(): Reconstruct a reference subsequence from the alignmentcstag.to_vcf(): Generate a VCF representationcstag.to_html(): Generate an HTML representationFor comprehensive documentation, please visit our docs.
🛠 Installation
Using PyPI:
Using Bioconda:
💡 Usage
Generating cs tags
Shortening or Lengthening cs tags
Creating a Consensus
Masking Low-Quality Bases
Splitting a cs tag
Reverse Complement of a cs tag
Reconstructing the Reference Subsequence
Generating a VCF Report
The multiple cs tags enable reporting of the variant allele frequency (VAF).
Generating an HTML Report
You can visualize mutations indicated by the cs tag using the generated
report.htmlfile as shown below:📣 Feedback and Support
For questions, bug reports, or other forms of feedback, we’d love to hear from you!
Please use GitHub Issues for all reporting purposes.
Please refer to CONTRIBUTING for how to contribute and how to verify your contributions.
🤝 Code of Conduct
Please note that this project is released with a Contributor Code of Conduct.
By participating in this project you agree to abide by its terms.
📄 Citation