Skip to content

magnusmanske/gentle_rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

108 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GENtle

A Rust implementation of GENtle.

One of the upcoming features of that new implmentation shall be an extension of the graphical user interface with a shell.

Desktop Application

GENtle screenshot An interactive interface for desktop is under development.

JavaScript interactive shell

You can run GENtle as an interactive shell using JavaScript.

Example

> cargo run --release --bin gentle_js
Interactive JavaScript Shell (type 'exit' to quit)
GENtle> pgex = load_dna("test_files/pGEX-3X.gb");
GENtle> console.log(pgex.seq.seq.length)
4952
GENtle> results = digest(pgex,"BamHI,EcoRI"); // Digest pGex-3X with BamHI and EcoRI
GENtle> console.log(results.length) // Number of sequences
2
GENtle> console.log(results[0].seq.seq.length) // Length of first sequence
6
GENtle> console.log(results[1].seq.seq.length) // Length of second sequence
4938

Lua interactive shell

You can run GENtle as an interactive shell using the Lua programming language.

Example

> cargo run --release --bin gentle_lua
Interactive Lua Shell (type 'exit' to quit)
(...)
GENtle> pgex = load_dna("test_files/pGEX-3X.gb") -- loads a GenBank sequence and performs some computations on it
GENtle> #pgex.seq.seq -- prints the length of the sequence
4952
GENtle> pgex.restriction_enzyme_sites -- shows the precomputed restriction enzyme sites
(...)
GENtle> pgex.methylation_sites -- shows the precomputed methylation_sites
(...)
GENtle> write_gb("output.gb",pgex) -- writes the sequence to a new GenBank file

Install

git clone https://github.com/magnusmanske/gentle_rs/
cd gentle_rs
cargo run --release --bin gentle

Note: Cargo will compile >360 dependencies. On non-Intel platforms it may be beneficial to explicitly specify your build architecture to avoid an error in some packages. E.g., for the MacBook M1 with conda, run

CFLAGS="-march=armv8-a" cargo run --release --bin gentle

Note: Currently only loads two test sequences, hardcoded.

Bundling GENtle for MacOS

To present all files to the operating system, including the application's icon, that are required for GENtle to run, all application data needs to be "bundled" as follows:

cargo install cargo-bundle
CFLAGS="-march=armv8-a" cargo bundle --release

To install the .app just copy it to an "Application" folder:

cp -r target/release/bundle/osx/gentle.app ~/Applications/

About

Rewrite of GENtle in Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors