Skip to content

Commit

Permalink
Merge pull request #107 from maxulysse/queue-2-value
Browse files Browse the repository at this point in the history
FIX: issues reported on Slack
  • Loading branch information
maxulysse authored Nov 1, 2023
2 parents 2a4852e + 760a651 commit 032e867
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 17 deletions.
2 changes: 1 addition & 1 deletion modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
},
"star/align": {
"branch": "master",
"git_sha": "cc08a888069f67cab8120259bddab8032d4c0fe3",
"git_sha": "8fc1d24c710ebe1d5de0f2447ec9439fd3d9d66a",
"installed_by": ["modules"]
},
"star/genomegenerate": {
Expand Down
8 changes: 8 additions & 0 deletions modules/nf-core/star/align/environment.yml

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

2 changes: 1 addition & 1 deletion modules/nf-core/star/align/main.nf

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

6 changes: 4 additions & 2 deletions modules/nf-core/star/align/meta.yml

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

23 changes: 10 additions & 13 deletions workflows/rnavar.nf
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ WorkflowRnavar.initialise(params, log)

for (param in checkPathParamList) if (param) file(param, checkIfExists: true)

if (params.input) { ch_input = file(params.input) } else { exit 1, 'Input samplesheet not specified!' }
if (!params.star_index && !params.gtf && !params.gff){ exit 1, "GTF|GFF3 file is required to build a STAR reference index! Use option --gtf|--gff to provide a GTF|GFF file." }

if ((params.download_cache) && (params.snpeff_cache || params.vep_cache)) {
error("Please specify either `--download_cache` or `--snpeff_cache`, `--vep_cache`.\nhttps://nf-co.re/sarek/usage#how-to-customise-snpeff-and-vep-annotation")
}
Expand Down Expand Up @@ -209,17 +206,17 @@ workflow RNAVAR {
// To gather used softwares versions for MultiQC
ch_versions = Channel.empty()

ch_from_samplesheet = Channel.empty()
ch_input = Channel.empty()

if (params.input) ch_from_samplesheet = Channel.fromSamplesheet("input")
if (params.input) ch_input = Channel.fromSamplesheet("input")

ch_fastq = ch_from_samplesheet.map{ meta, fastq_1, fastq_2 ->
ch_input = ch_input.map{ meta, fastq_1, fastq_2 ->
if (fastq_2) return [ meta + [id: meta.sample], [ fastq_1, fastq_2 ] ]
else return [ meta + [id: meta.sample], [ fastq_1 ] ]
}.groupTuple()
.branch { meta, fastq ->
single : fastq.size() == 1
return [ meta, fastq.flatten() ]
return [ meta + [single_end:true], fastq.flatten() ]
multiple: fastq.size() > 1
return [ meta, fastq.flatten() ]
}
Expand Down Expand Up @@ -256,14 +253,14 @@ workflow RNAVAR {

// MODULE: Concatenate FastQ files from same sample if required

CAT_FASTQ(ch_fastq.multiple)
CAT_FASTQ(ch_input.multiple)

ch_cat_fastq = CAT_FASTQ.out.reads.mix(ch_fastq.single)
ch_fastq = CAT_FASTQ.out.reads.mix(ch_input.single)

ch_versions = ch_versions.mix(CAT_FASTQ.out.versions.first().ifEmpty(null))

// MODULE: Generate QC summary using FastQC
FASTQC(ch_cat_fastq)
FASTQC(ch_fastq)
ch_reports = ch_reports.mix(FASTQC.out.zip.collect{ meta, logs -> logs })
ch_versions = ch_versions.mix(FASTQC.out.versions.first())

Expand Down Expand Up @@ -299,9 +296,9 @@ workflow RNAVAR {

if (params.aligner == 'star') {
ALIGN_STAR(
ch_cat_fastq,
PREPARE_GENOME.out.star_index,
PREPARE_GENOME.out.gtf,
ch_fastq,
PREPARE_GENOME.out.star_index.first(),
PREPARE_GENOME.out.gtf.first(),
params.star_ignore_sjdbgtf,
seq_platform,
seq_center
Expand Down

0 comments on commit 032e867

Please sign in to comment.