Skip to content

Commit

Permalink
depth filter added with a default setting of 10x coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
laurelhiatt committed Aug 18, 2021
1 parent 428667f commit 2ee7de9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion strling-denovo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 2ee7de9

Please sign in to comment.