Mercurial > repos > fabio > sbtas_se
comparison query.py @ 8:256d015d69f9 draft
Uploaded 20180131
| author | fabio |
|---|---|
| date | Wed, 31 Jan 2018 16:05:19 -0500 |
| parents | 97dd57f81d77 |
| children | 027f2e9d4a25 |
comparison
equal
deleted
inserted
replaced
| 7:edc721c9c418 | 8:256d015d69f9 |
|---|---|
| 95 for idx, file_path in enumerate(file_paths): | 95 for idx, file_path in enumerate(file_paths): |
| 96 #file_name = file_names[idx]; | 96 #file_name = file_names[idx]; |
| 97 with open(file_path, 'r') as content_file: | 97 with open(file_path, 'r') as content_file: |
| 98 for line in content_file: | 98 for line in content_file: |
| 99 if line.strip() != "": | 99 if line.strip() != "": |
| 100 line_split = line.strip().split("__tc__"); # split on tab | 100 line_split = line.strip().split("\t"); # split on tab |
| 101 if len(line_split) == 2: # 0:id , 1:seq , otherwise skip line | 101 if len(line_split) == 2: # 0:id , 1:seq , otherwise skip line |
| 102 seq_id = line_split[0]; | 102 seq_id = line_split[0]; |
| 103 seq_text = line_split[1]; | 103 seq_text = line_split[1]; |
| 104 if seq_id in multiple_data: | 104 if seq_id in multiple_data: |
| 105 return "Error: the id '"+seq_id+"' is duplicated"; | 105 return "Error: the id '"+seq_id+"' is duplicated"; |
