Skip to content

Commit

Permalink
Merge pull request #6 from XingerTang/main
Browse files Browse the repository at this point in the history
Revert the change of writePhase()
  • Loading branch information
gregorgorjanc authored Jul 17, 2023
2 parents d62c78a + 8b4e78f commit 65456ea
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions Pedigree.py
Original file line number Diff line number Diff line change
Expand Up @@ -932,13 +932,9 @@ def writeGenotypes(self, outputFile):

def writePhase(self, outputFile):
data_list = []
for ind in self:
if ind.haplotypes.ndim == 2: # diploid
data_list.append((ind.idx, ind.haplotypes[0]))
data_list.append((ind.idx, ind.haplotypes[1]))
elif ind.haplotypes.ndim == 1: # haploid
data_list.append((ind.idx, ind.haplotypes))
data_list.append((ind.idx, ind.haplotypes))
for ind in self :
data_list.append( (ind.idx, ind.haplotypes[0]) )
data_list.append( (ind.idx, ind.haplotypes[1]) )

MultiThreadIO.writeLines(outputFile, data_list, str)

Expand Down

0 comments on commit 65456ea

Please sign in to comment.