From 2ee7de99c2a925a29d42af1b86d796181aeff2e6 Mon Sep 17 00:00:00 2001 From: "Laurel (he/they)" Date: Wed, 18 Aug 2021 15:34:00 -0600 Subject: [PATCH] depth filter added with a default setting of 10x coverage --- strling-denovo.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/strling-denovo.py b/strling-denovo.py index 350205e..6a60069 100644 --- a/strling-denovo.py +++ b/strling-denovo.py @@ -22,6 +22,9 @@ def get_args(): help="outputfile") parser.add_argument("--ampsize", type=int, default=150, help="amplification size filter") + ### size of de novo expansion, or difference from kid to mom and dad allele sizes, is defaulted to 150bp + parser.add_argument("--depth", type=int, default=10, + help="depth filter") return parser.parse_args() def expandorama(df,kid,mom,dad, mutation, writeHeader = True): @@ -69,7 +72,7 @@ def expandorama(df,kid,mom,dad, mutation, writeHeader = True): kiddadmom = kiddadmom.assign(kiddelmom=kiddadmom['allele_kid'] - kiddadmom['allele_mom']) ###we are creating a new column that is the difference between child and parent, which gives an idea of the expansions - kiddadmom['novel_amp'] = (kiddadmom['allele_kid']-kiddadmom['allele_dad']> args.ampsize) & (kiddadmom['allele_kid']-kiddadmom['allele_mom']> args.ampsize) + kiddadmom['novel_amp'] = (kiddadmom['allele_kid']-kiddadmom['allele_dad']> args.ampsize) & (kiddadmom['allele_kid']-kiddadmom['allele_mom']> args.ampsize) & (kiddadmom['depth_kid'] > args.depth) & (kiddadmom['depth_mom'] > args.depth) & (kiddadmom['depth_dad'] > args.depth) ### we make a new column where the difference between child and parent is positive for both, prints True; these are candidate expansions novel_amp_reads = kiddadmom.novel_amp.value_counts()