Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • laure.heurtevin/workflows
  • cervin.guyomar/workflows
  • bios4biol/workflows
3 results
Show changes
Showing
with 0 additions and 84111 deletions
__default__:
mem: "1G"
cpus: 1
time: 01:00:00
star_index:
cpus: 8
star_map_pe:
cpus: 4
star_map_se:
cpus: 4
rule cutadapt_pe:
input:
r1 = os.path.join(READS_DIR, "{sample}_R1.fastq.gz"),
r2 = os.path.join(READS_DIR, "{sample}_R2.fastq.gz")
output:
r1 = os.path.join("Results", "cutadapt_pe", "{sample}_R1.fastq.gz"),
r2 = os.path.join("Results", "cutadapt_pe", "{sample}_R2.fastq.gz")
shell:
"cutadapt -a {ADAPT_1} -A {ADAPT_2} -o {output.r1} -p {output.r2} {input}"
rule cutadapt_se:
input:
r = os.path.join(READS_DIR, "{sample}.fastq.gz")
output:
r = os.path.join("Results", "cutadapt_se", "{sample}.fastq.gz")
shell:
"cutadapt -a {ADAPT_1} -o {output.r} {input}"
rule fastqc_pe:
input:
r1 = os.path.join(READS_DIR, "{sample}_R1.fastq.gz"),
r2 = os.path.join(READS_DIR, "{sample}_R2.fastq.gz")
output:
"Results/fastqc_pe/{sample}_R1_fastqc.zip"
params:
dir = "Results/fastqc_pe"
shell:
"fastqc -o {params.dir} {input.r1} {input.r2}"
rule fastqc_se:
input:
r = os.path.join(READS_DIR, "{sample}.fastq.gz")
output:
"Results/fastqc_se/{sample}_fastqc.zip"
params:
dir = "Results/fastqc_se"
shell:
"fastqc -o {params.dir} {input.r}"
rule star_index:
input:
ref = REFERENCE
output:
expand("{dir}/Genome",dir=STAR_INDEX),
dir = STAR_INDEX
params:
cpu = config["star_index"]["cpus"]
shell:
"""
STAR --runThreadN {params.cpu} --runMode genomeGenerate --genomeDir {output.dir} --genomeFastaFiles {input.ref} \
--outFileNamePrefix {output.dir}/
"""
rule star_map_pe:
input:
ref = STAR_INDEX,
r1 = os.path.join("Results", "cutadapt_pe", "{sample}_R1.fastq.gz"),
r2 = os.path.join("Results", "cutadapt_pe", "{sample}_R2.fastq.gz")
output:
bam = os.path.join("Results","star_map", "{sample}_Aligned.sortedByCoord.out.bam")
params:
cpu = config["star_map_pe"]["cpus"],
dir = "Results/star_map"
shell:
"""
STAR --genomeDir {input.ref} --readFilesIn {input.r1} {input.r2} --readFilesCommand zcat \
--outFileNamePrefix {params.dir}/{wildcards.sample}_ --runThreadN {params.cpu} --outSAMtype BAM SortedByCoordinate
"""
rule star_map_se:
input:
ref = STAR_INDEX,
reads = os.path.join("Results", "cutadapt_se", "{sample}.fastq.gz")
output:
bam = os.path.join("Results", "star_map", "{sample}_Aligned.sortedByCoord.out.bam")
params:
cpu = config["star_map_se"]["cpus"],
dir = "Results/star_map"
shell:
"""
STAR --genomeDir {input.ref} --readFilesIn {input.reads} --readFilesCommand zcat \
--outFileNamePrefix {params.dir}/{wildcards.sample}_ --runThreadN {params.cpu} --outSAMtype BAM SortedByCoordinate
"""
#! /bin/sh
##############################################################################
## launch workflow
WORKFLOW_DIR=/usr/local/bioinfo/workflows/Snakemake/template_dev/
SGE_LOG_DIR=SGE_out
mkdir -p $SGE_LOG_DIR
/usr/local/bioinfo/src/python/Python-3.6.1/bin/snakemake -s $WORKFLOW_DIR/Snakefile --jobs 99 \
--configfile $WORKFLOW_DIR/config.yaml \
--cluster-config $WORKFLOW_DIR/resources_SGE.yaml \
--cluster "qsub -q unlimitq -pe parallel_smp {cluster.cpus} -l mem={cluster.mem} -l h_vmem={cluster.vmem} -o $SGE_LOG_DIR -e $SGE_LOG_DIR" \
--printshellcmds --latency-wait 30
## use the exact same command to rerun the workflow
\ No newline at end of file
#! /bin/sh
##############################################################################
## export and module load
module load /tools/share/Modules/system/Python-3.6.3
##############################################################################
## launch workflow
WORKFLOW_DIR=/usr/local/bioinfo/workflows/Snakemake/template_dev/
SLURM_out=$WORKFLOW_DIR/logs
mkdir -p SLURM_out
snakemake -s Snakefile --jobs 99 \
--configfile config.yaml \
--cluster-config resources_SLURM.yaml \
--cluster "sbatch -p unlimitq --cpus-per-task={cluster.cpus} --time={cluster.time} --mem-per-cpu={cluster.mem} -e SLURM_out/%x.err -o SLURM_out/%x.out" \
--printshellcmds --latency-wait 30
## use the exact same command to rerun the workflow
File deleted
File deleted
File deleted
File deleted
wget http://genoweb.toulouse.inra.fr/~cnoirot/WorkflowFrameworkComparison/StarIndex.tgz
tar -xvzf StarIndex.tgz
\ No newline at end of file
This diff is collapsed.
source diff could not be displayed: it is too large. Options to address this: view the blob.