Comments (12)
@lpla we decided not to hardcode snakemake specific method names in the plugin. Instead we collect them from snakamake package and theoretically will automatically support new versions of snakemake if authors add/remove some methods, global variables, etc. That is why it is required to setup python interpreter with snakemake package in ide settings.
from snakecharm.
I don't see this fixed in latest release 0.4.35.2018.3. I am still having this Undefined reference
error with temp, output, config, expand, shell, wildcards and maybe more reserved words.
My Snakefile is here: https://github.com/bitextor/bitextor/blob/master/snakemake/Snakefile
EDIT: sorry, I was wrong. After installing all Python dependences the errors have gone. Thanks for your efforts!
from snakecharm.
Subtasks:
- Resolve 'expand' call to snakemake.io #32
E.g.:
rules
rule bam_to_bdg:
input:
bam="bams/{sample}.bam",
cs=rules.download_chrom_sizes.output
output: temp("bws/{sample}.bdg")
shell: 'bedtools genomecov -ibam {input.bam} -bg -g {input.cs} > {output}'
directory
rule download_fa:
output: directory("fa")
shell: 'rsync -avzP --exclude="*.txt" rsync://hgdownload.cse.ucsc.edu/goldenPath/{config[genome]}/chromosomes/ {output} && '
'gunzip -f {output}/*.fa.gz'
temp
rule bdg_to_clip:
output: temp("bws/{sample}.clip")
shell
, expand
, config
targets = expand("fa/{acc}_{idx}.txt", acc=config["samples"], idx=[1,2])
rule collect_acc:
output: expand("acc/{sample}.acc", sample=config["samples"])
run:
shell('mkdir -p acc')
from snakecharm.
also:
touch
rule mytask:
output: touch("mytask.done")
shell: "mycommand ..."
dynamic
rule all:
input: dynamic("{clusterid}.cluster.plot.pdf")
unpack
def myfunc(wildcards):
return { 'foo': '{wildcards.token}.txt'.format(wildcards=wildcards)
rule:
input: unpack(myfunc)
output: "someoutput.{token}.txt"
shell: "..."
from snakecharm.
E.g.
shell
is given fromfrom snakemake.shell import shell
expand
,protected
, .. fromsnakemake.io
from snakecharm.
Also protected
:
rule x:
output: protected("a.txt")
from snakecharm.
ancient
https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#ignoring-timestamps
rule NAME:
input:
ancient("path/to/inputfile")
output:
"path/to/outputfile"
shell:
"somecommand {input} {output}"
from snakecharm.
Also input
/output
:
rule NAME:
input:
"path/to/inputfile"
output:
"path/to/outputfile"
run:
some_func(input[0], output[0])
input
is resolved as the builtin input()
function, output not at all.
/edit: idk how it works, but you could basically invisibly prepend the following to each rule body:
input: snakemake.io.InputFiles
output: snakemake.io.OutputFiles
from snakecharm.
@flying-sheep also params
, threads
, wildcards
objects
from snakecharm.
True. wildcards
is a snakemake.io.Wildcards
, threads
is an int
I supposed, and params
?
from snakecharm.
@flying-sheep I think for wildcards
, params
we need to hardcode resolve/autocompletion to rule wildcard strings or params
section named args. The true runtime type here isn't very significant.
from snakecharm.
from snakecharm.
Related Issues (20)
- Current version of SnakeCharm is incompatible with PyCharm 2023.1 HOT 2
- Exception: "Access is allowed from write thread only" creating project in dumb mode HOT 2
- PyCharm 2023.3 Support
- Show notice on deprecated features HOT 1
- Unresolved reference warning when iterating over 'input' key-value pairs using '.items()'
- [7.11] Resources scopes support
- Unresolved reference 'snakemake' HOT 3
- Wildcard not defined in output of Target Rule HOT 3
- PyCharm 2024.1 support HOT 5
- Improve parser error message when rule/module is declared with name but lacks ':'
- Completion for wrapper names rarely works
- Section names cannot be resolved for rules after inheritance using use
- After using import, fuctions from other smk files are not detected HOT 1
- Importing rules using github function does not work
- Gitfile command is not recognized by snakecharm
- Snakecharm does not recognize localrule directive
- Cache and bechmark are not reported as an error
- Multiple functions are not recognized by snakecharm
- Snakecharm marks error on comment in last line HOT 1
- Improve target rules support
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 snakecharm.