Thanks a lot! Merging all lane data into one lane is good idea and easy to implement, but i guess there may exist a problem -- if we concat all fq into one file, mapping may cost much more time. And I just think of another interesting idea -- I wrote a scripts to classify all samples into a single directory with sample name, then I could write a shell scripts to execute a Snakefile for each sample. And the final directory tree may look like this:
wgs_test/
├── mapping
│ ├── samp1
│ │ └── sam1.bam
│ └── samp2
│ └── samp2.bam
└── rawdata
├── samp1
│ ├── samp1_R1.fq
│ └── samp1_R2.fq
└── samp2
├── samp2_R1.fq
└── samp2_R2.fq
And I am going to make it...
I'm guessing that should be samp_lane.append(samp) in the for loop?
Either way, the wildcards probably won't work as you expect them to. It might be considerably easier if you just merge your input files so you have a single file for each sample.