Skip to content

Commit efaf2b0

Browse files
authored
Merge pull request #52 from reactome/48-remove-logging
chore: Removed logging from all files to clear console.
2 parents eb73111 + 5fa5246 commit efaf2b0

File tree

20 files changed

+56
-56
lines changed

20 files changed

+56
-56
lines changed

projects/pathway-browser/src/app/details/tabs/result-tab/result-tab.component.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -148,29 +148,29 @@ export class ResultTabComponent {
148148
let size = data.length
149149
if (this.includeGrouping() === false) {
150150
data = data.filter(p => p.llp)
151-
console.log('Filter llp', size, '==>', data.length)
151+
//console.log('Filter llp', size, '==>', data.length)
152152
size = data.length
153153
}
154154
if (this.includeDisease() === false) {
155155
data = data.filter(p => !p.inDisease)
156-
console.log('Filter disease', size, '==>', data.length)
156+
//console.log('Filter disease', size, '==>', data.length)
157157
size = data.length
158158
}
159159
if (this.state.fdrFilter() !== undefined) {
160160
data = data.filter(p => p.entities.fdr <= this.state.fdrFilter()!)
161-
console.log('Filter fdr', size, '==>', data.length)
161+
//console.log('Filter fdr', size, '==>', data.length)
162162
}
163163
if (this.state.minExpressionFilter() !== undefined) {
164164
data = data.filter(p => p.entities.exp[this.analysis.sampleIndex()] >= this.state.minExpressionFilter()!)
165-
console.log('Filter minExpression', size, '==>', data.length)
165+
//console.log('Filter minExpression', size, '==>', data.length)
166166
}
167167
if (this.state.maxExpressionFilter() !== undefined) {
168168
data = data.filter(p => p.entities.exp[this.analysis.sampleIndex()] <= this.state.maxExpressionFilter()!)
169-
console.log('Filter minExpression', size, '==>', data.length)
169+
//console.log('Filter minExpression', size, '==>', data.length)
170170
}
171171
if (this.state.gsaFilter().length !== 0) {
172172
data = data.filter(p => this.gsaFilterSet().has(p.entities.exp[this.analysis.sampleIndex()]))
173-
console.log('Filter gsa', size, '==>', data.length)
173+
//console.log('Filter gsa', size, '==>', data.length)
174174
}
175175
return data
176176
})
@@ -182,15 +182,15 @@ export class ResultTabComponent {
182182
let size = data.length
183183
if (this.state.pathwayMinSizeFilter()) {
184184
data = data.filter(p => p.entities.total >= this.state.pathwayMinSizeFilter()!)
185-
console.log('Filter min size', size, '==>', data.length)
185+
//console.log('Filter min size', size, '==>', data.length)
186186
size = data.length
187187
}
188188
if (this.state.pathwayMaxSizeFilter()) {
189189
data = data.filter(p => p.entities.total <= this.state.pathwayMaxSizeFilter()!)
190-
console.log('Filter max size', size, '==>', data.length)
190+
//console.log('Filter max size', size, '==>', data.length)
191191
size = data.length
192192
}
193-
console.log("Total filter", this.analysis.result()?.pathways.length, '==>', size)
193+
//console.log("Total filter", this.analysis.result()?.pathways.length, '==>', size)
194194
return data;
195195
})
196196

@@ -276,7 +276,7 @@ export class ResultTabComponent {
276276

277277
visitPathway(pathway: Analysis.Pathway) {
278278
this.data.selectedPathwayStId.set(pathway.stId)
279-
console.log("Navigating to " + pathway.stId)
279+
//console.log("Navigating to " + pathway.stId)
280280
this.state.navigateTo(pathway.stId, {queryParamsHandling: 'preserve', preserveFragment: true})
281281
}
282282

projects/pathway-browser/src/app/diagram/diagram.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,7 @@ export class DiagramComponent implements AfterViewInit, OnDestroy {
964964

965965
const resource = this.state.overlay();
966966
if (resource) {
967-
console.log('Resource not null', resource)
967+
//console.log('Resource not null', resource)
968968
this.interactorsComponent()?.getInteractors(resource)
969969
}
970970

@@ -1064,7 +1064,7 @@ export class DiagramComponent implements AfterViewInit, OnDestroy {
10641064
filter((e) => e.detail.cy !== this.legend && e.type === ReactomeEventTypes.unselect)
10651065
).subscribe(e => {
10661066
if (this.state.select() === e.detail.element.data('graph.stId')) {
1067-
console.log('Unselect', e.detail.reactomeId)
1067+
//console.log('Unselect', e.detail.reactomeId)
10681068
this.state.select.set(null)
10691069
}
10701070
})

projects/pathway-browser/src/app/event-hierarchy/event-hierarchy.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ export class EventHierarchyComponent implements AfterViewInit, OnDestroy {
250250

251251
// Combine all data and merged into one object
252252
initialData$.pipe(
253-
tap(d => console.log('Initial data', d)),
253+
//tap(d => console.log('Initial data', d)),
254254
switchMap(initialData =>
255255
enhancedEventData$.pipe(
256256
combineLatestWith(
@@ -265,14 +265,14 @@ export class EventHierarchyComponent implements AfterViewInit, OnDestroy {
265265
}))
266266
)
267267
),
268-
tap(d => console.log('Combined data', d)),
268+
//tap(d => console.log('Combined data', d)),
269269

270270
// Build the tree with all data
271271
switchMap(({
272272
enhancedEvent,
273273
hitReactions
274274
}) => this.eventService.buildTree(enhancedEvent, this.pathwayId(), this.tree, hitReactions)),
275-
tap(d => console.log('Final data', d)),
275+
//tap(d => console.log('Final data', d)),
276276
).subscribe({
277277
next: () => {
278278
// Give pathway id when idToUse is PEs

projects/pathway-browser/src/app/reacfoam/reacfoam.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ export class ReacfoamComponent implements OnDestroy {
207207
if (selectedElement && isRLE(selectedElement)) {
208208
const flaggingResult = await firstValueFrom(this.data.getReacfoamFlagging(selectedElement.stId, this.species.currentSpecies().displayName));
209209
if (flaggingResult.matches && flaggingResult.matches.length === 1) {
210-
console.log('Selecting in reacfoam the parent pathway of a reaction as it is only contained in one pathway')
210+
//console.log('Selecting in reacfoam the parent pathway of a reaction as it is only contained in one pathway')
211211
this.select.set(flaggingResult.matches[0]);
212212
}
213213
}

projects/pathway-browser/src/app/reacfoam/reacfoam.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,13 @@ export class ReacfoamService {
115115

116116
fetchEventsHierarchy(species: Species, params: Partial<EventsHierarchy.QueryParams>): Observable<EventsHierarchy.Data[]> {
117117
cleanObject(params)
118-
console.log('fetch events hierarchy')
118+
//console.log('fetch events hierarchy')
119119
return this.http.get<EventsHierarchy.Data[]>(`${CONTENT_SERVICE}/data/eventsHierarchy/${species.taxId}`, {params})
120120
}
121121

122122

123123
fetchTLPLayoutMap(): Observable<Map<string, Layout.Data>> {
124-
console.log('fetch tlp layout')
124+
//console.log('fetch tlp layout')
125125
return this.http.get(LAYOUT_URL, {responseType: "text"}).pipe(
126126
map((text) => new Map(
127127
text.split("\n") // Split lines

projects/pathway-browser/src/app/services/analysis.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ export class AnalysisService {
245245
species: this.state.speciesFilter()
246246
}),
247247
loader: ({request, previous}) => {
248-
console.log("Loading ", request, previous)
248+
//console.log("Loading ", request, previous)
249249
return request.token ?
250250
this.loadAnalysis(request.token, {
251251
resource: request.resource || undefined,
@@ -323,7 +323,7 @@ export class AnalysisService {
323323

324324
effect(() => {
325325
const result = this.result();
326-
console.log('Result updated', result)
326+
//console.log('Result updated', result)
327327
if (!result) return
328328
const validGroups: Set<PaletteGroup> = new Set();
329329
if (result.summary.type === 'GSA_REGULATION') {

projects/pathway-browser/src/app/services/data-state.service.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export class DataStateService {
9696
diagram: this.state.pathwayId(),
9797
species: this.species.currentSpecies().displayName,
9898
})
99-
console.log('updating request', params);
99+
// console.log('updating request', params);
100100
return params;
101101
})
102102

@@ -155,8 +155,8 @@ export class DataStateService {
155155

156156

157157
constructor(private state: UrlStateService, private http: HttpClient, private species: SpeciesService) {
158-
effect(() => console.log('Flagging', this.flagIdentifiers()));
159-
effect(() => console.log('Flagging error', this.flagResource.error()));
158+
// effect(() => console.log('Flagging', this.flagIdentifiers()));
159+
// effect(() => console.log('Flagging error', this.flagResource.error()));
160160
effect(() => {
161161
if (this._selectedElement.error()) this.state.select.set(null); // If selection doesn't exist (wrong id), we remove selection
162162
});

projects/pathway-browser/src/app/services/diagram.service.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -202,18 +202,18 @@ export class DiagramService {
202202
diagram: this.http.get<Diagram>(`${this.general.download()}/diagram/${id}.json`),
203203
graph: this.http.get<Graph.Data>(`${this.general.download()}/diagram/${id}.graph.json`)
204204
}).pipe(
205-
tap(({diagram, graph}) => console.log('Original diagram:', diagram, 'Original graph', graph)),
205+
// tap(({diagram, graph}) => console.log('Original diagram:', diagram, 'Original graph', graph)),
206206
switchMap(({diagram, graph}) => {
207207
if (diagram.forNormalDraw !== undefined && !diagram.forNormalDraw) {
208208
return this.getNormalPathway(diagram.stableId).pipe(
209209
switchMap(normalPathwayId => forkJoin({
210210
normalDiagram: this.http.get<Diagram>(`${this.general.download()}/diagram/${normalPathwayId}.json`),
211211
normalGraph: this.http.get<Graph.Data>(`${this.general.download()}/diagram/${normalPathwayId}.graph.json`)
212212
})),
213-
tap(({
214-
normalGraph,
215-
normalDiagram
216-
}) => console.log('Normal diagram:', normalGraph, 'Normal graph', normalDiagram)),
213+
// tap(({
214+
// normalGraph,
215+
// normalDiagram
216+
// }) => console.log('Normal diagram:', normalGraph, 'Normal graph', normalDiagram)),
217217
map(({normalGraph, normalDiagram}) => {
218218
graph.nodes.push(...normalGraph.nodes);
219219
graph.edges.push(...normalGraph.edges);
@@ -233,7 +233,7 @@ export class DiagramService {
233233
return of({diagram, graph});
234234
}
235235
}),
236-
tap((mergedResponse) => console.log('All responses:', mergedResponse)),
236+
// tap((mergedResponse) => console.log('All responses:', mergedResponse)),
237237
map(mergedResponse => ({
238238
...mergedResponse,
239239
chebiMapping: this.getCHEBIStructure(
@@ -244,7 +244,7 @@ export class DiagramService {
244244
)
245245
})),
246246
map(({diagram, graph, chebiMapping}) => this.diagramFromData(diagram, graph, id, chebiMapping)),
247-
tap((output) => console.log('Output:', output)),
247+
// tap((output) => console.log('Output:', output)),
248248
)
249249

250250
}
@@ -255,11 +255,11 @@ export class DiagramService {
255255
id: number | string = '',
256256
chebiMapping: Map<string, Promise<string | undefined>> = new Map()
257257
): cytoscape.ElementsDefinition {
258-
console.log("edge.reactionType", new Set(diagram.edges.flatMap(edge => edge.reactionType)))
259-
console.log("node.connectors.types", new Set(diagram.nodes.flatMap(node => node.connectors.flatMap(con => con.type))))
260-
console.log("node.renderableClass", new Set(diagram.nodes.flatMap(node => node.renderableClass)))
261-
console.log("links.renderableClass", new Set(diagram.links.flatMap(link => link.renderableClass)))
262-
console.log("shadow.renderableClass", new Set(diagram.shadows.flatMap(shadow => shadow.renderableClass)))
258+
// console.log("edge.reactionType", new Set(diagram.edges.flatMap(edge => edge.reactionType)))
259+
// console.log("node.connectors.types", new Set(diagram.nodes.flatMap(node => node.connectors.flatMap(con => con.type))))
260+
// console.log("node.renderableClass", new Set(diagram.nodes.flatMap(node => node.renderableClass)))
261+
// console.log("links.renderableClass", new Set(diagram.links.flatMap(link => link.renderableClass)))
262+
// console.log("shadow.renderableClass", new Set(diagram.shadows.flatMap(shadow => shadow.renderableClass)))
263263

264264
const idToEdges = new Map<number, Edge>(diagram.edges.map(edge => [edge.id, edge]));
265265
const idToNodes = new Map<number, Node>(diagram.nodes.map(node => [node.id, node]));
@@ -673,7 +673,7 @@ export class DiagramService {
673673
}
674674
)
675675

676-
console.log('All data created')
676+
// console.log('All data created')
677677
return {
678678
nodes: [...compartmentNodes, ...reactionNodes, ...entityNodes, ...shadowNodes],
679679
edges: [...edges, ...linkEdges]

projects/pathway-browser/src/app/services/event.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ export class EventService {
360360
: object.stId;
361361
this.dboService.setCurrentObj(object);
362362

363-
console.log('Build tree with selected event', idToBuild);
363+
// console.log('Build tree with selected event', idToBuild);
364364
const ancestors = idToBuild
365365
? this.fetchEventAncestors(idToBuild).pipe(map(ancestors => this.getFinalAncestor(ancestors, diagramId ? [diagramId] : undefined)))
366366
: from([[] as Event[]]);

projects/pathway-browser/src/app/services/species.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export class SpeciesService {
116116
newValue = newValue.replaceAll(initial, replacement || '');
117117
}
118118
newValue = newValue.replaceAll(',""', '').replaceAll('""', '').trim() // Remove trailing commas and quotes from lists
119-
console.log(value, " => ", newValue);
119+
// console.log(value, " => ", newValue);
120120
if (newValue.length === 0) delete params[key];
121121
else params[key] = JSON.parse(newValue);
122122
}

0 commit comments

Comments
 (0)