Recent Releases of cstag and cstag-cli

cstag and cstag-cli - 1.1.0

🔥 Breaking

  • Remove to_pdf because the dependencies of weasyprint are complex, and installation fails on macOS (osx-arm64).
    • We would like to leave the saving of HTML to PDF to the browser's functionality.

Scientific Software - Peer-reviewed - Python
Published by akikuno almost 2 years ago

cstag and cstag-cli - 1.0.5

Maintenance

fix typo on regex pattern from =|[ACGTN]+ to =[ACGTN]+

Scientific Software - Peer-reviewed - Python
Published by akikuno over 2 years ago

cstag and cstag-cli - 1.0.4

New features

  • None # Maintenance
  • fix typo
  • add test cases described in README

Scientific Software - Peer-reviewed - Python
Published by akikuno over 2 years ago

cstag and cstag-cli - 1.0.3

New feature

  • None

Maintenance

  • Fixed a bug in the RD calculation
    • For instance, in the case of ["=C-g", "=C"], the correct approach is to separate the REF's CG and C to calculate RD (initially RD=1, next RD=1). However, since it was counting all the Cs (RD=2), it has been modified to calculate them separately.

```python import cstag

cs_tags = [ '=A*cg=GTAC', '=AC-g=TAC', '=ACGT+ggAC', ] chroms = ["chr1", "chr1", "chr1"] positions = [10, 10, 10]

x = cstag.tovcf(cstags, chroms, positions) print(x)

Before:

chr1 11 . CG C . . DP=4;RD=3;AD=1;VAF=0.25 chr1 11 . C G . . DP=4;RD=3;AD=1;VAF=0.25 chr1 13 . T TGG . . DP=3;RD=2;AD=1;VAF=0.333

After:

chr1 11 . CG C . . DP=2;RD=1;AD=1;VAF=0.5 chr1 11 . C G . . DP=3;RD=2;AD=1;VAF=0.333 chr1 13 . T TGG . . DP=3;RD=2;AD=1;VAF=0.333 ```

Scientific Software - Peer-reviewed - Python
Published by akikuno over 2 years ago

cstag and cstag-cli - 1.0.2

Maintenance

  • Fixed a calculation error in RD in to_vcf.call_reference_depth

    • Previously, only the Cs tags that matched the reference were considered, resulting in a match (adding 1 to RD) for sequences like deletions (e.g., =T, -c, -c).
    • Changed the policy to add 1 to RD if the sequence corresponding to v.ref exists in the CS tags.
  • Due to the change in cstag.consensus.normalize_read_lengths in v1.0.1, where insufficient read lengths are now padded with None instead of N, a bug arose in to_vcf.call_reference_depth where it referred to None. This has been fixed.

```python import cstag

cs_tags = [ '=Acg=G+aa=T-ac=G', 'cg=G+aa=T-ac=G', '=G-t=ACG' ] chroms = ['chr1', 'chr1', 'chr1'] positions = [10, 11, 12]

print(cstag.tovcf(cstags, chroms, positions))

before

Traceback (most recent call last):

File "", line 1, in

File "/home/kuno/miniconda3/lib/python3.10/site-packages/cstag/tovcf.py", line 340, in tovcf

return processcstags(cs_tags, chroms, positions)

File "/home/kuno/miniconda3/lib/python3.10/site-packages/cstag/tovcf.py", line 285, in processcs_tags

referencedepth = callreferencedepth(variantannotations, cstagslist, positions_list)

File "/home/kuno/miniconda3/lib/python3.10/site-packages/cstag/tovcf.py", line 202, in callreference_depth

if cs[i][0] in ACGT:

TypeError: 'NoneType' object is not subscriptable

after

fileformat=VCFv4.2

INFO=

INFO=

INFO=

INFO=

CHROM POS ID REF ALT QUAL FILTER INFO

chr1 11 . C G . . DP=2;RD=0;AD=2;VAF=1.0 chr1 12 . GT G . . DP=2;RD=1;AD=1;VAF=0.5 chr1 12 . G GAA . . DP=3;RD=1;AD=2;VAF=0.667 chr1 13 . TAC T . . DP=2;RD=0;AD=2;VAF=1.0 ```

Scientific Software - Peer-reviewed - Python
Published by akikuno over 2 years ago

cstag and cstag-cli - 1.0.1

  • [x] Made changes in consensus to not consider N due to insufficient read numbers.

``` cs_tags = [ '=Acg=G+aa=T-ac=G', 'cg=G+aa=T-ac=G', '=G-t=ACG' ] positions = [10, 11, 12]

cstag.consensus(cs_tags, positions)

result: =N*cg=G+aa=T-ac=G

expected: =A*cg=G+aa=T-ac=G

```

  • [x] Modified consensus to split the deletion tags.
    • Added expand_deletion_tags to split the deletions.

``` cs_tags = [ '=Acg=G+aa=T-ac=G', 'cg=G+aa=T-ac=G', '=G-t=ACG' ] positions = [10, 11, 12]

cstag.consensus(cs_tags, positions)

result: =N*cg=G+aa=T-ac=GN

expected: =N*cg=G+aa=T-ac=G

```

  • [x] Tried other libraries as installing weasyprint is challenging on mac and windows. However, continued using weasyprint as CSS was not applied.
    • fpdf2
    • borb
    • xhtml2pdf

Scientific Software - Peer-reviewed - Python
Published by akikuno over 2 years ago

cstag and cstag-cli - 1.0.0

New Features

  • Added to_pdf function
  • Added COC (Code of Conduct)
  • Added GitHub Issue templates (bug and feature)

Maintenance Updates

  • Translated Japanese parts to English
  • Updated the Docstring for to_vcf
  • Replaced to_vcf's NamedTuple with dataclass
    • Honestly, there wasn't much change
  • Enhanced tests for to_vcf

Scientific Software - Peer-reviewed - Python
Published by akikuno over 2 years ago

cstag and cstag-cli - 0.6.2

New Features

Core Enhancements

  • Enhanced cstag.to_vcf to support multiple cs_tags (list[str]). This update introduces additional headers and content for better data representation:

    INFO=

    INFO=

    INFO=

    INFO=

  • Introduced cstag.to_sequence for reconstructing subsequences.

Supplementary Features

  • Added validate_cs_tag for CS tag validation.
  • Introduced validate_pos for position validation.
  • Implemented normalize_positions within cstag.consensus.
  • Added Vcf and VcfInfo classes to to_vcf.

Maintenance Updates

  • Revised normalize_read_lengths to eliminate deque output.
  • Debugged to_html to properly handle =N.

Scientific Software - Peer-reviewed - Python
Published by akikuno over 2 years ago

cstag and cstag-cli - 0.6.1

bug fix: cstag.consensus + POS does not consider CIGAR's softclips, so removed extract_softclips and calculate_read_starts function

Scientific Software - Peer-reviewed - Python
Published by akikuno over 2 years ago

cstag and cstag-cli - 0.6.0

  • add cstag.to_vcf function

Scientific Software - Peer-reviewed - Python
Published by akikuno over 2 years ago

cstag and cstag-cli - 0.5.1

  • add prefix
  • convert the argument from uppercase to lowercase and standardize the format (e.g. CSTAG -> cs_tag)
  • add utils.validator.py
  • add python requirements >= 3.7

Scientific Software - Peer-reviewed - Python
Published by akikuno over 2 years ago

cstag and cstag-cli - 0.5.0

  • change the overall code of cstag.call
  • connect to zenodo

Scientific Software - Peer-reviewed - Python
Published by akikuno over 2 years ago

cstag and cstag-cli - 0.4.2

  • add cstag.call to generate a cstag

Scientific Software - Peer-reviewed - Python
Published by akikuno almost 3 years ago

cstag and cstag-cli - 0.4.1

  • add cstag.call to generate a cstag

Scientific Software - Peer-reviewed - Python
Published by akikuno almost 3 years ago

cstag and cstag-cli - 0.4.0

  • update to_html: visualize N at the beginning

Scientific Software - Peer-reviewed - Python
Published by akikuno almost 3 years ago

cstag and cstag-cli - 0.3.1

  • update to_html to return an objects, not a file.
  • tidy up tests

Scientific Software - Peer-reviewed - Python
Published by akikuno over 3 years ago

cstag and cstag-cli - 0.3.0

update test_html to compare objects, not files

Scientific Software - Peer-reviewed - Python
Published by akikuno over 3 years ago

cstag and cstag-cli - 0.2.3

Tests on Windows

Scientific Software - Peer-reviewed - Python
Published by akikuno almost 4 years ago

cstag and cstag-cli -

Add CSTAG arg to handle softclips.

python def test_softclip(): CSTAG = "cs:Z:=ACGT*ac+gg-cc=T" CIGAR = "2S5M2I2D1M" QUAL = "AAAA!!!!AA" assert cstag.mask(CSTAG, CIGAR, QUAL) == "cs:Z:=ACNN*an+ng-cc=T"

Scientific Software - Peer-reviewed - Python
Published by akikuno about 4 years ago

cstag and cstag-cli -

Implement cstag.mask() #7

Scientific Software - Peer-reviewed - Python
Published by akikuno about 4 years ago

cstag and cstag-cli -

Implemented cstag.to_html() #4

Scientific Software - Peer-reviewed - Python
Published by akikuno about 4 years ago

cstag and cstag-cli -

  • #3 implement cstag.consensus()

Scientific Software - Peer-reviewed - Python
Published by akikuno about 4 years ago

cstag and cstag-cli -

Scientific Software - Peer-reviewed - Python
Published by akikuno about 4 years ago