人类和小鼠转录组上游分析

news/2024/9/23 10:05:32/

基础软件

conda install cutadapt, trimmomatic, samtools, hisat2, subread, deeptools -y

人类转录组上游分析

# 样本名称
sample_name=sample# 线程
threads=4# 双端测序原始fastq1和fastq2路径
fastq1_path=/path/${sample_name}_1.fq.gz
fastq2_path=/path/${sample_name}_2.fq.gz# 双端测序clean fastq1和fastq2路径
clean_fastq1_path=/path/${sample_name}_clean_1.fq.gz
clean_fastq2_path=/path/${sample_name}_clean_2.fq.gz# 双端测序clean filter fastq1和fastq2路径
filter_fastq_path=/path/${sample_name}_filter.fq.gz
filter_fastq1_path=/path/${sample_name}_filter_1.fq.gz
filter_fastq2_path=/path/${sample_name}_filter_2.fq.gz# 输出SAM文件路径
sam_path=/path/${sample_name}.sam# 输出BAM文件路径
bam_path=/path/${sample_name}.bam
bam_sorted_path=/path/${sample_name}.sorted.bam# 输出结果文件
bam_sorted_bw_path=/path/${sample_name}.sorted.bam.bw
count_path=/path/${sample_name}.count###########################################
# 去接头
cutadapt --pair-filter=any --minimum-length 15 --max-n 8 \
-a AGATCGGAAGAGCACACGTCTGAACTCCAGTCAC \
-A AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGTAGATCTCGGTGGTCGCCGTATCATT \
-o $clean_fastq1_path -p $clean_fastq2_path \
$fastq1_path $fastq2_path # 去除低质量碱基
trimmomatic PE -threads $threads -phred33 \
$clean_fastq1_path $clean_fastq2_path \
-baseout $filter_fastq_path AVGQUAL:20 SLIDINGWINDOW:4:15 MINLEN:15# 比对到参考基因组
hisat2 --threads $threads -x /reference/hisat2/hg19 \
-1 $filter_fastq1_path -2 $filter_fastq1_path \
-S $sam_path# SAM转换为BAM
samtools view -bS $sam_path -@ $threads| \
samtools sort $bam_path -o $bam_sorted_path -@ $threads# 排序和索引BAM文件
samtools index $bam_path -@ $threads# featureCounts
featureCounts -T 30 -t exon -g gene_id \
-a /reference/hg19/Homo_sapiens.GRCh37.75.gtf \
-o $count_path $bam_sorted_path# 生成bamCoverage
bamCoverage --bam $bam_sorted_path -o $bam_sorted_bw_path \
--binSize 10 -p $threads

小鼠转录组上游分析

参考基因组和GTF注释文件替换为小鼠mm10。

# 样本名称
sample_name=sample# 线程
threads=4# 双端测序原始fastq1和fastq2路径
fastq1_path=/path/${sample_name}_1.fq.gz
fastq2_path=/path/${sample_name}_2.fq.gz# 双端测序clean fastq1和fastq2路径
clean_fastq1_path=/path/${sample_name}_clean_1.fq.gz
clean_fastq2_path=/path/${sample_name}_clean_2.fq.gz# 双端测序clean filter fastq1和fastq2路径
filter_fastq_path=/path/${sample_name}_filter.fq.gz
filter_fastq1_path=/path/${sample_name}_filter_1.fq.gz
filter_fastq2_path=/path/${sample_name}_filter_2.fq.gz# 输出SAM文件路径
sam_path=/path/${sample_name}.sam# 输出BAM文件路径
bam_path=/path/${sample_name}.bam
bam_sorted_path=/path/${sample_name}.sorted.bam# 输出结果文件
bam_sorted_bw_path=/path/${sample_name}.sorted.bam.bw
count_path=/path/${sample_name}.count###########################################
# 去接头
cutadapt --pair-filter=any --minimum-length 15 --max-n 8 \
-a AGATCGGAAGAGCACACGTCTGAACTCCAGTCAC \
-A AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGTAGATCTCGGTGGTCGCCGTATCATT \
-o $clean_fastq1_path -p $clean_fastq2_path \
$fastq1_path $fastq2_path # 去除低质量碱基
trimmomatic PE -threads $threads -phred33 \
$clean_fastq1_path $clean_fastq2_path \
-baseout $filter_fastq_path AVGQUAL:20 SLIDINGWINDOW:4:15 MINLEN:15# 比对到参考基因组
hisat2 --threads $threads -x /reference/hisat2/mm10 \
-1 $filter_fastq1_path -2 $filter_fastq1_path \
-S $sam_path# SAM转换为BAM
samtools view -bS $sam_path -@ $threads| \
samtools sort $bam_path -o $bam_sorted_path -@ $threads# 排序和索引BAM文件
samtools index $bam_path -@ $threads# featureCounts
featureCounts -T 30 -t exon -g gene_id \
-a /reference/mm10/Mus_musculus.GRCm38.102.gtf  \
-o $count_path $bam_sorted_path# 生成bamCoverage
bamCoverage --bam $bam_sorted_path -o $bam_sorted_bw_path \
--binSize 10 -p $threads

http://www.ppmy.cn/news/1463700.html

相关文章

vue2 面试题

一、.vue的性能优化怎么做? 1.编码优化: 不要把所有的数据都放在data中;v-for时给每个元素绑定事件用事件代理;keep-alive缓存组件;尽可能拆分组件,提高复用性、维护性;key值要保证唯一&#…

基于SpringBoot+Vue在线动漫信息平台设计和实现(源码+LW+部署讲解)

🌹作者主页:青花锁 🌹简介:Java领域优质创作者🏆、Java微服务架构公号作者😄 🌹简历模板、学习资料、面试题库、技术互助 🌹文末获取联系方式 📝 🌹推荐一个人…

1. lambda初体验

首先声明一个函数式接口,就只接口内只有一个抽象方法 //函数式接口 public interface Factory {Object getObject();}接口实现类 public class SubClass implements Factory {Overridepublic Object getObject() {return new User();}}User类 public class User …

详解 QtAndroid::requestPermissionsSync

QtAndroid::requestPermissionsSync 是 Qt 框架中用于在 Android 平台上同步请求运行时权限的函数。这个函数在 Qt for Android 的某个更新中被引入,以更好地支持 Android 6.0(API 级别 23)及以上版本引入的动态权限管理系统。下面是对该函数…

swiftui基础组件Image加载图片,以及记载gif动图示例

想要在swiftui中展示图片,可以使用Image这个组件,这个组件可以加载本地图片和网络图片,也可以调整图片大小等设置。先大概看一下Image的方法有哪些可以用。 常用的Image属性 1.调整图像尺寸: 使用 resizable() 方法使图像可调整…

Linux 系统的目录和文件管理

一、目录结 目录 一、目录结构和每个目录的作用 二、基本命令 1.分页查看more tail 命令 wc命令grep | 管道符 打包和解包 以及vim的用法 vim 文本编辑器单行替换 一、目录结构和每个目录的作用 二、基本命令 1.分页查看more tail 命令 wc命令 grep | 管道符 …

shell中编写备份数据库脚本(使用mysqldump工具)

mysqldump备份 目录 mysqldump备份 分库备份 分表备份 利用自带工具mysqldump 实现数据库分库分表备份。 要想知道需要备份哪些数据库,就得先列出来 mysql -uroot -pOpenlab123! -N -e show databases | egrep -on_schema|mysql|performance_schema|sys" …

Linux漏洞SSL/TLS协议信息泄露漏洞(CVE-2016-2183) - 非常危险(7.5分) 解决办法!升级openssl

漏洞情况 详细描述 TLS是安全传输层协议,用于在两个通信应用程序之间提供保密性和数据完整性。 TLS, SSH, IPSec协商及其他产品中使用的IDEA、DES及Triple DES密码或者3DES及 Triple 3DES存在大约四十亿块的生日界,这可使远程攻击者通过Sweet32攻击&…