Skip to content

Commit

Permalink
Merge 9393a68 into f54591f
Browse files Browse the repository at this point in the history
  • Loading branch information
Timothee Cezard committed Oct 11, 2018
2 parents f54591f + 9393a68 commit dd81e80
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion egcg_core/clarity.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def get_genome_version(sample_id, species=None):

def sanitize_user_id(user_id):
if isinstance(user_id, str):
return re.sub("[^\w_\-.]", "_", user_id)
return re.sub("[^\w]", "_", user_id)


substitutions = (
Expand Down
1 change: 1 addition & 0 deletions tests/test_clarity.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ def test_get_species_from_sample(self, mocked_get_samples, mocked_ncbi):

def test_sanitize_user_id(self):
assert clarity.sanitize_user_id('this?that$other another:more') == 'this_that_other_another_more'
assert clarity.sanitize_user_id('this.that$other another:more') == 'this_that_other_another_more'

def test_get_list_of_samples(self):
exp_lims_sample_ids = ['this', 'that:01', 'other _L:01']
Expand Down

0 comments on commit dd81e80

Please sign in to comment.