snakecharm
snakecharm copied to clipboard
Plugin for PyCharm / IntelliJ IDEA Platform IDEs which adds support for Snakemake language.
- [x] Basic parsing as valid SmkSl #214 - [ ] Syntax highlighting for format specifiers - [ ] Code completion for standard specifiers E.g. `echo {input:q}`, see https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html
Code insight support for case ``` # foo.smk rule foo: output: "foo.out" ``` ``` # boo.smk rule boo: input: rules.foo.output output: "out" ``` ``` # Snakefile include "foo.smk" include "boo.smk"...
rule foo: output: "file.txt" input: "input.txt" shell: "echo hello" rule boo: input: ... If the entire file is indented with tabs but a rule section, e.g. `output`, is indented with...
``` from snakemake.utils import validate configfile: "config.yaml" validate(config, schema="schemas/config.schema.yaml") cells = pd.read_csv(config["cells"], sep="\t").set_index("id", drop=False) validate(cells, schema="schemas/cells.schema.yaml") rule foo: input: "boo" ``` Scheme is a *.yaml file relative to this file
`snakemake` script run creates a `.snakemake` directory in the working directory. There can be a `shadow` directory in `.snakemake`, which contains symlinks to files in the current workdir; this results...
Sometimes user expects that he is using already defined variable or rule section, but get error like: wildcard `threads` cannot be defined from input/output error. E.g. in: ``` rule: threads:...
Given a file: ``` workdir: "Dir" include: "Dir/foo.smk" ``` Renaming directory _Dir_ to _Folder_ will result in ``` workdir: "Folder" include: "Dir/foo.smk" ``` But the desired result is: ``` workdir:...
At the moment PyCharm debugger doesn't allow to place breakpoints into snakefiles and debug it's pure python code at toplevel and in rule sections. Also debugger doesn't stop on breakpoints...
We could provide basic completion (and hide unresolve ref warning) even if Python SDK with snakecharm not configured. Not sure that all users will use proper SDK. Probably completion could...
Current completion implementation adds all top-level methods from `snakemake.io` to autocompletion, although `snakemake` imports only some of methods, e.g. See ``` # ~/anaconda/envs/snakemake/lib/python3.6/site-packages/snakemake/workflow.py from snakemake.io import protected, temp, temporary, ancient,...