diff --git a/tools/utils/cat/Snakefile b/tools/utils/cat/Snakefile new file mode 100644 index 0000000000000000000000000000000000000000..f75e57c7169397eac4dcb8e71423a32239ffbd3d --- /dev/null +++ b/tools/utils/cat/Snakefile @@ -0,0 +1,12 @@ +rule cat: + """ + Split a FASTA file with the desired number of sequences per chunk + """ + input: + __cat_input + output: + __cat_output + shell: + """ + cat {input} > {output} + """ diff --git a/tools/utils/cat/example_usage/Snakefile b/tools/utils/cat/example_usage/Snakefile new file mode 100644 index 0000000000000000000000000000000000000000..810f43a67c63f3310c2c537ec7b16a7e0161c0fe --- /dev/null +++ b/tools/utils/cat/example_usage/Snakefile @@ -0,0 +1,21 @@ +configfile: "config.yaml" + +# ==== Snakefile path ==== +__cat_rules = config.get("snakefiles", {}).get("cat") + +__main_output_dir = config.get('output_dir', 'output') + +# ==== Main config ==== +SAMPLES = config.get('samples') +__input_dir = config.get('input_dir', 'data') + +# ==== EggNOGmapper2 Diamond ==== +__cat_merged_name = config.get('cat', {}).get('name_merge', 'cat_file') +__cat_output_dir = __input_dir + +__cat_input = expand("{dir}/{{sample}}.emapper.seed_orthologs".format(dir=__input_dir), sample=SAMPLES) +__cat_output = "{dir}/{file_name}".format(dir=__cat_output_dir, file_name=__cat_merged_name) +include: __cat_rules + +rule all: + input: "{dir}/{file_name}".format(dir=__cat_output_dir, file_name=__cat_merged_name) diff --git a/tools/utils/cat/example_usage/config.yaml b/tools/utils/cat/example_usage/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..f74b24f75b4c5d480d608695192953860bbe6778 --- /dev/null +++ b/tools/utils/cat/example_usage/config.yaml @@ -0,0 +1,13 @@ +snakefiles: + cat: /pasteur/projets/policy01/Atm/snakemake/tools/utils/cat/Snakefile + +input_dir: /pasteur/projets/policy01/Atm/kenzo/sandbox/20200210_test_snakemake/test_output/eggnogmapper2/diamond/ +output_dir: /pasteur/projets/policy01/Atm/kenzo/sandbox/20200210_test_snakemake/test_output + +samples: +- test_00000 +- test_00001 +- test_00002 + +cat: + name_merge: all.emapper.seed_orthologs