Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cellranger-count
Manage
Activity
Members
Labels
Plan
Issues
3
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Astrocyte
Workflows
Strand Lab
cellranger-count
Commits
abe9129c
Commit
abe9129c
authored
8 months ago
by
John Lafin
Browse files
Options
Downloads
Patches
Plain Diff
Update test inputs
parent
203876e5
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!4
Multisample
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
workflow/main.nf
+108
-108
108 additions, 108 deletions
workflow/main.nf
with
108 additions
and
108 deletions
workflow/main.nf
+
108
−
108
View file @
abe9129c
/*
/*
* Copyright (c) 2023. The University of Texas Southwestern Medical Center
* Copyright (c) 2023. The University of Texas Southwestern Medical Center
*
*
* This file is part of the BioHPC Workflow Platform
* This file is part of the BioHPC Workflow Platform
*
*
* This is a workflow package to run cellranger count on fastq files from single cell RNA data.
* This is a workflow package to run cellranger count on fastq files from single cell RNA data.
*
*
* @authors
* @authors
* John Lafin
* John Lafin
*
*
*/
*/
// Parameters for input values
// Parameters for input values
params.sample_sheet = "${projectDir}/../test_data/sample_sheet.csv"
params.sample_sheet = "${projectDir}/../test_data/sample_sheet.csv"
params.fastq = "${projectDir}/../test_data"
params.fastq = "${projectDir}/../test_data/fastqs"
params.outDir = "${projectDir}/output"
params.outDir = "${projectDir}/output"
params.astrocyte = false
params.astrocyte = true
// Run cellranger count
// Run cellranger count
process cr_count {
process cr_count {
publishDir "${outDir}", mode: 'copy'
publishDir "${outDir}", mode: 'copy'
module 'cellranger/7.1.0'
module 'cellranger/7.1.0'
module 'singularity/3.9.9'
module 'singularity/3.9.9'
errorStrategy 'ignore'
errorStrategy 'ignore'
input:
input:
tuple val(sample), val(ref), val(expectCells), val(chemistry), val(introns), val(noBam)
tuple val(sample), val(ref), val(expectCells), val(chemistry), val(introns), val(noBam)
path(fastq)
path(fastq)
path(outDir)
path(outDir)
output:
output:
tuple val(sample), path("${sample}/outs/**")
tuple val(sample), path("${sample}/outs/**")
script:
script:
// Check reference
// Check reference
if (params.astrocyte) {
if (params.astrocyte) {
switch (ref) {
switch (ref) {
case "hg38":
case "hg38":
ref = file("/project/apps_database/cellranger/refdata-gex-GRCh38-2020-A")
ref = file("/project/apps_database/cellranger/refdata-gex-GRCh38-2020-A")
break
break
case "mm10":
case "mm10":
ref = file("/project/apps_database/cellranger/refdata-gex-mm10-2020-A")
ref = file("/project/apps_database/cellranger/refdata-gex-mm10-2020-A")
break
break
default:
default:
ref = file(ref)
ref = file(ref)
}
}
}
}
if ( ref.isEmpty() ) {
if ( ref.isEmpty() ) {
error "Error: Missing reference. Please provide one of the options outlined in the documentation."
error "Error: Missing reference. Please provide one of the options outlined in the documentation."
}
}
// Run Cell Ranger count
// Run Cell Ranger count
if( expectCells == 0 )
if( expectCells == 0 )
if( noBam )
if( noBam )
"""
"""
cellranger count --id=$sample \
cellranger count --id=$sample \
--transcriptome=$ref \
--transcriptome=$ref \
--fastqs=. \
--fastqs=. \
--sample=$sample \
--sample=$sample \
--chemistry=$chemistry \
--chemistry=$chemistry \
--include-introns=$introns \
--include-introns=$introns \
--no-bam
--no-bam
"""
"""
else
else
"""
"""
cellranger count --id=$sample \
cellranger count --id=$sample \
--transcriptome=$ref \
--transcriptome=$ref \
--fastqs=. \
--fastqs=. \
--sample=$sample \
--sample=$sample \
--chemistry=$chemistry \
--chemistry=$chemistry \
--include-introns=$introns
--include-introns=$introns
"""
"""
else if( expectCells > 0)
else if( expectCells > 0)
if( noBam )
if( noBam )
"""
"""
cellranger count --id=$sample \
cellranger count --id=$sample \
--transcriptome=$ref \
--transcriptome=$ref \
--fastqs=. \
--fastqs=. \
--sample=$sample \
--sample=$sample \
--expect-cells=$expectCells \
--expect-cells=$expectCells \
--chemistry=$chemistry \
--chemistry=$chemistry \
--include-introns=$introns \
--include-introns=$introns \
--no-bam
--no-bam
"""
"""
else
else
"""
"""
cellranger count --id=$sample \
cellranger count --id=$sample \
--transcriptome=$ref \
--transcriptome=$ref \
--fastqs=. \
--fastqs=. \
--sample=$sample \
--sample=$sample \
--expect-cells=$expectCells \
--expect-cells=$expectCells \
--chemistry=$chemistry \
--chemistry=$chemistry \
--include-introns=$introns
--include-introns=$introns
"""
"""
}
}
workflow {
workflow {
// Parse sample sheet and run cellranger count
// Parse sample sheet and run cellranger count
fastq = channel.fromPath(params.fastq).collect()
fastq = channel.fromPath(params.fastq).collect()
outDir = channel.value(params.outDir)
outDir = channel.value(params.outDir)
input = channel.fromPath(params.sample_sheet) \
input = channel.fromPath(params.sample_sheet) \
| splitCsv(header: true) \
| splitCsv(header: true) \
| map{ row -> tuple( row.sample, row.reference, row.expectCells, row.chemistry, row.introns, row.noBam ) }
| map{ row -> tuple( row.sample, row.reference, row.expectCells, row.chemistry, row.introns, row.noBam ) }
cr_count(input, fastq, outDir)
cr_count(input, fastq, outDir)
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment