Commit f7dc5af5 authored by mmassaviol's avatar mmassaviol
Browse files

Update RADseq_ref workflow

parent 850f4de2
File mode changed from 100755 to 100644
pipeline: RADseq_ref
params: {results_dir: /Results, sample_dir: /Data, sample_suffix: .fastq.gz, SeOrPe: PE,
quality_check: fastqc, fastqc_SE_output_dir: fastqc_SE, fastqc_PE_output_dir: fastqc_PE,
fastqc_threads: 4, null_output_dir: '', demultiplexing: process_radtags, process_radtags_SE_output_dir: process_radtags/SE,
process_radtags_barcode_file_select: server, process_radtags_barcode_file: '', process_radtags_barcode_type: --inline_null,
process_radtags_enzyme_SE: aciI, process_radtags_PE_output_dir: process_radtags/PE,
process_radtags_enzyme_1_PE: aciI, process_radtags_enzyme_2_PE: '', mapping: bowtie,
bowtie_index_output_dir: bowtie/index, bowtie_index_genome_fasta: '', bowtie_index_path: '',
bowtie_index_genome_fasta_select: server, bowtie_index_threads: 4, bowtie_PE_output_dir: bowtie/PE,
index: bwa/index/index, bowtie_threads: 4, bowtie_minins_PE: 0, bowtie_maxins_PE: 250,
bowtie_orientation_PE: '', bowtie_mult_align_limit: 1, bowtie_best: true, bowtie_strata: true,
bowtie_SE_output_dir: bowtie/SE, bwa_index_output_dir: bwa/index, bwa_index_genome_fasta: '',
bwa_index_path: '', bwa_index_genome_fasta_select: server, bwa_index_algorithm: bwtsw,
bwa_mem_PE_output_dir: bwa/mem/PE, bwa_mem_threads: 4, bwa_mem_quality0_multimapping: true,
bwa_mem_SE_output_dir: bwa/mem/SE, mapping_check: samtools_stats, samtools_stats_output_dir: samtools_stats,
samtools_stats_threads: 4, gstacks: gstacks, gstacks_output_dir: gstacks, gstacks_threads: 4,
gstacks_population_tsv_select: server, gstacks_population_tsv: '', gstacks_model: marukilow,
gstacks_var_alpha: 0.05, gstacks_gt_alpha: 0.05, gstacks_min_mapq: 20, gstacks_max_clipped: 0.2,
populations: populations, populations_output_dir: populations, populations_threads: 4,
populations_r: 0.7, populations_max_obs_het: 1, populations_min_maf: 0.05, populations_p: 2}
params:
results_dir: /Results
sample_dir: /Data
sample_suffix: .fastq.gz
SeOrPe: PE
quality_check: fastqc
fastqc_SE_output_dir: fastqc_SE
fastqc_PE_output_dir: fastqc_PE
fastqc_threads: 4
null_output_dir: ''
demultiplexing: process_radtags
process_radtags_SE_output_dir: process_radtags/SE
process_radtags_barcode_file_select: server
process_radtags_barcode_file: ''
process_radtags_barcode_type: --inline_null
process_radtags_enzyme_SE: aciI
process_radtags_PE_output_dir: process_radtags/PE
process_radtags_enzyme_1_PE: aciI
process_radtags_enzyme_2_PE: ''
mapping: bowtie
bowtie_index_output_dir: bowtie/index
bowtie_index_genome_fasta: ''
bowtie_index_path: ''
bowtie_index_genome_fasta_select: server
bowtie_index_threads: 4
bowtie_PE_output_dir: bowtie/PE
index: bwa/index/index
bowtie_threads: 4
bowtie_minins_PE: 0
bowtie_maxins_PE: 250
bowtie_orientation_PE: ''
bowtie_mult_align_limit: 1
bowtie_best: true
bowtie_strata: true
bowtie_SE_output_dir: bowtie/SE
bwa_index_output_dir: bwa/index
bwa_index_genome_fasta: ''
bwa_index_path: ''
bwa_index_genome_fasta_select: server
bwa_index_algorithm: bwtsw
bwa_mem_PE_output_dir: bwa/mem/PE
bwa_mem_threads: 4
bwa_mem_quality0_multimapping: true
bwa_mem_SE_output_dir: bwa/mem/SE
mapping_check: samtools_stats
samtools_stats_output_dir: samtools_stats
samtools_stats_threads: 4
gstacks: gstacks
gstacks_output_dir: gstacks
gstacks_threads: 4
gstacks_population_tsv_select: server
gstacks_population_tsv: ''
gstacks_model: marukilow
gstacks_var_alpha: 0.05
gstacks_gt_alpha: 0.05
gstacks_min_mapq: 20
gstacks_max_clipped: 0.2
populations: populations
populations_output_dir: populations
populations_threads: 4
populations_r: 0.7
populations_max_obs_het: 1
populations_min_maf: 0.05
populations_p: 2
samples: []
groups: []
final_step: all
steps:
- title: Quality check
name: quality_check
tools: [fastqc, 'null']
tools:
- fastqc
- 'null'
default: fastqc
- title: Demultiplexing
name: demultiplexing
tools: [process_radtags, 'null']
tools:
- process_radtags
- 'null'
default: process_radtags
- title: Mapping
name: mapping
tools: [bowtie, bwa]
tools:
- bowtie
- bwa
default: bowtie
- title: Mapping check
name: mapping_check
tools: [samtools_stats]
tools:
- samtools_stats
default: samtools_stats
- title: Gstacks
name: gstacks
tools: [gstacks]
tools:
- gstacks
default: gstacks
- title: Populations
name: populations
tools: [populations]
tools:
- populations
default: populations
params_info:
results_dir: {type: output_dir}
sample_dir: {type: input_dir}
sample_suffix: {type: text}
SeOrPe: {type: radio}
fastqc_threads: {tool: fastqc, rule: fastqc_PE, type: numeric}
process_radtags_barcode_file_select: {tool: process_radtags, rule: process_radtags_PE,
type: select}
process_radtags_barcode_file: {tool: process_radtags, rule: process_radtags_PE,
type: input_file}
process_radtags_barcode_type: {tool: process_radtags, rule: process_radtags_PE,
type: select}
process_radtags_enzyme_SE: {tool: process_radtags, rule: process_radtags_SE, type: select}
process_radtags_enzyme_1_PE: {tool: process_radtags, rule: process_radtags_PE, type: select}
process_radtags_enzyme_2_PE: {tool: process_radtags, rule: process_radtags_PE, type: select}
bowtie_index_path: {tool: bowtie, rule: bowtie_index, type: input_dir}
bowtie_index_genome_fasta_select: {tool: bowtie, rule: bowtie_index, type: select}
bowtie_index_genome_fasta: {tool: bowtie, rule: bowtie_index, type: input_file}
bowtie_index_threads: {tool: bowtie, rule: bowtie_index, type: numeric}
bowtie_threads: {tool: bowtie, rule: bowtie_SE, type: numeric}
bowtie_minins_PE: {tool: bowtie, rule: bowtie_PE, type: numeric}
bowtie_maxins_PE: {tool: bowtie, rule: bowtie_PE, type: numeric}
bowtie_orientation_PE: {tool: bowtie, rule: bowtie_PE, type: radio}
bowtie_mult_align_limit: {tool: bowtie, rule: bowtie_SE, type: numeric}
bowtie_best: {tool: bowtie, rule: bowtie_SE, type: checkbox}
bowtie_strata: {tool: bowtie, rule: bowtie_SE, type: checkbox}
bwa_index_path: {tool: bwa, rule: bwa_index, type: input_dir}
bwa_index_genome_fasta_select: {tool: bwa, rule: bwa_index, type: select}
bwa_index_genome_fasta: {tool: bwa, rule: bwa_index, type: input_file}
bwa_index_algorithm: {tool: bwa, rule: bwa_index, type: radio}
bwa_mem_threads: {tool: bwa, rule: bwa_mem_SE, type: numeric}
bwa_mem_quality0_multimapping: {tool: bwa, rule: bwa_mem_SE, type: checkbox}
samtools_stats_threads: {tool: samtools_stats, rule: samtools_stats, type: numeric}
gstacks_threads: {tool: gstacks, rule: gstacks, type: numeric}
gstacks_population_tsv_select: {tool: gstacks, rule: gstacks, type: select}
gstacks_population_tsv: {tool: gstacks, rule: gstacks, type: input_file}
gstacks_model: {tool: gstacks, rule: gstacks, type: select}
gstacks_var_alpha: {tool: gstacks, rule: gstacks, type: numeric}
gstacks_gt_alpha: {tool: gstacks, rule: gstacks, type: numeric}
gstacks_min_mapq: {tool: gstacks, rule: gstacks, type: numeric}
gstacks_max_clipped: {tool: gstacks, rule: gstacks, type: numeric}
populations_threads: {tool: populations, rule: populations, type: numeric}
populations_r: {tool: populations, rule: populations, type: numeric}
populations_max_obs_het: {tool: populations, rule: populations, type: numeric}
populations_min_maf: {tool: populations, rule: populations, type: numeric}
populations_p: {tool: populations, rule: populations, type: numeric}
prepare_report_scripts: [populations.prepare.report.R]
results_dir:
type: output_dir
sample_dir:
type: input_dir
sample_suffix:
type: text
SeOrPe:
type: radio
fastqc_threads:
tool: fastqc
rule: fastqc_PE
type: numeric
process_radtags_barcode_file_select:
tool: process_radtags
rule: process_radtags_PE
type: select
process_radtags_barcode_file:
tool: process_radtags
rule: process_radtags_PE
type: input_file
process_radtags_barcode_type:
tool: process_radtags
rule: process_radtags_PE
type: select
process_radtags_enzyme_SE:
tool: process_radtags
rule: process_radtags_SE
type: select
process_radtags_enzyme_1_PE:
tool: process_radtags
rule: process_radtags_PE
type: select
process_radtags_enzyme_2_PE:
tool: process_radtags
rule: process_radtags_PE
type: select
bowtie_index_path:
tool: bowtie
rule: bowtie_index
type: input_dir
bowtie_index_genome_fasta_select:
tool: bowtie
rule: bowtie_index
type: select
bowtie_index_genome_fasta:
tool: bowtie
rule: bowtie_index
type: input_file
bowtie_index_threads:
tool: bowtie
rule: bowtie_index
type: numeric
bowtie_threads:
tool: bowtie
rule: bowtie_SE
type: numeric
bowtie_minins_PE:
tool: bowtie
rule: bowtie_PE
type: numeric
bowtie_maxins_PE:
tool: bowtie
rule: bowtie_PE
type: numeric
bowtie_orientation_PE:
tool: bowtie
rule: bowtie_PE
type: radio
bowtie_mult_align_limit:
tool: bowtie
rule: bowtie_SE
type: numeric
bowtie_best:
tool: bowtie
rule: bowtie_SE
type: checkbox
bowtie_strata:
tool: bowtie
rule: bowtie_SE
type: checkbox
bwa_index_path:
tool: bwa
rule: bwa_index
type: input_dir
bwa_index_genome_fasta_select:
tool: bwa
rule: bwa_index
type: select
bwa_index_genome_fasta:
tool: bwa
rule: bwa_index
type: input_file
bwa_index_algorithm:
tool: bwa
rule: bwa_index
type: radio
bwa_mem_threads:
tool: bwa
rule: bwa_mem_SE
type: numeric
bwa_mem_quality0_multimapping:
tool: bwa
rule: bwa_mem_SE
type: checkbox
samtools_stats_threads:
tool: samtools_stats
rule: samtools_stats
type: numeric
gstacks_threads:
tool: gstacks
rule: gstacks
type: numeric
gstacks_population_tsv_select:
tool: gstacks
rule: gstacks
type: select
gstacks_population_tsv:
tool: gstacks
rule: gstacks
type: input_file
gstacks_model:
tool: gstacks
rule: gstacks
type: select
gstacks_var_alpha:
tool: gstacks
rule: gstacks
type: numeric
gstacks_gt_alpha:
tool: gstacks
rule: gstacks
type: numeric
gstacks_min_mapq:
tool: gstacks
rule: gstacks
type: numeric
gstacks_max_clipped:
tool: gstacks
rule: gstacks
type: numeric
populations_threads:
tool: populations
rule: populations
type: numeric
populations_r:
tool: populations
rule: populations
type: numeric
populations_max_obs_het:
tool: populations
rule: populations
type: numeric
populations_min_maf:
tool: populations
rule: populations
type: numeric
populations_p:
tool: populations
rule: populations
type: numeric
prepare_report_scripts:
- populations.prepare.report.R
prepare_report_outputs:
populations: [PCA_Eigenvalues_mqc.txt, PCA_First2axis_mqc.yaml, Mean_Pairwise_Pop_FST_mqc.csv,
IBS_mqc.png]
populations:
- PCA_Eigenvalues_mqc.txt
- PCA_First2axis_mqc.yaml
- Mean_Pairwise_Pop_FST_mqc.csv
- IBS_mqc.png
outputs:
fastqc:
fastqc_SE:
- {name: html, file: '{sample}_fastqc.html', description: Rapport html fastqc}
- {name: zip, file: '{sample}_fastqc.zip', description: Dossier zip fastqc}
- name: html
file: '{sample}_fastqc.html'
description: Rapport html fastqc
- name: zip
file: '{sample}_fastqc.zip'
description: Dossier zip fastqc
fastqc_PE:
- {name: html1, file: '{sample}_R1_fastqc.html', description: Rapport html fastqc}
- {name: zip1, file: '{sample}_R1_fastqc.zip', description: Dossier zip fastqc}
- {name: html2, file: '{sample}_R2_fastqc.html', description: Rapport html fastqc}
- {name: zip2, file: '{sample}_R2_fastqc.zip', description: Dossier zip fastqc}
- name: html1
file: '{sample}_R1_fastqc.html'
description: Rapport html fastqc
- name: zip1
file: '{sample}_R1_fastqc.zip'
description: Dossier zip fastqc
- name: html2
file: '{sample}_R2_fastqc.html'
description: Rapport html fastqc
- name: zip2
file: '{sample}_R2_fastqc.zip'
description: Dossier zip fastqc
'null':
'null': []
process_radtags:
process_radtags_SE:
- {name: reads_demultiplexed, file: '{individu}.fastq.gz', description: Files
of reads for each individual}
- name: reads_demultiplexed
file: '{individu}.fastq.gz'
description: Files of reads for each individual
process_radtags_PE:
- {name: reads_forward_demultiplexed, file: '{individu}_R1.fastq.gz', description: Files
of forward reads for each individual}
- {name: reads_reverse_demultiplexed, file: '{individu}_R2.fastq.gz', description: Files
of reverse reads for each individual}
- name: reads_forward_demultiplexed
file: '{individu}_R1.fastq.gz'
description: Files of forward reads for each individual
- name: reads_reverse_demultiplexed
file: '{individu}_R2.fastq.gz'
description: Files of reverse reads for each individual
bowtie:
bowtie_index:
- {name: index, file: index, description: Index files for bowtie alignment}
- name: index
file: index
description: Index files for bowtie alignment
bowtie_PE:
- {name: bam, file: '{sample}.bam', description: Alignment files}
- name: bam
file: '{sample}.bam'
description: Alignment files
bowtie_SE:
- {name: bam, file: '{sample}.bam', description: Alignment files}
- name: bam
file: '{sample}.bam'
description: Alignment files
bwa:
bwa_index:
- {name: index, file: index, description: Index files for bwa alignment}
- name: index
file: index
description: Index files for bwa alignment
bwa_mem_PE:
- {name: bam, file: '{sample}.bam', description: Alignment files}
- name: bam
file: '{sample}.bam'
description: Alignment files
bwa_mem_SE:
- {name: bam, file: '{sample}.bam', description: Alignment files}
- name: bam
file: '{sample}.bam'
description: Alignment files
samtools_stats:
samtools_stats:
- {name: stats, file: '{sample}_samtools_stats.txt', description: samtools stats
command output}
- name: stats
file: '{sample}_samtools_stats.txt'
description: samtools stats command output
gstacks:
gstacks:
- {name: catalog_calls, file: catalog.calls, description: Consensus sequence for
each assembled locus in the data}
- {name: catalog_fa, file: catalog.fa.gz, description: Custom file that contains
genotyping data}
- {name: stats, file: gstacks.log.distribs, description: 'Distributions statistics
(bam stats, coverage and phasing_rates per sample)'}
- name: catalog_calls
file: catalog.calls
description: Consensus sequence for each assembled locus in the data
- name: catalog_fa
file: catalog.fa.gz
description: Custom file that contains genotyping data
- name: stats
file: gstacks.log.distribs
description: Distributions statistics (bam stats, coverage and phasing_rates
per sample)
populations:
populations:
- {name: fstats_pop, file: 'populations.fst_{popA}-{popB}.tsv', description: SNP
and haplotype-based F statistics between each populations}
- {name: fstats_summary, file: populations.fst_summary.tsv, description: SNP and
haplotype-based F statistics summary}
- {name: haplotypes_tab, file: populations.haplotypes.tsv, description: Haplotypes
for each sample}
- {name: phistats_pop, file: 'populations.phistats_{popA}-{popB}.tsv', description: Phi
statistics between each populations}
- {name: phistats_summary, file: populations.phistats_summary.tsv, description: Phi
statistics summary}
- {name: vcf, file: populations.snps.vcf, description: SNP vcf file}
- {name: structure, file: populations.structure, description: Output in Structure
format}
- {name: genepop_haplotypes, file: populations.haps.genepop, description: Haplotypes
in GenePop format}
- {name: genepop_snps, file: populations.snps.genepop, description: SNP in GenePop
format}
- {name: plink_map, file: populations.plink.map, description: Genotypes in PLINK
format}
- {name: plink_ped, file: populations.plink.ped, description: Genotypes in PLINK
format}
- {name: radpainter_haplotypes, file: populations.haps.radpainter, description: Haplotypes
fineRADstructure/RADpainter format}
- {name: PCA_Eigenvalues_mqc, file: PCA_Eigenvalues_mqc.txt, description: PCA
eigenvalues}
- {name: PCA_First2axis_mqc, file: PCA_First2axis_mqc.yaml, description: PCA plot
on first 2 axis}
- {name: Mean_Pairwise_Pop_FST_mqc, file: Mean_Pairwise_Pop_FST_mqc.csv, description: Mean
pairwise population Fstats}
- {name: IBS_mqc, file: IBS_mqc.png, description: IBS heatmap}
multiqc: {fastqc: fastqc, 'null': custom, process_radtags: custom, bowtie: bowtie1,
bwa: custom, samtools_stats: samtools, gstacks: custom, populations: stacks}
- name: fstats_pop
file: populations.fst_{popA}-{popB}.tsv
description: SNP and haplotype-based F statistics between each populations
- name: fstats_summary
file: populations.fst_summary.tsv
description: SNP and haplotype-based F statistics summary
- name: haplotypes_tab
file: populations.haplotypes.tsv
description: Haplotypes for each sample
- name: phistats_pop
file: populations.phistats_{popA}-{popB}.tsv
description: Phi statistics between each populations
- name: phistats_summary
file: populations.phistats_summary.tsv
description: Phi statistics summary
- name: vcf
file: populations.snps.vcf
description: SNP vcf file
- name: structure
file: populations.structure
description: Output in Structure format
- name: genepop_haplotypes
file: populations.haps.genepop
description: Haplotypes in GenePop format
- name: genepop_snps
file: populations.snps.genepop
description: SNP in GenePop format
- name: plink_map
file: populations.plink.map
description: Genotypes in PLINK format
- name: plink_ped
file: populations.plink.ped
description: Genotypes in PLINK format
- name: radpainter_haplotypes
file: populations.haps.radpainter
description: Haplotypes fineRADstructure/RADpainter format
- name: PCA_Eigenvalues_mqc
file: PCA_Eigenvalues_mqc.txt
description: PCA eigenvalues
- name: PCA_First2axis_mqc
file: PCA_First2axis_mqc.yaml
description: PCA plot on first 2 axis
- name: Mean_Pairwise_Pop_FST_mqc
file: Mean_Pairwise_Pop_FST_mqc.csv
description: Mean pairwise population Fstats
- name: IBS_mqc
file: IBS_mqc.png
description: IBS heatmap
multiqc:
fastqc: fastqc
'null': custom
process_radtags: custom
bowtie: bowtie1
bwa: custom
samtools_stats: samtools
gstacks: custom
populations: stacks
Bootstrap: localimage
From: ../base.simg
From: ../base.sif
%environment
export PATH=/opt/biotools/bin:$PATH
......@@ -17,8 +17,8 @@ From: ../base.simg
echo "This container contains two apps (UI and Snakemake)."
echo "UI is a user interface to set up the workflow and launch it."
echo "Snakemake let you provide your configfile and other parameters to the snakemake command and launch it."
echo "To get help for an app :\nsingularity help --app appName this_container.simg"
echo "To run an app :\nsingularity run --app appName this_container.simg"
echo "To get help for an app :\nsingularity help --app appName this_container.sif"
echo "To run an app :\nsingularity run --app appName this_container.sif"
########################
......@@ -30,7 +30,7 @@ echo "To run an app :\nsingularity run --app appName this_container.simg"
%apphelp UI
To run the UI app you should bind data and results directories like in the following example.
You must also provide the host address and port where the shiny app will be launched
exemple : singularity run --app UI -B /path/to/data/directory:/Data -B /path/to/store/Results:/Results this_container.simg 127.0.0.1 1234
exemple : singularity run --app UI -B /path/to/data/directory:/Data -B /path/to/store/Results:/Results this_container.sif 127.0.0.1 1234
########################
......@@ -46,7 +46,7 @@ exemple : singularity run --app UI -B /path/to/data/directory:/Data -B /path/to/
%apphelp Snakemake
To run the Snakemake app you should bind data and results directories like in the following example.
You must also provide the configfile and the number of cores provided to snakemake command (you can add other parameters after these two)
exemple : singularity run --app Snakemake -B /path/to/data/directory:/Data -B /path/to/store/Results:/Results this_container.simg myconfig.yml 16 otherparams
exemple : singularity run --app Snakemake -B /path/to/data/directory:/Data -B /path/to/store/Results:/Results this_container.sif myconfig.yml 16 otherparams
########################
# App getConfigfile
......@@ -56,7 +56,7 @@ exemple : singularity run --app Snakemake -B /path/to/data/directory:/Data -B /p
%apphelp getConfigfile
To run the getConfigfile app you dont need to bind directories. This app will only copy the default parameters file from the container to your local disk.
exemple : singularity run --app getConfigfile this_container.simg
exemple : singularity run --app getConfigfile this_container.sif
%help
This container contains three apps (UI, Snakemake and getConfigfile).
......@@ -64,9 +64,9 @@ This container contains three apps (UI, Snakemake and getConfigfile).
* Snakemake let you provide your configfile and other parameters to the snakemake command and launch it.
* getConfigfile give you a copy of a default parameters file to fill and use with the Snakemake app
To get help for an app :
singularity help --app appName this_container.simg
singularity help --app appName this_container.sif
To run an app :
singularity run --app appName this_container.simg
singularity run --app appName this_container.sif
%files
......@@ -77,6 +77,7 @@ singularity run --app appName this_container.simg
%post
mkdir /Data
mkdir /Results
apt-get update -y
apt install -y fastqc=0.11.5+dfsg-6
......
......@@ -13,6 +13,6 @@ def read_yaml(filepath):