#!/home1/jialh/tools/miniconda3/bin/python
#PBS -N filter_fullname
#PBS -l nodes=1:ppn=8
#PBS -l walltime=999999:00:00
import os
import csv
import pandas as pd
workdir="/home3/ZXMGroup/MGEs_database/database/Taxonomy/testwork"
input_taxon_file="/home3/ZXMGroup/MGEs_database/database/Taxonomy/new_taxdump/fullnamelineage.dmp"
input_taxon=pd.read_csv(input_taxon_file, delimiter='\t',header=None, chunksize=100)
output=open(os.path.join(workdir,"taxid_name.csv"),"w")
for chunk in input_taxon:
for index, taxon_line in chunk.iterrows():
output.write(str(taxon_line[0]) + ',' + str(taxon_line[2]) + '\n')
output.close()
python处理taxonomy数据库的fullnamelineage.dmp文件
最新推荐文章于 2024-09-13 22:19:06 发布