예제 #1
0
            elif (len(fields) == 3):
                label = fields[0]
                test_type = fields[1].lower()
                date = parse_date(fields[2])

            print("label:", label)

            sampleIds = []

            if (',' in label):
                labels = label.split(',')

                for l in labels:

                    if (con.get_by_label(l.upper() if len(l) <= 2 else l,
                                         'samples',
                                         verbose=True) == -1):
                        con.add_sample(
                            l.upper() if len(l) <= 2 else l,
                            description=
                            'This sample was created automatically to match a data file added through Python.Please fill in the appropriate information.'
                        )

                    sampleIds.append(
                        con.get_by_label(l.upper() if len(l) <= 2 else l,
                                         'samples',
                                         verbose=False))

            elif (con.get_by_label(label.upper() if len(label) <= 2 else label,
                                   'samples',
                                   verbose=True) == -1):