Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for STAR chemistry issue #60 #113

Merged
merged 1 commit into from Jun 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixes

- Make sure pipeline runs on multiple samples [#77](https://github.com/nf-core/scrnaseq/pull/77)
- Fix issue where STARsolo always uses 10XV2 chemistry [#60](https://github.com/nf-core/scrnaseq/issues/60)

## v1.1.0 - 2021-03-24 "Olive Mercury Corgi"

Expand Down
6 changes: 5 additions & 1 deletion lib/WorkflowScrnaseq.groovy
Expand Up @@ -77,6 +77,7 @@ class WorkflowScrnaseq {
static formatProtocol(protocol, aligner) {
String new_protocol = protocol
String chemistry = ''
String other_parameters = ''

// alevin
if (aligner == 'alevin') {
Expand Down Expand Up @@ -104,14 +105,17 @@ class WorkflowScrnaseq {
case '10XV1':
new_protocol = 'CB_UMI_Simple'
chemistry = 'V1'
other_parameters = '--soloUMIlen 10'
break
case '10XV2':
new_protocol = 'CB_UMI_Simple'
chemistry = 'V2'
other_parameters = '--soloUMIlen 10'
break
case '10XV3':
new_protocol = 'CB_UMI_Simple'
chemistry = 'V3'
other_parameters = '--soloUMIlen 12'
break
case 'dropseq':
new_protocol = 'CB_UMI_Simple'
Expand Down Expand Up @@ -147,7 +151,7 @@ class WorkflowScrnaseq {
exit 1, 'Aligner not recognized.'
}

return [new_protocol, chemistry]
return [new_protocol, chemistry, other_parameters]
}

}
2 changes: 2 additions & 0 deletions modules/local/star_align.nf
Expand Up @@ -17,6 +17,7 @@ process STAR_ALIGN {
path gtf
path whitelist
val protocol
val other_10x_parameters

output:
tuple val(meta), path('*d.out.bam') , emit: bam
Expand Down Expand Up @@ -50,6 +51,7 @@ process STAR_ALIGN {
--outFileNamePrefix $prefix. \\
--soloCBwhitelist <(gzip -cdf $whitelist) \\
--soloType $protocol \\
$other_10x_parameters \\
$out_sam_type \\
$ignore_gtf \\
$seq_center \\
Expand Down
4 changes: 3 additions & 1 deletion subworkflows/local/starsolo.nf
Expand Up @@ -16,6 +16,7 @@ workflow STARSOLO {
protocol
barcode_whitelist
ch_fastq
other_10x_parameters

main:
ch_versions = Channel.empty()
Expand All @@ -42,7 +43,8 @@ workflow STARSOLO {
star_index,
gtf,
barcode_whitelist,
protocol
protocol,
other_10x_parameters
)
ch_versions = ch_versions.mix(STAR_ALIGN.out.versions)

Expand Down
5 changes: 3 additions & 2 deletions workflows/scrnaseq.nf
Expand Up @@ -63,7 +63,7 @@ include { MULTIQC } from "../modules/local/multiqc"
// TODO: Are this channels still necessary?
ch_output_docs = file("$projectDir/docs/output.md", checkIfExists: true)
ch_output_docs_images = file("$projectDir/docs/images/", checkIfExists: true)
(protocol, chemistry) = WorkflowScrnaseq.formatProtocol(params.protocol, params.aligner)
(protocol, chemistry, other_parameters) = WorkflowScrnaseq.formatProtocol(params.protocol, params.aligner)

// general input and params
ch_input = file(params.input)
Expand Down Expand Up @@ -145,7 +145,8 @@ workflow SCRNASEQ {
ch_star_index,
protocol,
ch_barcode_whitelist,
ch_fastq
ch_fastq,
other_parameters
)
ch_versions = ch_versions.mix(STARSOLO.out.ch_versions)
ch_multiqc_star = STARSOLO.out.for_multiqc
Expand Down