Skip to content

Commit

Permalink
Another try to fix chain names
Browse files Browse the repository at this point in the history
  • Loading branch information
milot-mirdita committed Apr 29, 2024
1 parent 38dd631 commit 00f89de
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/StructureViewer.vue
Expand Up @@ -83,11 +83,11 @@ const getChainName = (name) => {
}
let pos = name.lastIndexOf('_');
if (pos != -1) {
name = name.substring(pos + 1);
let match = name.substring(pos + 1);
return match.length >= 1 ? match[0] : 'A';
}
// handle stoichiometry and return only chain name
let match = name.match(/(.*?)-[0-9]+$/);
return match ? match[1] : name;
// fallback
return 'A';
}
const getAccession = (name) => {
Expand Down

0 comments on commit 00f89de

Please sign in to comment.