Skip to content

Commit

Permalink
Merge pull request #836 from nf-core/dev
Browse files Browse the repository at this point in the history
Dev -> Master for 3.8.1 release
  • Loading branch information
drpatelh authored May 27, 2022
2 parents 6995330 + f9d3b20 commit 89bf536
Show file tree
Hide file tree
Showing 12 changed files with 333 additions and 48 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [[3.8.1](https://github.com/nf-core/rnaseq/releases/tag/3.8.1)] - 2022-05-27

- [[#834](https://github.com/nf-core/rnaseq/issues/834)] - `nf-core download` fails with version 3.8 of the pipeline

## [[3.8](https://github.com/nf-core/rnaseq/releases/tag/3.8)] - 2022-05-25

### :warning: Major enhancements
Expand Down
4 changes: 2 additions & 2 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ process {
ext.args2 = '--no-same-owner'
}

withName: 'UNTAR_.*|STAR_GENOMEGENERATE|HISAT2_BUILD' {
withName: 'UNTAR_.*|STAR_GENOMEGENERATE|STAR_GENOMEGENERATE_IGENOMES|HISAT2_BUILD' {
publishDir = [
path: { "${params.outdir}/genome/index" },
mode: params.publish_dir_mode,
Expand Down Expand Up @@ -495,7 +495,7 @@ if (!params.skip_alignment) {

if (!params.skip_alignment && params.aligner == 'star_salmon') {
process {
withName: '.*:ALIGN_STAR:STAR_ALIGN' {
withName: '.*:ALIGN_STAR:STAR_ALIGN|.*:ALIGN_STAR:STAR_ALIGN_IGENOMES' {
ext.args = [
'--quantMode TranscriptomeSAM',
'--twopassMode Basic',
Expand Down
6 changes: 6 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@
"sortmerna": {
"git_sha": "e20e57f90b6787ac9a010a980cf6ea98bd990046"
},
"star/align": {
"git_sha": "fb6c7bca3d55c19a793372513395e3a567bdd7ba"
},
"star/genomegenerate": {
"git_sha": "fb6c7bca3d55c19a793372513395e3a567bdd7ba"
},
"stringtie/stringtie": {
"git_sha": "6d88f2da8cc5d586456e801b535cc4213e0fa2f7"
},
Expand Down
73 changes: 73 additions & 0 deletions modules/local/star_align_igenomes.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
process STAR_ALIGN_IGENOMES {
tag "$meta.id"
label 'process_high'

conda (params.enable_conda ? "bioconda::star=2.6.1d bioconda::samtools=1.10 conda-forge::gawk=5.1.0" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:59cdd445419f14abac76b31dd0d71217994cbcc9-0' :
'quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:59cdd445419f14abac76b31dd0d71217994cbcc9-0' }"

input:
tuple val(meta), path(reads)
path index
path gtf
val star_ignore_sjdbgtf
val seq_platform
val seq_center

output:
tuple val(meta), path('*d.out.bam') , emit: bam
tuple val(meta), path('*Log.final.out') , emit: log_final
tuple val(meta), path('*Log.out') , emit: log_out
tuple val(meta), path('*Log.progress.out'), emit: log_progress
path "versions.yml" , emit: versions

tuple val(meta), path('*sortedByCoord.out.bam') , optional:true, emit: bam_sorted
tuple val(meta), path('*toTranscriptome.out.bam'), optional:true, emit: bam_transcript
tuple val(meta), path('*Aligned.unsort.out.bam') , optional:true, emit: bam_unsorted
tuple val(meta), path('*fastq.gz') , optional:true, emit: fastq
tuple val(meta), path('*.tab') , optional:true, emit: tab
tuple val(meta), path('*.out.junction') , optional:true, emit: junction
tuple val(meta), path('*.out.sam') , optional:true, emit: sam

when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def ignore_gtf = star_ignore_sjdbgtf ? '' : "--sjdbGTFfile $gtf"
def seq_platform = seq_platform ? "'PL:$seq_platform'" : ""
def seq_center = seq_center ? "--outSAMattrRGline ID:$prefix 'CN:$seq_center' 'SM:$prefix' $seq_platform " : "--outSAMattrRGline ID:$prefix 'SM:$prefix' $seq_platform "
def out_sam_type = (args.contains('--outSAMtype')) ? '' : '--outSAMtype BAM Unsorted'
def mv_unsorted_bam = (args.contains('--outSAMtype BAM Unsorted SortedByCoordinate')) ? "mv ${prefix}.Aligned.out.bam ${prefix}.Aligned.unsort.out.bam" : ''
"""
STAR \\
--genomeDir $index \\
--readFilesIn $reads \\
--runThreadN $task.cpus \\
--outFileNamePrefix $prefix. \\
$out_sam_type \\
$ignore_gtf \\
$seq_center \\
$args
$mv_unsorted_bam
if [ -f ${prefix}.Unmapped.out.mate1 ]; then
mv ${prefix}.Unmapped.out.mate1 ${prefix}.unmapped_1.fastq
gzip ${prefix}.unmapped_1.fastq
fi
if [ -f ${prefix}.Unmapped.out.mate2 ]; then
mv ${prefix}.Unmapped.out.mate2 ${prefix}.unmapped_2.fastq
gzip ${prefix}.unmapped_2.fastq
fi
cat <<-END_VERSIONS > versions.yml
"${task.process}":
star: \$(STAR --version | sed -e "s/STAR_//g")
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
gawk: \$(echo \$(gawk --version 2>&1) | sed 's/^.*GNU Awk //; s/, .*\$//')
END_VERSIONS
"""
}
68 changes: 68 additions & 0 deletions modules/local/star_genomegenerate_igenomes.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
process STAR_GENOMEGENERATE_IGENOMES {
tag "$fasta"
label 'process_high'

conda (params.enable_conda ? "bioconda::star=2.6.1d bioconda::samtools=1.10 conda-forge::gawk=5.1.0" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:59cdd445419f14abac76b31dd0d71217994cbcc9-0' :
'quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:59cdd445419f14abac76b31dd0d71217994cbcc9-0' }"

input:
path fasta
path gtf

output:
path "star" , emit: index
path "versions.yml", emit: versions

when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
def args_list = args.tokenize()
def memory = task.memory ? "--limitGenomeGenerateRAM ${task.memory.toBytes() - 100000000}" : ''
if (args_list.contains('--genomeSAindexNbases')) {
"""
mkdir star
STAR \\
--runMode genomeGenerate \\
--genomeDir star/ \\
--genomeFastaFiles $fasta \\
--sjdbGTFfile $gtf \\
--runThreadN $task.cpus \\
$memory \\
$args
cat <<-END_VERSIONS > versions.yml
"${task.process}":
star: \$(STAR --version | sed -e "s/STAR_//g")
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
gawk: \$(echo \$(gawk --version 2>&1) | sed 's/^.*GNU Awk //; s/, .*\$//')
END_VERSIONS
"""
} else {
"""
samtools faidx $fasta
NUM_BASES=`gawk '{sum = sum + \$2}END{if ((log(sum)/log(2))/2 - 1 > 14) {printf "%.0f", 14} else {printf "%.0f", (log(sum)/log(2))/2 - 1}}' ${fasta}.fai`
mkdir star
STAR \\
--runMode genomeGenerate \\
--genomeDir star/ \\
--genomeFastaFiles $fasta \\
--sjdbGTFfile $gtf \\
--runThreadN $task.cpus \\
--genomeSAindexNbases \$NUM_BASES \\
$memory \\
$args
cat <<-END_VERSIONS > versions.yml
"${task.process}":
star: \$(STAR --version | sed -e "s/STAR_//g")
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
gawk: \$(echo \$(gawk --version 2>&1) | sed 's/^.*GNU Awk //; s/, .*\$//')
END_VERSIONS
"""
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

81 changes: 81 additions & 0 deletions modules/nf-core/modules/star/align/meta.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions modules/nf-core/modules/star/genomegenerate/meta.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ manifest {
description = 'RNA sequencing analysis pipeline for gene/isoform quantification and extensive quality control.'
mainScript = 'main.nf'
nextflowVersion = '!>=21.10.3'
version = '3.8'
version = '3.8.1'
}

// Load modules.config for DSL2 module specific options
Expand Down
Loading

0 comments on commit 89bf536

Please sign in to comment.