Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Utils.groovy
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import groovy.json.JsonSlurper


class WorkflowScrnaseq {
class Utils {
// Retrieve the aligner-specific protocol based on the specified protocol.
// Returns a map ["protocol": protocol, "extra_args": <extra args>, "whitelist": <path to whitelist>]
// extra_args and whitelist are optional.
Expand Down
2 changes: 1 addition & 1 deletion modules/local/parse_cellrangermulti_samplesheet.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ process PARSE_CELLRANGERMULTI_SAMPLESHEET {
//

label 'process_low'
publishDir = [ enabled: false ]
publishDir enabled: false

conda "conda-forge::python=3.9.5"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
Expand Down
2 changes: 1 addition & 1 deletion modules/nf-core/cellranger/count/main.nf

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

4 changes: 2 additions & 2 deletions modules/nf-core/cellranger/multi/main.nf

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

9 changes: 4 additions & 5 deletions modules/nf-core/cellrangerarc/count/main.nf

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

9 changes: 4 additions & 5 deletions modules/nf-core/cellrangerarc/mkgtf/main.nf

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

11 changes: 5 additions & 6 deletions modules/nf-core/cellrangerarc/mkref/main.nf

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

1 change: 0 additions & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ profiles {
test { includeConfig 'conf/test.config' }
test_full { includeConfig 'conf/test_full.config' }
test_cellrangermulti { includeConfig 'conf/test_cellranger_multi.config' }
test_multiome { includeConfig 'conf/test_multiome.config' }
}

// Load nf-core custom profiles from different institutions
Expand Down
59 changes: 29 additions & 30 deletions subworkflows/local/align_cellrangermulti.nf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ workflow CELLRANGER_MULTI_ALIGN {
.map{ meta ->
def meta_clone = meta.clone()
def data_dict = meta_clone.find{ it.key == "${meta_clone.feature_type}" }
fastqs = data_dict?.value
def fastqs = data_dict?.value
meta_clone.remove( data_dict?.key )
[ meta_clone, fastqs ]
}
Expand Down Expand Up @@ -145,15 +145,14 @@ workflow CELLRANGER_MULTI_ALIGN {
if ( params.gex_frna_probe_set && params.gex_reference_version ) {
def probeset_file = file(params.gex_frna_probe_set)
def probeset_reference = null
probeset_file.withReader { reader ->
String line
while ((line = reader.readLine()) != null) {
if (line.startsWith("#reference_genome=")) {
ref_split = line.split("=")
if (ref_split.size() > 1) {
probeset_reference = ref_split[1].trim()
}
break
def done = false
probeset_file.eachLine { line ->
if (done)
return
if (line.startsWith("#reference_genome=")) {
def ref_split = line.split("=")
if (ref_split.size() > 1) {
probeset_reference = ref_split[1].trim()
}
}
}
Expand Down Expand Up @@ -249,27 +248,27 @@ workflow CELLRANGER_MULTI_ALIGN {
}

def parse_demultiplexed_output_channels(in_ch, pattern) {
out_ch =
in_ch.map { meta, mtx_files ->
def desired_files = []
mtx_files.each{ if ( it.toString().contains("${pattern}") ) { desired_files.add( it ) } }
[ meta, desired_files ]
} // separate only desired files
.transpose() // transpose for handling one meta/file pair at a time
.map { meta, mtx_files ->
def meta_clone = meta.clone()
meta_clone.input_type = pattern.contains('raw_') ? 'raw' : 'filtered' // add metadata for conversion workflow
if ( mtx_files.toString().contains("per_sample_outs") ) {
def demultiplexed_sample_id = mtx_files.toString().split('/per_sample_outs/')[1].split('/')[0]
if ( demultiplexed_sample_id.toString() == meta.id) {
return null
def out_ch = in_ch
.map { meta, mtx_files ->
def desired_files = []
mtx_files.each{ if ( it.toString().contains("${pattern}") ) { desired_files.add( it ) } }
[ meta, desired_files ]
} // separate only desired files
.transpose() // transpose for handling one meta/file pair at a time
.map { meta, mtx_files ->
def meta_clone = meta.clone()
meta_clone.input_type = pattern.contains('raw_') ? 'raw' : 'filtered' // add metadata for conversion workflow
if ( mtx_files.toString().contains("per_sample_outs") ) {
def demultiplexed_sample_id = mtx_files.toString().split('/per_sample_outs/')[1].split('/')[0]
if ( demultiplexed_sample_id.toString() == meta.id) {
return null
}
meta_clone.id = demultiplexed_sample_id.toString()
}
meta_clone.id = demultiplexed_sample_id.toString()
}
[ meta_clone, mtx_files ]
} // check if output is from demultiplexed sample, if yes, correct meta.id for proper conversion naming
.filter{ it != null } // remove nulls from previous step
.groupTuple( by: 0 ) // group it back as one file collection per sample
[ meta_clone, mtx_files ]
} // check if output is from demultiplexed sample, if yes, correct meta.id for proper conversion naming
.filter{ it != null } // remove nulls from previous step
.groupTuple( by: 0 ) // group it back as one file collection per sample

return out_ch
}
2 changes: 0 additions & 2 deletions subworkflows/local/kallisto_bustools.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ include {KALLISTOBUSTOOLS_COUNT } from '../../modules/nf-core/kallis
include { GUNZIP } from '../../modules/nf-core/gunzip/main'
include { KALLISTOBUSTOOLS_REF } from '../../modules/nf-core/kallistobustools/ref/main'

def multiqc_report = []

workflow KALLISTO_BUSTOOLS {
take:
genome_fasta
Expand Down
2 changes: 1 addition & 1 deletion subworkflows/local/utils_nfcore_scrnaseq_pipeline/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def validateInputParameters() {
// Validate cellranger_multi_barcodes samplesheet for uniqueness and conditional requirements
//
def validateCellrangerMultiBarcodes() {
cellranger_multi_barcodes = file(params.cellranger_multi_barcodes).splitCsv(header: true)
def cellranger_multi_barcodes = file(params.cellranger_multi_barcodes).splitCsv(header: true)

// Get unique samples from input samplesheet for cross-validation
def inputSamples = file(params.input).splitCsv(header: true).collect { it.sample }.toSet()
Expand Down
Loading