From 74829449e53cd8624b5ae9f436f300460f95b909 Mon Sep 17 00:00:00 2001 From: Douwe Schulte Date: Fri, 25 Aug 2023 14:28:03 +0200 Subject: [PATCH] Readied for release --- .github/workflows/release.yml | 40 +++++++++++++++++++++++++++++ LICENSE | 21 ++++++++++++++++ README.md | 47 ++++++++++------------------------- src-tauri/Cargo.lock | 43 ++++++++++++++------------------ src-tauri/Cargo.toml | 12 ++++----- src-tauri/build.rs | 2 +- src-tauri/src/render.rs | 2 +- 7 files changed, 100 insertions(+), 67 deletions(-) create mode 100644 .github/workflows/release.yml create mode 100644 LICENSE diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..506803a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,40 @@ +name: 'publish' +on: + push: + branches: + - release + +jobs: + publish-tauri: + permissions: + contents: write + strategy: + fail-fast: false + matrix: + platform: [macos-latest, ubuntu-20.04, windows-latest] + + runs-on: ${{ matrix.platform }} + steps: + - uses: actions/checkout@v3 + - name: setup node + uses: actions/setup-node@v3 + with: + node-version: 16 + - name: install Rust stable + uses: dtolnay/rust-toolchain@stable + - name: install dependencies (ubuntu only) + if: matrix.platform == 'ubuntu-20.04' + run: | + sudo apt-get update + sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf + - name: install frontend dependencies + run: yarn install # change this to npm or pnpm depending on which one you use + - uses: tauri-apps/tauri-action@v0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version + releaseName: 'App v__VERSION__' + releaseBody: 'See the assets to download this version and install.' + releaseDraft: true + prerelease: false \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..8ffbd1d --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Douwe Schulte and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index 97ddc10..b72e3e4 100644 --- a/README.md +++ b/README.md @@ -1,39 +1,18 @@ -# Tauri + Vanilla +A simple tool to help you manually discover the depths of your spectra one spectrum at a time. It can load MGF files (only in centroid mode, also do not forget to deconvolute if you have TD data). Once loaded you can select a scan and add you annotation while tweaking the exact settings for generating the annotation. The annotation itself is interactive to help you discover what the spectrum means. Which you can then export as nice images for use in other environments. -This template should help get you started developing with Tauri in vanilla HTML, CSS and Javascript. +## Peptide sequence -## Recommended IDE Setup +It uses the [ProForma](https://github.com/HUPO-PSI/ProForma) specification to specify the sequence, it does not handle every last detail of this specification yet, for details see [rustyms](https://github.com/snijderlab/rustyms). Here are some examples of valid sequences: -- [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer) +* `VAEINPSNGGTTFNEKFKGGKATJ` Normal aminoacids +* `EM[L-methionine sulfoxide]EVEES[UNIMOD:21]PEK` Modifications using [unimod](http://www.unimod.org) and [PSI-MOD](https://www.ebi.ac.uk/ols/ontologies/mod) +* `TFNEKF[+15.9949]KGGKATJ` Modifications using raw masses +* `TFNEKF[Formula:O]KGGKATJ` Modifications using elemental formula +* `TFNEKF[Glycan:HexNAc1Hex2]KGGKATJ` Modifications glycan compositions +* `[+16]-TFNEKFKGGKATJ-[Methyl]` Terminal modifications +* `<15N>TFNEKFKGGKATJ` Global isotope modifications (all Nitrogen is 15N) +* `<[S-carboxamidomethyl-L-cysteine]@C>AVYYCSRWGGDGFYAMDYWGQG` Global modifications (all C are carboxamidomethylated) -## Example input +## Installing -EVQLVESGGGLVQPGGSLRLSCAASGFTVSSNYMSWVRQAPGKGLEWVSVIYSGGSTYYADSVKGRFTISRDNSKNTLYLQMNSLRAEDTAVYYCARXXXXXXXXXXXXXXXXXXXX - - -DLQLVESGGGLVGAKSPPGTLSAAASGFNL -DLQLVESGGGLVGAKSPPGTLSAAASGFNL -EVQLVESGGGLVQPGGSLSGAKYHSGFNL -EVVQLVESGGGLVQPGGSLGVLSCAASGF -DLQLVESGGGLVQPGGSLGVLSCAASGF -DLQLVESGGGLVQPGTPLYWNAASGFNL -DLQLVESGGGLVQPGGSLRLSCAASGF -QVQLVESGGGLVQPGGSLRLSCAASGF -EVQLVESGGGLPVQGGSLRLSCAADGF -EVQLVESGGGLVQPGGSLRLSCAASGF -EVQLVSGEGGLVQPGGSLRLSCAASGF -QVELVESGGGLVQPGGSLRLSCAASGF -TLSADTSKNTAYLQMNSLRAEDTAVY -RFTLSADTSKNTAYLQMNSLRAEDTA -QLVESGGGLVQPGGSLTHVAGAGHSGF -SADTSKNTAYLQMNSLRAEDTAVYY -LMLTDGYTRYADSVKGRFTLSADTS -QLVESGGGLVQPGGSLRLSCAASGF -QLVESGGGLVQPGGSLRLSCQTGF -LVESGGGLVQPNSLRLSCAASGF - -## todo - - [ ] Add density plot along the y axis of the spectrum graph to see the density of all errors over the ppm range - - [ ] Add N/C terminal highlighting option (shows all applicable ions in spectra, show all points relative to that side for spectrum-graph) - - [ ] Add N/C, N, or C positioning option for spectrum graph (shows all points relative to that series) - - [ ] Ruisfilter \ No newline at end of file +See [releases](https://github.com/snijderlab/annotator/releases) for the latest release, here you will also find the prebuilt binaries for your architecture. \ No newline at end of file diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index af6d102..2862c3b 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -50,6 +50,20 @@ dependencies = [ "libc", ] +[[package]] +name = "annotator" +version = "0.1.0" +dependencies = [ + "itertools", + "pdbtbx", + "proc_interface", + "rustyms", + "serde", + "serde_json", + "tauri", + "tauri-build", +] + [[package]] name = "anyhow" version = "1.0.71" @@ -1340,15 +1354,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.11.0" @@ -2374,9 +2379,11 @@ checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" [[package]] name = "rustyms" -version = "0.3.1" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffb1fee3148a098d6ef3973dcafbca097e952d0a0c5c2302ed01c053f8857086" dependencies = [ - "itertools 0.11.0", + "itertools", "regex", "serde", "statrs", @@ -2690,20 +2697,6 @@ dependencies = [ "rand 0.8.5", ] -[[package]] -name = "stitch-oxide" -version = "0.1.0" -dependencies = [ - "itertools 0.10.5", - "pdbtbx", - "proc_interface", - "rustyms", - "serde", - "serde_json", - "tauri", - "tauri-build", -] - [[package]] name = "string_cache" version = "0.8.7" diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 779354f..650c3dd 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,10 +1,10 @@ [package] -name = "stitch-oxide" +name = "annotator" version = "0.1.0" description = "Oxidised stepping stones for a new Stitch" -authors = ["you"] -license = "" -repository = "" +authors = ["Douwe Schulte "] +license = "MIT" +repository = "https://github.com/snijderlab/annotator" edition = "2021" rust-version = "1.57" @@ -22,12 +22,12 @@ path = "alignment/src/bin.rs" tauri-build = { version = "1.2", features = [] } [dependencies] -itertools = "0.10" +itertools = "0.11" serde_json = "1.0" serde = { version = "1.0", features = ["derive"] } tauri = { version = "1.2", features = ["dialog-open"] } pdbtbx = "0.10" -rustyms = { path = "../../rustyms" } +rustyms = "0.4.0" proc_interface = { path = "../src-proc-interface" } [features] diff --git a/src-tauri/build.rs b/src-tauri/build.rs index 1e63a0a..76b12c6 100644 --- a/src-tauri/build.rs +++ b/src-tauri/build.rs @@ -139,7 +139,7 @@ LVESGGGLVQPNSLRLSCAASGF - +

diff --git a/src-tauri/src/render.rs b/src-tauri/src/render.rs
index c77c7a5..6b601d6 100644
--- a/src-tauri/src/render.rs
+++ b/src-tauri/src/render.rs
@@ -683,7 +683,7 @@ fn general_stats(output: &mut String, spectrum: &AnnotatedSpectrum, fragments: &
     write!(
         output,
         "
-    
+    
Precursor Mass{precursor}
Precursor Mass (M){precursor}
Fragments found{percentage_fragments_found:.2} % ({num_annotated}/{})
Peaks annotated{percentage_peaks_annotated:.2} % ({num_annotated}/{})
Intensity annotated{percentage_intensity_annotated:.2} %