Crates.io | yeast |
lib.rs | yeast |
version | 0.20.2 |
source | src |
created_at | 2019-01-10 14:03:33.374481 |
updated_at | 2021-08-28 12:47:52.137473 |
description | Yet Another Shell Trick |
homepage | |
repository | https://github.com/yvan-sraka/yeast |
max_upload_size | |
id | 107772 |
size | 77,202 |
Yet Another Shell Trick
YeAST is an extension of the bourne shell shebangsyntax.
YeAST aims to solve issues of interoperability, parallel programming, quick prototyping and progressive refactoring by invite users to use in their scripts and software features of UNIX systems and build things more KISS.
You can read more about it through:
These instructions will get you the last stable binaries of yeast on your local machine for standard usage purposes.
brew
:You can install YeAST on macOS using our Homebrew custom Tap:
brew install yvan-sraka/YeAST/yeast
Run the following line in your terminal, then follow the onscreen instructions:
curl https://raw.githubusercontent.com/yvan-sraka/YeAST/master/install.sh -sSf | sh
If you wonder what this previous command do, don't hesitate to inspect the script: it runs all instructions of the Getting Started section.
To make scripts easily work out of the box, you can add this little hack at the beggining of your files:
#! /bin/sh
#! @ignore
if ! [ -x "$(command -v yeast)" ]; then
curl "https://raw.githubusercontent.com/yvan-sraka/YeAST/master/install.sh" -sSf | sh
fi
yeast "$0"
exit
You now have YeAST installed on your machine! Cool next thing to do could be to get a syntax support extension for your favorite code editor:
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Get a stable Rust toolchain:
curl https://sh.rustup.rs -sSf | sh
git clone git@github.com:yvan-sraka/YeAST.git
cd YeAST
cargo run basic_example.yst
The basic_example available in this repository is fun to get a general idea behind YeAST! But to understand the purpose of this tool, we will go through examples inspired from REAL WORLD, mainly by my scientific domain: "Bioinformatics and Modeling".
cat
outside interpreters#! /usr/bin/env yeast
This text will be printed on standard output!
Besides we experiment with a Python code we expect to say "Hello World":
#! python3
print("Hello, World!")
#!
Enjoy this nice way of writing code in notebook style.
#! /usr/bin/env yeast
Here we try to fold 3 different sequences, so we do it in parallel by
allocating 3 threads, there is no additional syntax needed:
#! python3 folding.py
;LCBO - Prolactin precursor - Bovine
; a sample sequence in FASTA format
MDSKGSSQKGSRLLLLLVVSNLLLCQGVVSTPVCPNGPGNCQVSLRDLFDRAVMVSHYIHDLSS
EMFNEFDKRYAQGKGFITMALNSCHTSSLPTPEDKEQAQQTHHEVLMSLILGLLRSWNDPLYHL
VTEVRGMKGAPDAILSRAIEIEEENKRLLEGMEMIFGQVIPGAKETEPYPVWSGLPSLQTKDED
ARYSAFYNLLHCLRRDSSKIDTYLKLLNCRIIYNNNC*
!#
Shebang in YeAST could be any shell command that's accepting as last argument a
given file, here we use the syntax to call our external script `folding.py`.
#! python3 folding.py
>MCHU - Calmodulin - Human, rabbit, bovine, rat, and chicken
ADQLTEEQIAEFKEAFSLFDKDGDGTITTKELGTVMRSLGQNPTEAELQDMINEVDADGNGTID
FPEFLTMMARKMKDTDSEEEIREAFRVFDKDGNGYISAAELRHVMTNLGEKLTDEEVDEMIREA
DIDGDGQVNYEEFVQMMTAK*
!#
Bonus: the output of this multithreading computation will be displayed the right
order as soon that the information is available!
#! python3 folding.py
>gi|5524211|gb|AAD44166.1| cytochrome b [Elephas maximus maximus]
LCLYTHIGRNIYYGSYLYSETWNTGIMLLLITMATAFMGYVLPWGQMSFWGATVITNLFSAIPYIGTNLV
EWIWGGFSVDKATLNRFFAFHFILPFTMVALAGVHLTFLHETGSNNPLGLTSDSDKIPFHPYYTIKDFLG
LLILILLLLLLALLSPDMLGDPDNHMPADPLNTPLHIKPEWYFLFAYAILRSVPNKLGGVLALFLSIVIL
GLMPFLHTSKHRSMMLRPLSQALFWTLTMDLLTLTWIGSQPVEYPYTIIGQMASILYFSIILAFLPIAGX
IENY
!#
make
, make test
& make install
intructions.$0
,
$1
, etc ...$*
for all input args.BACKTRACE
in
=1|full
mode#! /usr/bin/env yeast
not failed in stack
overflow due to an infinite loop of self-calls.man
page.gh-page
branch of this
repository.cmd
instead of sh
and Windowsnamedpipes
instead of mkfifo
).PATH
of command launch by YeAST.git pull
.YEAST_CONTEXT
env variablePlease read CONTRIBUTING.md for details on our code of conduct, and the process for submitting a pull requests to us.
See also the list of contributors who participated in this project.
This project is licensed under the 3rd version of the GPL License - see the LICENSE file for details.