Skip to content

Commit

Permalink
Prepare new release
Browse files Browse the repository at this point in the history
  • Loading branch information
RenzoTale88 committed Feb 12, 2025
1 parent 4efbed1 commit 7b667fe
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 40 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Changelog
## [v1.8.6]
- Fix bugs originated after the workflow simplification.

## [v1.8.5]
- Upkeep release.

Expand Down
9 changes: 0 additions & 9 deletions modules/processes/GSAlign/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,8 @@ process gsalign{
command = "GSAlign -i ${srcname} -q ${tgtfile} -sen -t ${task.cpus} -idy 75 -no_vcf -o ${srcname}.${tgtname}.tmp"
} else if (params.distance == 'far') {
command = "GSAlign -i ${srcname} -q ${tgtfile} -sen -t ${task.cpus} -idy 70 -no_vcf -o ${srcname}.${tgtname}.tmp"
} else if (params.distance == 'same') {
command = "GSAlign -i ${srcname} -q ${tgtfile} -sen -t ${task.cpus} -no_vcf -o ${srcname}.${tgtname}.tmp"
} else {
command = "GSAlign -i ${srcname} -q ${tgtfile} -sen -t ${task.cpus} -no_vcf -o ${srcname}.${tgtname}.tmp"
log.info"""Preset ${params.distance} not available for GSAlign"""
log.info"""The software will use the same instead."""
log.info"""If it is not ok for you, re-run selecting among the following options:"""
log.info""" 1 - near"""
log.info""" 2 - medium"""
log.info""" 3 - far"""
log.info""" 4 - same"""
}
"""
${command}
Expand Down
21 changes: 7 additions & 14 deletions modules/processes/blat/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,22 @@ process blat {
tuple val(srcname), val(tgtname), file("${srcname}.${tgtname}.psl"), emit: al_files_ch

script:
def blat_args = "-fastMap -tileSize=12 -minIdentity=98"
def blat_args = "-fastMap -tileSize=12 -minIdentity=98 -ooc=${ooc12}"
if (params.custom) {
blat_args = params.custom
} else if (params.distance == 'near'){
blat_args = "-t=dna -q=dna -fastMap -noHead -tileSize=11 -minScore=100 -minIdentity=98"
blat_args = "-t=dna -q=dna -fastMap -noHead -tileSize=11 -minScore=100 -minIdentity=98 -ooc=${ooc11}"
} else if (params.distance == 'medium'){
blat_args = "-t=dna -q=dna -fastMap -noHead -tileSize=11 -stepSize=11 -oneOff=0 -minMatch=2 -minScore=30 -minIdentity=90 -maxGap=2 -maxIntron=75000"
blat_args = "-t=dna -q=dna -fastMap -noHead -tileSize=11 -stepSize=11 -oneOff=0 -minMatch=2 -minScore=30 -minIdentity=90 -maxGap=2 -maxIntron=75000 -ooc=${ooc11}"
} else if (params.distance == 'far') {
blat_args = "-t=dna -q=dna -fastMap -noHead -tileSize=12 -oneOff=1 -minMatch=1 -minScore=30 -minIdentity=80 -maxGap=3 -maxIntron=75000"
blat_args = "-t=dna -q=dna -fastMap -noHead -tileSize=12 -oneOff=1 -minMatch=1 -minScore=30 -minIdentity=80 -maxGap=3 -maxIntron=75000 -ooc=${ooc12}"
} else if (params.distance == 'balanced') {
blat_args = "-fastMap -tileSize=12 -minIdentity=98"
blat_args = "-fastMap -tileSize=12 -minIdentity=98 -ooc=${ooc12}"
} else {
blat_args = "-fastMap -tileSize=12 -minIdentity=98"
log.info"""Preset ${params.distance} not available for blat"""
log.info"""The software will use the balanced instead."""
log.info"""If it is not ok for you, re-run selecting among the following options:"""
log.info""" 1 - near"""
log.info""" 2 - medium"""
log.info""" 3 - far"""
log.info""" 4 - balanced"""
blat_args = "-fastMap -tileSize=12 -minIdentity=98 -ooc=${ooc12}"
}
"""
blat ${srcfile} ${tgtfile} ${blat_args} -ooc=${ooc12} -out=psl tmp.psl
blat ${srcfile} ${tgtfile} ${blat_args} -out=psl tmp.psl
liftUp -type=.psl stdout $srclift warn tmp.psl |
liftUp -type=.psl -pslQ ${srcname}.${tgtname}.psl $tgtlift warn stdin
"""
Expand Down
11 changes: 1 addition & 10 deletions modules/processes/lastz/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,8 @@ process lastz{
lastz_args = "B=0 C=0 E=30 H=2000 K=2200 L=6000 M=50 O=400 T=2 Y=3400"
} else if (params.distance == 'primate') {
lastz_args = "E=30 H=3000 K=5000 L=5000 M=10 O=400 T=1 ‑‑allocate:traceback=2048.0M"
} else if (params.distance == 'general') {
lastz_args = "E=30 H=2200 K=3000 L=3000 O=400 T=1 ‑‑allocate:traceback=2048.0M"
} else {
log.info"""Preset ${params.distance} not available for lastz"""
log.info"""The software will use general instead."""
log.info"""If it is not ok for you, re-run selecting among the following options:"""
log.info""" 1 - near"""
log.info""" 2 - medium"""
log.info""" 3 - far"""
log.info""" 4 - primate"""
log.info""" 5 - general"""
lastz_args = "E=30 H=2200 K=3000 L=3000 O=400 T=1 ‑‑allocate:traceback=2048.0M"
}
def qscores = qmatrix.simpleName != "OPTIONAL_FILE" ? "Q=${qmatrix}" : ""
"""
Expand Down
7 changes: 1 addition & 6 deletions modules/processes/minimap2/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,7 @@ process minimap2 {
} else if (params.distance == 'far') {
mm2_args = "-cx asm20"
} else {
log.info"""Preset ${params.distance} not available for minimap2"""
log.info"""The software will use the medium instead."""
log.info"""If it is not ok for you, re-run selecting among the following options:"""
log.info""" 1 - near"""
log.info""" 2 - medium"""
log.info""" 3 - far"""
mm2_args = "-cx asm10"
}
"""
minimap2 -t ${task.cpus} ${mm2_args} --cap-kalloc 100m --cap-sw-mem 50m --cs=long ${srcfile} ${tgtfile} |
Expand Down
11 changes: 11 additions & 0 deletions modules/subworkflows/GSAlign.nf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@ workflow GSALIGN {
twoBitTN

main:
// Log if the preset is not available
if (params.distance != "near" && params.distance != "medium" && params.distance != "far" && params.distance != "same" && params.distance != "custom"){
log.info"""Preset ${params.distance} not available for GSAlign"""
log.info"""The software will use the same instead."""
log.info"""If it is not ok for you, re-run selecting among the following options:"""
log.info""" 1 - near"""
log.info""" 2 - medium"""
log.info""" 3 - far"""
log.info""" 4 - same"""
}

// make index
bwt_index( pairspath_ch.groupTuple(by: [0, 1] ).unique() )

Expand Down
9 changes: 9 additions & 0 deletions modules/subworkflows/blat.nf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ workflow BLAT {

main:
// Check that preset is among the available ones
if (params.distance != "near" && params.distance != "medium" && params.distance != "far" && params.distance != "balanced" && params.distance != "custom"){
log.info"""Preset ${params.distance} not available for blat"""
log.info"""The software will use the balanced instead."""
log.info"""If it is not ok for you, re-run selecting among the following options:"""
log.info""" 1 - near"""
log.info""" 2 - medium"""
log.info""" 3 - far"""
log.info""" 4 - balanced"""
}


// Prepare Ooc files
Expand Down
10 changes: 10 additions & 0 deletions modules/subworkflows/minimap2.nf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ workflow MINIMAP2 {
twoBitTN

main:
// Log if the preset is not available
if (params.distance != "near" && params.distance != "medium" && params.distance != "far" && params.distance != "custom"){
log.info"""Preset ${params.distance} not available for minimap2"""
log.info"""The software will use the medium instead."""
log.info"""If it is not ok for you, re-run selecting among the following options:"""
log.info""" 1 - near"""
log.info""" 2 - medium"""
log.info""" 3 - far"""
}

// Run minimap2
minimap2(pairspath_ch, tgt_lift, src_lift)
axtChain( minimap2.out.al_files_ch, twoBitS, twoBitT)
Expand Down
2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -187,5 +187,5 @@ manifest {
mainScript = 'main.nf'
nextflowVersion = '>=21.10.0'
defaultBranch = 'main'
version = '1.8.5'
version = '1.8.6'
}

0 comments on commit 7b667fe

Please sign in to comment.