swh:1:snp:18ef956b602668aadd1027bd3add90630713e6b5
Raw File
Tip revision: 44f72a1e27db1bafefb159cdc26bc71f3691bf54 authored by Behzad Yaghmaeian Salmani on 07 March 2024, 16:41:19 UTC
First commit
Tip revision: 44f72a1
cellrangercount.sh

# Get Mouse reference (mm10) dataset required for Cell Ranger.
# Download - 9.6 GB - md5sum: 8ce6bc561e2554701fc43871301042e6

curl -O https://cf.10xgenomics.com/supp/cell-exp/refdata-cellranger-mm10-3.0.0.tar.gz
# or 
wget https://cf.10xgenomics.com/supp/cell-exp/refdata-cellranger-mm10-3.0.0.tar.gz

# make a Cell Ranger compatible "pre-mRNA" reference package according to the instructions:

# https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/3.0/advanced/references#premrna

### bash script for cellranger count 

#!/bin/bash

module add bioinfo-tools
module add cellranger/3.0.1

# Define variables
REFERENCE="/path/to/refdata-mm10_premrna"
FASTQ_DIR="/path/to/fastq_files"

# Get list of sample names from their paths
SAMPLES=($(ls -d "$FASTQ_DIR"/* | awk -F'/' '{print $NF}'))

# Loop through sample names
for SAMPLE_ID in "${SAMPLES[@]}"; do
    echo "Processing sample: $SAMPLE_ID"
    
    # Run cellranger count command
    cellranger count \
        --id="$SAMPLE_ID" \
        --fastqs="$FASTQ_DIR/$SAMPLE_ID" \
        --transcriptome="$REFERENCE" 
    
    echo "Sample $SAMPLE_ID processing complete."
done

echo "All samples processed."

back to top