2018-06-09 第二阶段,使用diamond跑程序

将没有的项目弄出来

import os
myroot = 'cazymetotal'
i = 0
# for root, dirs, files in os.walk(myroot):
#     for fungi in dirs:
#         for root1, dirs1, files1 in os.walk(myroot + '/' + fungi):
#             n = 0
#             for onefile in files1:
#                 if onefile.endswith(".fasta"):
#                     n = n + 1
#                 if "gff" in onefile:
#                     n = n + 2
#             if n < 2:
#                 print (fungi)
for root1, fungis, files1 in os.walk('fungi'):
    break
for root, dirs, files in os.walk(myroot):
    for onefile in files:
        fungi = onefile.split("_all")[0]
        fungis.remove(fungi)

for root2, dirs2, files2 in os.walk('parserouts_all2'):
    for item in files2:
        itemname = item.split("_all")[0]
        if itemname in fungis:
            os.system('mv parserouts_all2/'+item +' parserouts_all_rest/')

没有用的fungi

[Command: python -u /home/huangle/fungidata/www.py]
Agabi_varbur_1
Phybl2
SerlaS7_3_2
Treme1
Trire2
Aspca3
Sporo1
Mucci2
Picst3
Triha1
[Finished in 0.079s]

你可能感兴趣的:(2018-06-09 第二阶段,使用diamond跑程序)