Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
morpheus.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Daria Zenkova
morpheus.js
Commits
eb2cc358
Commit
eb2cc358
authored
Jun 08, 2016
by
Joshua Gould
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
specify https protocol to enable running locally without server
parent
dc0545ce
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
256 additions
and
263 deletions
+256
-263
js/morpheus-latest.min.js
js/morpheus-latest.min.js
+6
-6
src/sample_datasets.js
src/sample_datasets.js
+249
-249
src/ui/heat_map_key_listener.js
src/ui/heat_map_key_listener.js
+1
-8
No files found.
js/morpheus-latest.min.js
View file @
eb2cc358
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/sample_datasets.js
View file @
eb2cc358
morpheus
.
SampleDatasets
=
function
(
options
)
{
morpheus
.
SampleDatasets
=
function
(
options
)
{
if
(
!
options
.
openText
)
{
options
.
openText
=
'
Open
'
;
}
...
...
@@ -33,11 +33,11 @@ morpheus.SampleDatasets = function(options) {
exampleHtml
.
push
(
'
<div name="tcga"></div>
'
);
$
(
exampleHtml
.
join
(
''
)).
appendTo
(
$el
);
$el
.
find
(
'
[name=ccle]
'
).
on
(
'
click
'
,
function
(
e
)
{
$el
.
find
(
'
[name=ccle]
'
).
on
(
'
click
'
,
function
(
e
)
{
e
.
preventDefault
();
var
$this
=
$
(
this
);
var
obj
=
{};
$this
.
parents
(
'
tr
'
).
find
(
'
input:checked
'
).
each
(
function
(
i
,
c
)
{
$this
.
parents
(
'
tr
'
).
find
(
'
input:checked
'
).
each
(
function
(
i
,
c
)
{
obj
[
$
(
c
).
data
(
'
type
'
)]
=
true
;
});
...
...
@@ -45,12 +45,12 @@ morpheus.SampleDatasets = function(options) {
});
$el
.
on
(
'
click
'
,
'
[name=tcgaLink]
'
,
function
(
e
)
{
$el
.
on
(
'
click
'
,
'
[name=tcgaLink]
'
,
function
(
e
)
{
e
.
preventDefault
();
var
$this
=
$
(
this
);
var
type
=
$this
.
data
(
'
disease-type
'
);
var
obj
=
{};
$this
.
parents
(
'
tr
'
).
find
(
'
input:checked
'
).
each
(
function
(
i
,
c
)
{
$this
.
parents
(
'
tr
'
).
find
(
'
input:checked
'
).
each
(
function
(
i
,
c
)
{
obj
[
$
(
c
).
data
(
'
type
'
)]
=
true
;
});
var
options
;
...
...
@@ -68,7 +68,7 @@ morpheus.SampleDatasets = function(options) {
.
on
(
'
click
'
,
'
[data-toggle=dataTypeToggle]
'
,
function
(
e
)
{
function
(
e
)
{
var
$this
=
$
(
this
);
var
$button
=
$this
.
parents
(
'
tr
'
).
find
(
'
button
'
);
var
isDisabled
=
$this
.
parents
(
'
tr
'
).
find
(
...
...
@@ -80,7 +80,7 @@ morpheus.SampleDatasets = function(options) {
.
addClass
(
'
animated flash
'
)
.
one
(
'
webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend
'
,
function
()
{
function
()
{
$
(
this
).
removeClass
(
'
animated flash
'
);
});
...
...
@@ -88,9 +88,9 @@ morpheus.SampleDatasets = function(options) {
});
$
.
ajax
(
'
//s3.amazonaws.com/data.clue.io/morpheus/tcga/tcga_index.txt
'
)
'
https:
//s3.amazonaws.com/data.clue.io/morpheus/tcga/tcga_index.txt
'
)
.
done
(
function
(
text
)
{
function
(
text
)
{
var
lines
=
text
.
split
(
'
\n
'
);
var
diseases
=
[];
for
(
var
i
=
0
;
i
<
lines
.
length
;
i
++
)
{
...
...
@@ -103,20 +103,20 @@ morpheus.SampleDatasets = function(options) {
var
dataTypes
=
tokens
[
1
].
split
(
'
,
'
);
var
name
=
morpheus
.
TcgaUtil
.
DISEASE_STUDIES
[
type
];
var
disease
=
{
mrna
:
dataTypes
mrna
:
dataTypes
.
indexOf
(
'
mRNAseq_RSEM_normalized_log2.txt
'
)
!==
-
1
,
sig_genes
:
dataTypes
.
indexOf
(
'
sig_genes.txt
'
)
!==
-
1
,
gistic
:
dataTypes
sig_genes
:
dataTypes
.
indexOf
(
'
sig_genes.txt
'
)
!==
-
1
,
gistic
:
dataTypes
.
indexOf
(
'
all_lesions.conf_99.txt
'
)
!==
-
1
,
sample_info
:
dataTypes
.
indexOf
(
'
All_CDEs.txt
'
)
!==
-
1
,
mutation
:
dataTypes
sample_info
:
dataTypes
.
indexOf
(
'
All_CDEs.txt
'
)
!==
-
1
,
mutation
:
dataTypes
.
indexOf
(
'
mutations_merged.maf.txt
'
)
!==
-
1
,
rppa
:
dataTypes
.
indexOf
(
'
rppa.txt
'
)
!==
-
1
,
methylation
:
dataTypes
rppa
:
dataTypes
.
indexOf
(
'
rppa.txt
'
)
!==
-
1
,
methylation
:
dataTypes
.
indexOf
(
'
meth.by_mean.data.txt
'
)
!==
-
1
,
name
:
name
,
type
:
type
,
dataTypes
:
dataTypes
name
:
name
,
type
:
type
,
dataTypes
:
dataTypes
};
if
(
disease
.
mrna
||
disease
.
gistic
||
disease
.
sig_genes
||
disease
.
rppa
...
...
@@ -124,7 +124,7 @@ morpheus.SampleDatasets = function(options) {
diseases
.
push
(
disease
);
}
}
diseases
.
sort
(
function
(
a
,
b
)
{
diseases
.
sort
(
function
(
a
,
b
)
{
a
=
a
.
name
.
toLowerCase
();
b
=
b
.
name
.
toLowerCase
();
return
(
a
===
b
?
0
:
(
a
<
b
?
-
1
:
1
));
...
...
@@ -199,8 +199,8 @@ morpheus.SampleDatasets = function(options) {
});
};
morpheus
.
SampleDatasets
.
getTcgaDataset
=
function
(
options
)
{
var
baseUrl
=
'
//s3.amazonaws.com/data.clue.io/morpheus/tcga/
'
morpheus
.
SampleDatasets
.
getTcgaDataset
=
function
(
options
)
{
var
baseUrl
=
'
https:
//s3.amazonaws.com/data.clue.io/morpheus/tcga/
'
+
options
.
type
+
'
/
'
;
var
datasetOptions
=
{};
if
(
options
.
mrna
)
{
...
...
@@ -227,20 +227,20 @@ morpheus.SampleDatasets.getTcgaDataset = function(options) {
datasetOptions
.
mrnaClust
=
baseUrl
+
'
bestclus.txt
'
;
datasetOptions
.
columnAnnotations
=
[
{
file
:
baseUrl
+
'
All_CDEs.txt
'
,
datasetField
:
'
participant_id
'
,
fileField
:
'
patient_id
'
}
];
datasetOptions
.
columnAnnotations
=
[{
file
:
baseUrl
+
'
All_CDEs.txt
'
,
datasetField
:
'
participant_id
'
,
fileField
:
'
patient_id
'
}];
return
morpheus
.
TcgaUtil
.
getDataset
(
datasetOptions
);
};
morpheus
.
SampleDatasets
.
getCCLEDataset
=
function
(
options
)
{
morpheus
.
SampleDatasets
.
getCCLEDataset
=
function
(
options
)
{
var
datasets
=
[];
if
(
options
.
sig_genes
)
{
datasets
.
push
({
dataset
:
'
//s3.amazonaws.com/data.clue.io/morpheus/CCLE_hybrid_capture1650_hg19_NoCommonSNPs_NoNeutralVariants_CDS_2012.05.07.maf.txt
'
dataset
:
'
https:
//s3.amazonaws.com/data.clue.io/morpheus/CCLE_hybrid_capture1650_hg19_NoCommonSNPs_NoNeutralVariants_CDS_2012.05.07.maf.txt
'
});
// datasets
// .push({
...
...
@@ -251,64 +251,64 @@ morpheus.SampleDatasets.getCCLEDataset = function(options) {
if
(
options
.
cn
)
{
datasets
.
push
({
dataset
:
'
//s3.amazonaws.com/data.clue.io/morpheus/CCLE_copynumber_byGene_2013-12-03.gct
'
dataset
:
'
https:
//s3.amazonaws.com/data.clue.io/morpheus/CCLE_copynumber_byGene_2013-12-03.gct
'
});
}
if
(
options
.
mrna
)
{
datasets
.
push
({
dataset
:
'
//s3.amazonaws.com/data.clue.io/morpheus/CCLE_Expression_Entrez_2012-09-29.txt
'
dataset
:
'
https:
//s3.amazonaws.com/data.clue.io/morpheus/CCLE_Expression_Entrez_2012-09-29.txt
'
});
}
if
(
options
.
ach
)
{
datasets
.
push
({
dataset
:
'
//s3.amazonaws.com/data.clue.io/morpheus/Achilles_QC_v2.4.3.rnai.Gs.gct
'
dataset
:
'
https:
//s3.amazonaws.com/data.clue.io/morpheus/Achilles_QC_v2.4.3.rnai.Gs.gct
'
});
}
var
columnAnnotations
=
[
{
file
:
'
//s3.amazonaws.com/data.clue.io/morpheus/CCLE_Sample_Info.txt
'
,
datasetField
:
'
id
'
,
fileField
:
'
id
'
}
];
var
columnAnnotations
=
[{
file
:
'
https:
//s3.amazonaws.com/data.clue.io/morpheus/CCLE_Sample_Info.txt
'
,
datasetField
:
'
id
'
,
fileField
:
'
id
'
}];
if
(
options
.
ach
)
{
// there are several cell lines that are in Achilles but not CCLE
columnAnnotations
.
push
({
file
:
'
//s3.amazonaws.com/data.clue.io/morpheus/Achilles_v2.4_SampleInfo_small.txt
'
,
datasetField
:
'
id
'
,
fileField
:
'
id
'
file
:
'
https:
//s3.amazonaws.com/data.clue.io/morpheus/Achilles_v2.4_SampleInfo_small.txt
'
,
datasetField
:
'
id
'
,
fileField
:
'
id
'
});
}
var
returnDeferred
=
$
.
Deferred
();
var
datasetDef
=
morpheus
.
DatasetUtil
.
readDatasetArray
({
dataset
:
datasets
dataset
:
datasets
});
var
annotationDef
=
morpheus
.
DatasetUtil
.
annotate
({
annotations
:
columnAnnotations
,
isColumns
:
true
annotations
:
columnAnnotations
,
isColumns
:
true
});
var
datasetToReturn
;
datasetDef
.
done
(
function
(
d
)
{
datasetDef
.
done
(
function
(
d
)
{
datasetToReturn
=
d
;
});
datasetDef
.
fail
(
function
(
message
)
{
datasetDef
.
fail
(
function
(
message
)
{
returnDeferred
.
reject
(
message
);
});
var
annotationCallbacks
;
annotationDef
.
done
(
function
(
callbacks
)
{
annotationDef
.
done
(
function
(
callbacks
)
{
annotationCallbacks
=
callbacks
;
});
annotationDef
.
fail
(
function
(
message
)
{
annotationDef
.
fail
(
function
(
message
)
{
returnDeferred
.
reject
(
message
);
});
$
.
when
.
apply
(
$
,
[
datasetDef
,
annotationDef
]).
then
(
function
()
{
$
.
when
.
apply
(
$
,
[
datasetDef
,
annotationDef
]).
then
(
function
()
{
annotationCallbacks
.
forEach
(
function
(
f
)
{
annotationCallbacks
.
forEach
(
function
(
f
)
{
f
(
datasetToReturn
);
});
returnDeferred
.
resolve
(
datasetToReturn
);
...
...
@@ -318,18 +318,18 @@ morpheus.SampleDatasets.getCCLEDataset = function(options) {
};
morpheus
.
SampleDatasets
.
prototype
=
{
openTcga
:
function
(
options
)
{
openTcga
:
function
(
options
)
{
this
.
callback
({
name
:
options
.
name
,
renderReady
:
function
(
heatMap
)
{
name
:
options
.
name
,
renderReady
:
function
(
heatMap
)
{
var
whitelist
=
[
'
age_at_initial_pathologic_diagnosis
'
,
'
breast_carcinoma_estrogen_receptor_status
'
,
'
breast_carcinoma_progesterone_receptor_status
'
,
'
lab_proc_her2_neu_immunohistochemistry_receptor_status
'
,
'
days_to_death
'
,
'
ethnicity
'
,
'
gender
'
,
'
histological_type
'
,
'
pathologic_stage
'
];
'
histological_type
'
,
'
pathologic_stage
'
];
var
columnMetadata
=
heatMap
.
getProject
()
.
getFullDataset
().
getColumnMetadata
();
...
...
@@ -345,55 +345,55 @@ morpheus.SampleDatasets.prototype = {
}
}
},
columns
:
[
{
field
:
'
participant_id
'
,
display
:
'
text
'
columns
:
[
{
field
:
'
participant_id
'
,
display
:
'
text
'
},
{
field
:
'
sample_type
'
,
display
:
'
color
'
field
:
'
sample_type
'
,
display
:
'
color
'
},
{
field
:
'
mutation_summary
'
,
display
:
'
stacked_bar
'
field
:
'
mutation_summary
'
,
display
:
'
stacked_bar
'
},
{
field
:
'
mRNAseq_cluster
'
,
display
:
'
color, highlight
'
}
],
dataset
:
morpheus
.
SampleDatasets
.
getTcgaDataset
(
options
)
field
:
'
mRNAseq_cluster
'
,
display
:
'
color, highlight
'
}
],
dataset
:
morpheus
.
SampleDatasets
.
getTcgaDataset
(
options
)
});
},
openCCLE
:
function
(
options
)
{
openCCLE
:
function
(
options
)
{
this
.
callback
({
name
:
'
CCLE
'
,
rows
:
[
{
field
:
'
id
'
,
display
:
'
text,tooltip
'
name
:
'
CCLE
'
,
rows
:
[
{
field
:
'
id
'
,
display
:
'
text,tooltip
'
},
{
field
:
'
mutation_summary
'
,
display
:
'
stacked_bar
'
field
:
'
mutation_summary
'
,
display
:
'
stacked_bar
'
},
{
field
:
'
Source
'
,
display
:
'
color
'
}
],
columns
:
[
{
field
:
'
id
'
,
display
:
'
text
'
field
:
'
Source
'
,
display
:
'
color
'
}],
columns
:
[
{
field
:
'
id
'
,
display
:
'
text
'
},
{
field
:
'
mutation_summary
'
,
display
:
'
stacked_bar
'
field
:
'
mutation_summary
'
,
display
:
'
stacked_bar
'
},
{
field
:
'
gender
'
,
display
:
'
color, highlight
'
field
:
'
gender
'
,
display
:
'
color, highlight
'
},
{
field
:
'
histology
'
,
display
:
'
color, highlight
'
field
:
'
histology
'
,
display
:
'
color, highlight
'
},
{
field
:
'
histology subtype
'
,
display
:
'
color, highlight
'
field
:
'
histology subtype
'
,
display
:
'
color, highlight
'
},
{
field
:
'
primary_site
'
,
display
:
'
color, highlight
'
}
],
dataset
:
morpheus
.
SampleDatasets
.
getCCLEDataset
(
options
)
field
:
'
primary_site
'
,
display
:
'
color, highlight
'
}],
dataset
:
morpheus
.
SampleDatasets
.
getCCLEDataset
(
options
)
});
}
};
src/ui/heat_map_key_listener.js
View file @
eb2cc358
morpheus
.
HeatMapKeyListener
=
function
(
controller
)
{
var
keydown
=
function
(
e
)
{
// if ((e.isImmediatePropagationStopped && e
// .isImmediatePropagationStopped())
// || (e.isDefaultPrevented && e.isDefaultPrevented())) {
// return;
// }
var
tagName
=
e
.
target
.
tagName
;
if
(
tagName
==
'
INPUT
'
||
tagName
==
'
SELECT
'
||
tagName
==
'
TEXTAREA
'
)
{
return
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment