snakemake yaml configuation for paired bwa align -


i create simple snakemake file bwa align data. have problems n wildcard , input used

config.yml

samples:     432:       - "432_l001"       - "432_l002" units:    432_l001:          - "/illumina/raw/432_cgatgt_l001_r1_001.fastq.gz"          - "/illumina/raw/432_cgatgt_l001_r2_001.fastq.gz" 

this snakemake file , bwa rules

from snakemake.exceptions import missinginputexception  rule bwa_mem:     input:         lambda wildcards: config["units"][wildcards.unit]     output:         temp("mapped_reads/sam/{unit}.sam")     params:         sample=lambda wildcards: unit_to_sample[wildcards.unit]         #sample=lambda wildcards: units[wildcards.unit],         #genome= config["reference"][genome_fasta]     log:         "mapped_reads/log/{unit}_bwa_mem.log"     benchmark:         "benchmarks/bwa/mem/{unit}.txt"     threads: 8     shell:         '/illumina/software/prog2/bwa-0.7.15/bwa mem {params.custom} '          '-t {threads} {params.genome} {input} 2> {log} > {output}'  snakemake --configfile config.yaml  mapped_reads/sam/{unit}.sam inputfunctionexception in line 50 of /illumina/runs/fastq/pippo4/rules/bwa_mem.rules: keyerror: '{unit}' wildcards: unit={unit} 

how can use wildcard analisys? or best way manage configuration files?


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -