-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from TRON-Bioinformatics/49_add_subworkflow_sn…
…peff_custom_genome 49 add subworkflow snpeff custom genome
- Loading branch information
Showing
9 changed files
with
115 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env python | ||
#!/usr/bin/env python3 | ||
import argparse | ||
import gzip | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env python | ||
#!/usr/bin/env python3 | ||
import argparse | ||
import logging | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#!/usr/bin/env python3 | ||
from pysam import FastaFile | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
params.memory = "3g" | ||
params.cpus = 1 | ||
params.output = "." | ||
|
||
|
||
process BWA_INDEX { | ||
cpus params.cpus | ||
memory params.memory | ||
publishDir "${params.output}", mode: "copy" | ||
tag "${name}" | ||
|
||
conda (params.enable_conda ? "bioconda::bwa-mem2=2.2.1 bioconda::samtools=1.12 bioconda::gatk4=4.2.0.0" : null) | ||
|
||
input: | ||
val(reference) | ||
|
||
output: | ||
path("reference/sequences.fa"), emit: reference | ||
path("reference/sequences.fa.fai"), emit: fai | ||
path("reference/sequences.dict"), emit: gatk_dict | ||
|
||
script: | ||
memory = "${params.memory}".replaceAll(" ", "").toLowerCase() | ||
""" | ||
mkdir -p reference | ||
cp ${reference} reference/sequences.fa | ||
bwa-mem2 index reference/sequences.fa | ||
samtools faidx reference/sequences.fa | ||
gatk CreateSequenceDictionary --REFERENCE reference/sequences.fa | ||
""" | ||
} | ||
|
||
process SNPEFF_DATABASE { | ||
cpus params.cpus | ||
memory params.memory | ||
publishDir "${params.output}", mode: "copy" | ||
tag "${name}" | ||
|
||
conda (params.enable_conda ? "bioconda::snpeff=5.0 bioconda::samtools=1.12" : null) | ||
|
||
input: | ||
val(reference) | ||
val(gff) | ||
val(snpeff_organism) | ||
|
||
output: | ||
path("snpeff/snpEff.config"), emit: snpeff_config | ||
path("snpeff/"), emit: snpeff_data | ||
|
||
script: | ||
memory = "${params.memory}".replaceAll(" ", "").toLowerCase() | ||
""" | ||
mkdir -p snpeff/${snpeff_organism} | ||
echo ${snpeff_organism}.genome : ${snpeff_organism} > snpeff/snpEff.config | ||
cp ${reference} snpeff/${snpeff_organism}/sequences.fa | ||
cp ${gff} snpeff/${snpeff_organism}/genes.gff | ||
cd snpeff | ||
snpEff build -gff3 -v ${snpeff_organism} -dataDir . | ||
""" | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters