Skip to content

Commit

Permalink
Merge from undefined bug fix, bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
joshkh committed Jan 23, 2017
2 parents 82295b7 + cf57b1c commit 8ecba2d
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mi-model",
"version": "0.4.3",
"version": "0.4.4",
"description": "Model for representing Molecular Interaction data",
"main": "src/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

var model;

$.get( "json/EBI-11619951.json", function( data ) {

$.get( "json/EBI-1202920.json", function( data ) {
model = new MIModel(data).load().then(function(m) {
console.log("model", m);
});
Expand Down
1 change: 1 addition & 0 deletions public/json/EBI-10828997.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"data":[{"object":"interactor","id":"uniprotkb_Q9UMX1","sequence":"MAELRPSGAPGPTAPPAPGPTAPPAFASLFPPGLHAIYGECRRLYPDQPNPLQVTAIVKYWLGGPDPLDYVSMYRNVGSPSANIPEHWHYISFGLSDLYGDNRVHEFTGTDGPSGFGFELTFRLKRETGESAPPTWPAELMQGLARYVFQSENTFCSGDHVSWHSPLDNSESRIQHMLLTEDPQMQPVQTPFGVVTFLQIVGVCTEELHSAQQWNGQGILELLRTVPIAGGPWLITDMRRGETIFEIDPHLQERVDKGIETDGSNLSGVSAKCAWDDLSRPPEDDEDSRSICIGTQPRRLSGKDTEQIRETLRRGLEINSKPVLPPINPQRQNGLAHDRAPSRKDSLESDSSTAIIPHELIRTRQLESVHLKFNQESGALIPLCLRGRLLHGRHFTYKSITGDMAITFVSTGVEGAFATEEHPYAAHGPWLQILLTEEFVEKMLEDLEDLTSPEEFKLPKEYSWPEKKLKVSILPDVVFDSPLH","type":{"id":"MI:0326","name":"protein"},"organism":{"taxid":"9606","common":"human","scientific":"Homo sapiens"},"identifier":{"db":"uniprotkb","id":"Q9UMX1"},"label":"sufu_human"},{"object":"interactor","id":"uniprotkb_P10071","sequence":"MEAQSHSSTTTEKKKVENSIVKCSTRTDVSEKAVASSTTSNEDESPGQTYHRERRNAITMQPQNVQGLSKVSEEPSTSSDERASLIKKEIHGSLPHVAEPSVPYRGTVFAMDPRNGYMEPHYHPPHLFPAFHPPVPIDARHHEGRYHYDPSPIPPLHMTSALSSSPTYPDLPFIRISPHRNPTAASESPFSPPHPYINPYMDYIRSLHSSPSLSMISATRGLSPTDAPHAGVSPAEYYHQMALLTGQRSPYADIIPSAATAGTGAIHMEYLHAMDSTRFSSPRLSARPSRKRTLSISPLSDHSFDLQTMIRTSPNSLVTILNNSRSSSSASGSYGHLSASAISPALSFTYSSAPVSLHMHQQILSRQQSLGSAFGHSPPLIHPAPTFPTQRPIPGIPTVLNPVQVSSGPSESSQNKPTSESAVSSTGDPMHNKRSKIKPDEDLPSPGARGQQEQPEGTTLVKEEGDKDESKQEPEVIYETNCHWEGCAREFDTQEQLVHHINNDHIHGEKKEFVCRWLDCSREQKPFKAQYMLVVHMRRHTGEKPHKCTFEGCTKAYSRLENLKTHLRSHTGEKPYVCEHEGCNKAFSNASDRAKHQNRTHSNEKPYVCKIPGCTKRYTDPSSLRKHVKTVHGPEAHVTKKQRGDIHPRPPPPRDSGSHSQSRSPGRPTQGALGEQQDLSNTTSKREECLQVKTVKAEKPMTSQPSPGGQSSCSSQQSPISNYSNSGLELPLTDGGSIGDLSAIDETPIMDSTISTATTALALQARRNPAGTKWMEHVKLERLKQVNGMFPRLNPILPPKAPAVSPLIGNGTQSNNTCSLGGPMTLLPGRSDLSGVDVTMLNMLNRRDSSASTISSAYLSSRRSSGISPCFSSRRSSEASQAEGRPQNVSVADSYDPISTDASRRSSEASQSDGLPSLLSLTPAQQYRLKAKYAAATGGPPPTPLPNMERMSLKTRLALLGDALEPGVALPPVHAPRRCSDGGAHGYGRRHLQPHDAPGHGVRRASDPVRTGSEGLALPRVPRFSSLSSCNPPAMATSAEKRSLVLQNYTRPEGGQSRNFHSSPCPPSITENVTLESLTMDADANLNDEDFLPDDVVQYLNSQNQAGYEQHFPSALPDDSKVPHGPGDFDAPGLPDSHAGQQFHALEQPCPEGSKTDLPIQWNEVSSGSADLSSSKLKCGPRPAVPQTRAFGFCNGMVVHPQNPLRSGPAGGYQTLGENSNPYGGPEHLMLHNSPGSGTSGNAFHEQPCKAPQYGNCLNRQPVAPGALDGACGAGIQASKLKSTPMQGSGGQLNFGLPVAPNESAGSMVNGMQNQDPVGQGYLAHQLLGDSMQHPGAGRPGQQMLGQISATSHINIYQGPESCLPGAHGMGSQPSSLAVVRGYQPCASFGGSRRQAMPRDSLALQSGQLSDTSQTCRVNGIKMEMKGQPHPLCSNLQNYSGQFYDQTVGFSQQDTKAGSFSISDASCLLQGTSAKNSELLSPGANQVTSTVDSLDSHDLEGVQIDFDAIIDDGDHSSLMSGALSPSIIQNLSHSSSRLTTPRASLPFPALSMSTTNMAIGDMSSLLTSLAEESKFLAVMQ","type":{"id":"MI:0326","name":"protein"},"organism":{"taxid":"9606","common":"human","scientific":"Homo sapiens"},"identifier":{"db":"uniprotkb","id":"P10071"},"label":"gli3_human"},{"object":"interaction","id":"wwpdb_4bld","interactionType":{"id":"MI:0407","name":"direct interaction"},"complexType":{"id":"MI:1302","name":"stable complex"},"evidenceType":{"id":"ECO:0000353","name":"physical interaction evidence used in manual assertion"},"organism":{"taxid":"9606","common":"human","scientific":"Homo sapiens"},"identifiers":[{"db":"wwpdb","id":"4bld"},{"db":"intact","id":"EBI-10828997"}],"participants":[{"id":"1","interactorRef":"uniprotkb_Q9UMX1","stoichiometry":"1","bioRole":{"id":"MI:0499","name":"unspecified role"},"features":[{"id":"2","name":"gli3 binding region","category":"otherFeatures","type":{"id":"MI:0442","name":"sufficient binding region"},"sequenceData":[{"pos":"361-483","interactorRef":"uniprotkb_Q9UMX1","participantRef":"1"},{"pos":"32-278","interactorRef":"uniprotkb_Q9UMX1","participantRef":"1"}],"linkedFeatures":["3"]}]},{"id":"4","interactorRef":"uniprotkb_P10071","stoichiometry":"1","bioRole":{"id":"MI:0499","name":"unspecified role"},"features":[{"id":"3","name":"sufu binding region","category":"otherFeatures","type":{"id":"MI:0442","name":"sufficient binding region"},"sequenceData":[{"pos":"328-344","interactorRef":"uniprotkb_P10071","participantRef":"4"}],"linkedFeatures":["2"]}]}]}]}
12 changes: 8 additions & 4 deletions src/models/Interaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,15 @@ Interaction = Backbone.Model.extend({


// Now that participants have been created, add the features to this interaction
this.get("participants").each(function(participant) {
participant.get("features").each(function(feature) {
this.get("features").add(feature);
try {
this.get("participants").each(function(participant) {
participant.get("features").each(function(feature) {
this.get("features").add(feature);
}, this);
}, this);
}, this);
} catch (e) {
// No participants
}

// Also, now that all features exist, link them to each other
this.get("features").each(function(feature) {
Expand Down
14 changes: 8 additions & 6 deletions src/models/Participant.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@ Participant = Backbone.Model.extend({
.get("interactors")
.get(this.get("interactorRef")))
} catch (e) {

}

this.set("features", new Features(_.map(this.get("features"), (function(feature) {
feature.participant = this;
return feature;
}, this))));
}

if (this.get("features")) {
this.set("features", new Features(this.get("features").map(function(feature) {
feature.participant = this;
return feature;
}, this)));
}

},

});
Expand Down

0 comments on commit 8ecba2d

Please sign in to comment.