Mercurial > repos > p.lucas > taxid_genusexpand_taxid2acc
comparison TAXID_genusexpand_taxid2acc.py @ 9:7e75c71e3c8e draft
Uploaded 13 03 23 fin def load_taxids fix bug to avoid error with empty line
| author | p.lucas |
|---|---|
| date | Mon, 13 Mar 2023 16:16:49 +0000 |
| parents | 8c9418230a5a |
| children | 5a4ac43fea68 |
comparison
equal
deleted
inserted
replaced
| 8:8c9418230a5a | 9:7e75c71e3c8e |
|---|---|
| 190 " file does not exist, line "+ str(sys._getframe().f_lineno) ) | 190 " file does not exist, line "+ str(sys._getframe().f_lineno) ) |
| 191 | 191 |
| 192 cmd = "cut -f 1,2 "+taxid_acc_tabular_f+" | sort | uniq " | 192 cmd = "cut -f 1,2 "+taxid_acc_tabular_f+" | sort | uniq " |
| 193 | 193 |
| 194 for line in os.popen(cmd).readlines(): | 194 for line in os.popen(cmd).readlines(): |
| 195 if line != "": | |
| 196 continue | |
| 195 k, v = line.rstrip().split() | 197 k, v = line.rstrip().split() |
| 196 taxidlist.append(k) | 198 taxidlist.append(k) |
| 197 accnrlist.append(v) | 199 accnrlist.append(v) |
| 198 | 200 |
| 199 return taxidlist | 201 return taxidlist |
