RNA-seq 差异分析学习
第一步: 连接服务器
用 ssh 连接服务器
ssh 10.73.29.10
查看服务器情况
- 查看集群中安装的模块:
$module av
$module av
2023-6-7:可以查看到服务器中的模块有:
R-3.6.1 cryoemtools gffread-0.12.3 pymol-2.4
R-4.1.1 crystfel-0.9.1 giggle python-3.7.8
RSEM-1.3.3 cuda-10.1 gpuburn redis-stable
STAR-2.7.6a cuda-11.0 hisat2-2.2.0 relion-2.1.0
alphafold2 cuda-7.0 homer-4.11 relion-3.0.8
anaconda3 cuda-8.0 impi-2019.4 relion-3.1.0
auto3dem-4.05 cuda-9.2 intel-2019.4 relion-4.0.0
bam2mpg-1.0.1 dssp-2.0.4 java-1.8.0 root-6.22
bedGraphToBigWig emClarity-1.0.0 king-2.2.5 samtools-1.11
bedtools-2.29.2 eman2-2.31 maxQuant-2.3 scipion-2.0
bigWigToBedGraph fastq-multx-1.4.0 miniconda3 scipion-3.0
boost-1.59 fastqc-0.11.9 mysql-8.0.26 singularity-3.6.3
bowtie-1.3.0 fiji-20190218 openmpi-2.0.3 strelka-2.9.10
bowtie2-2.4.1 focus-1.0.0 openmpi-3.1.0 subread-2.0.1
bwa-0.7.17 frealign-9.11 openmpi-4.0.4 thunder-1.4.14
cctbx-1848 freebayes-1.3.1 openmpi-4.0.5 vcftools-0.1.17
cistem-1.0.0-b gcc-4.9.0 parallel-20210822 wigToBigWig
conda-3.0 gcc-8.3.0 pcre xds-2020
coot-0.8.9 gcc-9.4.0 pyem-0.5
- 使用
module
加载conda
环境
$module load anaconda3
$which conda
备注:全局conda
环境仅提供使用conda的命令,无法在公共目录执行写操作(即无法安装自己所需的包)
普通用户创建自有conda环境
普通用户按照全局环境的方式加载了conda
后可以使用conda
创建自己的环境 操作如下:
#我创建了一个自己的环境叫做 `landing_env`
$conda creat -n landing_env
$source activate landing_env
# 得到反馈如下:
[lilanding@login01 ~]$ source activate landing_env
(landing_env) [lilanding@login01 ~]$
指定python版本:
$conda create -n your_env python=3.6
第二步:上传数据
实战经验
接下来我需要把电脑上下载下来的数据传输到服务器上面
# 这里我使用了 scp 协议传输文件
scp -r local_folder remote_user_name@remote_ip:remote_folder
#-r表示递归传出路径下所有文件
#local_folder为传出的本地文件夹
#remote_user_name为接收文件的远程用户名
#remote_ip为接收文件的远程用户所在的ip地址
# remote_folder为远程用户下储存接收文件的文件夹
# 我使用了以下代码传输:
(landing_env) [lilanding@login01 ~]$ scp -r /Users/lilanding/Documents/文稿\ -\ 李兰丁’s\ MacBook\ Pro/01_Work/01_Project_APL/01_RawData_by_Experiment/14_RNAseq/RNA-seq lilanding@10.73.29.10:lilab/lilanding/RNA-seq
发现传不上去,因为我当时登录在服务器里面,在服务器里面是没办法操作电脑上的文件的。
于是我使用exit
退出了服务器,在电脑端使用scp -r
命令传输文件
(base) lilanding@lilandings-MacBook-Pro ~ % scp -r /Users/lilanding/Documents/文稿\ -\ 李 兰丁’s\ MacBook\ Pro/01_Work/01_Project_APL/01_RawData_by_Experiment/14_RNAseq/RNA-seq lilanding@10.73.29.10:share/home/lilab/lilanding/RNA-seq
#输入后得到反馈,让我输密码
lilanding@10.73.29.10's password:
#但是还是传输失败,说找不到目的地文件夹
scp: realpath share/home/lilab/lilanding/RNA-seq: No such file
scp: upload "share/home/lilab/lilanding/RNA-seq": path canonicalization failed
scp: failed to upload directory /Users/lilanding/Documents/?\226\207稿 - ?\235\216?\205??\201?\200\231s MacBook Pro/01_Work/01_Project_APL/01_RawData_by_Experiment/14_RNAseq/RNA-seq to share/home/lilab/lilanding/RNA-seq
(base) lilanding@lilandings-MacBook-Pro ~ %
我重新登录服务器,进入我的目的地文件夹,使用pwd
命令查看路径,发现路径是/share/home/lilab/lilanding/RNA-seq
和我之前输入的share/home/lilab/lilanding/RNA-seq
不一样,差了一个\
找到问题后重新输入正确的命令:
(base) lilanding@lilandings-MacBook-Pro ~ % scp -r /Users/lilanding/Documents/文稿\ -\ 李 兰丁’s\ MacBook\ Pro/01_Work/01_Project_APL/01_RawData_by_Experiment/14_RNAseq/RNA-seq lilanding@10.73.29.10:/share/home/lilab/lilanding/RNA-seq
#输入后得到反馈,让我输密码
lilanding@10.73.29.10's password:
#成功!开始上传啦
.DS_Store 100% 6148 1.2MB/s 00:00
01 本地校验通过.xlsx 100% 10KB 2.1MB/s 00:00
.DS_Store 100% 10KB 1.6MB/s 00:00
L1EHE2100001--NB4_d2_Ctrl_1.clean.2.fastq.gz 100% 1353MB 9.1MB/s 02:29
L1EHE2100002--NB4_d2_Ctrl_2.clean.1.fastq.gz 100% 1399MB 9.0MB/s 02:34
clean_md5.txt 100% 990 238.5KB/s 00:00
L1EHE2100003--NB4_d2_Ctrl_3.clean.2.fastq.gz 100% 1360MB 9.1MB/s 02:30
标准操作:
scp -r local_folder remote_user_name@remote_ip:remote_folder
#-r表示递归传出路径下所有文件
#local_folder为传出的本地文件夹
#remote_user_name为接收文件的远程用户名
#remote_ip为接收文件的远程用户所在的ip地址
# remote_folder为远程用户下储存接收文件的文件夹
# 我使用了以下代码传输:
(base) lilanding@lilandings-MacBook-Pro ~ % scp -r /Users/lilanding/Documents/文稿\ -\ 李 兰丁’s\ MacBook\ Pro/01_Work/01_Project_APL/01_RawData_by_Experiment/14_RNAseq/RNA-seq lilanding@10.73.29.10:/share/home/lilab/lilanding/RNA-seq
2023年06月07日 上传成功
第三步:所需软件的安装
我更改了登录服务器的密码
# 之前创建了一个环境 landing_env,这里想激活这个环境,但由于退出过服务器,因此要重新 load conda
$ module load anaconda3
$ source activate landing_env
安装软件
通过conda进一步安装软件fastqc, multiqc, trimmomatic, STAR, subread ,参考代码如下:
#在该环境下安装fastqc等软件
$ conda install fastqc multiqc trimmomatic STAR subread
#返回结果如下,出现了问题。包括环境问题,和 channel 问题导致无法成功安装。
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- subread
- trimmomatic
- multiqc
- fastqc
- star
Current channels:
- https://repo.anaconda.com/pkgs/main/linux-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/linux-64
- https://repo.anaconda.com/pkgs/r/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
试着一个一个安装
#加载环境
$ module load anaconda3
$ which conda
/share/apps/software/anconda/bin/conda
$ source activate RNAseq
#安装第一个软件 fastqc
$ conda install fastqc
#搜索 ”conda install fastqc“,进入 anaconda 官网 fastaqc 网站,发现安装语句为:
$ conda install -c bioconda fastqc
$ conda install -c "bioconda/label/broken" fastqc
$ conda install -c "bioconda/label/cf201901" fastqc
#使用第一个语句
$ conda install -c bioconda fastqc
# 貌似开始正常下载了!
#检查一下
$ which fastaqc
#得到
/usr/bin/which: no fastaqc in (/share/home/lilab/lilanding/.conda/envs/RNAseq/bin:/share/apps/software/anconda/condabin:/share/apps/software/anconda/bin:/share/home/lilab/lilanding/perl5/bin:/share/apps/software/intel/compilers_and_libraries_2019.4.243/linux/mpi/intel64/libfabric/bin:/share/apps/software/intel/compilers_and_libraries_2019.4.243/linux/mpi/intel64/bin:/share/apps/software/intel/compilers_and_libraries_2019.4.243/linux/bin/intel64:/share/apps/software/IMOD/bin:/opt/focus/scripts/proc:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/opt/ibutils/bin:/share/home/lilab/lilanding/.local/bin:/share/home/lilab/lilanding/bin)
继续
$ conda install -c bioconda multiqc