VUmcCGP / wisecondor

WISECONDOR (WIthin-SamplE COpy Number aberration DetectOR): Detect fetal trisomies and smaller CNV's in a maternal plasma sample using whole-genome data.
Other
44 stars 65 forks source link

A question about the TriArr class #29

Closed Karma0alpha closed 7 years ago

Karma0alpha commented 7 years ago

Excume me, Sir. I am a primary python engineer, in research the triarray.py code, the class TriArr has a method linTo2D, I couldn't understand the structure of the method, especially in while z >= int((y*y)/2.+y/2.): y += 1 None definition of z before, why could use it? Good appreciation for your help and best wishes.

rstraver commented 7 years ago

Hi, there is a return statement before the usage of the undefined z variable:

return self.edge-curEdge,y+self.edge-curEdge
y = 0
while z >= int((y*y)/2.+y/2.):

Hence it never got to evaluate the undefined variable z. This bit being in the script is just a leftover from development, I changed the code a few times without properly removing the old bits. I suppose these lines should be taken out to avoid confusion.

Thanks for letting me know.