我在家里跟lab想跑一个code,结果家里跑得出来
但是在lab里跑却显示"list index out of range "
想请问一下为什么,是内存的问题吗?
程式码如下:
import gzip
import cPickle
cog_cats = {}
cogs_seqs = {}
cog_names = {}
pfam_seqs = {}
pfam_cog = {}
import os
if 'pfam_cog_dict.p' not in os.listdir('.'):
## map cog name to cog category
print 'mapping cog name to cog category'
with open('cogs.csv', 'r') as cog_file:
for line in cog_file:
line = line.rstrip()
line = line.split(',')
cog_cats[line[0]] = line[1]
cog_names[line[0]] = line[2]
print cog_cats
print cog_names
读取的档案的网址(.csv):
ftp://ftp.ncbi.nih.gov/pub/wolf/COGs/COG0303/cogs.csv
还请大家帮我解惑