Commit 539b21fb authored by mmassaviol's avatar mmassaviol
Browse files

Update Mito_Assembler_Megahit workflow

parent 57ad911f
......@@ -3,6 +3,8 @@ import re
import snakemake.utils
import csv
dir_path = "/workflow"
#############
# Wildcards #
#############
......
File mode changed from 100755 to 100644
pipeline: Mito_Assembler_Megahit
params: {results_dir: /Results, sample_dir: /Data, sample_suffix: .fastq.gz, SeOrPe: PE,
clade: Arthropoda, quality_check: fastqc, fastqc_SE_output_dir: fastqc_SE, fastqc_PE_output_dir: fastqc_PE,
fastqc_threads: 4, null_output_dir: '', assembling: megahit, megahit_SE_output_dir: megahit_SE,
megahit_threads: 4, megahit_PE_output_dir: megahit_PE, find_mitoscaf: mitoz_findmitoscaf,
mitoz_findmitoscaf_output_dir: mitoz_findmitoscaf, mitoz_findmitoscaf_threads: 4,
annotate: mitoz_annotate, mitoz_annotate_SE_output_dir: mitoz_annotate_SE, mitoz_annotate_threads: 4,
mitoz_annotate_PE_output_dir: mitoz_annotate_PE, visualize: igv_visualize, igv_visualize_output_dir: igv_visualize,
igv_visualize_threads: 4}
params:
results_dir: /Results
sample_dir: /Data
sample_suffix: .fastq.gz
SeOrPe: PE
clade: Arthropoda
quality_check: fastqc
fastqc_SE_output_dir: fastqc_SE
fastqc_PE_output_dir: fastqc_PE
fastqc_threads: 4
null_output_dir: ''
assembling: megahit
megahit_SE_output_dir: megahit_SE
megahit_threads: 4
megahit_PE_output_dir: megahit_PE
find_mitoscaf: mitoz_findmitoscaf
mitoz_findmitoscaf_output_dir: mitoz_findmitoscaf
mitoz_findmitoscaf_threads: 4
annotate: mitoz_annotate
mitoz_annotate_SE_output_dir: mitoz_annotate_SE
mitoz_annotate_threads: 4
mitoz_annotate_PE_output_dir: mitoz_annotate_PE
visualize: igv_visualize
igv_visualize_output_dir: igv_visualize
igv_visualize_threads: 4
samples: []
groups: []
final_step: all
steps:
- title: Quality check
name: quality_check
tools: [fastqc, 'null']
tools:
- fastqc
- 'null'
default: fastqc
- title: Assembling
name: assembling
tools: [megahit]
tools:
- megahit
default: megahit
- title: Find mitochondrion scaffold
name: find_mitoscaf
tools: [mitoz_findmitoscaf]
tools:
- mitoz_findmitoscaf
default: mitoz_findmitoscaf
- title: Annotate
name: annotate
tools: [mitoz_annotate]
tools:
- mitoz_annotate
default: mitoz_annotate
- title: Visualize
name: visualize
tools: [igv_visualize]
tools:
- igv_visualize
default: igv_visualize
params_info:
results_dir: {type: output_dir}
sample_dir: {type: input_dir}
sample_suffix: {type: text}
SeOrPe: {type: radio}
clade: {type: radio}
fastqc_threads: {tool: fastqc, rule: fastqc_PE, type: numeric}
megahit_threads: {tool: megahit, rule: megahit_PE, type: numeric}
mitoz_findmitoscaf_threads: {tool: mitoz_findmitoscaf, rule: mitoz_findmitoscaf,
type: numeric}
mitoz_annotate_threads: {tool: mitoz_annotate, rule: mitoz_annotate_PE, type: numeric}
igv_visualize_threads: {tool: igv_visualize, rule: igv_visualize, type: numeric}
prepare_report_scripts: [mitoz_annotate.prepare.report.R]
results_dir:
type: output_dir
sample_dir:
type: input_dir
sample_suffix:
type: text
SeOrPe:
type: radio
clade:
type: radio
fastqc_threads:
tool: fastqc
rule: fastqc_PE
type: numeric
megahit_threads:
tool: megahit
rule: megahit_PE
type: numeric
mitoz_findmitoscaf_threads:
tool: mitoz_findmitoscaf
rule: mitoz_findmitoscaf
type: numeric
mitoz_annotate_threads:
tool: mitoz_annotate
rule: mitoz_annotate_PE
type: numeric
igv_visualize_threads:
tool: igv_visualize
rule: igv_visualize
type: numeric
prepare_report_scripts:
- mitoz_annotate.prepare.report.R
prepare_report_outputs:
mitoz_annotate: [Annotations_mqc.tsv, Contigs_mqc.tsv, Genes_found_mqc.tsv, Potential_missing_genes_mqc.tsv]
mitoz_annotate:
- Annotations_mqc.tsv
- Contigs_mqc.tsv
- Genes_found_mqc.tsv
- Potential_missing_genes_mqc.tsv
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': []
megahit:
megahit_SE:
- {name: contigs, file: assembly.contigs.fa, description: Result of the assembly}
- name: contigs
file: assembly.contigs.fa
description: Result of the assembly
megahit_PE:
- {name: contigs, file: assembly.contigs.fa, description: Result of the assembly}
- name: contigs
file: assembly.contigs.fa
description: Result of the assembly
mitoz_findmitoscaf:
mitoz_findmitoscaf:
- {name: mitogenome, file: mitoz_findmitoscaf.mitogenome.fa, description: The
mitochondrial sequences from each Kmer assembly}
- {name: readme, file: README.txt, description: Readme with all output files explained}
- name: mitogenome
file: mitoz_findmitoscaf.mitogenome.fa
description: The mitochondrial sequences from each Kmer assembly
- name: readme
file: README.txt
description: Readme with all output files explained
mitoz_annotate:
mitoz_annotate_SE:
- {name: genbank_annots, file: mitoz_annotate_SE_mitoscaf.fa.gbf, description: The
mitochondrial genome in GenBank format}
- {name: readme, file: README.txt, description: Readme with all output files explained}
- name: genbank_annots
file: mitoz_annotate_SE_mitoscaf.fa.gbf
description: The mitochondrial genome in GenBank format
- name: readme
file: README.txt
description: Readme with all output files explained
mitoz_annotate_PE:
- {name: genbank_annots, file: mitoz_annotate_PE_mitoscaf.fa.gbf, description: The
mitochondrial genome in GenBank format}
- {name: readme, file: README.txt, description: Readme with all output files explained}
- name: genbank_annots
file: mitoz_annotate_PE_mitoscaf.fa.gbf
description: The mitochondrial genome in GenBank format
- name: readme
file: README.txt
description: Readme with all output files explained
igv_visualize:
igv_visualize:
- {name: igv_png, file: '{contig_name}_mqc.png', description: Contig and read
coverage visualisation}
multiqc: {fastqc: fastqc, 'null': custom, megahit: custom, mitoz_findmitoscaf: custom,
mitoz_annotate: custom, igv_visualize: custom}
- name: igv_png
file: '{contig_name}_mqc.png'
description: Contig and read coverage visualisation
multiqc:
fastqc: fastqc
'null': custom
megahit: custom
mitoz_findmitoscaf: custom
mitoz_annotate: custom
igv_visualize: custom
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