
## Download cellranger
curl -o cellranger-10.0.0.tar.xz "https://cf.10xgenomics.com/releases/cell-exp/cellranger-10.0.0.tar.xz?Expires=1776742988&Key-Pair-Id=APKAI7S6A5RYOXBWRPDA&Signature=RV1zy49WurmEZ80bLGvrWZbKZnZkqlgCn~mw85ffxSX95dpA5uA3jBdnNkgNro2o-mS-TrFm1N44Cp0-eNkhfpnzuacOJxM0F6ySfhSaJkH83wqfyzlyqIz-vUICQyOGFDlLje1uLbvVh1ZvjdBLtlo~saETR4uKIF0SQFToY7FwtlIK0JZvujKXaZqOxlJubB7i-gjtCvmFo7~-k44oDo9Vvo3wg-r-6t6GcYrz42I4Gm1QVD-U8w9MFlqo-qcyt7nIznmMTkPYSD8OO6ikdspv8TZ2HrHeh0qmqYQtcd1P-PoIJF90bHP-fjCq7JV-~wLnbDmJO4X5FOGz~ThM7g__"

## Unpack cellranger
tar -xvf cellranger-10.0.0.tar.xz

## Creating a conda env
conda create -n "scRNAseq_workshop" -y --clone "/faststorage/project/AU_abcafe/scRNAseq_workshop/Env/genomedk-workshop"

## Activating the created conda env
conda activate scRNA_workshop


## Allow cellranger to run from any directory
export PATH=/faststorage/project/AU_abcafe/scRNAseq_workshop/tools/cellranger-10.0.0:$PATH

## Inside the conda environment
### Install python
conda install conda-forge::python==3.7.0 -y

## Install cellbender
pip install cellbender


## Run cellranger count

cellranger count --id=run_count_1kpbmcs \ 
                 --fastqs=/faststorage/project/AU_abcafe/scRNAseq_workshop/RawData/pbmc_1k_v3_fastqs \
                 --sample=pbmc_1k_v3 \ 
                 --transcriptome=/faststorage/project/AU_abcafe/scRNAseq_workshop/refdata-gex-GRCh38-2020-A \
                 --create-bam false
