I am trying to unpack a list with fewer variables and get the following error.
human_prots looks like this:
['9606.ENSP00000482075_HomoSapiens\t10029.XP_007627869.1_CricetulusGriseus,10036.XP_005079789.1_MesocricetusAuratus,10042.XP_006987441.1_PeromyscusManiculatus9986.ENSOCUP00000025621_OryctolagusCuniculus', '']
with open(path_to_homolog_file,'r') as ortho_tab:
ortho_text = ortho_tab.read()
no_genes = []
ortho_list = []
ortho_text.strip()
human_prots = ortho_text.split('\n\n')
for horthos in human_prots:
[hprot,orthos,_] = horthos.split('\t')
[_,hprot] = hprot.split('.')
hprot_info = find_match(db_dict.get('HomoSapiens'),hprot)
if len(hprot_info) > 1 and warning == 'on':
print('WARNING! Multiple matches found for {}: {}'.format(hprot,hprot_info))
[hgene,_] = hprot_info[0].split('\t')
orthos = orthos.split(', ')
line 71, in <module>
[hprot,orthos,*_] = horthos.split('\t')
ValueError: not enough values to unpack (expected at least 2, got 1)
what am I doing wrong?