Skip to content

Commit

Permalink
Merge pull request #159 from broadinstitute/integration
Browse files Browse the repository at this point in the history
Integration
  • Loading branch information
kataviz authored Sep 20, 2018
2 parents 71ea309 + b14796d commit b8bbdab
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 363 deletions.
126 changes: 4 additions & 122 deletions build/js/gtex-viz.bundle.dev.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions build/js/gtex-viz.bundle.min.js

Large diffs are not rendered by default.

118 changes: 0 additions & 118 deletions demo/GTExViz.transcriptTracks.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,106 +41,6 @@ <h5>Transcript Viewer</h5>
function getData(){
return {
"exons": {
"ENST00000578419.1": [
{
"chrom": "17",
"chromStart": 77071021,
"chromEnd": 77071172,
"strand": "+",
"exonNumber": "1",
"exonId": "ENSE00003502032.1"

},
{
"chrom": "17",
"chromEnd": 77073579,
"exonId": "ENSE00003672628.1",
"exonNumber": "2",
"chromStart": 77073512,
"strand": "+"
},
{
"chrom": "17",
"chromEnd": 77073946,
"exonId": "ENSE00003475281.1",
"exonNumber": "3",
"chromStart": 77073745,
"strand": "+"
},
{
"chrom": "17",
"chromEnd": 77076446,
"exonId": "ENSE00003679852.1",
"exonNumber": "4",
"chromStart": 77076289,
"strand": "+"
},
{
"chrom": "17",
"chromEnd": 77077155,
"exonId": "ENSE00003583515.1",
"exonNumber": "5",
"chromStart": 77077007,
"strand": "+"
},
{
"chrom": "17",
"chromEnd": 77078631,
"exonId": "ENSE00003589230.1",
"exonNumber": "6",
"chromStart": 77077980,
"strand": "+"
}
],
"ENST00000539857.2": [
{
"chrom": "17",
"chromEnd": 77071172,
"exonId": "ENSE00003512401.1",
"exonNumber": "1",
"chromStart": 77071021,
"strand": "+"
},
{
"chrom": "17",
"chromEnd": 77073579,
"exonId": "ENSE00003623828.1",
"exonNumber": "2",
"chromStart": 77073512,
"strand": "+"
},
{
"chrom": "17",
"chromEnd": 77073946,
"exonId": "ENSE00003638693.1",
"exonNumber": "3",
"chromStart": 77073745,
"strand": "+"
},
{
"chrom": "17",
"chromEnd": 77076446,
"exonId": "ENSE00003651250.1",
"exonNumber": "4",
"chromStart": 77076289,
"strand": "+"
},
{
"chrom": "17",
"chromEnd": 77077155,
"exonId": "ENSE00003607773.1",
"exonNumber": "5",
"chromStart": 77077007,
"strand": "+"
},
{
"chrom": "17",
"chromEnd": 77078631,
"exonId": "ENSE00003488117.1",
"exonNumber": "6",
"chromStart": 77077980,
"strand": "+"
}],
"ENST00000311595.9": [
{
"chrom": "17",
Expand Down Expand Up @@ -201,24 +101,6 @@ <h5>Transcript Viewer</h5>
]
},
"transcripts": [
{
"chromosome": "17",
"end": 77078631,
"gencodeId": "ENSG00000167280.12",
"geneSymbol": "ENGASE",
"start": 77071021,
"strand": "+",
"transcriptId": "ENST00000578419.1"
},
{
"chromosome": "17",
"end": 77078631,
"gencodeId": "ENSG00000167280.12",
"geneSymbol": "ENGASE",
"start": 77071021,
"strand": "+",
"transcriptId": "ENST00000539857.2"
},
{
"chromosome": "17",
"end": 77078612,
Expand Down
121 changes: 1 addition & 120 deletions src/GTExViz.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,106 +170,6 @@ export const demoData = {
],
transcriptTracks: {
"exons": {
"ENST00000578419.1": [
{
"chrom": "17",
"chromStart": 77071021,
"chromEnd": 77071172,
"strand": "+",
"exonNumber": "1",
"exonId": "ENSE00003502032.1"

},
{
"chrom": "17",
"chromEnd": 77073579,
"exonId": "ENSE00003672628.1",
"exonNumber": "2",
"chromStart": 77073512,
"strand": "+"
},
{
"chrom": "17",
"chromEnd": 77073946,
"exonId": "ENSE00003475281.1",
"exonNumber": "3",
"chromStart": 77073745,
"strand": "+"
},
{
"chrom": "17",
"chromEnd": 77076446,
"exonId": "ENSE00003679852.1",
"exonNumber": "4",
"chromStart": 77076289,
"strand": "+"
},
{
"chrom": "17",
"chromEnd": 77077155,
"exonId": "ENSE00003583515.1",
"exonNumber": "5",
"chromStart": 77077007,
"strand": "+"
},
{
"chrom": "17",
"chromEnd": 77078631,
"exonId": "ENSE00003589230.1",
"exonNumber": "6",
"chromStart": 77077980,
"strand": "+"
}
],
"ENST00000539857.2": [
{
"chrom": "17",
"chromEnd": 77071172,
"exonId": "ENSE00003512401.1",
"exonNumber": "1",
"chromStart": 77071021,
"strand": "+"
},
{
"chrom": "17",
"chromEnd": 77073579,
"exonId": "ENSE00003623828.1",
"exonNumber": "2",
"chromStart": 77073512,
"strand": "+"
},
{
"chrom": "17",
"chromEnd": 77073946,
"exonId": "ENSE00003638693.1",
"exonNumber": "3",
"chromStart": 77073745,
"strand": "+"
},
{
"chrom": "17",
"chromEnd": 77076446,
"exonId": "ENSE00003651250.1",
"exonNumber": "4",
"chromStart": 77076289,
"strand": "+"
},
{
"chrom": "17",
"chromEnd": 77077155,
"exonId": "ENSE00003607773.1",
"exonNumber": "5",
"chromStart": 77077007,
"strand": "+"
},
{
"chrom": "17",
"chromEnd": 77078631,
"exonId": "ENSE00003488117.1",
"exonNumber": "6",
"chromStart": 77077980,
"strand": "+"
}],
"ENST00000311595.9": [
{
"chrom": "17",
Expand Down Expand Up @@ -330,25 +230,6 @@ export const demoData = {
]
},
"transcripts": [
{

"chromosome": "17",
"end": 77078631,
"gencodeId": "ENSG00000167280.12",
"geneSymbol": "ENGASE",
"start": 77071021,
"strand": "+",
"transcriptId": "ENST00000578419.1"
},
{
"chromosome": "17",
"end": 77078631,
"gencodeId": "ENSG00000167280.12",
"geneSymbol": "ENGASE",
"start": 77071021,
"strand": "+",
"transcriptId": "ENST00000539857.2"
},
{
"chromosome": "17",
"end": 77078612,
Expand Down Expand Up @@ -403,7 +284,7 @@ export function transcriptTracks(par=transcriptTracksConfig){
h: inHeight,
labelOn: par.labelPos
};
let viewer = new IsoformTrackViewer(par.data.transcripts, par.data.exons, par.data.exons["ENST00000578419.1"], config);
let viewer = new IsoformTrackViewer(par.data.transcripts, par.data.exons, undefined, config);
viewer.render(false, svg, par.labelPos);

}
Expand Down
3 changes: 2 additions & 1 deletion src/modules/IsoformTrackViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ export default class IsoformTrackViewer {

_renderModels(w, labelOn = 'left'){
this.isoforms.forEach((isoform) => {
const model = new GeneModel(isoform, this.modelExons, this.isoformExons[isoform.transcriptId], [], true);
let reference = (this.modelExons === undefined || this.modelExons === null)?this.isoformExons[isoform.transcriptId]:this.modelExons;
const model = new GeneModel(isoform, reference, this.isoformExons[isoform.transcriptId], [], true);
const isoformG = select(`#${isoform.transcriptId.replace(".", "_")}`);
model.render(isoformG, {w:w, h: this.yScale.bandwidth(), labelOn: labelOn});
});
Expand Down

0 comments on commit b8bbdab

Please sign in to comment.