新建 rnaseq 分析環境
conda env list
conda create -n rnaseq -y安裝軟體
# 激活rnaseq分析環境
conda activate rnaseq
# 安裝所需的軟體
conda install -c biobuilds sra-tools -y
conda install -c hcc aspera-cli -y
conda install -c bioconda gffread -y
conda install -c bioconda trim-galore -y
conda install -c bird fastqc -y
conda install -c bioconda multiqc -y
conda install -c bioconda hisat2 -y
conda install -c bioconda samtools -y
conda install -c bioconda subread -y有時候用 conda 直接搜索搜索不到,可以百度 conda 軟體名查找安裝方式
image-20210812140243741轉錄組數據下載實戰使用數據NCBI登錄號:PRJNA480638。
慘痛教訓,剛開始不懂做練習的時候最好用別人已經做過沒有問題的數據,不然中間有哪一步出問題根本不知道是自己參數設置不對,還是下載的數據有問題。。。
下載方式一:sra數據下載NCBI搜索登錄號:PRJNA480638,勾選搜索結果,下載包含轉錄組數據下載地址的 excel 文件
image-20210729132012168打開下載的 excel 文件找到下載文件路徑在 Windows 中下載
image-20210729132358193winscp 將 SRA 數據上傳到伺服器 /home/jiamj/analysis/raw 目錄下
image-20210730100951072fastq-dump 將 sra 文件轉換為 fastq 格式
轉錄組(三):了解 fastq 測序數據:https://www.cnblogs.com/fhn7/articles/12355025.html
#確認是否在rnaseq分析環境中,否則激活
conda activate rnaseq
# 進入到存放文件的目錄
cd /home/jiamj/analysis/raw
批量將sra文件轉換為fastq格式
for i in 39 40 41 42 43 44
do
fastq-dump --gzip --split-3 -O /home/jiamj/analysis/raw SRR75089${i}.1
done
下載方式二:aspera下載數據(使用)後續分析用的是該方式下載的數據。
ENA 資料庫:https://www.ebi.ac.uk/ena/browser/home
ENA 資料庫輸入 PRJNA480638 搜索
image-20210729160707100輸入登錄號查找,選擇自己想要的信息。可以看物種分組和文件大小
image-20210729161423432點擊 TSV 下載,filereport_read_run_PRJNA480638_tsv.txt
image-20210729161954989將 fastq_aspera 整理成下面的文件,命名為 aspera_download.txt
image-20210729171223341winSCP 將這 aspera_download.txt 上傳到伺服器 /home/jiamj/analysis/rnadata 目錄下
Aspera下載安裝使用 https://www.jianshu.com/p/fed19a8821eb
Aspera工具安裝與使用https://www.jianshu.com/p/a6ac81456c01
# 先看看 rnaseq 環境激活沒有,沒有激活就激活分析環境
# conda activate rnaseq
# 查看是否安裝成功
ascp -h
# 查找密鑰
which ascp
image-20210729173258753把bin及bin後面的內容換成etc/asperaweb_id_dsa.openssh即為密鑰地址
/home/jiamj/miniconda3/envs/rnaseq/etc/asperaweb_id_dsa.openssh
參數說明-l最大傳輸速率-i密鑰地址,/home/jiamj/miniconda3/envs/rnaseq/etc/asperaweb_id_dsa.openssh,用conda安裝可以看上面操作-P提供SSH port,一般是33001-QEnable fair transfer policy-k斷點續傳,一般設置為1-T取消加密批量下載
ascp -k 1 -QT -l 100m -P33001 -i /home/jiamj/miniconda3/envs/rnaseq/etc/asperaweb_id_dsa.openssh --mode recv --host fasp.sra.ebi.ac.uk --user era-fasp --file-list aspera_download.txt .
# .表示當前文件夾數據完整性檢驗
windows 將 filereport_read_run_PRJNA480638_tsv.txt 中的 fastq_md5 整理出來記為 md5.txt
image-20210729175527689將這個文件上傳到伺服器 /home/jiamj/analysis/rnadata 目錄
用md5sum -c md5.txt進行數據檢查的時候會報錯,因為在 Windows 系統下編輯的文件,換行符回車的格式為 』\r\n』,在 linux 系統下,回車的格式為 』\n』,在 Windows 下編輯的文本文件在上傳至 linux 伺服器時,回車 』\r\n』 就顯示成 ^M+』\n』
問題解決_md5sum檢驗提示沒有該文件 https://blog.csdn.net/mudong0052/article/details/108931285
sed 's/\r//g' md5.txt | md5sum -c -
image-20210730100902652參考基因組下載ensembl plant 資料庫,點擊進去擬南芥的連結
image-20210702161500551點進上圖紅框,右鍵複製所要下載文件的地址連結地址
# 在analysis目錄下創建一個ref文件夾存放參考基因組文件
mkdir ref
#進入ref目錄下
cd ref
#下載
wget -c ftp://ftp.ensemblgenomes.org/pub/plants/release-51/fasta/arabidopsis_thaliana/dna/Arabidopsis_thaliana.TAIR10.dna.toplevel.fa.gz
wget -c ftp://ftp.ensemblgenomes.org/pub/plants/release-51/gff3/arabidopsis_thaliana/Arabidopsis_thaliana.TAIR10.51.gff3.gz
# 解壓縮
gunzip *.gz
image-20210812141412669