Commit 65cde969 authored by peguerin's avatar peguerin
Browse files

fix path of results

parent 44dd49c4
......@@ -45,31 +45,32 @@ from Bio.Seq import Seq
###############################################################################
results_subfolders = {
'flags': '00_flags',
'settings': '01_settings',
'merge_fastq': '02_merge_fastq',
'demultiplex_tag': '03_demultiplex_tag',
'trim_primers': '04_trim_primers',
'discard_iupac_ambiguous_sequences': '05_discard_iupac_ambiguous_sequences',
'sample_dereplicate_sequences': '06_sample_dereplicate_sequences',
'flag_projmarkrun': '07_flag_projmarkrun',
'cat_quality': '08_cat_quality',
'filter_quality': '09_filter_quality',
'hash_quality': '10_hash_quality',
'sort_quality': '11_sort_quality',
'flag_projmark': '12_flag_projmark',
'projetmarker_cat_quality': '13_projetmarker_cat_quality',
'projetmarker_cat_fasta': '14_projetmarker_cat_fasta',
'projetmarker_dereplicate_sequences': '15_projetmarker_dereplicate_sequences',
'projetmarker_cluster_sequences': '16_projetmarker_cluster_sequences',
'sort_representatives':'17_sort_representatives',
'remove_chimera_sequences':'18_remove_chimera_sequences',
'otu_table':'19_otu_table',
'otu_fasta':'20_otu_fasta',
'taxonomic_assignment':'21_taxonomic_assignment',
'remove_annotations':'22_remove_annotations',
'sort_abundance_assigned_sequences':'23_sort_abundance_assigned_sequences',
'table_assigned_sequences':'24_table_assigned_sequences'
'fastq_quality_control':'fastqc',
'flags': 'intermediates/00_flags',
'settings': 'intermediates/01_settings',
'merge_fastq': 'intermediates/02_merge_fastq',
'demultiplex_tag': 'intermediates/03_demultiplex_tag',
'trim_primers': 'intermediates/04_trim_primers',
'discard_iupac_ambiguous_sequences': 'intermediates/05_discard_iupac_ambiguous_sequences',
'sample_dereplicate_sequences': 'intermediates/06_sample_dereplicate_sequences',
'flag_projmarkrun': 'intermediates/07_flag_projmarkrun',
'cat_quality': 'intermediates/08_cat_quality',
'filter_quality': 'intermediates/09_filter_quality',
'hash_quality': 'intermediates/10_hash_quality',
'sort_quality': 'intermediates/11_sort_quality',
'flag_projmark': 'intermediates/12_flag_projmark',
'projetmarker_cat_quality': 'intermediates/13_projetmarker_cat_quality',
'projetmarker_cat_fasta': 'intermediates/14_projetmarker_cat_fasta',
'projetmarker_dereplicate_sequences': 'intermediates/15_projetmarker_dereplicate_sequences',
'projetmarker_cluster_sequences': 'intermediates/16_projetmarker_cluster_sequences',
'sort_representatives':'intermediates/17_sort_representatives',
'remove_chimera_sequences':'intermediates/18_remove_chimera_sequences',
'otu_table':'intermediates/19_otu_table',
'otu_fasta':'intermediates/20_otu_fasta',
'taxonomic_assignment':'intermediates/21_taxonomic_assignment',
'remove_annotations':'intermediates/22_remove_annotations',
'sort_abundance_assigned_sequences':'intermediates/23_sort_abundance_assigned_sequences',
'table_assigned_sequences':'intermediates/24_table_assigned_sequences'
}
......
......@@ -15,8 +15,8 @@ rule demultiplex_tag:
resources:
job=1
params:
barcodes='results/01_settings/barcodes/{run}.fasta',
dereplicated_csv='results/01_settings/barcodes/{run}_duplicated.csv',
barcodes='results/'+results_subfolders['settings']+'/barcodes/{run}.fasta',
dereplicated_csv='results/'+results_subfolders['settings']+'/barcodes/{run}_duplicated.csv',
minLen=config["demultiplexing"]["minLen"]
log:
'logs/'+results_subfolders['demultiplex_tag']+'/{run}.log'
......
......@@ -13,7 +13,8 @@ rule otu_table:
swarm='results/'+results_subfolders['projetmarker_cluster_sequences']+'/{projmark}/all.swarm',
qual='results/'+results_subfolders['projetmarker_cat_quality']+'/{projmark}/all.qual',
assignment='results/'+results_subfolders['remove_chimera_sequences']+'/{projmark}/representatives.assignment',
resFolder='results/'+results_subfolders['otu_table']
resFolder='results/'+results_subfolders['otu_table'],
resFolderFasta='results/'+results_subfolders['sample_dereplicate_sequences']
log:
'logs/'+results_subfolders['otu_table']+'/{projmark}/otu_contingency_table.log'
threads:
......@@ -28,6 +29,6 @@ rule otu_table:
{input} \
{params.qual} \
{params.assignment} \
results/06_sample_dereplicate_sequences/{wildcards.projmark}/*.fasta > {output} 2> {log};
{params.resFolderFasta}/{wildcards.projmark}/*.fasta > {output} 2> {log};
else touch {output}; fi;
'''
......@@ -10,10 +10,11 @@ rule projetmarker_cat_fasta:
threads:
1
params:
resFolder='results/'+results_subfolders['projetmarker_cat_fasta']
resFolder='results/'+results_subfolders['projetmarker_cat_fasta'],
resFolderFasta='results/'+results_subfolders['sample_dereplicate_sequences']
shell:
'''
mkdir -p {params.resFolder}/{wildcards.projmark}
cat results/06_sample_dereplicate_sequences/{wildcards.projmark}/*.fasta > {output}
cat {params.resFolderFasta}/{wildcards.projmark}/*.fasta > {output}
'''
......@@ -8,12 +8,13 @@ rule projetmarker_cat_quality:
output:
'results/'+results_subfolders['projetmarker_cat_quality']+'/{projmark}/all.qual'
params:
resFolder='results/'+results_subfolders['projetmarker_cat_quality']
resFolder='results/'+results_subfolders['projetmarker_cat_quality'],
resFolderQual='results/'+results_subfolders['sort_quality']
threads:
1
shell:
'''
mkdir -p {params.resFolder}/{wildcards.projmark}
cat results/11_sort_quality/{wildcards.projmark}/*.qual > {output}
cat {params.resFolderQual}/{wildcards.projmark}/*.qual > {output}
'''
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment