{"action":"created","issue":{"url":"https://api.github.com/repos/goyalsid/phageParser/issues/62","repository_url":"https://api.github.com/repos/goyalsid/phageParser","labels_url":"https://api.github.com/repos/goyalsid/phageParser/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/goyalsid/phageParser/issues/62/comments","events_url":"https://api.github.com/repos/goyalsid/phageParser/issues/62/events","html_url":"https://github.com/goyalsid/phageParser/issues/62","id":140832039,"number":62,"title":"Script to analyze BLAST output from host genome ","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":[{"url":"https://api.github.com/repos/goyalsid/phageParser/labels/code","name":"code","color":"d4c5f9"},{"url":"https://api.github.com/repos/goyalsid/phageParser/labels/good%20first%20bug","name":"good first bug","color":"207de5"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-03-15T00:09:10Z","updated_at":"2016-10-13T13:27:06Z","closed_at":null,"body":"This is marked as a **good first bug** because, although it sounds complicated, it's computationally not as bad as it sounds - I think. There might be some tricky sections, but if a newcomer is attempting this, I'm available for questions anytime! Just comment in this issue.\r\n\r\n### Motivation\r\n\r\nResearch has suggested that there may be cases when CRISPR systems are used for something besides immunity to foreign DNA - perhaps they could be regulating the host genome, or they might simply be inactive. A clue that one of these things might be happening is if there are spacers that come from their own host genome. To this end, we need functions to (A) BLAST spacers against the host genome and (B) analyze the BLAST output. The first function is described in issue #60 and the second function is described here.\r\n\r\n-------\r\n\r\n### The function\r\n\r\n**Input:** \r\n* XML file produced by the BLAST function in issue #60 (example [here](https://github.com/goyalsid/phageParser/blob/master/data/NC_000853.xml)).\r\n* File containing the start and end positions of CRISPR loci in the sequence, which can be found [here](https://github.com/goyalsid/phageParser/blob/master/data/CRISPR_locus_positions.csv). The format of each row in this file is `Accession, CRISPR_ID, start, end`. \r\n* Optional expect value cutoff, default should be 1. \r\n\r\n**The function should do the following:**\r\n* Use [BioPython's built-in BLAST parser](http://biopython.org/DIST/docs/tutorial/Tutorial.html#sec:parsing-blast) to parse the output. This is also done in [filterByExpect_all_v2.py](https://github.com/goyalsid/phageParser/blob/master/filterByExpect_all_v2.py), although I've noticed a few mistakes just now so be careful!\r\n* This is the tricky part: differentiate between a match with itself (i.e. the source spacer array) and a match somewhere else in the genome. I think the easiest way might be to run [extract_CRISPRdb.py](https://github.com/goyalsid/phageParser/blob/master/extract_CRISPRdb.py) once at the beginning of the analysis, and then use the start and stop locations of the CRISPR loci as boundaries to exclude from. If there is more than one CRISPR locus in a genome, matches to any of the loci should be considered \"CRISPR\" matches. This will have to be slightly modified if people are contributing genomes not from CRISPRdb - but this could be solved by first running [CRISPRfinder](http://crispr.u-psud.fr/Server/) on submitted genomes. If a match is suspected to be from the original CRISPR array, the output should mark it as being \"CRISPR\". If it is suspected to be from a different region of the genome, the output should mark it as being \"non-CRISPR\". \r\n\r\n**Output:**\r\n* A csv file called `accession_self-spacers.csv` (where \"accession\" is the NCBI accession number, i.e. NC_000853) with the following column headings: \r\n   * Query\r\n   * Score\r\n   * Expect\r\n   * QueryStart\r\n   * QueryEnd\r\n   * SubjectStart\r\n   * SubjectEnd\r\n   * Source\r\n\r\nThe \"Source\" column contains the \"CRISPR\" or \"non-CRISPR\" flag. All other column headings are fields in the object that results from the BLAST-parser module."},"comment":{"url":"https://api.github.com/repos/goyalsid/phageParser/issues/comments/253512470","html_url":"https://github.com/goyalsid/phageParser/issues/62#issuecomment-253512470","issue_url":"https://api.github.com/repos/goyalsid/phageParser/issues/62","id":253512470,"user":{"login":"bhanu546","id":13589656,"avatar_url":"https://avatars.githubusercontent.com/u/13589656?v=3","gravatar_id":"","url":"https://api.github.com/users/bhanu546","html_url":"https://github.com/bhanu546","followers_url":"https://api.github.com/users/bhanu546/followers","following_url":"https://api.github.com/users/bhanu546/following{/other_user}","gists_url":"https://api.github.com/users/bhanu546/gists{/gist_id}","starred_url":"https://api.github.com/users/bhanu546/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhanu546/subscriptions","organizations_url":"https://api.github.com/users/bhanu546/orgs","repos_url":"https://api.github.com/users/bhanu546/repos","events_url":"https://api.github.com/users/bhanu546/events{/privacy}","received_events_url":"https://api.github.com/users/bhanu546/received_events","type":"User","site_admin":false},"created_at":"2016-10-13T13:27:06Z","updated_at":"2016-10-13T13:27:06Z","body":"> Use BioPython's built-in BLAST parser to parse the output. This is also done in filterByExpect_all_v2.py, although I've noticed a few mistakes just now so be careful\r\n\r\nIn reference to this, what does the parse the output mean? Could you please explain the statement?"}}
{"actor":{"display_login":"bhanu546"}}