Skip to content

Commit

Permalink
accounts for inferred chr
Browse files Browse the repository at this point in the history
  • Loading branch information
brwnj committed Feb 20, 2020
1 parent 922703a commit 9865032
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion covviz/ped.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,17 @@ def parse_ped(path, traces, sample_col, sex_chroms, sex_vals="1,2"):

if via_indexcov:
# inferred sex
ped_data["inferred"]["x"].append(row["CN%s" % sex_chroms[0]])
try:
ped_data["inferred"]["x"].append(row["CN%s" % sex_chroms[0]])
except KeyError:
ped_data["inferred"]["x"].append(row["CNchr%s" % sex_chroms[0]])
try:
ped_data["inferred"]["y"].append(row["CN%s" % sex_chroms[1]])
except KeyError:
try:
ped_data["inferred"]["y"].append(row["CNchr%s" % sex_chroms[1]])
except IndexError:
ped_data["inferred"]["y"].append(0)
except IndexError:
ped_data["inferred"]["y"].append(0)

Expand Down

0 comments on commit 9865032

Please sign in to comment.