|
|
|
|
|
|
|
|
```mermaid
|
|
|
|
|
|
graph TD;
|
|
|
classDef Fichier fill:#ffff00;
|
|
|
classDef Configurer fill:#E0FFFF;
|
|
|
classDef Snakefile fill:#98FB98,border:#0c4c0c;
|
|
|
|
|
|
|
|
|
|
|
|
id0s{{`marker` sample description .dat}}-->s0;
|
|
|
id0c{{config.yaml}}-->s0;
|
|
|
id0a{{rapdirun.tsv}}-->s0;
|
|
|
|
|
|
s0[readwrite_rapidrun_demultiplexing]-->s1[assembly];
|
|
|
s1-->s2[demultiplexing];
|
|
|
s2-->s3[filtering];
|
|
|
s3-->s4[assignment];
|
|
|
|
|
|
s0--> id0b{{demultiplex.csv}};
|
|
|
|
|
|
|
|
|
id1[`run` paired-end .fastq files]-->r1(illuminapairedend);
|
|
|
|
|
|
subgraph g1[assembly]
|
|
|
r1(illuminapairedend)-->r2(remove_unaligned);
|
|
|
click r1 "https://gitlab.mbb.univ-montp2.fr/edna/snakemake_rapidrun_obitools/-/blob/master/02_assembly/rules/illuminapairedend.smk";
|
|
|
click r2 "https://gitlab.mbb.univ-montp2.fr/edna/snakemake_rapidrun_obitools/-/blob/master/02_assembly/rules/remove_unaligned.smk";
|
|
|
end
|
|
|
|
|
|
r2-->id2[`run` annotated merged .fastq files];
|
|
|
id2-->r3
|
|
|
|
|
|
subgraph g2[demultiplexing]
|
|
|
r3(assign_sequences)-->r4(split_sequences);
|
|
|
click r3 "https://gitlab.mbb.univ-montp2.fr/edna/snakemake_rapidrun_obitools/-/blob/master/03_demultiplex/rules/assign_sequences.smk";
|
|
|
click r4 "https://gitlab.mbb.univ-montp2.fr/edna/snakemake_rapidrun_obitools/-/blob/master/03_demultiplex/rules/split_sequences.smk";
|
|
|
end
|
|
|
|
|
|
r4-->id3[`projet`/`marker`/`run`/`sample` annotated .fasta files];
|
|
|
id3-->r5
|
|
|
|
|
|
subgraph g3[filtering]
|
|
|
r5(dereplicate_samples)-->r6(goodlength_samples);
|
|
|
r6-->r7(clean_pcrerr_samples);
|
|
|
r7-->r8(rm_internal_samples);
|
|
|
|
|
|
click r5 "https://gitlab.mbb.univ-montp2.fr/edna/snakemake_rapidrun_obitools/-/blob/master/04_filter_samples/rules/dereplicate_samples.smk";
|
|
|
click r6 "https://gitlab.mbb.univ-montp2.fr/edna/snakemake_rapidrun_obitools/-/blob/master/04_filter_samples/rules/goodlength_samples.smk";
|
|
|
click r7 "https://gitlab.mbb.univ-montp2.fr/edna/snakemake_rapidrun_obitools/-/blob/master/04_filter_samples/rules/clean_pcrerr_samples.smk";
|
|
|
click r8 "https://gitlab.mbb.univ-montp2.fr/edna/snakemake_rapidrun_obitools/-/blob/master/04_filter_samples/rules/rm_internal_samples.smk";
|
|
|
end
|
|
|
|
|
|
r8-->id4[`projet`/`marker`/`run`/`sample` filtered .fasta files];
|
|
|
id4-->|concatenate `sample` into `run` files|id5[`projet`/`marker`/`run` .fasta files]; ;
|
|
|
|
|
|
id5-->r9;
|
|
|
|
|
|
|
|
|
subgraph g4[assignment]
|
|
|
|
|
|
r9(dereplicate_runs)-->r10(assign_taxon);
|
|
|
r10-->r11(rm_attributes);
|
|
|
r11-->r12(sort_runs);
|
|
|
r12-->r13(table_runs);
|
|
|
click r9 "https://gitlab.mbb.univ-montp2.fr/edna/snakemake_rapidrun_obitools/-/blob/master/05_assignment/rules/dereplicate_runs.smk";
|
|
|
click r10 "https://gitlab.mbb.univ-montp2.fr/edna/snakemake_rapidrun_obitools/-/blob/master/05_assignment/rules/assign_taxon.smk";
|
|
|
click r11 "https://gitlab.mbb.univ-montp2.fr/edna/snakemake_rapidrun_obitools/-/blob/master/05_assignment/rules/rm_attributes.smk";
|
|
|
click r12 "https://gitlab.mbb.univ-montp2.fr/edna/snakemake_rapidrun_obitools/-/blob/master/05_assignment/rules/sort_runs.smk";
|
|
|
click r13 "https://gitlab.mbb.univ-montp2.fr/edna/snakemake_rapidrun_obitools/-/blob/master/05_assignment/rules/table_runs.smk";
|
|
|
end
|
|
|
|
|
|
r13-->id6[`projet`/`marker`/`run` species occurence .tsv files];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
id0a-->s1;
|
|
|
|
|
|
|
|
|
|
|
|
id0b-->s2;
|
|
|
id0b-->s3;
|
|
|
id0b-->s4;
|
|
|
|
|
|
|
|
|
click id0c "https://gitlab.mbb.univ-montp2.fr/edna/snakemake_rapidrun_obitools/-/tree/master/config";
|
|
|
click id0b "https://gitlab.mbb.univ-montp2.fr/edna/snakemake_rapidrun_obitools/-/tree/master/results/01_settings"
|
|
|
click id0a "https://gitlab.mbb.univ-montp2.fr/edna/snakemake_rapidrun_obitools/-/blob/master/resources/test/all_samples.tsv";
|
|
|
click id0s "https://gitlab.mbb.univ-montp2.fr/edna/snakemake_rapidrun_obitools/-/tree/master/resources/test/sample_description";
|
|
|
|
|
|
click id2 "https://gitlab.mbb.univ-montp2.fr/edna/snakemake_rapidrun_obitools/-/tree/master/results/02_assembly/02_remove_unaligned";
|
|
|
click id3 "https://gitlab.mbb.univ-montp2.fr/edna/snakemake_rapidrun_obitools/-/tree/master/results/03_demultiplex/02_raw";
|
|
|
click id4 "https://gitlab.mbb.univ-montp2.fr/edna/snakemake_rapidrun_obitools/-/tree/master/results/04_filter_samples/04_filtered";
|
|
|
click id5 "https://gitlab.mbb.univ-montp2.fr/edna/snakemake_rapidrun_obitools/-/tree/master/results/05_assignment/01_runs";
|
|
|
click id6 "https://gitlab.mbb.univ-montp2.fr/edna/snakemake_rapidrun_obitools/-/tree/master/results/06_final_tables";
|
|
|
|
|
|
click s0 "https://gitlab.mbb.univ-montp2.fr/edna/snakemake_rapidrun_obitools/-/blob/master/01_settings/readwrite_rapidrun_demultiplexing.py";
|
|
|
|
|
|
class id0a,id0b,id0c,id0s Configurer;
|
|
|
class s0,s1,s2,s3,s4,g1,g2,g3,g4 Snakefile;
|
|
|
class id1,id2,id3,id4,id5,id6 Fichier;
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
# Rules
|
|
|
## write demultiplex table
|
|
|
### read 'rapidrun' .tsv file
|
|
|
### remove blacklisted runs & projects
|
|
|
### write table projet/run/sample
|
|
|
demultiplex","projet", "marker","run", "plaque","sample","barcode5","barcode3","primer5","primer3","min_f","min_r","lenBarcode5","lenBarcode3"
|
|
|
|
|
|
## assemble
|
|
|
### Paired end alignment then keep reads with quality > 40
|
|
|
### Remove unaligned sequence records
|
|
|
## demultiplex
|
|
|
### Assign each sequence record to the corresponding sample/marker combination
|
|
|
### Split the input sequence file in a set of subfiles according to the values of attribute `sample`
|
|
|
## filter samples
|
|
|
### dereplicate reads into uniq sequences
|
|
|
### only sequence more than 20bp with no ambiguity IUAPC with total coverage greater than 10 reads
|
|
|
### Clean the sequences for PCR/sequencing errors (sequence variants)
|
|
|
### Remove sequence which are classified as 'internal' by obiclean
|
|
|
## concatenate samples into run
|
|
|
## assignment
|
|
|
### Dereplicate and merge samples together
|
|
|
### Assign each sequence to a taxon
|
|
|
### Some unuseful attributes can be removed at this stage
|
|
|
### The sequences can be sorted by decreasing order of count
|
|
|
### Generate a table final results
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|