Skip to content

Commit 37b0e38

Browse files
authored
Merge pull request #91 from Integrative-Transcriptomics/dev
Dev
2 parents 9189e56 + 32c3253 commit 37b0e38

File tree

4 files changed

+20
-15
lines changed

4 files changed

+20
-15
lines changed

src/components/Result.jsx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,18 @@ function Result() {
7373
const allRows = masterTable.trim().split("\n"); // trim() removes trailing newline
7474
const headers = allRows[0].split("\t");
7575
let IDofSelectableColumns = []
76+
const isGenomeComparison = headers.indexOf("Genome") !== -1
7677
let tmpMetadataColumns = {}
77-
const col = headers.map((h, i) => {
78+
let col = headers.map((h, i) => {
79+
if (!isGenomeComparison) {
80+
if (["Pos", "Strand"].includes(h)) {
81+
return null;
82+
}
83+
if (["SuperPos", "SuperStrand"].includes(h)) {
84+
// Remove "Super" prefix
85+
h = h.replace("Super", "");
86+
}
87+
}
7888
if (selectHeaders.includes(h)) {
7989
IDofSelectableColumns.push(i)
8090
}
@@ -89,7 +99,8 @@ function Result() {
8999
sortingFn: h.startsWith("rep") ? "myReplicateSorting" : cappedValues.includes(h) ? "myCappedSorting" : sortingFns.alphanumeric
90100
};
91101
});
92-
const searchFor = headers.indexOf("Genome") !== -1 ? "Genome" : "Condition";
102+
col = col.filter((c) => c !== null);
103+
const searchFor = isGenomeComparison ? "Genome" : "Condition";
93104
const genomeIdx = headers.indexOf(searchFor);
94105

95106
const allG = new Set();

src/components/Result/GoslingVisualizations/AlignedGenomeViz.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ function AlignedGenomeViz({ dataGosling, filter, filePath, gosRef, maxValueWiggl
107107
}
108108
const completeView = (views, color, subtitle) => {
109109
return {
110-
"style": { "background": color, "backgroundOpacity": 0.25, "outline": "black", "outlineWidth": 2 },
110+
"style": { "backgroundOpacity": 0.25, "outline": "black", "outlineWidth": 2 },
111111
"subtitle": subtitle,
112112
"spacing": 0,
113113
"arrangement": "vertical",

src/components/Result/GoslingVisualizations/SharedGoslingFunctions.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export const createGenomeTrack = (filePath, genome, strand = "+",width) => {
6363
"mark": "text",
6464
"text": { "field": "base", "type": "nominal" },
6565
"x": { "field": "pos", "type": "genomic" },
66-
"style": { "textFontWeight": "bold", "align": "center" },
66+
"style": { "textFontWeight": "bold", "align": "center" , "textAlign": "center"},
6767
"size": { "value": 16 },
6868
"color": {
6969
"field": "base",
@@ -77,8 +77,8 @@ export const createGenomeTrack = (filePath, genome, strand = "+",width) => {
7777
{
7878
"operation": "LT",
7979
"measure": "zoomLevel",
80-
"threshold": 500,
81-
"transitionPadding": 1000,
80+
"threshold": 125,
81+
"transitionPadding": 50,
8282
"target": "mark"
8383
}]
8484

@@ -110,8 +110,6 @@ export const createBinnedView = (filePath, binSize, maxValueBin, filterTSS, stra
110110
"xe": { "field": "binEnd", "type": "genomic", "axis": "none" },
111111
"mark": "bar",
112112
width: width,
113-
114-
"style": { "background": strand === "+" ? "lightblue" : "#f59f95", "backgroundOpacity": 0.25 },
115113
"y": {
116114
"field": "count",
117115
"type": "quantitative",
@@ -221,10 +219,9 @@ export const createGFFTrack = (filePath, genomeName, strand, width) => {
221219
"mark": "rect",
222220
"x": { "field": "start", "type": "genomic", "axis": "none" },
223221
"xe": { "field": "end", "type": "genomic", "axis": "none" },
224-
"color": { "value": "grey" },
225-
"opacity": { "value": 0.4 },
222+
"color": { "value": "darkgrey" },
223+
"opacity": { "value": 0.75 },
226224
"size": { "value": 4 },
227-
"style": { background: strand === "+" ? "lightblue" : "#f59f95", backgroundOpacity: 0.15 },
228225
"tracks": [
229226
{
230227
"tooltip": [

src/components/Result/GoslingVisualizations/SingleGenomeViz.jsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ function SingleGenomeViz({ dataGosling, filter, filePath, gosRef, maxValueWiggle
3838
return [
3939
{
4040
"alignment": "overlay",
41-
"style": { background: strand === "+" ? "lightblue" : "#f59f95", backgroundOpacity: 0.25 },
4241
"tracks": [
4342
detailTSSTrack,
4443
...binnedViews,
@@ -72,9 +71,7 @@ function SingleGenomeViz({ dataGosling, filter, filePath, gosRef, maxValueWiggle
7271
let views = [];
7372
for (let genome of Object.keys(data)) {
7473
views.push({
75-
style: {
76-
background: "lightgray", backgroundOpacity: 0.25, outline: "black", outlineWidth: 2
77-
},
74+
style: {outline: "black", outlineWidth: 2},
7875
"alignment": "stack",
7976
"assembly": [[genome, data[genome]["lengthGenome"]]],
8077
"spacing": 0,

0 commit comments

Comments
 (0)