Commit 850f4de2 authored by mmassaviol's avatar mmassaviol
Browse files

Update RADseq_denovo workflow

parent 539b21fb
File mode changed from 100755 to 100644
pipeline: RADseq_denovo
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: '', ustacks: ustacks,
ustacks_output_dir: stacks, ustacks_threads: 4, ustacks_M: 2, ustacks_m: 3, ustacks_N: NA,
cstacks: cstacks, cstacks_output_dir: stacks, cstacks_threads: 4, cstacks_population_tsv_select: server,
cstacks_population_tsv: '', cstacks_n: 1, stacks: sstacks, sstacks_output_dir: stacks,
sstacks_threads: 4, tsv2bam: tsv2bam, tsv2bam_output_dir: stacks, tsv2bam_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: ''
ustacks: ustacks
ustacks_output_dir: stacks
ustacks_threads: 4
ustacks_M: 2
ustacks_m: 3
ustacks_N: NA
cstacks: cstacks
cstacks_output_dir: stacks
cstacks_threads: 4
cstacks_population_tsv_select: server
cstacks_population_tsv: ''
cstacks_n: 1
stacks: sstacks
sstacks_output_dir: stacks
sstacks_threads: 4
tsv2bam: tsv2bam
tsv2bam_output_dir: stacks
tsv2bam_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: ustacks
name: ustacks
tools: [ustacks]
tools:
- ustacks
default: ustacks
- title: cstacks
name: cstacks
tools: [cstacks]
tools:
- cstacks
default: cstacks
- title: sstacks
name: stacks
tools: [sstacks]
tools:
- sstacks
default: sstacks
- title: tsv2bam
name: tsv2bam
tools: [tsv2bam]
tools:
- tsv2bam
default: tsv2bam
- 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}
ustacks_threads: {tool: ustacks, rule: ustacks, type: numeric}
ustacks_M: {tool: ustacks, rule: ustacks, type: numeric}
ustacks_m: {tool: ustacks, rule: ustacks, type: numeric}
ustacks_N: {tool: ustacks, rule: ustacks, type: numeric}
cstacks_threads: {tool: cstacks, rule: cstacks, type: numeric}
cstacks_population_tsv_select: {tool: cstacks, rule: cstacks, type: select}
cstacks_population_tsv: {tool: cstacks, rule: cstacks, type: input_file}
cstacks_n: {tool: cstacks, rule: cstacks, type: numeric}
sstacks_threads: {tool: sstacks, rule: sstacks, type: numeric}
tsv2bam_threads: {tool: tsv2bam, rule: tsv2bam, 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
ustacks_threads:
tool: ustacks
rule: ustacks
type: numeric
ustacks_M:
tool: ustacks
rule: ustacks
type: numeric
ustacks_m:
tool: ustacks
rule: ustacks
type: numeric
ustacks_N:
tool: ustacks
rule: ustacks
type: numeric
cstacks_threads:
tool: cstacks
rule: cstacks
type: numeric
cstacks_population_tsv_select:
tool: cstacks
rule: cstacks
type: select
cstacks_population_tsv:
tool: cstacks
rule: cstacks
type: input_file
cstacks_n:
tool: cstacks
rule: cstacks
type: numeric
sstacks_threads:
tool: sstacks
rule: sstacks
type: numeric
tsv2bam_threads:
tool: tsv2bam
rule: tsv2bam
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
ustacks:
ustacks: []
cstacks:
......@@ -123,43 +282,73 @@ outputs:
tsv2bam: []
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, ustacks: custom,
cstacks: custom, sstacks: custom, tsv2bam: custom, 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
ustacks: custom
cstacks: custom
sstacks: custom
tsv2bam: custom
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):
def write_yaml(filepath,data):
try:
with open(filepath, 'w') as file:
yaml.dump(data, file)
yaml.dump(data, file, default_flow_style=False)
except IOError as e:
print("Error in file opening:", e)
\ No newline at end of file
Supports Markdown
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