{"action":"created","issue":{"url":"https://api.github.com/repos/goyalsid/phageParser/issues/99","repository_url":"https://api.github.com/repos/goyalsid/phageParser","labels_url":"https://api.github.com/repos/goyalsid/phageParser/issues/99/labels{/name}","comments_url":"https://api.github.com/repos/goyalsid/phageParser/issues/99/comments","events_url":"https://api.github.com/repos/goyalsid/phageParser/issues/99/events","html_url":"https://github.com/goyalsid/phageParser/issues/99","id":184952782,"number":99,"title":"Add CRISPR repeat and spacer sequences to database","user":{"login":"mbonsma","id":5651370,"avatar_url":"https://avatars.githubusercontent.com/u/5651370?v=3","gravatar_id":"","url":"https://api.github.com/users/mbonsma","html_url":"https://github.com/mbonsma","followers_url":"https://api.github.com/users/mbonsma/followers","following_url":"https://api.github.com/users/mbonsma/following{/other_user}","gists_url":"https://api.github.com/users/mbonsma/gists{/gist_id}","starred_url":"https://api.github.com/users/mbonsma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbonsma/subscriptions","organizations_url":"https://api.github.com/users/mbonsma/orgs","repos_url":"https://api.github.com/users/mbonsma/repos","events_url":"https://api.github.com/users/mbonsma/events{/privacy}","received_events_url":"https://api.github.com/users/mbonsma/received_events","type":"User","site_admin":false},"labels":[{"id":341434816,"url":"https://api.github.com/repos/goyalsid/phageParser/labels/code","name":"code","color":"d4c5f9","default":false},{"id":464998006,"url":"https://api.github.com/repos/goyalsid/phageParser/labels/database","name":"database","color":"bfdadc","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/goyalsid/phageParser/milestones/3","html_url":"https://github.com/goyalsid/phageParser/milestones/MozFest%202016","labels_url":"https://api.github.com/repos/goyalsid/phageParser/milestones/3/labels","id":2080681,"number":3,"title":"MozFest 2016","description":"","creator":{"login":"mbonsma","id":5651370,"avatar_url":"https://avatars.githubusercontent.com/u/5651370?v=3","gravatar_id":"","url":"https://api.github.com/users/mbonsma","html_url":"https://github.com/mbonsma","followers_url":"https://api.github.com/users/mbonsma/followers","following_url":"https://api.github.com/users/mbonsma/following{/other_user}","gists_url":"https://api.github.com/users/mbonsma/gists{/gist_id}","starred_url":"https://api.github.com/users/mbonsma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbonsma/subscriptions","organizations_url":"https://api.github.com/users/mbonsma/orgs","repos_url":"https://api.github.com/users/mbonsma/repos","events_url":"https://api.github.com/users/mbonsma/events{/privacy}","received_events_url":"https://api.github.com/users/mbonsma/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":0,"state":"open","created_at":"2016-10-19T18:34:37Z","updated_at":"2016-10-26T23:01:25Z","due_on":"2016-10-30T00:00:00Z","closed_at":null},"comments":1,"created_at":"2016-10-24T20:57:31Z","updated_at":"2016-10-29T09:30:12Z","closed_at":null,"body":"We want to include the sequences of CRISPR repeats and spacers in our database. Repeat sequences can be useful for comparing CRISPR systems between different species, since species with similar repeat sequences may have some shared CRISPR history. Spacer sequences are the link between viruses and bacteria - since spacers come from viruses or other foreign DNA, studying spacers can shed light on how bacteria and viruses interact. \r\n\r\nOne source of this data is the CRISPRdb database, which has detected CRISPR arrays in thousands of species of bacteria and archaea. We will start by adding their data to our database, and going forward we will continue to periodically update our database from theirs. \r\n\r\n----------------\r\n\r\n### The function\r\n\r\n**Input:**\r\n* List of CRISPR repeat sequences from CRISPRdb: http://crispr.i2bc.paris-saclay.fr/crispr/BLAST/DR/DRdatabase\r\n* List of CRISPR spacer sequences from CRISPRdb: http://crispr.i2bc.paris-saclay.fr/crispr/BLAST/Spacer/Spacerdatabase\r\n\r\n**The function should do the following:**\r\n* Insert each repeat sequence into the **Repeat** table with an auto-generated Primary Key if it isn't already in the table. \r\n* Insert each spacer sequence into the **Spacer** table with an auto-generated Primary Key if it isn't already in the table. \r\n* Insert each accession number into the **Organism** table in the **Accession** column. The **OrganismName** column can remain blank for now - this is addressed in another issue.\r\n\r\nEach pair of lines in the linked file contains the accession numbers of all the organisms that have a particular sequence followed by the sequence itself. For example, in this block the first line is a list of accession numbers with a postscript, the second is the repeat (GAATCTTCGAGATAGAATTGCAAG). The actual accession number is **just the letters and the first block of numbers**, i.e. `NC_000854`. \r\n```\r\n>NC_000854_2|NC_000854_4|NC_022521_3|NC_022521_6\r\nGAATCTTCGAGATAGAATTGCAAG\r\n```\r\n\r\n**Helpful information:**\r\nFind our SQLite database [here](https://github.com/goyalsid/phageParser/blob/master/crispr.sqlite). Its schema is not in its final form, but it has enough to get us started on rewiring our analysis scripts. Here's what it looks like (courtesy of @dbonsma):\r\n\r\n![image](https://cloud.githubusercontent.com/assets/5651370/19663156/c0988fa0-9a08-11e6-964c-6ae6152f648b.png)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/goyalsid/phageParser/issues/comments/257081481","html_url":"https://github.com/goyalsid/phageParser/issues/99#issuecomment-257081481","issue_url":"https://api.github.com/repos/goyalsid/phageParser/issues/99","id":257081481,"user":{"login":"mbonsma","id":5651370,"avatar_url":"https://avatars.githubusercontent.com/u/5651370?v=3","gravatar_id":"","url":"https://api.github.com/users/mbonsma","html_url":"https://github.com/mbonsma","followers_url":"https://api.github.com/users/mbonsma/followers","following_url":"https://api.github.com/users/mbonsma/following{/other_user}","gists_url":"https://api.github.com/users/mbonsma/gists{/gist_id}","starred_url":"https://api.github.com/users/mbonsma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbonsma/subscriptions","organizations_url":"https://api.github.com/users/mbonsma/orgs","repos_url":"https://api.github.com/users/mbonsma/repos","events_url":"https://api.github.com/users/mbonsma/events{/privacy}","received_events_url":"https://api.github.com/users/mbonsma/received_events","type":"User","site_admin":false},"created_at":"2016-10-29T09:30:12Z","updated_at":"2016-10-29T09:30:12Z","body":"Example data: https://github.com/goyalsid/phageParser/blob/master/data/DRdatabase.txt"}}
{"actor":{"display_login":"mbonsma"}}