conda info --envs
查看conda中的环境
用star进行比对
要把.fq.gz文件解压为.fq文件
代码语言:javascript复制#!/bin/bash
###########################################################
#SBATCH -t 2380:00:00
#SBATCH -N 1
#SBATCH --cpus-per-task=20
#SBATCH -p cv2
#SBATCH -o job.out
#SBATCH -e job.err
cd $SLURM_SUBMIT_DIR
# Define the path to the STAR executable
# Define the path to the reference genome index
genomeDir="/public/home/jiezhang_gibh/hqn1/rnaseq1014/fastqnew.data/trim/h19/index"
# Define the output directory
outputDir="/public/home/jiezhang_gibh/hqn1/rnaseq1014/fastqnew.data/trim/star"
# Loop through each pair of sequencing data files
for i in BHLHE40-rep1 BHLHE40-rep2 Control-rep1 Control-rep2
do
read1="/public/home/jiezhang_gibh/hqn1/rnaseq1014/fastqnew.data/trim/${i}_1_val_1.fq.gz"
read2="/public/home/jiezhang_gibh/hqn1/rnaseq1014/fastqnew.data/trim/${i}_2_val_2.fq.gz"
gzip -d $read1
gzip -d $read2
R1="/public/home/jiezhang_gibh/hqn1/rnaseq1014/fastqnew.data/trim/${i}_1_val_1.fq"
R2="/public/home/jiezhang_gibh/hqn1/rnaseq1014/fastqnew.data/trim/${i}_2_val_2.fq"
# Run STAR alignment
STAR --runThreadN 20 --genomeDir $genomeDir --readFilesIn $R1 $R2 --outFileNamePrefix ${outputDir}/${i} --outSAMtype BAM SortedByCoordinate
done