Mercurial > repos > p.lucas > taxid_genusexpand_taxid2acc
comparison TAXID_genusexpand_taxid2acc.py @ 10:5a4ac43fea68 draft
Uploaded 14 03 23 def load_taxids fix bug when empty line
| author | p.lucas |
|---|---|
| date | Tue, 14 Mar 2023 08:07:14 +0000 |
| parents | 7e75c71e3c8e |
| children | 3d116861e380 |
comparison
equal
deleted
inserted
replaced
| 9:7e75c71e3c8e | 10:5a4ac43fea68 |
|---|---|
| 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 != "": | 195 if line != "": |
| 196 continue | 196 k, v = line.rstrip().split() |
| 197 k, v = line.rstrip().split() | 197 taxidlist.append(k) |
| 198 taxidlist.append(k) | 198 accnrlist.append(v) |
| 199 accnrlist.append(v) | |
| 200 | 199 |
| 201 return taxidlist | 200 return taxidlist |
| 202 # -------------------------------------------------------------------------- | 201 # -------------------------------------------------------------------------- |
| 203 | 202 |
| 204 # test load_taxids function | 203 # test load_taxids function |
