JetBrains-Research / snakecharm

Plugin for PyCharm / IntelliJ IDEA Platform IDEs which adds support for Snakemake language.
MIT License
61 stars 7 forks source link

Parsing error in : input: '{ds}.bam'.format(ds=ds) for ds in DATASETS #547

Open iromeo opened 1 month ago

iromeo commented 1 month ago

works in 8.20.6

image
# kate: syntax python;

DATASETS = '1 2 3'.split()

rule mapmature_all:
    input: '{ds}.bam'.format(ds=ds) for ds in DATASETS

rule gzip:
    output: '{file}.gz'
    input: '{file}'
    shell: 'gzip < {input} > {output}'

rule cutadapt:
    output: fastq=temp('{ds}.fastq')
    input: '{ds}.txt'
    shell:
        'echo hello > {output.fastq}'

rule bwa_mature:
    output: bam='{ds}.bam'
    input: reads='{ds}.fastq.gz'
    threads: 4
    shell:
        'echo starting with {threads} threads; sleep 10; touch {output.bam}'
iromeo commented 1 month ago

Note: no parsing errors for:

rule mapmature_all:
    input: ('{ds}.bam'.format(ds=ds) for ds in DATASETS)