Snakemake Wildcards from Unknown Sample List
0
0
Entering edit mode
4.8 years ago

Hello people,

I am creating a Snakefile, the first few rules are 1) downloading the raw files from a repo, and 2) assembling WGS from these files. This repo will always be updated from time to time.

Usually to create a Snakefile, I would know the names of the samples, and it is easy to create wildcards from them. However, I wouldnt know the names of the samples. I would only know them after I download them. Is it possible to execute step 1, then create a list of sample names as wildcards, then use these sample names to execute step 2?

snakemake • 1.6k views
ADD COMMENT
0
Entering edit mode

Separate your run into two: one snakefile to download the repo, to make a list of filenames (eg, make a .tsv), and to subsequenly call the other snakefile as a subworkflow. The second snakefile would have access to the filenames, and you could use wildcards in the typical setting where you do know the sample names.

ADD REPLY
0
Entering edit mode
ADD REPLY

Login before adding your answer.

Traffic: 1946 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6