diff --git a/docs/Writerside/s.tree b/docs/Writerside/s.tree
index 5686f74..5ec7cfb 100644
--- a/docs/Writerside/s.tree
+++ b/docs/Writerside/s.tree
@@ -10,6 +10,12 @@
+
+
+
+
+
+
diff --git a/docs/Writerside/topics/Compare-Structures.topic b/docs/Writerside/topics/Compare-Structures.topic
index a94aa91..a2006b7 100644
--- a/docs/Writerside/topics/Compare-Structures.topic
+++ b/docs/Writerside/topics/Compare-Structures.topic
@@ -12,7 +12,7 @@
of Sails.
-
+
Syntax:
diff --git a/docs/Writerside/topics/Find-Glycosylation-Sites.topic b/docs/Writerside/topics/Find-Glycosylation-Sites.topic
index 77b5136..655399c 100644
--- a/docs/Writerside/topics/Find-Glycosylation-Sites.topic
+++ b/docs/Writerside/topics/Find-Glycosylation-Sites.topic
@@ -12,7 +12,7 @@
will output a JSON file with the residues that follow the respective motifs.
-
+
Syntax:
@@ -21,7 +21,7 @@
Example:
- sails-find -model built.cif -logout potential_sites.json
+ sails-find -modelin built.cif -logout potential_sites.json
diff --git a/docs/Writerside/topics/Find-WURCS.topic b/docs/Writerside/topics/Find-WURCS.topic
new file mode 100644
index 0000000..664cddb
--- /dev/null
+++ b/docs/Writerside/topics/Find-WURCS.topic
@@ -0,0 +1,64 @@
+
+
+
+
+
+ Sails provides a utility tool to find the WURCS code of a glycan in a macromolecule. A single WURCS code can
+ be generated for a known glycosite or all can be generated. These codes can be used to search glycomics databases.
+
+
+
+ Syntax:
+
+
+ sails-wurcs find [OPTIONS]
+
+
+ Example:
+
+ sails-wurcs find -modelin structure.cif -chain A -seqid 123
+
+
+
+ sails-wurcs find -modelin structure.cif -all -logout all_wurcs.json
+
+
+
+
+ Describe what each option is used for:
+
+
+
+ Path to a model.
+ Formats accepted: CIF or PDB
+ Required
+
+
+ Path to output JSON file
+ Default: wurcs.json
+
+
+ Ignore chain and seqid, and generate WURCS codes for all glycans that can be found for the input model
+
+
+ Chain name containing the root protein residue
+ Example: A
+
+
+ Sequence Id of the root protein residue of a glycan (e.g. asparagine for an N-glycan)
+ Example: 123
+
+
+
+ Displays help.
+
+
+
+
+
+
+
+
diff --git a/docs/Writerside/topics/Generate-SNFG-Diagrams.topic b/docs/Writerside/topics/Generate-SNFG-Diagrams.topic
index 3561f68..3a9ece1 100644
--- a/docs/Writerside/topics/Generate-SNFG-Diagrams.topic
+++ b/docs/Writerside/topics/Generate-SNFG-Diagrams.topic
@@ -52,11 +52,11 @@
Ignore chain and seqid, and generate all SNFGs that can be found for the input model
- Chain name
+ Chain name containing the root protein residue
Example: A
- Sequence Id of desired SNFG root
+ Sequence Id of desired protein root residue
Example: 123
diff --git a/docs/Writerside/topics/Model-Glycan-from-WURCS.topic b/docs/Writerside/topics/Model-Glycan-from-WURCS.topic
new file mode 100644
index 0000000..b2f1591
--- /dev/null
+++ b/docs/Writerside/topics/Model-Glycan-from-WURCS.topic
@@ -0,0 +1,58 @@
+
+
+
+
+
+ Sails provides a utility tool to model a glycan into a structure from a known WURCS code and a root residue.
+ This may be useful to glycosylate predicted models or as a simple starting point for manual model building. The
+ glycan is placed with the mean torsion angles for a given linkage.
+
+
+
+ Syntax:
+
+
+ sails-wurcs model [OPTIONS]
+
+
+ Example:
+
+ sails-wurcs model -modelin structure.cif -wurcs "WURCS=2.0/..." -chain A -seqid 123
+
+
+
+
+ Describe what each option is used for:
+
+
+
+ Path to a model.
+ Formats accepted: CIF or PDB
+ Required
+
+
+ Path to the glycosylated output model.
+ Formats accepted: CIF or PDB
+ Default: sails-model-out.cif
+
+
+ WURCS code of glycan to model.
+ Must be in standard form without open chains and without circular glycans.
+
+
+ Chain name containing desired root residue
+ Example: A
+
+
+ Sequence Id of the root residue of the future glycan (e.g. asparagine for an N-glycan)
+ Example: 123
+
+
+ Displays help.
+
+
+
+
diff --git a/docs/Writerside/topics/Morph-Glycan.topic b/docs/Writerside/topics/Morph-Glycan.topic
new file mode 100644
index 0000000..aba70c1
--- /dev/null
+++ b/docs/Writerside/topics/Morph-Glycan.topic
@@ -0,0 +1,57 @@
+
+
+
+
+ Sails provides a utility tool to morph a modelled glycan into another form using a supplied WURCS code. The new
+ glycan will be superimposed onto the modelled glycan and may be useful to morph a high-mannose N-glycan into a
+ more processed kind, for example.
+
+
+
+ Syntax:
+
+
+ sails-morph [OPTIONS]
+
+
+ Example:
+
+ sails-morph -modelin structure.cif -chain A -seqid 123 -wurcs "WURCS=2.0/..."
+
+
+
+
+ Describe what each option is used for:
+
+
+
+ Path to a model.
+ Formats accepted: CIF or PDB
+ Required
+
+
+ Path to the morphed output model.
+ Formats accepted: CIF or PDB
+ Default: sails-model-out.cif
+
+
+ WURCS code of glycan to model.
+ Must be in standard form without open chains and without circular glycans.
+
+
+ Chain name containing the root protein residue
+ Example: A
+
+
+ Sequence Id of the root protein of the glycan (e.g. asparagine for an N-glycan)
+ Example: 123
+
+
+ Displays help.
+
+
+
+
diff --git a/package/scripts/bump_version.py b/package/scripts/bump_version.py
index e69de29..9504676 100644
--- a/package/scripts/bump_version.py
+++ b/package/scripts/bump_version.py
@@ -0,0 +1,67 @@
+import re
+import argparse
+
+
+def bump_version(version, args):
+ major, minor, patch = map(int, version.split("."))
+ if args.major:
+ major += 1
+
+ if args.minor:
+ minor += 1
+
+ if args.patch:
+ patch += 1
+
+ return f"{major}.{minor}.{patch}"
+
+
+def update_version_in_file(file_path, old_version, new_version):
+ with open(file_path, "r") as file:
+ content = file.read()
+
+ print(old_version, new_version)
+ updated_content = content.replace(old_version, new_version)
+
+ with open(file_path, "w") as file:
+ file.write(updated_content)
+
+
+def main():
+ parser = argparse.ArgumentParser(description="Bump project version.")
+ parser.add_argument("-major", action=argparse.BooleanOptionalAction)
+ parser.add_argument("-minor", action=argparse.BooleanOptionalAction)
+ parser.add_argument("-patch", action=argparse.BooleanOptionalAction)
+ args = parser.parse_args()
+
+ # Update __version__.py
+ version_file = "src/sails/__version__.py"
+ version_regex = r"(?:__version__\s*=\s*[\"'])(\d+\.\d+\.\d+)([\"'])"
+ with open(version_file, "r") as file:
+ match = re.search(version_regex, file.read())
+ if not match:
+ raise ValueError("Current version not found in __version__.py")
+ current_version = match.group(1)
+
+ # Update writerside.cfg
+ cfg_file = "../docs/Writerside/writerside.cfg"
+ cfg_version_regex = r'(]*version=")(\d+\.\d+\.\d+)(")'
+
+ with open(cfg_file, "r") as file:
+ match = re.search(cfg_version_regex, file.read())
+ if not match:
+ raise ValueError("Current version not found in writerside.cfg")
+ cfg_current_version = match.group(2)
+
+ if current_version != cfg_current_version:
+ raise RuntimeError("Docs and Python version mismatch")
+
+ new_version = bump_version(current_version, args)
+
+ print(f"Bumping version {current_version} -> {new_version}")
+ update_version_in_file(version_file, current_version, new_version)
+ update_version_in_file(cfg_file, current_version, new_version)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/package/src/sails/morph.py b/package/src/sails/morph.py
index f1341ea..7b67bc9 100644
--- a/package/src/sails/morph.py
+++ b/package/src/sails/morph.py
@@ -10,11 +10,15 @@ def parse_args():
parser.add_argument("--version", action="version", version=__version__)
parser.add_argument("-modelin", help="Path to input model", type=str, required=True)
parser.add_argument(
- "-modelout", help="Path to output model", type=str, required=False
+ "-modelout",
+ help="Path to output model",
+ type=str,
+ required=False,
+ default="sails-model-out.cif",
)
parser.add_argument("-chain", help="Name of target chain", type=str, required=True)
parser.add_argument(
- "-res", help="Name of target residue (protein)", type=int, required=True
+ "-seqid", help="Name of target residue (protein)", type=int, required=True
)
parser.add_argument(
"-wurcs", help="WURCS identifier for new glycan", type=str, required=True
diff --git a/package/src/sails/wurcs.py b/package/src/sails/wurcs.py
index 1f4f5c6..7988710 100644
--- a/package/src/sails/wurcs.py
+++ b/package/src/sails/wurcs.py
@@ -20,7 +20,7 @@ def parse_args():
"find", parents=[parent], formatter_class=formatter
)
find_parser.add_argument(
- "-all",
+ "--all",
help="Find WURCS identifiers for all glycans",
action=argparse.BooleanOptionalAction,
required=False,
@@ -59,7 +59,10 @@ def parse_args():
"-chain", help="Name of target chain", type=str, required=True
)
model_parser.add_argument(
- "-res", help="Name of target residue (protein)", type=str, required=True
+ "-seqid",
+ help="Sequence ID of the root residue (protein)",
+ type=str,
+ required=True,
)
return parser.parse_args()