There is a newer version of the record available.

Published October 4, 2023 | Version 1.0.3

akikuno/cstag: 1.0.3

Authors/Creators

  • 1. University of Tsukuba

Description

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.
import cstag

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

x = cstag.to_vcf(cs_tags, 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

Files

akikuno/cstag-1.0.3.zip

Files (1.0 MB)

Name Size Download all
md5:a14c439d83f22e0fb63fb1bd4e29b3ec
1.0 MB Preview Download

Additional details

Related works