예제 #1
0
파일: OGTtoPED.py 프로젝트: dnil/OGTtoPED
                info = "NA"
            info.rstrip()

            tissue_cell =  ws["C" + str(rownum)]
            tissue = tissue_cell.value
            if tissue is None:
                tissue = "NA"
            tissue.rstrip()

            sample = Sample(sample_id, info, tissue)
            in_family = True
            family.append(sample)
            
            if sample.info.find("singleton") != -1:          
                # Found a singleton!
                sample.affected = True
                update_family(family)
                print >> out, family_ped(family, family_count).rstrip()
                # This ends the current family.
                if config.debug:
                    print(sys.stderr, "Found a singleton. Family complete.")
                family = []
                in_family = False
                # Note that the next row may be a None or a new family member..

            samples_found += 1

        elif cell.value is None: 
            # Value None means an empty row.
            if in_family:
                # This ends the current family.