GitHub PullRequestReviewCommentEvent at 2014-03-17 16:28:45
Repository: scikit-bio
Actor: ElDeveloper
Payload: {"comment":{"url":"https://api.github.com/repos/biocore/scikit-bio/pulls/comments/10664595","id":10664595,"diff_hunk":"@@ -964,15 +939,92 @@ class NucleotideSequence(BiologicalSequence):\n \n     \"\"\"\n \n-    iupac_standard_characters = set(\"ACGTU\")\n-    iupac_degeneracies = {\"R\": set(\"AG\"), \"Y\": set(\"CTU\"), \"M\": set(\"AC\"),\n-                          \"K\": set(\"TUG\"), \"W\": set(\"ATU\"), \"S\": set(\"GC\"),\n-                          \"B\": set(\"CGTU\"), \"D\": set(\"AGTU\"),\n-                          \"H\": set(\"ACTU\"), \"V\": set(\"ACG\"), \"N\": set(\"ACGTU\")}\n-    iupac_degenerate_characters = set(iupac_degeneracies)\n-    iupac_characters = iupac_standard_characters | iupac_degenerate_characters\n-    complement_map = {}\n-    _alphabet = iupac_characters | set(map(str.lower, iupac_characters))\n+    @classmethod\n+    def alphabet(cls):\n+        \"\"\"Return the set of characters allowed in a `NucleotideSequence`.\n+\n+        Returns\n+        -------\n+        set\n+            Characters that are allowed in a valid `NucleotideSequence`.\n+\n+        \"\"\"\n+        chars = cls.iupac_characters()\n+        return chars | set(map(str.lower, chars))\n+\n+    @classmethod\n+    def complement_map(cls):\n+        \"\"\"Return the mapping of characters to their complements.\n+\n+        Returns\n+        -------\n+        dict\n+            Mapping of characters to their complements.\n+\n+        Notes\n+        -----\n+        Complements cannot be defined for a generic `NucleotideSequence`\n+        because the complement of 'A' is ambiguous.\n+        `NucleotideSequence.complement_map` will therefore be the empty dict.\n+        Thanks, nature...","path":"skbio/core/sequence.py","position":247,"original_position":247,"commit_id":"c2e2869b35d9b37e9c575cb72817c5c0c64a92b0","original_commit_id":"142346e0018a87327f3cfe4586b9d22b215242c7","user":{"login":"ElDeveloper","id":375307,"avatar_url":"https://gravatar.com/avatar/5ee33edf9eb551a3756365466dd91075?d=https%3A%2F%2Fidenticons.github.com%2F34a8af75a77ae0acd818cede2083f563.png&r=x","gravatar_id":"5ee33edf9eb551a3756365466dd91075","url":"https://api.github.com/users/ElDeveloper","html_url":"https://github.com/ElDeveloper","followers_url":"https://api.github.com/users/ElDeveloper/followers","following_url":"https://api.github.com/users/ElDeveloper/following{/other_user}","gists_url":"https://api.github.com/users/ElDeveloper/gists{/gist_id}","starred_url":"https://api.github.com/users/ElDeveloper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ElDeveloper/subscriptions","organizations_url":"https://api.github.com/users/ElDeveloper/orgs","repos_url":"https://api.github.com/users/ElDeveloper/repos","events_url":"https://api.github.com/users/ElDeveloper/events{/privacy}","received_events_url":"https://api.github.com/users/ElDeveloper/received_events","type":"User","site_admin":false},"body":":+1: ","created_at":"2014-03-17T16:28:45Z","updated_at":"2014-03-17T16:28:45Z","html_url":"https://github.com/biocore/scikit-bio/pull/169#discussion_r10664595","pull_request_url":"https://api.github.com/repos/biocore/scikit-bio/pulls/169","_links":{"self":{"href":"https://api.github.com/repos/biocore/scikit-bio/pulls/comments/10664595"},"html":{"href":"https://github.com/biocore/scikit-bio/pull/169#discussion_r10664595"},"pull_request":{"href":"https://api.github.com/repos/biocore/scikit-bio/pulls/169"}}}}