Skip to content

Commit 28731cf

Browse files
committed
Fix Bam-deam-stats-script (update version v2.5)
1 parent f526428 commit 28731cf

File tree

4 files changed

+16
-1
lines changed

4 files changed

+16
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1414
- Create a table that shows substitutions-rates for the first 10 and last 10 positions of each alignment.
1515
- Create a table that shows the 95% confidence-intervals for the first and last 10 positions of each alignment
1616
- the are saved to the `stats/` directory under `{RG}_04_deamination_positions/`
17+
- Add the `--ancientness_threshold` flag to specify the threshold used for reporting ancientness levels ('++' and '+')
1718

1819
### Bugfixes
1920

assets/pipeline/help.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ process arguments:
4242
--bamfilter_quality_cutoff N Quality filter for extracted bam (default: 25)
4343
--krakenuniq_min_kmers N Filter: minimal required unique kmers (krakenuniq) assigned to a family (default: 129)
4444
--krakenuniq_min_reads N Filter: minimal required number of reads assigned to a family by krakenuniq (default: 3)
45+
--ancientness_threshold N Threshold for reporting 'Ancientness' values of '++' or '+' (default: 9.5)
46+
- (++): Substitution frequencies on both ends of sequences are significantly higher than N %
47+
- (+): Substitution frequencies on either the 5’ or the 3’ end of sequences are significantly higher than N %
4548
--reportfilter_percentage N For the 'filtered_report.tsv', Specify a FamPercentage threshold
4649
--reportfilter_breadth N For the 'filtered_report.tsv', Specify a ProportionExpectedBreadth threshold
4750

docs/source/flags.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,17 @@ Optional flags
272272

273273
--bamfilter_quality_cutoff 25
274274

275+
* - --ancientness_threshold
276+
- N
277+
- | Threshold for reporting 'Ancientness' values of '++' or '+' (default: 9.5)
278+
| (++): Substitution frequencies on both ends of sequences are significantly higher than N %
279+
| (+): Substitution frequencies on either the 5’ or the 3’ end of sequences are significantly higher than N %
280+
::
281+
282+
Example:
283+
284+
--ancientness_threshold 5
285+
275286
* - --reportfilter_percentage
276287
- N
277288
- | For the creation of the filtered_report.tsv file

modules/local/bam_deam_stats/resources/usr/bin/bam_deam_stats.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def binomial_ci(x, n, alpha=0.05):
1515
return f"{round(lower*100,1):.1f},{round(upper*100,1):.1f}"
1616

1717

18-
def main(bamfile, threshold=threshold, positions=3, stats_only=False, doublestranded=False):
18+
def main(bamfile, threshold=9.5, positions=3, stats_only=False, doublestranded=False):
1919
#store all reference bases
2020
all_first = []
2121
all_last = []

0 commit comments

Comments
 (0)