Skip to content

Commit

Permalink
Fix issues due to meta2
Browse files Browse the repository at this point in the history
  • Loading branch information
grst committed Sep 28, 2023
1 parent dca40cb commit 79d0146
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion modules/local/star_align.nf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ process STAR_ALIGN {
// Input array for a sample is created in the same order reads appear in samplesheet as pairs from replicates are appended to array.
//
tuple val(meta), path(reads)
path index
tuple val(meta2), path(index)
path gtf
path whitelist
val protocol
Expand Down
8 changes: 8 additions & 0 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,14 @@
"type": "boolean",
"description": "Specify this parameter to save the indices created (STAR, Kallisto, Salmon) to the results.",
"fa_icon": "fas fa-bookmark"
},
"igenomes_base": {
"type": "string",
"format": "directory-path",
"description": "Directory / URL base for iGenomes references.",
"default": "s3://ngi-igenomes/igenomes",
"fa_icon": "fas fa-cloud-download-alt",
"hidden": true
}
}
},
Expand Down
8 changes: 6 additions & 2 deletions subworkflows/local/starsolo.nf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ workflow STARSOLO {
* Build STAR index if not supplied
*/
if (!star_index) {
STAR_GENOMEGENERATE( genome_fasta, gtf )
STAR_GENOMEGENERATE(
genome_fasta.map{ f -> [[id: f.baseName], f]},
gtf.map{ g -> [[id: g.baseName], g]}
)
star_index = STAR_GENOMEGENERATE.out.index.collect()
ch_versions = ch_versions.mix(STAR_GENOMEGENERATE.out.versions)
}
Expand All @@ -53,7 +56,8 @@ workflow STARSOLO {

emit:
ch_versions
star_index = star_index
// get rid of meta for star index
star_index = star_index.map{ meta, index -> index}
star_result = STAR_ALIGN.out.tab
star_counts = STAR_ALIGN.out.counts
for_multiqc = STAR_ALIGN.out.log_final
Expand Down
2 changes: 1 addition & 1 deletion workflows/scrnaseq.nf
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ ch_output_docs_images = file("$projectDir/docs/images/", checkIfExists: true)

// general input and params
ch_input = file(params.input)
ch_genome_fasta = params.fasta ? file(params.fasta) : []
ch_genome_fasta = Channel.value(params.fasta ? file(params.fasta) : [])
ch_gtf = params.gtf ? file(params.gtf) : []
ch_transcript_fasta = params.transcript_fasta ? file(params.transcript_fasta): []
ch_txp2gene = params.txp2gene ? file(params.txp2gene) : []
Expand Down

0 comments on commit 79d0146

Please sign in to comment.