Comments (4)
snakemake doesn't restrict the use of libraries ... I suppose the current support for import modules are perhaps sufficient:
- in python(''' ... ''') it is fully supported
class
anddef
are also supported and one can always add animport
statement inside a class or function if the class or function requires. There is then no need to have global support for this.
from sos.
This depends on what we want to include. snakemake uses a special include
directive to include rules. This is useful but something I dislike about
snakemake because for example tophat/STAR accept tones of parameters for
different applications and I do not want them to be hidden in another file.
SoS cannot include steps because of the index mechanism but
- We can include a bunch of auxiliary steps. That pushes SoS to a
dangerous application that I do not want to encourage. - We can define a bunch of unnamed steps and do something like
[my_step_100 = pre-defines-1]
- We can import a bunch of action functions, but there is nothing special
and we can do this through regular import. Users can either import sos and
decorate their functions in their own module, or do something like
from mymodule import func1, func2, func3
func1 = SoS_Action(func1)
func2 = SoS_Action(func2)
@SoS_Action
def func3_wrapper(parameter):
return func3(parameter) is None
The advantage is that mymodule
can be defined independent of SoS and used
in other places.
from sos.
Oh I see here modules refer to pre-defined SoS text ... yes snakemake would call these "wrappers". I think it will make our life easier if we restrict it to actions only. One way out, as you proposed, is to encourage users to write python functions. But perhaps a lot useful actions are just run()
calls with hard-to-remember arguments that is best imported one way or another rather than copy-paste. Perhaps we can define a special SoS action that exclusively imports a desired action from another SoS file (e.g. from given action at given step)?
from sos.
I tend to think the currently SoS is open enough.because it can run any
external script and import any python function. The SoS level import, e.g.
import SoS action function, import SoS step, and import SoS workflows are
possible but we should keep things simple for now until we find a good
justification for such features.
Bo
On Sun, Mar 13, 2016 at 10:53 AM, gaow [email protected] wrote:
Oh I see here modules refer to pre-defined SoS text ... yes snakemake
would call these "wrappers". I think it will make our life easier if we
restrict it to actions only. One way out, as you proposed, is to encourage
users to write python functions. But perhaps a lot useful actions are just
run() calls with hard-to-remember arguments that is best imported one way
or another rather than copy-paste. Perhaps we can define a special SoS
action that exclusively imports a desired action from another SoS file
(e.g. from given action at given step)?—
Reply to this email directly or view it on GitHub
#20 (comment).
from sos.
Related Issues (20)
- sos status show the uname of the machine HOT 7
- Combined use of -r and -q
- Singularity exec vs run HOT 6
- bug found in entrypoint version HOT 1
- Installing sos into the tljh HOT 1
- Singularity clear environment when execute containers HOT 7
- Singularity to recognize `oras://` HOT 5
- SoS Not Registering My Alias for Singularity HOT 5
- Retain the structure of variable for `input` grouping HOT 3
- tasks fails with `bash` is not defined
- Change the destination of where failed script is written to HOT 19
- Alternative task_template?
- Only works with nbclassic? HOT 1
- Requiring shared directory for remote execution of tasks HOT 3
- Remove `R` etc from sos namespace HOT 2
- tests hang due to clean up issues HOT 1
- subclass pathlib.Path for path
- Using a sos namespace
- SoS is broken on Python 3.12? HOT 6
- Outdated SoS conda packages HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sos.