Skip to content

Commit

Permalink
Merge pull request #113 from ncats/development
Browse files Browse the repository at this point in the history
Merge Development
  • Loading branch information
tsheils authored Sep 7, 2023
2 parents e0d564e + 4825140 commit b4560da
Show file tree
Hide file tree
Showing 15 changed files with 11,633 additions and 18,846 deletions.
2 changes: 1 addition & 1 deletion apps/ramp-client/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ COPY --from=build /var/www/app/dist/ramp-client/browser /var/www/app

# Add read permissions to all files under assets directory
RUN chmod -R o+r /var/www/app/assets/*
RUN echo "Checkout assets file permissions" && ls -la /var/www/app/assets/*
# RUN echo "Checkout assets file permissions" && ls -la /var/www/app/assets/*
6 changes: 0 additions & 6 deletions apps/ramp-client/Jenkinsfile-ifx
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,6 @@ pipeline {
"""
}
}
post {
always {
echo " Clean up the workspace in deploy node!"
cleanWs()
}
}
}
}
}
6 changes: 0 additions & 6 deletions apps/ramp-client/Jenkinsfile-ncats
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,6 @@ pipeline {
}
}
}
post {
always {
echo " Clean up the workspace in deploy node!"
cleanWs()
}
}
}
}
}
6 changes: 0 additions & 6 deletions apps/ramp-server/Jenkinsfile-ifx
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,6 @@ pipeline {
"""
}
}
post {
always {
echo " Clean up the workspace in deploy node!"
cleanWs()
}
}
}
}
}
6 changes: 0 additions & 6 deletions apps/ramp-server/Jenkinsfile-ncats
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,6 @@ pipeline {
}
}
}
post {
always {
echo " Clean up the workspace in deploy node!"
cleanWs()
}
}
}
}
}
2 changes: 1 addition & 1 deletion apps/ramp-server/install.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library(devtools)
install_github("ncats/RaMP-DB", ref="pw_enrich_dev", force = TRUE, dependencies=TRUE)
install_github("ncats/RaMP-DB", force = TRUE, dependencies=TRUE)
library(RaMP)

8 changes: 4 additions & 4 deletions apps/ramp-server/plumber.R
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,8 @@ function(fishers_results, pval_type = 'fdr', pval_cutoff = 0.1) {
function(
fishers_results,
#analyte_source_id,
perc_analyte_overlap = 0.2,
perc_pathway_overlap = 0.2,
perc_analyte_overlap = 0.5,
perc_pathway_overlap = 0.5,
min_pathway_tocluster=2
) {
if (typeof(min_pathway_tocluster) == "character") {
Expand Down Expand Up @@ -475,8 +475,8 @@ function(
#'
function(
fishers_results,
perc_analyte_overlap = 0.2,
perc_pathway_overlap = 0.2,
perc_analyte_overlap = 0.5,
perc_pathway_overlap = 0.5,
min_pathway_tocluster=2,
filename
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ <h3>Cluster Results</h3>
matInput
type="number"
step="0.01"
min=".5"
max ="1"
[formControl]="percentAnalyteFormCtrl"
/>
</mat-form-field>
Expand All @@ -172,6 +174,8 @@ <h3>Cluster Results</h3>
matInput
type="number"
step="0.01"
min=".5"
max ="1"
[formControl]="percentPathwayFormCtrl"
/>
</mat-form-field>
Expand Down Expand Up @@ -228,9 +232,8 @@ <h3>Cluster Results</h3>
<br>
<br>
<div fxLayout="row" fxLayoutAlign="end center">
<div fxFlex="10">
<button
mat-stroked-button
<div fxFlex="10" *ngIf="!tooBig">
<button mat-stroked-button
class="tool-button list-download"
(click)="fetchClusterImageFile()"
matTooltip="Download Data"
Expand All @@ -240,7 +243,8 @@ <h3>Cluster Results</h3>
</button>
</div>
</div>
<div [innerHTML]="image"></div>
<div *ngIf="tooBig">This website currently does not support clustering over 100 pathways.</div>
<div *ngIf="!tooBig" [innerHTML]="image"></div>
</mat-tab>
</mat-tab-group>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ export class PathwayEnrichmentComponent
@ViewChild('resultsTabs') resultsTabs!: MatTabGroup;
@ViewChild('fileUpload') fileUpload!: ElementRef;
minPathWayFormCtrl: UntypedFormControl = new UntypedFormControl(2);
percentPathwayFormCtrl: UntypedFormControl = new UntypedFormControl(0.2);
percentAnalyteFormCtrl: UntypedFormControl = new UntypedFormControl(0.2);
percentPathwayFormCtrl: UntypedFormControl = new UntypedFormControl(0.5);
percentAnalyteFormCtrl: UntypedFormControl = new UntypedFormControl(0.5);

pValueFormCtrl: UntypedFormControl = new UntypedFormControl(0.2);
pValueTypeFormCtrl: UntypedFormControl = new UntypedFormControl('fdr');
Expand Down Expand Up @@ -143,6 +143,7 @@ export class PathwayEnrichmentComponent
pathwayDataAsDataProperty!: { [key: string]: DataProperty }[];
image: any;
enrichedDataframe: any;
tooBig = false;

constructor(
private ref: ChangeDetectorRef,
Expand Down Expand Up @@ -229,7 +230,10 @@ export class PathwayEnrichmentComponent
.subscribe(
(res: any | undefined) => {
if (res && res.length> 0) {
this.image = this.sanitizer.bypassSecurityTrustHtml(res);
this.tooBig = false;
this.image = this.sanitizer.bypassSecurityTrustHtml(res);
} else {
this.tooBig = true;
}
this.imageLoading = false;
this.ref.markForCheck();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,15 @@ export class PropertiesFromMetabolitesComponent
value: value[1],
});
});

console.log(obj.iso_smiles)
newObj.imageUrl.url = `${
this.route.snapshot.data.renderUrl
}(${encodeURIComponent(obj.iso_smiles)})?size=150`;
console.log(newObj.imageUrl.url)
console.log(`${
this.route.snapshot.data.renderUrl
}(${encodeURI(obj.iso_smiles)})?size=150`)
newObj.imageUrl.label = newObj.common_name.value;
return newObj;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
grid-auto-rows: max-content;
grid-template-columns: 0.2fr 2.1fr 0.7fr;
grid-template-areas: 'checkbox label count';
align-items: center;
}
.count {
grid-area: count;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe('RampFacade', () => {
isLoaded = await readFirst(facade.loading$);

// expect(list.length).toBe(0);
expect(isLoaded).toBe(true);
expect(isLoaded).toBe(false);
});

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,16 @@ const rampReducer = createReducer(
rampAdapter.setAll(rampStore, { ...state, loading: false })
),

on(
on (
RampActions.init,
RampActions.initAbout,
(state) => ({
...state,
error: null,
})
),

on(
RampActions.fetchOntologiesFromMetabolites,
RampActions.fetchAnalytesFromPathways,
RampActions.fetchPathwaysFromAnalytes,
Expand Down
14 changes: 9 additions & 5 deletions libs/stores/ramp-store/src/lib/+state/ramp.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -500,23 +500,27 @@ export class RampService {
min_pathway_tocluster?: number,
perc_pathway_overlap?: number
){
if(!dataframe.fishresults || dataframe.fishresults.length >= 10) {
return ""
} else {
const body = {
fishers_results: dataframe,
text_size: 8,
perc_analyte_overlap: perc_analyte_overlap,
perc_analyte_overlap: perc_analyte_overlap,
min_pathway_tocluster: min_pathway_tocluster,
perc_pathway_overlap: perc_pathway_overlap,
filename: Date.now() + '.svg'
}
const options: Object = {responseType: 'text' as const};
const options: Object = { responseType: 'text' as const };
return this.http
.post<string[]>(`${this.url}cluster-plot`,body, options)
.post<string[]>(`${this.url}cluster-plot`, body, options)
.pipe(
map((response: any) => {
return response.toString();
return response.toString();
}),
catchError(this.handleError('chemical enrichment', []))
);
)
}
}

fetchClusterImageFile(data: any) {
Expand Down
Loading

0 comments on commit b4560da

Please sign in to comment.