Skip to content

Commit 17577df

Browse files
committed
Fix #834
1 parent 8d30e81 commit 17577df

File tree

12 files changed

+331
-50
lines changed

12 files changed

+331
-50
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
44
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
55

6-
## [Unpublished Version / DEV]
6+
## [[3.8.1](https://github.com/nf-core/rnaseq/releases/tag/3.8.1)] - 2022-05-27
77

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

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

conf/modules.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ process {
5858
ext.args2 = '--no-same-owner'
5959
}
6060

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

496496
if (!params.skip_alignment && params.aligner == 'star_salmon') {
497497
process {
498-
withName: '.*:ALIGN_STAR:STAR_ALIGN' {
498+
withName: '.*:ALIGN_STAR:STAR_ALIGN|.*:ALIGN_STAR:STAR_ALIGN_IGENOMES' {
499499
ext.args = [
500500
'--quantMode TranscriptomeSAM',
501501
'--twopassMode Basic',

modules.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@
9696
"sortmerna": {
9797
"git_sha": "e20e57f90b6787ac9a010a980cf6ea98bd990046"
9898
},
99+
"star/align": {
100+
"git_sha": "fb6c7bca3d55c19a793372513395e3a567bdd7ba"
101+
},
102+
"star/genomegenerate": {
103+
"git_sha": "fb6c7bca3d55c19a793372513395e3a567bdd7ba"
104+
},
99105
"stringtie/stringtie": {
100106
"git_sha": "6d88f2da8cc5d586456e801b535cc4213e0fa2f7"
101107
},
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
process STAR_ALIGN_IGENOMES {
2+
tag "$meta.id"
3+
label 'process_high'
4+
5+
conda (params.enable_conda ? "bioconda::star=2.6.1d bioconda::samtools=1.10 conda-forge::gawk=5.1.0" : null)
6+
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
7+
'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:59cdd445419f14abac76b31dd0d71217994cbcc9-0' :
8+
'quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:59cdd445419f14abac76b31dd0d71217994cbcc9-0' }"
9+
10+
input:
11+
tuple val(meta), path(reads)
12+
path index
13+
path gtf
14+
val star_ignore_sjdbgtf
15+
val seq_platform
16+
val seq_center
17+
18+
output:
19+
tuple val(meta), path('*d.out.bam') , emit: bam
20+
tuple val(meta), path('*Log.final.out') , emit: log_final
21+
tuple val(meta), path('*Log.out') , emit: log_out
22+
tuple val(meta), path('*Log.progress.out'), emit: log_progress
23+
path "versions.yml" , emit: versions
24+
25+
tuple val(meta), path('*sortedByCoord.out.bam') , optional:true, emit: bam_sorted
26+
tuple val(meta), path('*toTranscriptome.out.bam'), optional:true, emit: bam_transcript
27+
tuple val(meta), path('*Aligned.unsort.out.bam') , optional:true, emit: bam_unsorted
28+
tuple val(meta), path('*fastq.gz') , optional:true, emit: fastq
29+
tuple val(meta), path('*.tab') , optional:true, emit: tab
30+
tuple val(meta), path('*.out.junction') , optional:true, emit: junction
31+
tuple val(meta), path('*.out.sam') , optional:true, emit: sam
32+
33+
when:
34+
task.ext.when == null || task.ext.when
35+
36+
script:
37+
def args = task.ext.args ?: ''
38+
def prefix = task.ext.prefix ?: "${meta.id}"
39+
def ignore_gtf = star_ignore_sjdbgtf ? '' : "--sjdbGTFfile $gtf"
40+
def seq_platform = seq_platform ? "'PL:$seq_platform'" : ""
41+
def seq_center = seq_center ? "--outSAMattrRGline ID:$prefix 'CN:$seq_center' 'SM:$prefix' $seq_platform " : "--outSAMattrRGline ID:$prefix 'SM:$prefix' $seq_platform "
42+
def out_sam_type = (args.contains('--outSAMtype')) ? '' : '--outSAMtype BAM Unsorted'
43+
def mv_unsorted_bam = (args.contains('--outSAMtype BAM Unsorted SortedByCoordinate')) ? "mv ${prefix}.Aligned.out.bam ${prefix}.Aligned.unsort.out.bam" : ''
44+
"""
45+
STAR \\
46+
--genomeDir $index \\
47+
--readFilesIn $reads \\
48+
--runThreadN $task.cpus \\
49+
--outFileNamePrefix $prefix. \\
50+
$out_sam_type \\
51+
$ignore_gtf \\
52+
$seq_center \\
53+
$args
54+
55+
$mv_unsorted_bam
56+
57+
if [ -f ${prefix}.Unmapped.out.mate1 ]; then
58+
mv ${prefix}.Unmapped.out.mate1 ${prefix}.unmapped_1.fastq
59+
gzip ${prefix}.unmapped_1.fastq
60+
fi
61+
if [ -f ${prefix}.Unmapped.out.mate2 ]; then
62+
mv ${prefix}.Unmapped.out.mate2 ${prefix}.unmapped_2.fastq
63+
gzip ${prefix}.unmapped_2.fastq
64+
fi
65+
66+
cat <<-END_VERSIONS > versions.yml
67+
"${task.process}":
68+
star: \$(STAR --version | sed -e "s/STAR_//g")
69+
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
70+
gawk: \$(echo \$(gawk --version 2>&1) | sed 's/^.*GNU Awk //; s/, .*\$//')
71+
END_VERSIONS
72+
"""
73+
}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
process STAR_GENOMEGENERATE_IGENOMES {
2+
tag "$fasta"
3+
label 'process_high'
4+
5+
conda (params.enable_conda ? "bioconda::star=2.6.1d bioconda::samtools=1.10 conda-forge::gawk=5.1.0" : null)
6+
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
7+
'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:59cdd445419f14abac76b31dd0d71217994cbcc9-0' :
8+
'quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:59cdd445419f14abac76b31dd0d71217994cbcc9-0' }"
9+
10+
input:
11+
path fasta
12+
path gtf
13+
14+
output:
15+
path "star" , emit: index
16+
path "versions.yml", emit: versions
17+
18+
when:
19+
task.ext.when == null || task.ext.when
20+
21+
script:
22+
def args = task.ext.args ?: ''
23+
def args_list = args.tokenize()
24+
def memory = task.memory ? "--limitGenomeGenerateRAM ${task.memory.toBytes() - 100000000}" : ''
25+
if (args_list.contains('--genomeSAindexNbases')) {
26+
"""
27+
mkdir star
28+
STAR \\
29+
--runMode genomeGenerate \\
30+
--genomeDir star/ \\
31+
--genomeFastaFiles $fasta \\
32+
--sjdbGTFfile $gtf \\
33+
--runThreadN $task.cpus \\
34+
$memory \\
35+
$args
36+
37+
cat <<-END_VERSIONS > versions.yml
38+
"${task.process}":
39+
star: \$(STAR --version | sed -e "s/STAR_//g")
40+
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
41+
gawk: \$(echo \$(gawk --version 2>&1) | sed 's/^.*GNU Awk //; s/, .*\$//')
42+
END_VERSIONS
43+
"""
44+
} else {
45+
"""
46+
samtools faidx $fasta
47+
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`
48+
49+
mkdir star
50+
STAR \\
51+
--runMode genomeGenerate \\
52+
--genomeDir star/ \\
53+
--genomeFastaFiles $fasta \\
54+
--sjdbGTFfile $gtf \\
55+
--runThreadN $task.cpus \\
56+
--genomeSAindexNbases \$NUM_BASES \\
57+
$memory \\
58+
$args
59+
60+
cat <<-END_VERSIONS > versions.yml
61+
"${task.process}":
62+
star: \$(STAR --version | sed -e "s/STAR_//g")
63+
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
64+
gawk: \$(echo \$(gawk --version 2>&1) | sed 's/^.*GNU Awk //; s/, .*\$//')
65+
END_VERSIONS
66+
"""
67+
}
68+
}

modules/local/star_align.nf renamed to modules/nf-core/modules/star/align/main.nf

Lines changed: 3 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/nf-core/modules/star/align/meta.yml

Lines changed: 81 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/local/star_genomegenerate.nf renamed to modules/nf-core/modules/star/genomegenerate/main.nf

Lines changed: 3 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/nf-core/modules/star/genomegenerate/meta.yml

Lines changed: 37 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nextflow.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ manifest {
229229
description = 'RNA sequencing analysis pipeline for gene/isoform quantification and extensive quality control.'
230230
mainScript = 'main.nf'
231231
nextflowVersion = '!>=21.10.3'
232-
version = '3.9dev'
232+
version = '3.8.1'
233233
}
234234

235235
// Load modules.config for DSL2 module specific options

0 commit comments

Comments
 (0)