Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #144 from tsheils/development
Browse files Browse the repository at this point in the history
adjust models to split by commas instead of semicolon
  • Loading branch information
tsheils authored May 2, 2024
2 parents 76d997c + cb3654b commit 0dfcef9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libs/models/ramp-models/src/lib/analyte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class Analyte {
}
if (obj.sourceAnalyteIDs) {
this.sourceAnalyteIDs = obj.sourceAnalyteIDs
.split('; ')
.split(',')
.sort((a: string, b: string) => a.localeCompare(b))
.join('; ');
}
Expand Down
4 changes: 4 additions & 0 deletions libs/models/ramp-models/src/lib/metabolite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@ export class Metabolite {

constructor(obj: Partial<Metabolite>) {
Object.assign(this, obj);

if(obj['metIds']){
this.metIds = (<string>obj["metIds"]).replace(/,/g, ', ')
}
}
}
6 changes: 4 additions & 2 deletions libs/models/ramp-models/src/lib/reaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ export class Reaction {
}

if (obj['rxn_partner_ids']) {
this.rxnPartnerIdsString = <string>obj['rxn_partner_ids'];
this.rxnPartnerIds = this.rxnPartnerIdsString.split('; ');
this.rxnPartnerIdsString = (<string>obj['rxn_partner_ids']).replace(/,/g, ', ');
console.log(obj['rxn_partner_ids'])
console.log(this.rxnPartnerIdsString)
this.rxnPartnerIds = this.rxnPartnerIdsString.split(',');
}
}
}

0 comments on commit 0dfcef9

Please sign in to comment.