From: David R. <ros...@uc...> - 2009-09-24 03:13:52
|
From what I can see, there is no 'easy' way to use multiple glyphs per track in the current implementation (something I am interested in doing). Is this something you plan to implement? I have come up with a short-term solution (hack) to this problem through modifying the FeatureTrack.js file. here's a diff of my addition: --- FeatureTrack.js 2009-09-23 21:04:08.000000000 -0500 +++ FeatureTrack.old.js 2009-09-23 15:42:15.000000000 -0500 @@ -363,32 +363,6 @@ featDiv.className = "minus-" + className; break; } - - var cnvReTester = /^CNV-.*$/; - if (feature[name].search(cnvReTester) == 0) { - var fSlots = feature[name].split(/-/); - if (fSlots[1].charAt(0) == '1') { // i.e. is CNV - if ((fSlots[1].charAt(1) * 1) < 2) { // i.e. is deletion - featDiv.className = 'deletion' + fSlots[1].charAt(1); - } else { - featDiv.className = 'duplication' + fSlots[1].charAt(1); - } - } else if (fSlots[1].charAt(0) == '2') { // i.e. is probe - switch (fSlots[1].charAt(1)) { - case '1': - featDiv.className = 'snpprobe'; break; - case '2': - featDiv.className = 'exonprobe'; break; - case '3': - featDiv.className = 'gapprobe'; break; - } - } - }; - - - - - if ((phase !== undefined) && (feature[phase] !== null)) featDiv.className = featDiv.className + feature[phase]; As you can see, I wrote it specifically to address my particular needs, although it could easily be 'generalized' to allow for any javascript callback using the 5 features stored in the json data. David M. Rosenberg University of Chicago Committee on Neurobiology 947 E 58th St. MC 0928 Chicago, IL 60637 (773) 299-8740 ros...@uc... http://www.palmerlab.org/Members/rosenbergdm |