Skip to content

Commit

Permalink
Add gene annotation track to IGV. Fix #1494.
Browse files Browse the repository at this point in the history
  • Loading branch information
mccalluc committed Nov 10, 2016
1 parent 564e8b1 commit 63ba0dd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 2 additions & 0 deletions refinery/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,8 @@ def visualize_genome(request):
"fasta_url": url_base + genome + ".fa",
"index_url": url_base + genome + ".fa.fai",
"cytoband_url": url_base + "cytoBand.txt",
"bed_url": url_base + "refGene.bed",
"tbi_url": url_base + "refGene.bed.tbi",
"node_ids_json": node_ids_json
},
context_instance=RequestContext(request))
Expand Down
14 changes: 11 additions & 3 deletions refinery/templates/core/visualize/genome.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,21 @@
url: promise.relative_file_store_item_url,
format: promise.file_extension
};

if (promise.file_extension === "bam") {
igv_track.indexURL = promise.auxiliary_nodes[0];
}

return igv_track;

});
tracks.push({
name: "Genes",
type: "annotation",
format: "bed",
sourceType: "file",
url: "{{ bed_url|escapejs }}",
indexURL: "{{ tbi_url|escapejs }}",
order: Number.MAX_VALUE,
visibilityWindow: 300000000,
displayMode: "EXPANDED"
});
var div = $("#igv")[0];
var options = {
Expand Down

0 comments on commit 63ba0dd

Please sign in to comment.