New feature
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