Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -148,29 +148,29 @@ export class ResultTabComponent {
let size = data.length
if (this.includeGrouping() === false) {
data = data.filter(p => p.llp)
console.log('Filter llp', size, '==>', data.length)
//console.log('Filter llp', size, '==>', data.length)
size = data.length
}
if (this.includeDisease() === false) {
data = data.filter(p => !p.inDisease)
console.log('Filter disease', size, '==>', data.length)
//console.log('Filter disease', size, '==>', data.length)
size = data.length
}
if (this.state.fdrFilter() !== undefined) {
data = data.filter(p => p.entities.fdr <= this.state.fdrFilter()!)
console.log('Filter fdr', size, '==>', data.length)
//console.log('Filter fdr', size, '==>', data.length)
}
if (this.state.minExpressionFilter() !== undefined) {
data = data.filter(p => p.entities.exp[this.analysis.sampleIndex()] >= this.state.minExpressionFilter()!)
console.log('Filter minExpression', size, '==>', data.length)
//console.log('Filter minExpression', size, '==>', data.length)
}
if (this.state.maxExpressionFilter() !== undefined) {
data = data.filter(p => p.entities.exp[this.analysis.sampleIndex()] <= this.state.maxExpressionFilter()!)
console.log('Filter minExpression', size, '==>', data.length)
//console.log('Filter minExpression', size, '==>', data.length)
}
if (this.state.gsaFilter().length !== 0) {
data = data.filter(p => this.gsaFilterSet().has(p.entities.exp[this.analysis.sampleIndex()]))
console.log('Filter gsa', size, '==>', data.length)
//console.log('Filter gsa', size, '==>', data.length)
}
return data
})
Expand All @@ -182,15 +182,15 @@ export class ResultTabComponent {
let size = data.length
if (this.state.pathwayMinSizeFilter()) {
data = data.filter(p => p.entities.total >= this.state.pathwayMinSizeFilter()!)
console.log('Filter min size', size, '==>', data.length)
//console.log('Filter min size', size, '==>', data.length)
size = data.length
}
if (this.state.pathwayMaxSizeFilter()) {
data = data.filter(p => p.entities.total <= this.state.pathwayMaxSizeFilter()!)
console.log('Filter max size', size, '==>', data.length)
//console.log('Filter max size', size, '==>', data.length)
size = data.length
}
console.log("Total filter", this.analysis.result()?.pathways.length, '==>', size)
//console.log("Total filter", this.analysis.result()?.pathways.length, '==>', size)
return data;
})

Expand Down Expand Up @@ -276,7 +276,7 @@ export class ResultTabComponent {

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

Expand Down
4 changes: 2 additions & 2 deletions projects/pathway-browser/src/app/diagram/diagram.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,7 @@ export class DiagramComponent implements AfterViewInit, OnDestroy {

const resource = this.state.overlay();
if (resource) {
console.log('Resource not null', resource)
//console.log('Resource not null', resource)
this.interactorsComponent()?.getInteractors(resource)
}

Expand Down Expand Up @@ -1064,7 +1064,7 @@ export class DiagramComponent implements AfterViewInit, OnDestroy {
filter((e) => e.detail.cy !== this.legend && e.type === ReactomeEventTypes.unselect)
).subscribe(e => {
if (this.state.select() === e.detail.element.data('graph.stId')) {
console.log('Unselect', e.detail.reactomeId)
//console.log('Unselect', e.detail.reactomeId)
this.state.select.set(null)
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ export class EventHierarchyComponent implements AfterViewInit, OnDestroy {

// Combine all data and merged into one object
initialData$.pipe(
tap(d => console.log('Initial data', d)),
//tap(d => console.log('Initial data', d)),
switchMap(initialData =>
enhancedEventData$.pipe(
combineLatestWith(
Expand All @@ -265,14 +265,14 @@ export class EventHierarchyComponent implements AfterViewInit, OnDestroy {
}))
)
),
tap(d => console.log('Combined data', d)),
//tap(d => console.log('Combined data', d)),

// Build the tree with all data
switchMap(({
enhancedEvent,
hitReactions
}) => this.eventService.buildTree(enhancedEvent, this.pathwayId(), this.tree, hitReactions)),
tap(d => console.log('Final data', d)),
//tap(d => console.log('Final data', d)),
).subscribe({
next: () => {
// Give pathway id when idToUse is PEs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export class ReacfoamComponent implements OnDestroy {
if (selectedElement && isRLE(selectedElement)) {
const flaggingResult = await firstValueFrom(this.data.getReacfoamFlagging(selectedElement.stId, this.species.currentSpecies().displayName));
if (flaggingResult.matches && flaggingResult.matches.length === 1) {
console.log('Selecting in reacfoam the parent pathway of a reaction as it is only contained in one pathway')
//console.log('Selecting in reacfoam the parent pathway of a reaction as it is only contained in one pathway')
this.select.set(flaggingResult.matches[0]);
}
}
Expand Down
4 changes: 2 additions & 2 deletions projects/pathway-browser/src/app/reacfoam/reacfoam.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ export class ReacfoamService {

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


fetchTLPLayoutMap(): Observable<Map<string, Layout.Data>> {
console.log('fetch tlp layout')
//console.log('fetch tlp layout')
return this.http.get(LAYOUT_URL, {responseType: "text"}).pipe(
map((text) => new Map(
text.split("\n") // Split lines
Expand Down
4 changes: 2 additions & 2 deletions projects/pathway-browser/src/app/services/analysis.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ export class AnalysisService {
species: this.state.speciesFilter()
}),
loader: ({request, previous}) => {
console.log("Loading ", request, previous)
//console.log("Loading ", request, previous)
return request.token ?
this.loadAnalysis(request.token, {
resource: request.resource || undefined,
Expand Down Expand Up @@ -323,7 +323,7 @@ export class AnalysisService {

effect(() => {
const result = this.result();
console.log('Result updated', result)
//console.log('Result updated', result)
if (!result) return
const validGroups: Set<PaletteGroup> = new Set();
if (result.summary.type === 'GSA_REGULATION') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export class DataStateService {
diagram: this.state.pathwayId(),
species: this.species.currentSpecies().displayName,
})
console.log('updating request', params);
// console.log('updating request', params);
return params;
})

Expand Down Expand Up @@ -155,8 +155,8 @@ export class DataStateService {


constructor(private state: UrlStateService, private http: HttpClient, private species: SpeciesService) {
effect(() => console.log('Flagging', this.flagIdentifiers()));
effect(() => console.log('Flagging error', this.flagResource.error()));
// effect(() => console.log('Flagging', this.flagIdentifiers()));
// effect(() => console.log('Flagging error', this.flagResource.error()));
effect(() => {
if (this._selectedElement.error()) this.state.select.set(null); // If selection doesn't exist (wrong id), we remove selection
});
Expand Down
26 changes: 13 additions & 13 deletions projects/pathway-browser/src/app/services/diagram.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,18 +202,18 @@ export class DiagramService {
diagram: this.http.get<Diagram>(`${this.general.download()}/diagram/${id}.json`),
graph: this.http.get<Graph.Data>(`${this.general.download()}/diagram/${id}.graph.json`)
}).pipe(
tap(({diagram, graph}) => console.log('Original diagram:', diagram, 'Original graph', graph)),
// tap(({diagram, graph}) => console.log('Original diagram:', diagram, 'Original graph', graph)),
switchMap(({diagram, graph}) => {
if (diagram.forNormalDraw !== undefined && !diagram.forNormalDraw) {
return this.getNormalPathway(diagram.stableId).pipe(
switchMap(normalPathwayId => forkJoin({
normalDiagram: this.http.get<Diagram>(`${this.general.download()}/diagram/${normalPathwayId}.json`),
normalGraph: this.http.get<Graph.Data>(`${this.general.download()}/diagram/${normalPathwayId}.graph.json`)
})),
tap(({
normalGraph,
normalDiagram
}) => console.log('Normal diagram:', normalGraph, 'Normal graph', normalDiagram)),
// tap(({
// normalGraph,
// normalDiagram
// }) => console.log('Normal diagram:', normalGraph, 'Normal graph', normalDiagram)),
map(({normalGraph, normalDiagram}) => {
graph.nodes.push(...normalGraph.nodes);
graph.edges.push(...normalGraph.edges);
Expand All @@ -233,7 +233,7 @@ export class DiagramService {
return of({diagram, graph});
}
}),
tap((mergedResponse) => console.log('All responses:', mergedResponse)),
// tap((mergedResponse) => console.log('All responses:', mergedResponse)),
map(mergedResponse => ({
...mergedResponse,
chebiMapping: this.getCHEBIStructure(
Expand All @@ -244,7 +244,7 @@ export class DiagramService {
)
})),
map(({diagram, graph, chebiMapping}) => this.diagramFromData(diagram, graph, id, chebiMapping)),
tap((output) => console.log('Output:', output)),
// tap((output) => console.log('Output:', output)),
)

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

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

console.log('All data created')
// console.log('All data created')
return {
nodes: [...compartmentNodes, ...reactionNodes, ...entityNodes, ...shadowNodes],
edges: [...edges, ...linkEdges]
Expand Down
2 changes: 1 addition & 1 deletion projects/pathway-browser/src/app/services/event.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ export class EventService {
: object.stId;
this.dboService.setCurrentObj(object);

console.log('Build tree with selected event', idToBuild);
// console.log('Build tree with selected event', idToBuild);
const ancestors = idToBuild
? this.fetchEventAncestors(idToBuild).pipe(map(ancestors => this.getFinalAncestor(ancestors, diagramId ? [diagramId] : undefined)))
: from([[] as Event[]]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export class SpeciesService {
newValue = newValue.replaceAll(initial, replacement || '');
}
newValue = newValue.replaceAll(',""', '').replaceAll('""', '').trim() // Remove trailing commas and quotes from lists
console.log(value, " => ", newValue);
// console.log(value, " => ", newValue);
if (newValue.length === 0) delete params[key];
else params[key] = JSON.parse(newValue);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ export class UrlStateService implements State {
});

effect(() => {
console.log('Updating patwhayId to ', this.pathwayId())
// console.log('Updating patwhayId to ', this.pathwayId())

//If in content/search do not navigate
if (this.router.url.includes('content') || this.router.url.includes('query')) {
console.log('In content or search route, not navigating on pathwayId change');
// console.log('In content or search route, not navigating on pathwayId change');
return;
}

Expand Down Expand Up @@ -214,9 +214,9 @@ export class UrlStateService implements State {
if (typeof paramValue === 'string') paramValue = paramValue.replaceAll(' ', '__')
queryParams[key] = isArray(paramValue) ? paramValue.join(';') : paramValue;
}
console.log('Updating URL from state', queryParams)
// console.log('Updating URL from state', queryParams)
if (this.router.url.includes('content') || this.router.url.includes('query')) {
console.log('In content or search route, not navigating on state change');
// console.log('In content or search route, not navigating on state change');
return;
}
this.navigateTo(this.pathwayId() ?? null, {queryParams, preserveFragment: true});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export class LoggerComponent implements OnInit{
}

ngOnInit(): void {
console.log('Building ', this.toLog())
// console.log('Building ', this.toLog())
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ export class ExpandableVirtualScrollStrategy extends FixedSizeVirtualScrollStrat
private maxBufferPx: number = 200;

constructor() {
console.log('Expandable Virtual Scroll Strategy.');
// console.log('Expandable Virtual Scroll Strategy.');
super(28, 100, 200);
}

override attach(viewport: CdkVirtualScrollViewport): void {
// super.attach(viewport);
this.viewport = viewport;
console.log('Attempting to attach', viewport);
// console.log('Attempting to attach', viewport);
}

setItemHeight(index: number, height: number) {
Expand All @@ -28,7 +28,7 @@ export class ExpandableVirtualScrollStrategy extends FixedSizeVirtualScrollStrat
} else {
this._indexToHeight.set(index, height);
}
console.log(index, height);
// console.log(index, height);
this._updateViewport();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export class QualitativeAnalysisComponent implements AfterViewInit {
});
effect(async () => {
if (!this.lottieCanvas() || this.lottieEnd !== undefined) return;
console.log('Building lottie')
// console.log('Building lottie')
this.lottieEnd = await this.lottieService.buildLottie({
renderConfig: {
autoResize: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export class SearchComponent {
this.searchText.set(searchText);
if (event) event.preventDefault();
this.collapsed.set('opened')
console.log('searching', searchText);
// console.log('searching', searchText);
this.typeFilter.set([])
this.selectedResult.set(undefined)
this.searchParams.set({
Expand Down Expand Up @@ -487,7 +487,9 @@ export namespace Search {
isDisease: boolean;
hasEHLD?: boolean;
hasReferenceEntity: boolean;
disease: boolean
disease: boolean;
deleted: boolean;
date: number;
}

export interface EntryResult {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ export class ViewportComponent implements AfterViewInit {
playSpeed = model(2);

updateSpeed = effect(() => {
console.log('Update play speed', this.playSpeed());
// console.log('Update play speed', this.playSpeed());
if (this.interval) {
this.pause();
this.play();
Expand Down
4 changes: 2 additions & 2 deletions projects/reactome-cytoscape-style/src/lib/interactivity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class Interactivity {
isMobile = 'ontouchstart' in document || navigator.maxTouchPoints > 0;

constructor(private cy: cytoscape.Core, private properties: Properties) {
console.log('is mobile', this.isMobile)
// console.log('is mobile', this.isMobile)
// @ts-ignore
cy.elements().ungrabify().panify();
this.initHover(cy);
Expand Down Expand Up @@ -102,7 +102,7 @@ export class Interactivity {

.on('mouseover', 'edge', e => {
const mapped = mapper(e.target);
if (mapped !== e.target) console.log(mapped, mapped.connectedNodes('.reaction'))
// if (mapped !== e.target) console.log(mapped, mapped.connectedNodes('.reaction'))

hoverReaction(mapped.connectedNodes('.reaction'))
})
Expand Down
2 changes: 1 addition & 1 deletion projects/reactome-cytoscape-style/src/lib/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export class Style {
css: {
"background-color": (node) => {
const exp = node.data('exp') as number[];
console.log(node.data(), exp)
// console.log(node.data(), exp)
return exp !== undefined ? this.currentPalette(exp[0]).hex() : this.pm('analysis', 'notFound', c => c)()
},
"border-width": this.p('global', 'thickness'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

.article-title {
margin: 0 0 1rem 0;
line-height: 32px;
color: var(--primary);
}

Expand Down
Loading
Loading