Skip to content

Commit

Permalink
[RELEASE] 1.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
grosenberger committed Jul 31, 2020
1 parent e70c4dd commit cdc0105
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion secat/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def __init__(self, mitabfile):

def read(self, mitabfile):
def _extract_uniprotkb(string):
return [u for u in string.split("|") if "uniprotkb" in u][0].split("uniprotkb:")[1].split("-")[0]
return [i.split("uniprotkb:")[1].split("-")[0] for i in [u for u in string.split("|") if "uniprotkb" in u]]

def _extract_score(string):
if 'intact-miscore:' in string:
Expand Down Expand Up @@ -97,6 +97,12 @@ def _extract_score(string):
df.bait_id = df.bait_id.apply(_extract_uniprotkb)
df.prey_id = df.prey_id.apply(_extract_uniprotkb)

# Explode lists
df = df.explode('bait_id').reset_index(drop=True)
df = df.explode('prey_id').reset_index(drop=True)

click.echo("Info: MITAB file contains %s entries considering all alternative identifiers." % df.shape[0])

# Extract score
df.interaction_confidence = df.interaction_confidence.apply(_extract_score)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setup(
name='secat',
version='1.0.7',
version='1.0.8',
description='Size-Exclusion Chromatography Algorithmic Toolkit',
long_description=long_description,
long_description_content_type='text/markdown',
Expand Down

0 comments on commit cdc0105

Please sign in to comment.