BSCMatrix v1.9 Environment Setup and User Guide

BMKManu DG1000 vs. Mainstream Overseas Single-Cell Platforms
2022-06-21
Animal Skin Single-Cell Demo Data
2022-07-15

V1.9 Update contents:

1. Adjusted the reads alignment strategy to improve the genome alignment rate;

2. Added the pipeline version number to the report;

3. Adjusted the transcript alignment calculation strategy to improve the transcript alignment rate. Updating directly to version 1.9 is recommended.

[su_heading size="16" align="left" margin="10"]1. conda installation [/su_heading]

# Download

wget https://repo.anaconda.com/miniconda/Miniconda3-py39_4.12.0-Linux-x86_64.sh

# Run after the download completes

sh Miniconda3-py39_4.12.0-Linux-x86_64.sh

————> # Install by following the prompts

# After installation, run the following commands

source ~/.bashrc

# Help commands

conda list # List the software installed with conda in the current environment

conda remove fastqc # Remove software from this environment

conda remove -n rnaseq fastqc # Remove software from the specified environment

conda update fastqc # Update the specified software

conda update conda # Update conda itself

[su_heading size="16" align="left" margin="10"]2. conda environment configuration [/su_heading]

conda create -n (environment name) python=3.9

# Activate the created environment

conda activate (environment name)

# Add a mirror source

conda config –add channels https://mirrors.bfsu.edu.cn/anaconda/cloud/bioconda/

conda config –add channels https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge/

conda config –add channels https://mirrors.bfsu.edu.cn/anaconda/pkgs/free/

conda config –add channels https://mirrors.bfsu.edu.cn/anaconda/pkgs/main/

# View mirror sources

conda config –show-sources

[su_heading size="16" align="left" margin="10"]3. Install python modules [/su_heading]

#BSCMatrix

pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple plotly

pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple lz4

pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple Cython

pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple h5py

pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple scipy

pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple tables

pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple sklearn

[su_heading size="16" align="left" margin="10"]4. Run setup.py [/su_heading]

cd BSCMatrix_v1.7/cellcalling/

python setup.py build_ext -i

[su_heading size="16" align="left" margin="10"]5. Install STAR and samtools [/su_heading]

conda install star=2.6.1d

conda install samtools

[su_heading size="16" align="left" margin="10"]6. Run [/su_heading]

# Input data preparation

1) Sequencing data: paired-end sequencing fastq data.

2) Reference genome data: genome sequence file, gtf file and gff file.

3) features.tsv file: can be generated from the gtf file. Reference command: perl ./tools/features_generate_v1.1.pl -i xxx.gtf -o features.tsv

4) STAR genome index file: can be generated from the genome sequence file and the gtf file. Reference command:

STAR –runThreadN 8 –runMode genomeGenerate –genomeDir star/ –genomeFastaFiles genome.fa –sjdbGTFfile gene.gtf

# Writing the configuration file

config.txt:

### Data files

## Sequencing data: used in steps 1 and 2

FQ1 /path/to/read_1.fastq

FQ2 /path/to/read_2.fastq

## Reference genome STAR index file and gff file: used in step 2

INDEX /path/to/STAR/index/dir/

GFF /path/to/ref/gene/gff3/file

## features.tsv file: used in step 3

FEATURE /path/to/features.tsv

## Output directory and output prefix

OUTDIR /path/to/result/dir/

PREFIX outfile-prefix

### Program Parameters

## fastq2BcUmiSC

MinKmerNum 3 # Minimum number of matching kmers

## Umi2Gene

Sjdboverhang 100 # The -sjdboverhang value used when building the STAR library; default 100

Threads 8 # Number of STAR alignment threads## QC

EC 3000 # Expected number of cells

# Running the pipeline

1) Pipeline description:

The pipeline consists of 5 steps, as follows:

A) Step 1: Run fastq2BcUmiSC to identify the barcodes and UMIs in the fastq data.

B) Step 2: Run Umi2Gene to align reads to the reference genome and obtain the gene information corresponding to each UMI.

C) Step 3: Run MatrixMake to obtain the gene expression matrix.

D) Step 4: Run QC to filter the gene expression data and compute statistics.

E) Step 5: Run WebReport to generate the web-based report.

2) Pipeline parameters:

-c config.txt data configuration file

-s Step selection. 0 runs all steps 1–6; individual steps can also be selected and run separately, with multiple steps separated by “,”.

3) Reference commands:

./BGTMatrix -c config.txt -s 0

./BGTMatrix -c config.txt -s 1,2,3,4,5

./BGTMatrix -c config.txt -s 1,2

Troubleshooting

#1 Permission error

./BSCMatrix: Permission denied

# Solution

chmod 755 ./BSCMatrix

#2 perl error

BEGIN failed–compilation aborted

# Solution

yum groupinstall perl*

 

Note: if you encounter any errors during the analysis, please keep a screenshot of the DOS interface and contact us; BMK Manufacturing will get in touch with you to resolve the issue as soon as possible.

Contact Us