Skip to content

Commit

Permalink
Picard removed from buildReferences.nf
Browse files Browse the repository at this point in the history
  • Loading branch information
Szilveszter Juhos authored and Szilveszter Juhos committed Aug 1, 2018
1 parent d341e32 commit 6bc0065
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 17 deletions.
23 changes: 11 additions & 12 deletions buildReferences.nf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ kate: syntax groovy; space-indent on; indent-width 2;
- ProcessReference - Download all references if needed
- DecompressFile - Extract files if needed
- BuildBWAindexes - Build indexes for BWA
- BuildPicardIndex - Build index with Picard
- BuildReferenceIndex - Build index for FASTA refs
- BuildSAMToolsIndex - Build index with SAMTools
- BuildVCFIndex - Build index for VCF files
================================================================================
Expand Down Expand Up @@ -98,7 +98,7 @@ if (params.verbose) ch_decompressedFiles = ch_decompressedFiles.view {

ch_fastaFile = Channel.create()
ch_fastaForBWA = Channel.create()
ch_fastaForPicard = Channel.create()
ch_fastaReference = Channel.create()
ch_fastaForSAMTools = Channel.create()
ch_otherFile = Channel.create()
ch_vcfFile = Channel.create()
Expand All @@ -108,7 +108,7 @@ ch_decompressedFiles
it =~ ".fasta" ? 0 :
it =~ ".vcf" ? 1 : 2}

(ch_fastaForBWA, ch_fastaForPicard, ch_fastaForSAMTools, ch_fastaFileToKeep) = ch_fastaFile.into(4)
(ch_fastaForBWA, ch_fastaReference, ch_fastaForSAMTools, ch_fastaFileToKeep) = ch_fastaFile.into(4)
(ch_vcfFile, ch_vcfFileToKeep) = ch_vcfFile.into(2)

ch_notCompressedfiles
Expand Down Expand Up @@ -137,29 +137,28 @@ if (params.verbose) bwaIndexes.flatten().view {
"BWA index : ${it.fileName}"
}

process BuildPicardIndex {
process BuildReferenceIndex {
tag {f_reference}

publishDir params.outDir, mode: 'link'

input:
file(f_reference) from ch_fastaForPicard
file(f_reference) from ch_fastaReference

output:
file("*.dict") into ch_picardIndex
file("*.dict") into ch_referenceIndex

script:
"""
java -Xmx${task.memory.toGiga()}g \
-jar \$PICARD_HOME/picard.jar \
gatk --java-options "-Xmx${task.memory.toGiga()}g" \
CreateSequenceDictionary \
REFERENCE=${f_reference} \
OUTPUT=${f_reference.baseName}.dict
--REFERENCE ${f_reference} \
--OUTPUT ${f_reference.baseName}.dict
"""
}

if (params.verbose) ch_picardIndex.view {
"Picard index : ${it.fileName}"
if (params.verbose) ch_referenceIndex.view {
"Reference index : ${it.fileName}"
}

process BuildSAMToolsIndex {
Expand Down
3 changes: 1 addition & 2 deletions configuration/containers.config
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

process {
$BuildBWAindexes.container = "${params.repository}/sarek:${params.tag}"
$BuildPicardIndex.container = "${params.repository}/picard:${params.tag}"
$BuildReferenceIndex.container = "${params.repository}/sarek:${params.tag}"
$BuildSAMToolsIndex.container = "${params.repository}/sarek:${params.tag}"
$BuildVCFIndex.container = "${params.repository}/sarek:${params.tag}"
$CompressVCF.container = "${params.repository}/sarek:${params.tag}"
Expand All @@ -25,7 +25,6 @@ process {
$GetVersionFreeBayes.container = "${params.repository}/sarek:${params.tag}"
$GetVersionGATK.container = "${params.repository}/sarek:${params.tag}"
$GetVersionManta.container = "${params.repository}/sarek:${params.tag}"
$GetVersionPicard.container = "${params.repository}/picard:${params.tag}"
$GetVersionSnpeff.container = {params.genome == 'GRCh38' ? "${params.repository}/snpeffgrch38:${params.tag}" : "${params.repository}/snpeffgrch37:${params.tag}"}
$GetVersionStrelka.container = "${params.repository}/sarek:${params.tag}"
$GetVersionVCFtools.container = "${params.repository}/sarek:${params.tag}"
Expand Down
2 changes: 1 addition & 1 deletion configuration/singularity-path.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ singularity {

process {
$BuildBWAindexes.container = "${params.containerPath}/sarek-${params.tag}.img"
$BuildPicardIndex.container = "${params.containerPath}/sarek-${params.tag}.img"
$BuildReferenceIndex.container = "${params.containerPath}/sarek-${params.tag}.img"
$BuildSAMToolsIndex.container = "${params.containerPath}/sarek-${params.tag}.img"
$BuildVCFIndex.container = "${params.containerPath}/sarek-${params.tag}.img"
$CompressVCF.container = "${params.containerPath}/sarek-${params.tag}.img"
Expand Down
2 changes: 1 addition & 1 deletion configuration/uppmax-localhost.config
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ process {
$BuildBWAindexes {
memory = {params.totalMemory} // TODO This is likely too high
}
$BuildPicardIndex {
$BuildReferenceIndex {
memory = {params.totalMemory} // TODO This is likely too high
}
$BuildSAMToolsIndex {
Expand Down
2 changes: 1 addition & 1 deletion configuration/uppmax-slurm.config
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ process {

$BuildBWAindexes {
}
$BuildPicardIndex {
$BuildReferenceIndex {
}
$BuildSAMToolsIndex {
}
Expand Down

0 comments on commit 6bc0065

Please sign in to comment.