(单细胞-SingleCell)单细胞可变剪切流程(一)

构建STAR的索引
# 使用10X的参考数据构建star索引
STAR \
	--runMode genomeGenerate \
	-- runThreadN 28 \
	--genomeDir ~/bioreference/index/10x-star \
	--genomeFastaFiles ~/bioreference/10x/grch38_10x/fasta/genome.fa \
	--sjdbGTFfile ~/bioreference/10x/grch38_10x/genes/genes.gtf
进行STAR流程

将以下代码写入scSTAR.sh脚本中

# Global variable
#########################################################
source activate rna
#########################################################
start=$(date +%s) #脚本启始时间
echo "脚本开始执行"
echo "开始时间:"`date` 
#########################################################
# Main program
SraPath=/mnt/d/datasets/GSE108383/GSE108383
GenomeRef=~/bioreference/index/10x-star
fa=/mnt/d/datasets/GSE108383/GSE108383
OutPath=~/GSE108383
# STAR workflow
ls $SraPath |while read id
do
x=$(echo $id | cut -b1-10)
echo $x
STAR --runThreadN 20 --genomeDir $GenomeRef \
 --readFilesCommand zcat \
 --readFilesIn ${fa}/$x.fastq.gz \
 --outSAMtype BAM SortedByCoordinate \
 --outFileNamePrefix ${OutPath}/${x}_star
done
conda deactivate 
#########################################################
end=$(date +%s) #脚本终止时间
take=$(( end - start ))
h=$(( take / 3600 ))
m=$((( take - 3600 * h ) / 60 ))
s=$((( take - 3600 * h - 60 * m )))
echo 脚本运行完毕,用时 ${h} 小时 ${m} 分钟 ${s}echo "结束时间:"`date` 
say "The program has finished running"
#########################################################
然后走stringtie流程

将以下代码写入stringtie.sh脚本中

注意,改代码要在上个文件的输出文件夹中运行

# Global variable
#########################################################
#########################################################
start=$(date +%s) #脚本启始时间
echo "脚本开始执行"
echo "开始时间:"`date` 
#########################################################
# Main program
stringtie=~/biosoft/stringtie-2.1.4.Linux_x86_64/stringtie
GTF=~/bioreference/10x/grch38_10x/genes/genes.gtf
OutPath=IsoformQuantification
bam=/home/yuansh/GSE108383
# stringtie workflow 
ls $bam | grep 'bam' | while read id
do 
x=$(echo $id | cut -b1-10)
echo $x
$stringtie -eB -G $GTF -o $OutPath/long_reads.out.gtf ${x}_starAligned.sortedByCoord.out.bam
done
#########################################################
end=$(date +%s) #脚本终止时间
take=$(( end - start ))
h=$(( take / 3600 ))
m=$((( take - 3600 * h ) / 60 ))
s=$((( take - 3600 * h - 60 * m )))
echo 脚本运行完毕,用时 ${h} 小时 ${m} 分钟 ${s}echo "结束时间:"`date` 
say "The program has finished running"
#########################################################
然后生成csv文件
# 然后生成csv文件
python ~/biosoft/stringtie-2.1.4.Linux_x86_64/prepDE.py

如果您觉得我的教程对您有帮助的话,点个赞或者打个赏请我喝杯星巴克(~ ̄(OO) ̄)ブ

Best Regards,
Yuan.SH
---------------------------------------
School of Basic Medical Sciences,
Fujian Medical University,
Fuzhou, Fujian, China.
please contact with me via the following ways:
(a) e-mail :yuansh3354@163.com
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值