{"action":"created","comment":{"url":"https://api.github.com/repos/microscopium/microscopium/pulls/comments/25420295","id":25420295,"diff_hunk":"@@ -253,29 +264,29 @@ def cellomics_semantic_filename(fn):\n     -------\n     semantic : collections.OrderedDict {string: string}\n         A dictionary mapping the different components of the filename.\n-\n-    Examples\n-    --------\n-    >>> fn = ('MFGTMP_140206180002_A01f00d0.TIF')\n-    >>> d = cellomics_semantic_filename(fn)\n-    >>> d\n-    OrderedDict([('directory', ''), ('prefix', 'MFGTMP'), ('plate', 140206180002), ('well', 'A01'), ('field', 0), ('channel', 0), ('suffix', 'TIF')])\n     \"\"\"\n     keys = ['directory', 'prefix', 'plate', 'well', 'field', 'channel', 'suffix']\n+\n     directory, fn = os.path.split(fn)\n-    filename, suffix = fn.split('.')[0], '.'.join(fn.split('.')[1:])\n+    split_fn = fn.split('_')\n \n-    # ignore '_stitched' tag\n-    split_fn = filename.split('_')\n-    if len(split_fn) == 4:\n-        split_fn = split_fn[:-1]\n+    if(split_fn[-1].startswith('stitch')):","path":"microscopium/screens/cellomics.py","position":76,"original_position":76,"commit_id":"c5aa92a2eb640f8034e4be082dc0f14e8e738499","original_commit_id":"c5aa92a2eb640f8034e4be082dc0f14e8e738499","user":{"login":"jni","id":492549,"avatar_url":"https://avatars.githubusercontent.com/u/492549?v=3","gravatar_id":"","url":"https://api.github.com/users/jni","html_url":"https://github.com/jni","followers_url":"https://api.github.com/users/jni/followers","following_url":"https://api.github.com/users/jni/following{/other_user}","gists_url":"https://api.github.com/users/jni/gists{/gist_id}","starred_url":"https://api.github.com/users/jni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jni/subscriptions","organizations_url":"https://api.github.com/users/jni/orgs","repos_url":"https://api.github.com/users/jni/repos","events_url":"https://api.github.com/users/jni/events{/privacy}","received_events_url":"https://api.github.com/users/jni/received_events","type":"User","site_admin":false},"body":"This is sooooo messy! Can you add comments explaining these two code paths and also how each of the splits works? And I would leave a doctest there, because the function is just too convoluted without it.","created_at":"2015-02-26T11:28:14Z","updated_at":"2015-02-26T11:28:14Z","html_url":"https://github.com/microscopium/microscopium/pull/33#discussion_r25420295","pull_request_url":"https://api.github.com/repos/microscopium/microscopium/pulls/33","_links":{"self":{"href":"https://api.github.com/repos/microscopium/microscopium/pulls/comments/25420295"},"html":{"href":"https://github.com/microscopium/microscopium/pull/33#discussion_r25420295"},"pull_request":{"href":"https://api.github.com/repos/microscopium/microscopium/pulls/33"}}},"pull_request":{"url":"https://api.github.com/repos/microscopium/microscopium/pulls/33","id":30058400,"html_url":"https://github.com/microscopium/microscopium/pull/33","diff_url":"https://github.com/microscopium/microscopium/pull/33.diff","patch_url":"https://github.com/microscopium/microscopium/pull/33.patch","issue_url":"https://api.github.com/repos/microscopium/microscopium/issues/33","number":33,"state":"open","locked":false,"title":"Update cellomics functions","user":{"login":"starcalibre","id":7637964,"avatar_url":"https://avatars.githubusercontent.com/u/7637964?v=3","gravatar_id":"","url":"https://api.github.com/users/starcalibre","html_url":"https://github.com/starcalibre","followers_url":"https://api.github.com/users/starcalibre/followers","following_url":"https://api.github.com/users/starcalibre/following{/other_user}","gists_url":"https://api.github.com/users/starcalibre/gists{/gist_id}","starred_url":"https://api.github.com/users/starcalibre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starcalibre/subscriptions","organizations_url":"https://api.github.com/users/starcalibre/orgs","repos_url":"https://api.github.com/users/starcalibre/repos","events_url":"https://api.github.com/users/starcalibre/events{/privacy}","received_events_url":"https://api.github.com/users/starcalibre/received_events","type":"User","site_admin":false},"body":"After your comments on my big PR on the UI I'm like \"NOW LOOK AT MORE CODE BWAHAHAH\".\r\n\r\nSummary of PR:\r\n\r\n* The ``cellomics_semantic_filename`` has been updated to support the filename format used by the BBBC17/HT29 dataset. The HT29 dataset has files in the format:\r\n\r\n``AS_09125_050116110001_A01f00d1.DIB``\r\n\r\nie, there is an underscore (or is that a *lodash*? ;)) in the screen name! Bah!! I've updated the ``cellomics_semantic_filename`` function so it can correctly parse screen names with and without underscores. It also ignores the '_stitched' tag that gets added to stitched files.\r\n\r\n* The snail stitch function has been re-written to accept the spiral configuration as an argument. Through it'd be nice to write this function such that I could just input ``snail_stitch((3, 2), 'left')`` and it'd do the rest, so I'd like to add this as an issue (however low priority).\r\n\r\n* Tests! A more comprehensive test has been written for the ``cellomics_semantic_filename`` function, along with a test for ``make_key2file`` and two tests for the stitching function. I adapted your method of generating test images from ``test_pre.py``. Only thing I'm not sure about are the ``image_files_25`` and ``image_files_6`` functions. Is there any way to generate the number of images where I'd just need to call ``image_files(25)`` and ``image_files(6)`` ?","created_at":"2015-02-26T08:26:10Z","updated_at":"2015-02-26T11:28:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"11feb93540b21439b003edf25339f26129579aa5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/microscopium/microscopium/pulls/33/commits","review_comments_url":"https://api.github.com/repos/microscopium/microscopium/pulls/33/comments","review_comment_url":"https://api.github.com/repos/microscopium/microscopium/pulls/comments{/number}","comments_url":"https://api.github.com/repos/microscopium/microscopium/issues/33/comments","statuses_url":"https://api.github.com/repos/microscopium/microscopium/statuses/c5aa92a2eb640f8034e4be082dc0f14e8e738499","head":{"label":"starcalibre:update-cellomics-functions","ref":"update-cellomics-functions","sha":"c5aa92a2eb640f8034e4be082dc0f14e8e738499","user":{"login":"starcalibre","id":7637964,"avatar_url":"https://avatars.githubusercontent.com/u/7637964?v=3","gravatar_id":"","url":"https://api.github.com/users/starcalibre","html_url":"https://github.com/starcalibre","followers_url":"https://api.github.com/users/starcalibre/followers","following_url":"https://api.github.com/users/starcalibre/following{/other_user}","gists_url":"https://api.github.com/users/starcalibre/gists{/gist_id}","starred_url":"https://api.github.com/users/starcalibre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starcalibre/subscriptions","organizations_url":"https://api.github.com/users/starcalibre/orgs","repos_url":"https://api.github.com/users/starcalibre/repos","events_url":"https://api.github.com/users/starcalibre/events{/privacy}","received_events_url":"https://api.github.com/users/starcalibre/received_events","type":"User","site_admin":false},"repo":{"id":29560026,"name":"microscopium","full_name":"starcalibre/microscopium","owner":{"login":"starcalibre","id":7637964,"avatar_url":"https://avatars.githubusercontent.com/u/7637964?v=3","gravatar_id":"","url":"https://api.github.com/users/starcalibre","html_url":"https://github.com/starcalibre","followers_url":"https://api.github.com/users/starcalibre/followers","following_url":"https://api.github.com/users/starcalibre/following{/other_user}","gists_url":"https://api.github.com/users/starcalibre/gists{/gist_id}","starred_url":"https://api.github.com/users/starcalibre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starcalibre/subscriptions","organizations_url":"https://api.github.com/users/starcalibre/orgs","repos_url":"https://api.github.com/users/starcalibre/repos","events_url":"https://api.github.com/users/starcalibre/events{/privacy}","received_events_url":"https://api.github.com/users/starcalibre/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/starcalibre/microscopium","description":"Unsupervised clustering of high content screen samples","fork":true,"url":"https://api.github.com/repos/starcalibre/microscopium","forks_url":"https://api.github.com/repos/starcalibre/microscopium/forks","keys_url":"https://api.github.com/repos/starcalibre/microscopium/keys{/key_id}","collaborators_url":"https://api.github.com/repos/starcalibre/microscopium/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/starcalibre/microscopium/teams","hooks_url":"https://api.github.com/repos/starcalibre/microscopium/hooks","issue_events_url":"https://api.github.com/repos/starcalibre/microscopium/issues/events{/number}","events_url":"https://api.github.com/repos/starcalibre/microscopium/events","assignees_url":"https://api.github.com/repos/starcalibre/microscopium/assignees{/user}","branches_url":"https://api.github.com/repos/starcalibre/microscopium/branches{/branch}","tags_url":"https://api.github.com/repos/starcalibre/microscopium/tags","blobs_url":"https://api.github.com/repos/starcalibre/microscopium/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/starcalibre/microscopium/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/starcalibre/microscopium/git/refs{/sha}","trees_url":"https://api.github.com/repos/starcalibre/microscopium/git/trees{/sha}","statuses_url":"https://api.github.com/repos/starcalibre/microscopium/statuses/{sha}","languages_url":"https://api.github.com/repos/starcalibre/microscopium/languages","stargazers_url":"https://api.github.com/repos/starcalibre/microscopium/stargazers","contributors_url":"https://api.github.com/repos/starcalibre/microscopium/contributors","subscribers_url":"https://api.github.com/repos/starcalibre/microscopium/subscribers","subscription_url":"https://api.github.com/repos/starcalibre/microscopium/subscription","commits_url":"https://api.github.com/repos/starcalibre/microscopium/commits{/sha}","git_commits_url":"https://api.github.com/repos/starcalibre/microscopium/git/commits{/sha}","comments_url":"https://api.github.com/repos/starcalibre/microscopium/comments{/number}","issue_comment_url":"https://api.github.com/repos/starcalibre/microscopium/issues/comments{/number}","contents_url":"https://api.github.com/repos/starcalibre/microscopium/contents/{+path}","compare_url":"https://api.github.com/repos/starcalibre/microscopium/compare/{base}...{head}","merges_url":"https://api.github.com/repos/starcalibre/microscopium/merges","archive_url":"https://api.github.com/repos/starcalibre/microscopium/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/starcalibre/microscopium/downloads","issues_url":"https://api.github.com/repos/starcalibre/microscopium/issues{/number}","pulls_url":"https://api.github.com/repos/starcalibre/microscopium/pulls{/number}","milestones_url":"https://api.github.com/repos/starcalibre/microscopium/milestones{/number}","notifications_url":"https://api.github.com/repos/starcalibre/microscopium/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/starcalibre/microscopium/labels{/name}","releases_url":"https://api.github.com/repos/starcalibre/microscopium/releases{/id}","created_at":"2015-01-20T23:09:17Z","updated_at":"2015-02-25T21:07:54Z","pushed_at":"2015-02-26T08:30:57Z","git_url":"git://github.com/starcalibre/microscopium.git","ssh_url":"git@github.com:starcalibre/microscopium.git","clone_url":"https://github.com/starcalibre/microscopium.git","svn_url":"https://github.com/starcalibre/microscopium","homepage":null,"size":17924,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"microscopium:master","ref":"master","sha":"a5d6744c871a65c499d07f7dc3a264a1d5792e77","user":{"login":"microscopium","id":10542326,"avatar_url":"https://avatars.githubusercontent.com/u/10542326?v=3","gravatar_id":"","url":"https://api.github.com/users/microscopium","html_url":"https://github.com/microscopium","followers_url":"https://api.github.com/users/microscopium/followers","following_url":"https://api.github.com/users/microscopium/following{/other_user}","gists_url":"https://api.github.com/users/microscopium/gists{/gist_id}","starred_url":"https://api.github.com/users/microscopium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/microscopium/subscriptions","organizations_url":"https://api.github.com/users/microscopium/orgs","repos_url":"https://api.github.com/users/microscopium/repos","events_url":"https://api.github.com/users/microscopium/events{/privacy}","received_events_url":"https://api.github.com/users/microscopium/received_events","type":"Organization","site_admin":false},"repo":{"id":9764938,"name":"microscopium","full_name":"microscopium/microscopium","owner":{"login":"microscopium","id":10542326,"avatar_url":"https://avatars.githubusercontent.com/u/10542326?v=3","gravatar_id":"","url":"https://api.github.com/users/microscopium","html_url":"https://github.com/microscopium","followers_url":"https://api.github.com/users/microscopium/followers","following_url":"https://api.github.com/users/microscopium/following{/other_user}","gists_url":"https://api.github.com/users/microscopium/gists{/gist_id}","starred_url":"https://api.github.com/users/microscopium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/microscopium/subscriptions","organizations_url":"https://api.github.com/users/microscopium/orgs","repos_url":"https://api.github.com/users/microscopium/repos","events_url":"https://api.github.com/users/microscopium/events{/privacy}","received_events_url":"https://api.github.com/users/microscopium/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/microscopium/microscopium","description":"Unsupervised clustering of high content screen samples","fork":false,"url":"https://api.github.com/repos/microscopium/microscopium","forks_url":"https://api.github.com/repos/microscopium/microscopium/forks","keys_url":"https://api.github.com/repos/microscopium/microscopium/keys{/key_id}","collaborators_url":"https://api.github.com/repos/microscopium/microscopium/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/microscopium/microscopium/teams","hooks_url":"https://api.github.com/repos/microscopium/microscopium/hooks","issue_events_url":"https://api.github.com/repos/microscopium/microscopium/issues/events{/number}","events_url":"https://api.github.com/repos/microscopium/microscopium/events","assignees_url":"https://api.github.com/repos/microscopium/microscopium/assignees{/user}","branches_url":"https://api.github.com/repos/microscopium/microscopium/branches{/branch}","tags_url":"https://api.github.com/repos/microscopium/microscopium/tags","blobs_url":"https://api.github.com/repos/microscopium/microscopium/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/microscopium/microscopium/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/microscopium/microscopium/git/refs{/sha}","trees_url":"https://api.github.com/repos/microscopium/microscopium/git/trees{/sha}","statuses_url":"https://api.github.com/repos/microscopium/microscopium/statuses/{sha}","languages_url":"https://api.github.com/repos/microscopium/microscopium/languages","stargazers_url":"https://api.github.com/repos/microscopium/microscopium/stargazers","contributors_url":"https://api.github.com/repos/microscopium/microscopium/contributors","subscribers_url":"https://api.github.com/repos/microscopium/microscopium/subscribers","subscription_url":"https://api.github.com/repos/microscopium/microscopium/subscription","commits_url":"https://api.github.com/repos/microscopium/microscopium/commits{/sha}","git_commits_url":"https://api.github.com/repos/microscopium/microscopium/git/commits{/sha}","comments_url":"https://api.github.com/repos/microscopium/microscopium/comments{/number}","issue_comment_url":"https://api.github.com/repos/microscopium/microscopium/issues/comments{/number}","contents_url":"https://api.github.com/repos/microscopium/microscopium/contents/{+path}","compare_url":"https://api.github.com/repos/microscopium/microscopium/compare/{base}...{head}","merges_url":"https://api.github.com/repos/microscopium/microscopium/merges","archive_url":"https://api.github.com/repos/microscopium/microscopium/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/microscopium/microscopium/downloads","issues_url":"https://api.github.com/repos/microscopium/microscopium/issues{/number}","pulls_url":"https://api.github.com/repos/microscopium/microscopium/pulls{/number}","milestones_url":"https://api.github.com/repos/microscopium/microscopium/milestones{/number}","notifications_url":"https://api.github.com/repos/microscopium/microscopium/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/microscopium/microscopium/labels{/name}","releases_url":"https://api.github.com/repos/microscopium/microscopium/releases{/id}","created_at":"2013-04-30T05:56:29Z","updated_at":"2015-02-22T23:45:21Z","pushed_at":"2015-02-22T23:45:21Z","git_url":"git://github.com/microscopium/microscopium.git","ssh_url":"git@github.com:microscopium/microscopium.git","clone_url":"https://github.com/microscopium/microscopium.git","svn_url":"https://github.com/microscopium/microscopium","homepage":null,"size":18046,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":4,"forks":4,"open_issues":4,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/microscopium/microscopium/pulls/33"},"html":{"href":"https://github.com/microscopium/microscopium/pull/33"},"issue":{"href":"https://api.github.com/repos/microscopium/microscopium/issues/33"},"comments":{"href":"https://api.github.com/repos/microscopium/microscopium/issues/33/comments"},"review_comments":{"href":"https://api.github.com/repos/microscopium/microscopium/pulls/33/comments"},"review_comment":{"href":"https://api.github.com/repos/microscopium/microscopium/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/microscopium/microscopium/pulls/33/commits"},"statuses":{"href":"https://api.github.com/repos/microscopium/microscopium/statuses/c5aa92a2eb640f8034e4be082dc0f14e8e738499"}}}}