Skip to content

Commit

Permalink
Add help text beside histone modifications
Browse files Browse the repository at this point in the history
Refs #2116
  • Loading branch information
kimrutherford committed Nov 30, 2023
1 parent 174ba03 commit b1cc217
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/app/pombase-api.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,7 @@ export class PombaseAPIService {

if (isHistoneGene && ext_range.summary_residues) {
ext_range.summary_residues =
fixHistoneResidues(ext_range.summary_residues);
fixHistoneResidues(ext_range.summary_residues, false);
}
}
}
Expand Down Expand Up @@ -1784,14 +1784,17 @@ export class PombaseAPIService {
}
}

function fixHistoneResidues(residues: Array<string>): Array<string> {
function fixHistoneResidues(residues: Array<string>, long: boolean): Array<string> {
let newResidues = [];

for (let res of residues) {
const m = res.match(/^([A-Z])(\d+)$/);

if (m) {
const newRes = m[1] + (+m[2] - 1) + '(' + m[1] + m[2] + ')';
let newRes = m[1] + (+m[2] - 1) + '(' + m[1] + m[2] + ')';
if (long) {
newRes += ' processed(preprocessed)';
}
newResidues.push(newRes);
}
}
Expand Down Expand Up @@ -1847,7 +1850,7 @@ function processExtension(annotation: Annotation|undefined,
isHistone) {
if (extPart.ext_range.summary_residues) {
extPart.ext_range.summary_residues =
fixHistoneResidues(extPart.ext_range.summary_residues);
fixHistoneResidues(extPart.ext_range.summary_residues, true);
}
}
}
Expand Down

0 comments on commit b1cc217

Please sign in to comment.