Skip to content

Commit

Permalink
Merge branch 'vcf-info-depth' into 'dev'
Browse files Browse the repository at this point in the history
Clarify depth stats in VCF

See merge request research/medaka!569
  • Loading branch information
cjw85 committed Nov 13, 2023
2 parents cbf182f + 3a0f5af commit 78d47ef
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [unreleased]
### Changed
- Additional explanatory information in VCF INFO fields concerning depth calculations.

## [v1.11.1]
### Fixed
- Do not exit if model cannot be interpreted, use the default instead.
Expand Down
19 changes: 12 additions & 7 deletions medaka/vcf.py
Original file line number Diff line number Diff line change
Expand Up @@ -1162,8 +1162,6 @@ def annotate_vcf_n_reads(args):

vcf = VCFReader(args.vcf)
chrom = None
pref = 'Depth of reads '
suff = ' by strand (fwd, rev)'
g_open = 5
g_ext = 3
# use parasail.dnafull (match 5, mismatch -4)
Expand All @@ -1178,16 +1176,23 @@ def annotate_vcf_n_reads(args):
assert np.unique(matrix.matrix.diagonal()[:4])[0] == match

ann_meta = [
('INFO', 'DP', 1, 'Integer', pref + 'at pos'),
('INFO', 'DPS', 2, 'Integer', pref + 'at pos' + suff),
('INFO', 'DP', 1, 'Integer',
'Depth of reads at position, calculated from read pileup, '
'capped to ~8000.'),
('INFO', 'DPS', 2, 'Integer',
'Depth of reads at position by strand (fwd, rev), calculated '
'from read pileup, capped to ~8000 total.'),
('INFO', 'DPSP', 1, 'Integer',
pref + 'spanning pos +-{}'.format(args.pad)),
'Depth of reads spanning pos +-{}. '.format(args.pad) +
'This is not capped as in the case of DP and DPS.'),
('INFO', 'SR', '.', 'Integer',
'Depth of spanning reads by strand which best align to each '
'allele (ref fwd, ref rev, alt1 fwd, alt1 rev, etc.)'),
'allele (ref fwd, ref rev, alt1 fwd, alt1 rev, etc.). '
'This is not capped as in the case of DP and DPS.'),
('INFO', 'AR', 2, 'Integer',
'Depth of ambiguous spanning reads by strand which align '
'equally well to all alleles (fwd, rev)'),
'equally well to all alleles (fwd, rev). '
'This is not capped as in the case of DP and DPS.'),
('INFO', 'SC', '.', 'Integer',
'Total alignment score to each allele of spanning reads by '
'strand (ref fwd, ref rev, alt1 fwd, alt1 rev, etc.) '
Expand Down

0 comments on commit 78d47ef

Please sign in to comment.