diff --git a/Snakefile b/Snakefile index 71f989c..4792d36 100644 --- a/Snakefile +++ b/Snakefile @@ -23,10 +23,31 @@ def _get_config(sample, item): try: return SAMPLES[sample][item] except KeyError: - try: - return CHEMISTRY[SAMPLES[sample]["chemistry"]][item] - except KeyError: - return DEFAULTS[item] + pass + try: + return CHEMISTRY[SAMPLES[sample]["chemistry"]][SAMPLES[sample]["platform"]][item] + except KeyError: + pass + try: + return CHEMISTRY[SAMPLES[sample]["chemistry"]][DEFAULTS["platform"]][item] + except KeyError: + pass + try: + return CHEMISTRY[SAMPLES[sample]["chemistry"]][item] + except KeyError: + pass + try: + return CHEMISTRY[DEFAULTS["chemistry"]][SAMPLES[sample]["platform"]][item] + except KeyError: + pass + try: + return CHEMISTRY[DEFAULTS["chemistry"]][DEFAULTS["platform"]][item] + except KeyError: + pass + try: + return CHEMISTRY[DEFAULTS["chemistry"]][item] + except KeyError: + return DEFAULTS[item] # assemble outputs for rule all SAMPLE_OUTS = [] diff --git a/chemistry.yaml b/chemistry.yaml index 1e22f9a..c5ffe95 100644 --- a/chemistry.yaml +++ b/chemistry.yaml @@ -1,38 +1,53 @@ -chromiumV3_illumina: - filter_R1_length: 58 +# Chemistry and platform-specific configurations +# +# Example: +# +# chemistry1: +# platform_agnostic_option1: ... +# platform_agnostic_option2: ... +# name_of_platform1: +# filter_R1_length: ... +# STAR_R1: ... +# STAR_R2: ... + +chromiumV3: bc_whitelist: WHITELIST_V3 - STAR_R1: --soloUMIlen 12 --clip5pNbases 58 0 --soloCBstart 1 --soloCBlen 16 --soloUMIstart 17 --outFilterMultimapNmax 1 --outFilterMismatchNmax 999 --outFilterMismatchNoverReadLmax 0.2 - STAR_R2: --soloUMIlen 12 -chromiumV3_element: - filter_R1_length: False - bc_whitelist: WHITELIST_V3 - STAR_R1: --soloUMIlen 12 --clip5pNbases 48 0 --soloCBstart 1 --soloCBlen 16 --soloUMIstart 17 - STAR_R2: --soloUMIlen 12 -chromiumV3_ultima: - filter_R1_length: 58 - bc_whitelist: WHITELIST_V3 - STAR_R1: --soloUMIlen 9 --clip5pNbases 58 --soloCBstart 23 --soloCBlen 16 --soloUMIstart 39 -chromiumV2_illumina: - filter_R1_length: 56 + illumina: + filter_R1_length: 58 + STAR_R1: --soloUMIlen 12 --clip5pNbases 58 0 --soloCBstart 1 --soloCBlen 16 --soloUMIstart 17 --outFilterMultimapNmax 1 --outFilterMismatchNmax 999 --outFilterMismatchNoverReadLmax 0.2 + STAR_R2: --soloUMIlen 12 + element: + filter_R1_length: False + STAR_R1: --soloUMIlen 12 --clip5pNbases 48 0 --soloCBstart 1 --soloCBlen 16 --soloUMIstart 17 + STAR_R2: --soloUMIlen 12 + ultima: + filter_R1_length: 58 + STAR_R1: --soloUMIlen 9 --clip5pNbases 58 --soloCBstart 23 --soloCBlen 16 --soloUMIstart 39 +chromiumV2: bc_whitelist: WHITELIST_V2 - STAR_R1: --soloUMIlen 10 --clip5pNbases 56 0 --soloCBstart 1 --soloCBlen 16 --soloUMIstart 17 --outFilterMultimapNmax 1 --outFilterMismatchNmax 999 --outFilterMismatchNoverReadLmax 0.2 - STAR_R2: --soloUMIlen 10 -dropseq_illumina: - filter_R1_length: 50 - STAR_R1: --soloUMIlen 8 --clip5pNbases 50 0 --soloCBstart 1 --soloCBlen 12 --soloUMIstart 13 --outFilterMultimapNmax 1 --outFilterMismatchNmax 999 --outFilterMismatchNoverReadLmax 0.2 - STAR_R2: --soloUMIlen 8 --soloCBstart 1 --soloCBlen 12 --soloUMIstart 13 -microwellseq_illumina: - filter_R1_length: 54 + illumina: + filter_R1_length: 56 + STAR_R1: --soloUMIlen 10 --clip5pNbases 56 0 --soloCBstart 1 --soloCBlen 16 --soloUMIstart 17 --outFilterMultimapNmax 1 --outFilterMismatchNmax 999 --outFilterMismatchNoverReadLmax 0.2 + STAR_R2: --soloUMIlen 10 +dropseq: + illumina: + filter_R1_length: 50 + STAR_R1: --soloUMIlen 8 --clip5pNbases 50 0 --soloCBstart 1 --soloCBlen 12 --soloUMIstart 13 --outFilterMultimapNmax 1 --outFilterMismatchNmax 999 --outFilterMismatchNoverReadLmax 0.2 + STAR_R2: --soloUMIlen 8 --soloCBstart 1 --soloCBlen 12 --soloUMIstart 13 +microwellseq: bc_cut: CGACTCACTACAGGG...TCGGTGACACGATCG - STAR_R1: --soloUMIlen 6 --clip5pNbases 54 0 --soloCBstart 1 --soloCBlen 18 --soloUMIstart 19 --outFilterMultimapNmax 1 --outFilterMismatchNmax 999 --outFilterMismatchNoverReadLmax 0.2 - STAR_R2: --soloUMIlen 6 --soloCBstart 1 --soloCBlen 18 --soloUMIstart 19 -bd_illumina: - filter_R1_length: 53 + illumina: + filter_R1_length: 54 + STAR_R1: --soloUMIlen 6 --clip5pNbases 54 0 --soloCBstart 1 --soloCBlen 18 --soloUMIstart 19 --outFilterMultimapNmax 1 --outFilterMismatchNmax 999 --outFilterMismatchNoverReadLmax 0.2 + STAR_R2: --soloUMIlen 6 --soloCBstart 1 --soloCBlen 18 --soloUMIstart 19 +bd: bc_cut: ACTGGCCTGCGA...GGTAGCGGTGACA - STAR_R1: --soloUMIlen 8 --clip5pNbases 53 0 --soloCBstart 1 --soloCBlen 27 --soloUMIstart 28 --outFilterMultimapNmax 1 --outFilterMismatchNmax 999 --outFilterMismatchNoverReadLmax 0.2 - STAR_R2: --soloUMIlen 8 --soloCBstart 1 --soloCBlen 27 --soloUMIstart 28 -indrop_illumina: - filter_R1_length: 32 - STAR_R1: --soloUMIlen 6 --clip5pNbases 32 0 --soloCBstart 1 --soloCBlen 8 --soloUMIstart 9 --outFilterMultimapNmax 1 --outFilterMismatchNmax 999 --outFilterMismatchNoverReadLmax 0.2 - STAR_R2: --soloUMIlen 6 --soloCBstart 1 --soloCBlen 8 --soloUMIstart 9 - \ No newline at end of file + illumina: + filter_R1_length: 53 + STAR_R1: --soloUMIlen 8 --clip5pNbases 53 0 --soloCBstart 1 --soloCBlen 27 --soloUMIstart 28 --outFilterMultimapNmax 1 --outFilterMismatchNmax 999 --outFilterMismatchNoverReadLmax 0.2 + STAR_R2: --soloUMIlen 8 --soloCBstart 1 --soloCBlen 27 --soloUMIstart 28 +indrop: + illumina: + filter_R1_length: 32 + STAR_R1: --soloUMIlen 6 --clip5pNbases 32 0 --soloCBstart 1 --soloCBlen 8 --soloUMIstart 9 --outFilterMultimapNmax 1 --outFilterMismatchNmax 999 --outFilterMismatchNoverReadLmax 0.2 + STAR_R2: --soloUMIlen 6 --soloCBstart 1 --soloCBlen 8 --soloUMIstart 9 \ No newline at end of file diff --git a/config.yaml b/config.yaml index 6771791..51911c0 100644 --- a/config.yaml +++ b/config.yaml @@ -35,7 +35,8 @@ POLYA_SITES: DEFAULTS: # default config options, overridden by SAMPLES and CHEMISTRY definitions - chemistry: chromiumV3_illumina + platform: illumina + chemistry: chromiumV3 alignments: - R2 - paired @@ -53,13 +54,16 @@ SAMPLES: # extra star_args (STAR_R1_extra_args, STAR_R2_extra_args, STAR_paired_extra_args) test: basename: sample - chemistry: chromiumV2_illumina + platform: illumina + chemistry: chromiumV2 test2: basename: dropseq - chemistry: dropseq_illumina + platform: illumina + chemistry: dropseq test3: basename: microwellseq - chemistry: microwellseq_illumina + platform: illumina + chemistry: microwellseq # for multiqc report