Skip to content

Commit

Permalink
Update 2022.10.22
Browse files Browse the repository at this point in the history
Fixed bugs of create proteome.
  • Loading branch information
henry-leo committed Oct 22, 2022
1 parent 4704e0e commit e7f0bc7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion patpat/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ def initiate_uniprot_proteome_catalog():

def create_list_uniprot_proteome():
"""Create UniProt Proteome Catalog"""
file = [i for i in os.listdir() if re.search('patpat_env/proteome/UP_README', i)][0]
os.chdir('patpat_env/proteome/')
file = [i for i in os.listdir() if re.search('UP_README', i)][0]
with open(file, mode='r') as f:
flag = ''
while flag != 'Proteome_ID Tax_ID OSCODE SUPERREGNUM #(1) #(2) #(3) Species Name\n':
Expand All @@ -86,6 +87,7 @@ def create_list_uniprot_proteome():
else:
r.append(re.split('\t', flag[:-1]))
df = pd.DataFrame(r[1:], columns=r[0])
os.chdir('../..')
return df


Expand Down

0 comments on commit e7f0bc7

Please sign in to comment.