{"action":"created","issue":{"url":"https://api.github.com/repos/cjfields/redmine-test/issues/56","labels_url":"https://api.github.com/repos/cjfields/redmine-test/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/cjfields/redmine-test/issues/56/comments","events_url":"https://api.github.com/repos/cjfields/redmine-test/issues/56/events","html_url":"https://github.com/cjfields/redmine-test/issues/56","id":110318023,"number":56,"title":"Trace data in Bio::SeqIO::scf appears scrambled","user":{"login":"cjfields","id":49265,"avatar_url":"https://avatars.githubusercontent.com/u/49265?v=3","gravatar_id":"","url":"https://api.github.com/users/cjfields","html_url":"https://github.com/cjfields","followers_url":"https://api.github.com/users/cjfields/followers","following_url":"https://api.github.com/users/cjfields/following{/other_user}","gists_url":"https://api.github.com/users/cjfields/gists{/gist_id}","starred_url":"https://api.github.com/users/cjfields/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjfields/subscriptions","organizations_url":"https://api.github.com/users/cjfields/orgs","repos_url":"https://api.github.com/users/cjfields/repos","events_url":"https://api.github.com/users/cjfields/events{/privacy}","received_events_url":"https://api.github.com/users/cjfields/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cjfields/redmine-test/labels/Category:%20Bio::SeqIO","name":"Category: Bio::SeqIO","color":"009999"},{"url":"https://api.github.com/repos/cjfields/redmine-test/labels/Component:%20URL","name":"Component: URL","color":"ededed"},{"url":"https://api.github.com/repos/cjfields/redmine-test/labels/Priority:%20Normal","name":"Priority: Normal","color":"666600"},{"url":"https://api.github.com/repos/cjfields/redmine-test/labels/Status:%20New","name":"Status: New","color":"FF6600"},{"url":"https://api.github.com/repos/cjfields/redmine-test/labels/Tracker:%20Bug","name":"Tracker: Bug","color":"FF0000"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/cjfields/redmine-test/milestones/1","html_url":"https://github.com/cjfields/redmine-test/milestones/main-trunk","labels_url":"https://api.github.com/repos/cjfields/redmine-test/milestones/1/labels","id":1343339,"number":1,"title":"main-trunk","description":null,"creator":{"login":"cjfields","id":49265,"avatar_url":"https://avatars.githubusercontent.com/u/49265?v=3","gravatar_id":"","url":"https://api.github.com/users/cjfields","html_url":"https://github.com/cjfields","followers_url":"https://api.github.com/users/cjfields/followers","following_url":"https://api.github.com/users/cjfields/following{/other_user}","gists_url":"https://api.github.com/users/cjfields/gists{/gist_id}","starred_url":"https://api.github.com/users/cjfields/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjfields/subscriptions","organizations_url":"https://api.github.com/users/cjfields/orgs","repos_url":"https://api.github.com/users/cjfields/repos","events_url":"https://api.github.com/users/cjfields/events{/privacy}","received_events_url":"https://api.github.com/users/cjfields/received_events","type":"User","site_admin":false},"open_issues":21,"closed_issues":0,"state":"open","created_at":"2015-10-07T19:48:44Z","updated_at":"2015-10-07T21:14:10Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-10-07T21:14:10Z","updated_at":"2015-10-07T21:14:13Z","closed_at":null,"body":"---\n\n\nAuthor Name: **Charles Tilford** (Charles Tilford)\nOriginal Redmine Issue: 2858, https://redmine.open-bio.org/issues/2858\nOriginal Date: 2009-06-18\nOriginal Assignee: Bioperl Guts\n\n---\n\nI’m using the SCF Bio::SeqIO module to parse trace data out of chromatograms. The SCF files are being produced by phred using the “-cd” parameter. The traces come out great, and the corresponding base calls from the .phd files align with the peaks wonderfully when I visualize them on a rendered trace. However, only the A bases align to the appropriate trace channel, the rest are mixed up. I find that if I do the following re-mapping, the phred base calls match the trace:\n\nSeqIO : Remapped\nA : A\nC : G\nG : T\nT : C\n\nThe relevant part of Bio::SeqIO::scf is here:\n\nhttp://doc.bioperl.org/releases/bioperl-current/bioperl-live/Bio/SeqIO/scf.html\\#CODE9\n\n… which indicates that it expects the pack()ed trace data to be in order ATGC. The base call parsing code is here:\n\nhttp://doc.bioperl.org/releases/bioperl-current/bioperl-live/Bio/SeqIO/scf.html\\#CODE8\n\n… which is unpacking in order ACGT. As far as I can tell, the relevant official SCF documentation is here:\n\nhttp://staden.sourceforge.net/manual/formats\\_unix\\_4.html\n\n… which indicates that both trace and base order should be ACGT (matching the SeqIO unpack() for bases, but not traces). My empirical channel unscrambling mapping implies order ACTG, which is different from either of the two orders above. The sequence from the SCF file (should be that from original AB1 file, I think) is not perfectly identical to that called by phred, but is very similar (to be expected); that is, I don’t need to remap C, G and T to get it to align with the phred data.\n\nSo it looks like the SeqIO module is not mapping the sections of the packed trace data to the appropriate bases. The unpack order is different than the staden documentation … but so is the order I impose to correct the problem. I am still unclear as to the differences between V2 and V3 of the format. The major difference appears to be coding the trace absolutely (V2) or relatively to prior values (V3); I’d expect if I was using one format and SeqIO was trying to parse the other that I would get garbage out. Running in verbose reports “scf.pm is working with a version 2 scf.”\n\nFWIW, the trace() method returns nothing (or “0”, I think). I am skiping the API and digging the data out from the {trace} hash in the returned SeqWithQuality object. That hash is in turn keyed to {a} {c} {t} and {g}, each pointing to an array of trace values. I suppose another fix would be to get that data formally tied into the API so the trace\\*() methods return the content?\n\n\n\n\n"},"comment":{"url":"https://api.github.com/repos/cjfields/redmine-test/issues/comments/146331246","html_url":"https://github.com/cjfields/redmine-test/issues/56#issuecomment-146331246","issue_url":"https://api.github.com/repos/cjfields/redmine-test/issues/56","id":146331246,"user":{"login":"cjfields","id":49265,"avatar_url":"https://avatars.githubusercontent.com/u/49265?v=3","gravatar_id":"","url":"https://api.github.com/users/cjfields","html_url":"https://github.com/cjfields","followers_url":"https://api.github.com/users/cjfields/followers","following_url":"https://api.github.com/users/cjfields/following{/other_user}","gists_url":"https://api.github.com/users/cjfields/gists{/gist_id}","starred_url":"https://api.github.com/users/cjfields/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjfields/subscriptions","organizations_url":"https://api.github.com/users/cjfields/orgs","repos_url":"https://api.github.com/users/cjfields/repos","events_url":"https://api.github.com/users/cjfields/events{/privacy}","received_events_url":"https://api.github.com/users/cjfields/received_events","type":"User","site_admin":false},"created_at":"2015-10-07T21:14:13Z","updated_at":"2015-10-07T21:14:13Z","body":"---\n\nOriginal Redmine Comment\nAuthor Name: **Chris Fields** \nOriginal Date: 2010-03-04T13:54:40Z\n\n---\n\nI am committing a fix that corrects the order. We need to evaluate the results of the parser vs true io\\_lib-based output (via Bio::SCF or the BioLib bindings) to ensure we’re getting the right information. I’ll see what I can come up with.\n\n"}}