Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update terminator type - 1990 #1997

Merged
merged 18 commits into from
Jan 21, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
small fixes and disabled portions of the drop-down menu
  • Loading branch information
nathandunn committed Jan 9, 2019
commit e85a7423506e1f8101bad85232422092ddd135f8
2 changes: 2 additions & 0 deletions client/apollo/js/JSONUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ function JSONUtils() {

JSONUtils.verbose_conversion = false;
JSONUtils.variantTypes = [ "SNV", "SNP", "MNV", "MNP", "INDEL", "SUBSTITUTION", "INSERTION", "DELETION" ];
JSONUtils.regulatorTypes = [ "TERMINATOR" ];


JSONUtils.MANUALLY_ASSOCIATE_TRANSCRIPT_TO_GENE = "Manually associate transcript to gene";
JSONUtils.MANUALLY_DISSOCIATE_TRANSCRIPT_FROM_GENE = "Manually dissociate transcript from gene";
Expand Down
9 changes: 6 additions & 3 deletions client/apollo/js/View/Track/AnnotTrack.js
Original file line number Diff line number Diff line change
Expand Up @@ -7271,12 +7271,12 @@ define([
updateDissociateTranscriptFromGeneItem: function() {
var menuItem = this.getMenuItem("dissociate_transcript_from_gene");
var selected = this.selectionManager.getSelection();
var currentType = selected[0].feature.get('type');
if (selected.length != 1) {
menuItem.set("disabled", true);
return;
}
if (JSONUtils.variantTypes.includes(currentType.toUpperCase())) {
var currentType = selected[0].feature.get('type');
if (JSONUtils.variantTypes.includes(currentType.toUpperCase()) || JSONUtils.regulatorTypes.includes(currentType.toUpperCase())) {
menuItem.set("disabled", true);
return;
}
Expand Down Expand Up @@ -7314,7 +7314,7 @@ define([
menuItems[i].setDisabled(false);
}
}
else if (selectedType === "miRNA" || selectedType == "snRNA" || selectedType === "snoRNA" ||
else if (selectedType === "miRNA" || selectedType === "snRNA" || selectedType === "snoRNA" ||
selectedType === "rRNA" || selectedType === "tRNA" || selectedType === "ncRNA") {
if (menuItems[i].label === selectedType) {
menuItems[i].setDisabled(true);
Expand Down Expand Up @@ -7342,6 +7342,9 @@ define([
else if (JSONUtils.variantTypes.includes(selectedType.toUpperCase())) {
menuItems[i].setDisabled(true);
}
else if (JSONUtils.regulatorTypes.includes(selectedType.toUpperCase())) {
menuItems[i].setDisabled(true);
}
else {
menuItems[i].setDisabled(false);
}
Expand Down