### Example params.yaml for nf-core/scrnaseq Source: https://github.com/nf-core/scrnaseq/blob/master/docs/usage.md An example of a YAML parameter file used with the nf-core/scrnaseq pipeline. It specifies input data, output directory, reference genome, and other customizable settings. The `<...>` indicates that other parameters can be included. ```yaml input: './samplesheet.csv' outdir: './results/' genome: 'GRCh37' <...> ``` -------------------------------- ### Execute Pipeline with Different Aligners (STARsolo, Kallisto/BUStools, Cellranger) Source: https://context7.com/nf-core/scrnaseq/llms.txt Demonstrates running the nf-core/scrnaseq pipeline with alternative alignment tools: STARsolo, Kallisto/BUStools, and Cellranger. Each example specifies the relevant aligner and its specific configuration parameters, such as --star_feature, --kb_workflow, or --cellranger_index. ```bash # Using STARsolo nextflow run nf-core/scrnaseq \ -profile docker \ --input samplesheet.csv \ --outdir ./star_results \ --genome GRCh38 \ --protocol 10XV3 \ --aligner star \ --star_feature Gene # Using Kallisto/Bustools nextflow run nf-core/scrnaseq \ -profile docker \ --input samplesheet.csv \ --outdir ./kallisto_results \ --genome GRCh38 \ --protocol 10XV3 \ --aligner kallisto \ --kb_workflow standard # Using Cellranger nextflow run nf-core/scrnaseq \ -profile docker \ --input samplesheet.csv \ --outdir ./cellranger_results \ --cellranger_index /path/to/cellranger/index \ --protocol auto \ --aligner cellranger ``` -------------------------------- ### Specify Custom Kallisto/bustools Protocol Source: https://github.com/nf-core/scrnaseq/blob/master/docs/usage.md This snippet demonstrates how to specify custom protocols for Kallisto/bustools using either predefined protocol names or a custom technology string. The technology string format is 'bc:umi:seq', where each component is a triplet of integers defining file index, start, and stop positions for the sequence. ```bash # List all supported protocols kb --list # Use a predefined protocol kallisto bus --protocol ... # Specify a custom technology string (e.g., 10xV2) kallisto bus --protocol "0,0,16:0,16,26:1,0,0" ... ``` -------------------------------- ### Execute Pipeline with Default Settings Source: https://context7.com/nf-core/scrnaseq/llms.txt This command runs the nf-core/scrnaseq pipeline using Docker, specifying input samplesheet, output directory, reference genome, GTF annotation, protocol, and the SimpleAF aligner. It's a standard starting point for analysis. ```bash nextflow run nf-core/scrnaseq \ -profile docker \ --input samplesheet.csv \ --outdir ./results \ --fasta GRCm38.p6.genome.chr19.fa \ --gtf gencode.vM19.annotation.chr19.gtf \ --protocol 10XV2 \ --aligner simpleaf ``` -------------------------------- ### Prepare Samplesheet for nf-core/scrnaseq Source: https://github.com/nf-core/scrnaseq/blob/master/README.md This CSV file defines the input data for the nf-core/scrnaseq pipeline. Each row specifies a sample, its corresponding FASTQ files (paired-end in this example), and the expected number of cells. This format is crucial for the pipeline to correctly associate and process sequencing reads. ```csv sample,fastq_1,fastq_2,expected_cells pbmc8k,pbmc8k_S1_L007_R1_001.fastq.gz,pbmc8k_S1_L007_R2_001.fastq.gz,10000 pbmc8k,pbmc8k_S1_L008_R1_001.fastq.gz,pbmc8k_S1_L008_R2_001.fastq.gz,10000 ``` -------------------------------- ### Protocol Specification for Cell Ranger Source: https://github.com/nf-core/scrnaseq/blob/master/docs/usage.md This example demonstrates how to specify the single-cell protocol when using the Cell Ranger aligner. The recommended value is 'auto' for automatic detection. ```nextflow params.protocol = 'auto' ``` -------------------------------- ### Run nf-core/scrnaseq Pipeline (Bash) Source: https://github.com/nf-core/scrnaseq/blob/master/README.md This command demonstrates how to execute the nf-core/scrnaseq pipeline using Nextflow. It specifies the profile for execution (e.g., Docker or Singularity), the input samplesheet, reference genome FASTA and GTF files, sequencing protocol, alignment method, and the output directory. Ensure you replace placeholders like '', '', and '' with your specific configurations. ```bash nextflow run nf-core/scrnaseq \ -profile \ --input samplesheet.csv \ --fasta GRCm38.p6.genome.chr19.fa \ --gtf gencode.vM19.annotation.chr19.gtf \ --protocol 10XV2 \ --aligner \ --outdir ``` -------------------------------- ### Configure Simpleaf Indexing for Scratch Space Source: https://github.com/nf-core/scrnaseq/blob/master/docs/usage.md This configuration snippet for Nextflow's `modules.config` file enables the `scratch=true` option for the `SIMPLEAF_INDEX` process. This is crucial for environments with limited disk I/O, such as AWS, to prevent performance issues and failures during index building by allowing temporary files to be created in a scratch directory. ```nextflow process { withName: SIMPLEAF_INDEX { scratch=true } } ``` -------------------------------- ### Run nf-core/scrnaseq Pipeline with Docker Source: https://github.com/nf-core/scrnaseq/blob/master/docs/usage.md This command initiates the nf-core/scrnaseq pipeline using the Docker containerization profile. It requires an input samplesheet and specifies an output directory and reference genome. Default parameters for barcode whitelists are used. ```bash nextflow run nf-core/scrnaseq --input ./samplesheet.csv --outdir ./results --genome GRCh38 -profile docker ``` -------------------------------- ### Execute Pipeline with Parameters File Source: https://context7.com/nf-core/scrnaseq/llms.txt Shows how to run the nf-core/scrnaseq pipeline using a YAML file to define parameters. This approach centralizes configuration, making it easier to manage complex runs and share settings. ```yaml # params.yaml input: './samplesheet.csv' outdir: './results/' genome: 'GRCh38' aligner: 'simpleaf' protocol: '10XV3' save_reference: true skip_fastqc: false ``` ```bash nextflow run nf-core/scrnaseq \ -profile docker \ -params-file params.yaml ``` -------------------------------- ### Run scrnaseq with Pre-built Aligner Indices using Nextflow Source: https://context7.com/nf-core/scrnaseq/llms.txt These Nextflow commands demonstrate running the scrnaseq pipeline with pre-built aligner indices for STAR, Kallisto, and SimpleAF. Each command specifies the respective index path along with other standard pipeline parameters like input samplesheet, output directory, and protocol. ```bash # With pre-built STAR index nextflow run nf-core/scrnaseq \ -profile docker \ --input samplesheet.csv \ --outdir ./results \ --aligner star \ --star_index /path/to/star_index \ --protocol 10XV3 # With pre-built Kallisto index nextflow run nf-core/scrnaseq \ -profile docker \ --input samplesheet.csv \ --outdir ./results \ --aligner kallisto \ --kallisto_index /path/to/kallisto_index.idx \ --protocol 10XV3 # With pre-built SimpleAF index nextflow run nf-core/scrnaseq \ -profile docker \ --input samplesheet.csv \ --outdir ./results \ --aligner simpleaf \ --simpleaf_index /path/to/simpleaf_index \ --protocol 10XV3 ``` -------------------------------- ### Specify Custom Simpleaf Chemistry Source: https://github.com/nf-core/scrnaseq/blob/master/docs/usage.md This code demonstrates how to pass custom chemistries to Alevin-fry via Simpleaf. The format differs from Kallisto/bustools, using a specific notation like '1{b[16]u[12]x:}2{r:}' to define barcode, UMI, and read types. ```bash simpleaf --chemistry "1{b[16]u[12]x:}2{r:}" ... ``` -------------------------------- ### Run nf-core/scrnaseq Pipeline with a Params File Source: https://github.com/nf-core/scrnaseq/blob/master/docs/usage.md This command executes the nf-core/scrnaseq pipeline, utilizing parameters defined in an external YAML file. This method is useful for managing and reusing complex parameter sets across multiple runs. The `-profile docker` option ensures containerized execution. ```bash nextflow run nf-core/scrnaseq -profile docker -params-file params.yaml ``` -------------------------------- ### Run Pipeline on HPC with Singularity and Slurm Source: https://context7.com/nf-core/scrnaseq/llms.txt This command illustrates running the nf-core/scrnaseq pipeline on a High-Performance Computing (HPC) cluster using Singularity containers and the Slurm workload manager. It includes profile settings for singularity and slurm, along with input/output specifications, genome, protocol, aligner, and maximum resource limits. ```bash nextflow run nf-core/scrnaseq \ -profile singularity,slurm \ --input samplesheet.csv \ --outdir ./results \ --genome GRCh38 \ --protocol 10XV3 \ --aligner star \ --max_cpus 48 \ --max_memory 192.GB \ --max_time 48.h ``` -------------------------------- ### Kallisto Aligner Configuration Source: https://github.com/nf-core/scrnaseq/blob/master/docs/usage.md This snippet shows how to configure the pipeline to use Kallisto for alignment and Bustools for downstream analysis. This is an alternative to the default 'simpleaf' aligner. ```nextflow params.aligner = 'kallisto' ``` -------------------------------- ### Run Pipeline with Custom Resource Configuration Source: https://context7.com/nf-core/scrnaseq/llms.txt This command executes the nf-core/scrnaseq pipeline while applying custom resource configurations defined in a separate Groovy file. The '-c' flag points to the configuration file, enabling fine-tuned resource allocation for pipeline tasks. ```bash nextflow run nf-core/scrnaseq \ -profile docker \ --input samplesheet.csv \ --outdir ./results \ --genome GRCh38 \ --protocol 10XV3 \ -c custom.config ``` -------------------------------- ### Kallisto/Bustools Aligner with Custom Workflow Source: https://context7.com/nf-core/scrnaseq/llms.txt Executes the pipeline using Kallisto/Bustools with a specified workflow ('standard') and provides custom transcript FASTA and saves the reference. This enables tailored quantification using Kallisto/Bustools. ```bash nextflow run nf-core/scrnaseq \ -profile docker \ --input samplesheet.csv \ --outdir ./results \ --aligner kallisto \ --protocol 10XV3 \ --transcript_fasta transcripts.fa \ --kb_workflow standard \ --save_reference true ``` -------------------------------- ### Aligner-Specific Configuration Parameters Source: https://context7.com/nf-core/scrnaseq/llms.txt This section details aligner-specific configuration parameters for various aligners supported by the nf-core/scrnaseq pipeline, including SimpleAF, Kallisto, STAR, and Cell Ranger. ```bash # SimpleAF parameters --simpleaf_index /path/to/index --simpleaf_umi_resolution cr-like # Kallisto parameters --kallisto_index /path/to/index.idx --kb_workflow standard --kb_t1c /path/to/t1c.txt --kb_t2c /path/to/t2c.txt # STAR parameters --star_index /path/to/star_index --star_feature Gene --star_ignore_sjdbgtf false --seq_center ILLUMINA # Cellranger parameters --cellranger_index /path/to/refdata --skip_cellranger_renaming false # Cellranger Multi parameters --cellranger_vdj_index /path/to/vdj_ref --cellranger_multi_barcodes barcodes.csv --gex_frna_probe_set /path/to/probes.csv --gex_cmo_set /path/to/cmo_ref.csv --fb_reference /path/to/feature_ref.csv ``` -------------------------------- ### Run scrnaseq with FastQC and MultiQC using Nextflow Source: https://context7.com/nf-core/scrnaseq/llms.txt This Nextflow command executes the scrnaseq pipeline with FastQC and MultiQC enabled by default for quality control. It requires input samplesheet, output directory, genome, protocol, and aligner configuration. QC tools are automatically run unless explicitly skipped. ```bash nextflow run nf-core/scrnaseq \ -profile docker \ --input samplesheet.csv \ --outdir ./results \ --genome GRCh38 \ --protocol 10XV3 \ --aligner simpleaf # FastQC and MultiQC are enabled by default ``` -------------------------------- ### Run Cellranger Multi with CMO using Nextflow Source: https://context7.com/nf-core/scrnaseq/llms.txt This command executes the nf-core/scrnaseq pipeline for Cellranger Multi analysis with CMO (Cellular Measurement of Oligonucleotides) support. It requires a samplesheet, output directory, aligner specification, genome reference, and paths to the Cellranger index and CMO reference files. ```bash nextflow run nf-core/scrnaseq \ -profile docker \ --input cellranger_multi_samplesheet.csv \ --outdir ./results \ --aligner cellrangermulti \ --genome GRCh38 \ --cellranger_index /path/to/refdata-gex-GRCh38-2020-A \ --cellranger_multi_barcodes barcodes_samplesheet.csv \ --gex_cmo_set /path/to/cmo_reference.csv ``` -------------------------------- ### Run scrnaseq with Custom Reference Files using Nextflow Source: https://context7.com/nf-core/scrnaseq/llms.txt This Nextflow command configures the scrnaseq pipeline to use custom reference files, including a FASTA genome and a GTF annotation file. It also specifies the aligner (SimpleAF), protocol, and enables saving the reference files for future runs. ```bash nextflow run nf-core/scrnaseq \ -profile docker \ --input samplesheet.csv \ --outdir ./results \ --fasta /path/to/genome.fa \ --gtf /path/to/annotation.gtf \ --aligner simpleaf \ --protocol 10XV3 \ --save_reference true ``` -------------------------------- ### Custom Protocol Chemistry for SimpleAF Source: https://context7.com/nf-core/scrnaseq/llms.txt Configures SimpleAF with a custom protocol chemistry string and specifies transcript FASTA and txp2gene mapping files. This allows for advanced customization beyond standard 10x protocols. ```bash # Using custom chemistry string nextflow run nf-core/scrnaseq \ -profile docker \ --input samplesheet.csv \ --outdir ./results \ --aligner simpleaf \ --protocol '1{b[16]u[12]x:}2{r:}' \ --transcript_fasta transcripts.fa \ --txp2gene txp2gene.tsv ``` -------------------------------- ### STARsolo Aligner with Custom Parameters Source: https://context7.com/nf-core/scrnaseq/llms.txt Runs the pipeline with STARsolo, including options to ignore SJDBGTF, specify the sequencing center, and save alignment intermediates. These parameters allow fine-tuning of STARsolo's alignment behavior. ```bash nextflow run nf-core/scrnaseq \ -profile docker \ --input samplesheet.csv \ --outdir ./results \ --aligner star \ --protocol 10XV3 \ --genome GRCh38 \ --star_feature Gene \ --star_ignore_sjdbgtf false \ --seq_center ILLUMINA \ --save_align_intermeds true ``` -------------------------------- ### Groovy: Display nf-core/scrnaseq Pipeline Configuration Source: https://github.com/nf-core/scrnaseq/blob/master/assets/email_template.txt This Groovy script iterates through a summary map of pipeline parameters and formats them as a list for display. This provides a clear overview of the configuration used for the nf-core/scrnaseq run. ```Groovy <% out << summary.collect{ k,v -> " - $k: $v" }.join("\n") %> ``` -------------------------------- ### Download and Prepare FASTQ Dataset with Bash Source: https://github.com/nf-core/scrnaseq/blob/master/modules/nf-core/cellranger/count/README.md Downloads a sample FASTQ dataset using curl and extracts it. It then removes index files and simulates scenarios for multiple flow cells and multiplexed samples by creating new directories and renaming files accordingly. Finally, it concatenates R1 and R2 files into a single directory. ```bash curl https://s3-us-west-2.amazonaws.com/10x.files/samples/cell-exp/6.1.2/10k_PBMC_3p_nextgem_Chromium_X_intron/10k_PBMC_3p_nextgem_Chromium_X_intron_fastqs.tar | tar -xv INPUT_DIR=10k_PBMC_3p_nextgem_Chromium_X_fastqs # remove index files rm $INPUT_DIR/*_I{1,2}_*.fastq.gz MFC=fastq_multiflowcell mkdir -p $MFC/fc{1,2,3,4} for f in $INPUT_DIR/*.fastq.gz; do ; ln $f $MFC; done for i in $(seq 4) ; do ; mv $MFC/*L00$i* $MFC/fc$i ; done for i in $(seq 4) ; do ; rename L00$i L001 $MFC/fc$i/*; done MPX=fastq_multiplexed mkdir $MPX for f in $INPUT_DIR/*.fastq.gz; do ; ln $f $MPX; done for i in $(seq 4) ; do ; rename S1_L00$i S${i}_L001 $MPX/* ; done mkdir fastq_cat cat $INPUT_DIR/*_R1_*.fastq.gz > fastq_cat/10k_PBMC_3p_nextgem_Chromium_X_S1_L001_R1_001.fastq.gz cat $INPUT_DIR/*_R2_*.fastq.gz > fastq_cat/10k_PBMC_3p_nextgem_Chromium_X_S1_L001_R2_001.fastq.gz ``` -------------------------------- ### Simpleaf Aligner Configuration Source: https://github.com/nf-core/scrnaseq/blob/master/docs/usage.md This snippet outlines the default aligner used by the nf-core/scrnaseq pipeline, which is 'simpleaf'. It utilizes Piscem for pseudo-alignment and Alevin-fry for quantification, followed by AlevinQC for reports. ```nextflow params.aligner = 'simpleaf' ``` -------------------------------- ### Run scrnaseq with iGenomes Reference using Nextflow Source: https://context7.com/nf-core/scrnaseq/llms.txt This Nextflow command executes the scrnaseq pipeline utilizing a pre-configured iGenomes reference genome. It requires a samplesheet, output directory, genome identifier (e.g., GRCh38), aligner (e.g., STAR), and protocol version. ```bash nextflow run nf-core/scrnaseq \ -profile docker \ --input samplesheet.csv \ --outdir ./results \ --genome GRCh38 \ --aligner star \ --protocol 10XV3 ``` -------------------------------- ### Run Cellranger Multi with FFPE Samples using Nextflow Source: https://context7.com/nf-core/scrnaseq/llms.txt This Nextflow command initiates the scrnaseq pipeline for FFPE samples using Cellranger Multi. It requires FFPE-specific samplesheets, output directory, aligner, genome index, barcode information, and the path to the FRNA probe set. ```bash nextflow run nf-core/scrnaseq \ -profile docker \ --input ffpe_samplesheet.csv \ --outdir ./ffpe_results \ --aligner cellrangermulti \ --cellranger_index /path/to/refdata-gex-GRCh38-2020-A \ --cellranger_multi_barcodes ffpe_barcodes.csv \ --gex_frna_probe_set /path/to/probe_set.csv ``` -------------------------------- ### SimpleAF (Alevin-Fry) Aligner Configuration Source: https://context7.com/nf-core/scrnaseq/llms.txt Executes the pipeline using the SimpleAF aligner with specific configurations. Includes parameters for UMI resolution and saving the reference genome, offering detailed control over the alignment process. ```bash nextflow run nf-core/scrnaseq \ -profile docker \ --input samplesheet.csv \ --outdir ./results \ --aligner simpleaf \ --protocol 10XV3 \ --genome GRCh38 \ --simpleaf_umi_resolution cr-like \ --save_reference true ``` -------------------------------- ### Reference Genome Configuration Parameters Source: https://context7.com/nf-core/scrnaseq/llms.txt These parameters define how to specify the reference genome for the nf-core/scrnaseq pipeline. Options include using a pre-defined genome key from iGenomes or providing custom FASTA and GTF files. ```bash # Using genome key --genome GRCh38 --igenomes_base s3://ngi-igenomes/igenomes/ # Using custom files --fasta /path/to/genome.fa --gtf /path/to/annotation.gtf --transcript_fasta /path/to/transcripts.fa --txp2gene /path/to/txp2gene.tsv ``` -------------------------------- ### Prepare FFPE Input Samplesheet for Cellranger Multi Source: https://context7.com/nf-core/scrnaseq/llms.txt This CSV samplesheet specifies the input FASTQ files for FFPE (Formalin-Fixed Paraffin-Embedded) samples in a Cellranger Multi experiment. It includes sample names, FASTQ file paths (R1 and R2), feature type, and optionally, the expected number of cells. ```csv sample,fastq_1,fastq_2,feature_type,expected_cells 4PLEX_HUMAN,multiplex_L001_R1_001.fastq.gz,multiplex_L001_R2_001.fastq.gz,gex, 4PLEX_HUMAN,multiplex_L002_R1_001.fastq.gz,multiplex_L002_R2_001.fastq.gz,gex, 4PLEX_HUMAN,multiplex_L003_R1_001.fastq.gz,multiplex_L003_R2_001.fastq.gz,gex, 4PLEX_HUMAN,multiplex_L004_R1_001.fastq.gz,multiplex_L004_R2_001.fastq.gz,gex, ``` -------------------------------- ### Resume Failed Pipeline Run Source: https://context7.com/nf-core/scrnaseq/llms.txt This command shows how to resume a previously failed nf-core/scrnaseq pipeline run. It includes essential parameters like input samplesheet, output directory, genome, and protocol, along with the '-resume' flag to pick up from where it left off. ```bash nextflow run nf-core/scrnaseq \ -profile docker \ --input samplesheet.csv \ --outdir ./results \ --genome GRCh38 \ --protocol 10XV3 \ -resume ``` -------------------------------- ### Run Pipeline with Custom Barcode Whitelist Source: https://context7.com/nf-core/scrnaseq/llms.txt This command demonstrates how to run the nf-core/scrnaseq pipeline using a custom barcode whitelist. It specifies input samplesheet, output directory, reference genome and annotation files, aligner, protocol, and the path to the custom whitelist. ```bash nextflow run nf-core/scrnaseq \ -profile docker \ --input samplesheet.csv \ --outdir ./results \ --fasta genome.fa \ --gtf annotation.gtf \ --aligner star \ --protocol dropseq \ --barcode_whitelist /path/to/custom_whitelist.txt ``` -------------------------------- ### Run scrnaseq with Custom Transcript-to-Gene Mapping using Nextflow Source: https://context7.com/nf-core/scrnaseq/llms.txt This Nextflow command runs the scrnaseq pipeline using a custom transcript-to-gene mapping file. It specifies the input samplesheet, output directory, aligner (Kallisto), transcript FASTA file, the custom txp2gene file, and the protocol version. ```bash nextflow run nf-core/scrnaseq \ -profile docker \ --input samplesheet.csv \ --outdir ./results \ --aligner kallisto \ --transcript_fasta transcripts.fa \ --txp2gene custom_txp2gene.tsv \ --protocol 10XV3 ``` -------------------------------- ### Configure Custom Resources for Processes (Groovy) Source: https://context7.com/nf-core/scrnaseq/llms.txt This Groovy script defines custom resource configurations for specific processes within the pipeline, such as STAR alignment and Cell Ranger count. It allows users to specify CPUs, memory, and time limits for individual tasks, overriding default settings. ```groovy // custom.config process { withName: STAR_ALIGN { cpus = 16 memory = 64.GB time = 8.h } withName: CELLRANGER_COUNT { cpus = 32 memory = 128.GB time = 24.h } } ``` -------------------------------- ### Cell Ranger ARC Index Configuration Source: https://github.com/nf-core/scrnaseq/blob/master/docs/usage.md This section details how to provide the reference index for Cell Ranger ARC using the `--cellranger_index` flag. It also explains the options for generating a new index, either automatically by providing FASTA, GTF, and optional motif files, or manually by supplying a configuration file and reference genome name. ```bash # Provide existing index --cellranger_index /PATH/TO/10X_REF/refdata-gex-GRCh38-2024-A/ # Automatically generate index --fasta /path/to/genome.fasta \ --gtf /path/to/genome.gtf \ --motif /path/to/motifs.meme # Provide custom config file --cellrangerarc_config /path/to/custom.yml \ --cellrangerarc_reference custom_genome_name ``` -------------------------------- ### Core Mandatory Pipeline Parameters Source: https://context7.com/nf-core/scrnaseq/llms.txt This section lists the core mandatory parameters required for running the nf-core/scrnaseq pipeline. It covers aligner selection, protocol specification, and essential input/output parameters. ```bash # Aligner selection --aligner simpleaf # Options: simpleaf, star, kallisto, cellranger, cellrangerarc, cellrangermulti # Protocol specification --protocol 10XV3 # Options: auto, 10XV1, 10XV2, 10XV3, 10XV4, dropseq, smartseq, or custom string # Input/Output --input samplesheet.csv --outdir ./results ``` -------------------------------- ### Run scrnaseq Skipping QC Tools using Nextflow Source: https://context7.com/nf-core/scrnaseq/llms.txt This Nextflow command runs the scrnaseq pipeline while explicitly disabling FastQC and MultiQC. This is useful when QC is not required or will be performed separately. Standard pipeline parameters like input, output, genome, protocol, and aligner are still necessary. ```bash nextflow run nf-core/scrnaseq \ -profile docker \ --input samplesheet.csv \ --outdir ./results \ --genome GRCh38 \ --protocol 10XV3 \ --aligner simpleaf \ --skip_fastqc \ --skip_multiqc ``` -------------------------------- ### Run Cellranger Count with Singularity Source: https://github.com/nf-core/scrnaseq/blob/master/modules/nf-core/cellranger/count/README.md Executes the Cellranger count pipeline using Singularity for containerization. Demonstrates running Cellranger with different FASTQ input configurations: a single directory, multiple comma-separated directories (simulating multi-flow cell), a single directory with multiplexed samples, and a directory with concatenated files. ```bash singularity pull docker://docker.io/nfcore/cellranger:7.1.0 cd $INPUT_DIR && singularity exec -B $(pwd):$(pwd) -B /cfs:/cfs docker://docker.io/nfcore/cellranger:7.1.0 cellranger count --localcores=8 --id=10k_PBMC_3p_nextgem_Chromium_X --fastqs=. --transcriptome=/cfs/sturmgre/tmp/cellranger-ref/refdata-gex-GRCh38-2020-A --localmem=64 cd $MFC && singularity exec -B $(pwd):$(pwd) -B /cfs:/cfs docker://docker.io/nfcore/cellranger:7.1.0 cellranger count --localcores=8 --id=10k_PBMC_3p_nextgem_Chromium_X --fastqs=fc1,fc2,fc3,fc4 --transcriptome=/cfs/sturmgre/tmp/cellranger-ref/refdata-gex-GRCh38-2020-A --localmem=64 cd $MPX && singularity exec -B $(pwd):$(pwd) -B /cfs:/cfs docker://docker.io/nfcore/cellranger:7.1.0 cellranger count --localcores=8 --id=10k_PBMC_3p_nextgem_Chromium_X --fastqs=. --transcriptome=/cfs/sturmgre/tmp/cellranger-ref/refdata-gex-GRCh38-2020-A --localmem=64 cd fastq_cat && singularity exec -B $(pwd):$(pwd) -B /cfs:/cfs docker://docker.io/nfcore/cellranger:7.1.0 cellranger count --localcores=8 --id=10k_PBMC_3p_nextgem_Chromium_X --fastqs=. --transcriptome=/cfs/sturmgre/tmp/cellranger-ref/refdata-gex-GRCh38-2020-A --localmem=64 ``` -------------------------------- ### Basic Samplesheet Structure (CSV) Source: https://context7.com/nf-core/scrnaseq/llms.txt Defines the fundamental format for the samplesheet CSV file. It includes columns for sample name, FASTQ file paths for read 1 and read 2, and the expected number of cells. This is essential for sample identification and processing. ```csv sample,fastq_1,fastq_2,expected_cells pbmc8k,pbmc8k_S1_L007_R1_001.fastq.gz,pbmc8k_S1_L007_R2_001.fastq.gz,10000 pbmc8k,pbmc8k_S1_L008_R1_001.fastq.gz,pbmc8k_S1_L008_R2_001.fastq.gz,10000 control,control_S1_L001_R1_001.fastq.gz,control_S1_L001_R2_001.fastq.gz,5000 ``` -------------------------------- ### STARsolo Aligner Configuration Source: https://github.com/nf-core/scrnaseq/blob/master/docs/usage.md This snippet configures the pipeline to use STARsolo for both alignment and downstream analysis. STARsolo is an option for users who prefer a single tool for these steps. ```nextflow params.aligner = 'star' ``` -------------------------------- ### Samplesheet with Multiple Lanes and Sequencing Centers (CSV) Source: https://context7.com/nf-core/scrnaseq/llms.txt Extends the basic samplesheet format to accommodate data from multiple sequencing lanes and different sequencing centers. Includes 'seq_center' column for tracking data origin, useful for complex experimental designs. ```csv sample,fastq_1,fastq_2,expected_cells,seq_center sample1,sample1_L001_R1_001.fastq.gz,sample1_L001_R2_001.fastq.gz,8000,ILLUMINA_CENTER1 sample1,sample1_L002_R1_001.fastq.gz,sample1_L002_R2_001.fastq.gz,8000,ILLUMINA_CENTER1 sample2,sample2_L001_R1_001.fastq.gz,sample2_L001_R2_001.fastq.gz,12000,ILLUMINA_CENTER2 ``` -------------------------------- ### File Naming Convention for Cell Ranger Source: https://github.com/nf-core/scrnaseq/blob/master/docs/usage.md This describes the expected naming convention for FASTQ files when using the Cell Ranger aligner in the nf-core/scrnaseq pipeline. It adheres to the 10x Genomics naming standard for sample input. ```shell [Sample Name]_S1_L00[Lane Number]_[Read Type]_001.fastq.gz ``` -------------------------------- ### Cell Ranger ARC Sample Sheet Definition Source: https://github.com/nf-core/scrnaseq/blob/master/docs/usage.md This CSV snippet illustrates the structure of a sample sheet required for Cell Ranger ARC. It includes essential columns like 'sample', 'fastq_1', 'fastq_2', 'fastq_barcode', and 'sample_type', with specific considerations for scRNA and scATAC data. ```csv sample,fastq_1,fastq_2,fastq_barcode,sample_type test_scARC,path/test_scARC_atac_rep1_S1_L001_R1_001.fastq.gz,path/test_scARC_atac_rep1_S1_L001_R2_001.fastq.gz,path/test_scARC_atac_rep1_S1_L001_I2_001.fastq.gz,atac test_scARC,path/test_scARC_atac_rep2_S2_L001_R1_001.fastq.gz,path/test_scARC_atac_rep2_S2_L001_R2_001.fastq.gz,path/test_scARC_atac_rep2_S2_L001_I2_001.fastq.gz,atac test_scARC,path/test_scARC_gex_S1_L001_R1_001.fastq.gz,path/test_scARC_gex_S1_L001_R2_001.fastq.gz,,gex test_scARC,path/test_scARC_gex_S1_L002_R1_001.fastq.gz,path/test_scARC_gex_S1_L002_R2_001.fastq.gz,,gex ``` -------------------------------- ### Prepare FFPE Barcode Samplesheet for Cellranger Multi Source: https://context7.com/nf-core/scrnaseq/llms.txt This CSV samplesheet provides barcode information for FFPE samples in Cellranger Multi. It maps sample identifiers to multiplexed sample IDs, probe barcode IDs, and CMO/OCM IDs, along with a description. This is crucial for accurate sample deconvolution in FFPE experiments. ```csv sample,multiplexed_sample_id,probe_barcode_ids,cmo_ids,ocm_ids,description 4PLEX_HUMAN,Liver_BC1,BC001,,,Healthy_liver_FFPE 4PLEX_HUMAN,Ovarian_BC2,BC002,,,Ovarian_cancer_FFPE 4PLEX_HUMAN,Colorectal_BC3,BC003,,,Colorectal_cancer_FFPE 4PLEX_HUMAN,Pancreas_BC4,BC004,,,Healthy_pancreas_FFPE ``` -------------------------------- ### Create Transcript-to-Gene Mapping from GTF using t2g.py Source: https://context7.com/nf-core/scrnaseq/llms.txt This bash command demonstrates how to generate a transcript-to-gene mapping file (txp2gene.tsv) from a GTF (Gene Transfer Format) annotation file using the provided t2g.py script. Options allow for including version numbers or excluding gene names. ```bash # Using the t2g.py script cat gencode.v38.annotation.gtf | ./bin/t2g.py > txp2gene.tsv # With version numbers cat gencode.v38.annotation.gtf | ./bin/t2g.py --use_version > txp2gene_versioned.tsv # Without gene names (IDs only) cat gencode.v38.annotation.gtf | ./bin/t2g.py --skip_gene_names > txp2gene_ids_only.tsv ``` -------------------------------- ### Conditionally Attach MultiQC Report (Groovy) Source: https://github.com/nf-core/scrnaseq/blob/master/assets/sendmail_template.txt This Groovy code checks if a MultiQC report file exists and if its size is below a specified maximum. If both conditions are met, it base64 encodes the report and prepares it as an attachment for a multipart MIME email. ```groovy if (mqcFile){ def mqcFileObj = new File("$mqcFile") if (mqcFileObj.length() < mqcMaxSize){ out << """ --nfcoremimeboundary Content-Type: text/html; name=\"multiqc_report\" Content-Transfer-Encoding: base64 Content-ID: Content-Disposition: attachment; filename=\"${mqcFileObj.getName()}\"" ${mqcFileObj. bytes. encodeBase64(). toString(). tokenize( '\n' )*. toList()*. collate( 76 )*. collect { it.join() }. flatten(). join( '\n' )} """ }} ``` -------------------------------- ### Verify Output File Integrity with MD5 Checksums (Shell) Source: https://github.com/nf-core/scrnaseq/blob/master/modules/nf-core/cellranger/count/README.md This snippet demonstrates how to calculate and sort MD5 checksums for all .h5 files located in the 'outs' directory of the nf-core/scrnaseq pipeline outputs. It helps in verifying the integrity and consistency of the generated output files across different processing paths. This command relies on standard Unix utilities `md5sum` and `sort`. ```shell > md5sum **/outs/*.h5 | sort 2a7a5a022f01cb8d95965980f0d95ca5 10k_PBMC_3p_nextgem_Chromium_X_fastqs/10k_PBMC_3p_nextgem_Chromium_X/outs/raw_feature_bc_matrix.h5 2a7a5a022f01cb8d95965980f0d95ca5 fastq_cat/10k_PBMC_3p_nextgem_Chromium_X/outs/raw_feature_bc_matrix.h5 2a7a5a022f01cb8d95965980f0d95ca5 fastq_multiflowcell/10k_PBMC_3p_nextgem_Chromium_X/outs/raw_feature_bc_matrix.h5 2a7a5a022f01cb8d95965980f0d95ca5 fastq_multiplexed/10k_PBMC_3p_nextgem_Chromium_X/outs/raw_feature_bc_matrix.h5 533f4156f2d90152594ebc587b7fde0a 10k_PBMC_3p_nextgem_Chromium_X_fastqs/10k_PBMC_3p_nextgem_Chromium_X/outs/filtered_feature_bc_matrix.h5 533f4156f2d90152594ebc587b7fde0a fastq_cat/10k_PBMC_3p_nextgem_Chromium_X/outs/filtered_feature_bc_matrix.h5 533f4156f2d90152594ebc587b7fde0a fastq_multiflowcell/10k_PBMC_3p_nextgem_Chromium_X/outs/filtered_feature_bc_matrix.h5 533f4156f2d90152594ebc587b7fde0a fastq_multiplexed/10k_PBMC_3p_nextgem_Chromium_X/outs/filtered_feature_bc_matrix.h5 cd33d3aa95c0d5cda7cf50908c5399c1 10k_PBMC_3p_nextgem_Chromium_X_fastqs/10k_PBMC_3p_nextgem_Chromium_X/outs/molecule_info.h5 cd33d3aa95c0d5cda7cf50908c5399c1 fastq_cat/10k_PBMC_3p_nextgem_Chromium_X/outs/molecule_info.h5 cd33d3aa95c0d5cda7cf50908c5399c1 fastq_multiflowcell/10k_PBMC_3p_nextgem_Chromium_X/outs/molecule_info.h5 cd33d3aa95c0d5cda7cf50908c5399c1 fastq_multiplexed/10k_PBMC_3p_nextgem_Chromium_X/outs/molecule_info.h5 ``` -------------------------------- ### Run scrnaseq with CellBender Background Removal using Nextflow Source: https://context7.com/nf-core/scrnaseq/llms.txt This Nextflow command executes the scrnaseq pipeline with CellBender enabled by default for background removal. CellBender performs ambient RNA removal and can produce additional filtered count matrices. It requires typical pipeline inputs like samplesheet, output directory, genome, protocol, and aligner. ```bash nextflow run nf-core/scrnaseq \ -profile docker \ --input samplesheet.csv \ --outdir ./results \ --genome GRCh38 \ --protocol 10XV3 \ --aligner simpleaf # CellBender is enabled by default, produces additional filtered matrices ``` -------------------------------- ### Run scrnaseq Skipping CellBender using Nextflow Source: https://context7.com/nf-core/scrnaseq/llms.txt This Nextflow command runs the scrnaseq pipeline while explicitly disabling CellBender background removal. This option is useful if ambient RNA removal is not desired or handled by other means. The command includes standard parameters for input, output, genome, protocol, and aligner. ```bash nextflow run nf-core/scrnaseq \ -profile docker \ --input samplesheet.csv \ --outdir ./results \ --genome GRCh38 \ --protocol 10XV3 \ --aligner star \ --skip_cellbender ``` -------------------------------- ### FFPE Sample Sheet Format for nf-core/scrnaseq Source: https://github.com/nf-core/scrnaseq/blob/master/docs/usage.md This CSV format is used for FFPE samples, specifying sample names, FASTQ file locations, feature types, and optionally expected cell counts. It requires a separate barcode CSV for multiplexing. ```csv sample,fastq_1,fastq_2,feature_type,expected_cells 4PLEX_HUMAN,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/10xgenomics/cellranger/4plex_scFFPE/4plex_human_liver_colorectal_ovarian_panc_scFFPE_multiplex_S1_L001_R1_001.subsampled.fastq.gz,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/10xgenomics/cellranger/4plex_scFFPE/4plex_human_liver_colorectal_ovarian_panc_scFFPE_multiplex_S1_L001_R2_001.subsampled.fastq.gz,gex, 4PLEX_HUMAN,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/10xgenomics/cellranger/4plex_scFFPE/4plex_human_liver_colorectal_ovarian_panc_scFFPE_multiplex_S1_L002_R1_001.subsampled.fastq.gz,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/10xgenomics/cellranger/4plex_scFFPE/4plex_human_liver_colorectal_ovarian_panc_scFFPE_multiplex_S1_L002_R2_001.subsampled.fastq.gz,gex, 4PLEX_HUMAN,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/10xgenomics/cellranger/4plex_scFFPE/4plex_human_liver_colorectal_ovarian_panc_scFFPE_multiplex_S1_L003_R1_001.subsampled.fastq.gz,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/10xgenomics/cellranger/4plex_scFFPE/4plex_human_liver_colorectal_ovarian_panc_scFFPE_multiplex_S1_L003_R2_001.subsampled.fastq.gz,gex, 4PLEX_HUMAN,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/10xgenomics/cellranger/4plex_scFFPE/4plex_human_liver_colorectal_ovarian_panc_scFFPE_multiplex_S1_L004_R1_001.subsampled.fastq.gz,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/10xgenomics/cellranger/4plex_scFFPE/4plex_human_liver_colorectal_ovarian_panc_scFFPE_multiplex_S1_L004_R2_001.subsampled.fastq.gz,gex, ``` -------------------------------- ### Prepare Barcode Assignment Samplesheet for Cellranger Multi Source: https://context7.com/nf-core/scrnaseq/llms.txt This CSV samplesheet is used for assigning barcodes in Cellranger Multi experiments. It links multiplexed sample IDs to probe barcode IDs and CMO/OCM IDs for sample deconvolution. Ensure the file is correctly formatted for input into the pipeline. ```csv sample,multiplexed_sample_id,probe_barcode_ids,cmo_ids,ocm_ids,description PBMC_10K_CMO,PBMC_10K_CMO_donor1,,CMO301,,Donor_1_PBMCs PBMC_10K_CMO,PBMC_10K_CMO_donor2,,CMO302,,Donor_2_PBMCs PBMC_10K_CMO,PBMC_10K_CMO_donor3,,CMO303,,Donor_3_PBMCs ```