---
title: 运行和验证
description: "1. 使用PuTTY工具，以root用户登录服务器。"
url: https://www.hikunpeng.com/document/detail/zh/kunpenghpcs/hpcindapp/prtg-osc/kunpengtophat2_02_0009.html
sourcePath: /source/zh/kunpenghpcs/hpcindapp/prtg-osc/kunpengtophat2_02_0009.html
indexId: a540bf0765720f435016628aaab3b6bf4548658723a9e3d0ec890feca1b8305d69
---
# 运行和验证

#### 操作步骤

1. 使用PuTTY工具，以root用户登录服务器。
2. 执行以下命令设置TopHat2环境变量。

```
export PATH=
/path/to/TOPHAT2
/
bin:
$PATH
```


3. 执行以下命令进入测试算例存放目录。

```
cd
/path/to/CASE
```


4. 执行以下命令解压缩算例。

```
gzip -d Drosophila_melanogaster.BDGP6.dna.toplevel.fa.gz
gzip -d R1.fq.gz
gzip -d R2.fq.gz
mv Drosophila_melanogaster.BDGP6.dna.toplevel.fa genome.fa
```


5. 执行以下命令建立索引。

```
bowtie2-build
genome.fa
genome
```


6. 执行以下命令运行TopHat2测试。

```
time -p tophat2 -p 128 genome R1.fq R2.fq
```


  -p后面接的是线程数，本文以“128”举例。

  算例运行结束后有“Run complete”字样表示运行正常。如果出现“FAILED”则表示出现运行错误。

  要查看日志中最后的time命令输出中的“real”数值，单位是时间“x秒”，数值越低性能越优。

  输出的结果信息如下所示。

```
[2024-02-20 20:03:27] Beginning TopHat run (v2.1.1)
-----------------------------------------------
[2024-02-20 20:03:27] Checking for Bowtie
Bowtie version:        2.3.5.1
[2024-02-20 20:03:27] Checking for Bowtie index files (genome)..
[2024-02-20 20:03:27] Checking for reference FASTA file
[2024-02-20 20:03:27] Generating SAM header for genome
[2024-02-20 20:03:28] Preparing reads
left reads: min. length=35, max. length=151, 3748054 kept reads (1946 discarded)
right reads: min. length=35, max. length=151, 3748733 kept reads (1267 discarded)
[2024-02-20 20:05:47] Mapping left_kept_reads to genome genome with Bowtie2
[2024-02-20 20:09:46] Mapping left_kept_reads_seg1 to genome genome with Bowtie2 (1/6)
[2024-02-20 20:10:18] Mapping left_kept_reads_seg2 to genome genome with Bowtie2 (2/6)
[2024-02-20 20:10:56] Mapping left_kept_reads_seg3 to genome genome with Bowtie2 (3/6)
[2024-02-20 20:11:33] Mapping left_kept_reads_seg4 to genome genome with Bowtie2 (4/6)
[2024-02-20 20:12:16] Mapping left_kept_reads_seg5 to genome genome with Bowtie2 (5/6)
[2024-02-20 20:13:08] Mapping left_kept_reads_seg6 to genome genome with Bowtie2 (6/6)
[2024-02-20 20:14:06] Mapping right_kept_reads to genome genome with Bowtie2
[2024-02-20 20:18:11] Mapping right_kept_reads_seg1 to genome genome with Bowtie2 (1/6)
[2024-02-20 20:18:49] Mapping right_kept_reads_seg2 to genome genome with Bowtie2 (2/6)
[2024-02-20 20:19:30] Mapping right_kept_reads_seg3 to genome genome with Bowtie2 (3/6)
[2024-02-20 20:20:15] Mapping right_kept_reads_seg4 to genome genome with Bowtie2 (4/6)
[2024-02-20 20:21:09] Mapping right_kept_reads_seg5 to genome genome with Bowtie2 (5/6)
[2024-02-20 20:22:13] Mapping right_kept_reads_seg6 to genome genome with Bowtie2 (6/6)
[2024-02-20 20:23:30] Searching for junctions via segment mapping
[2024-02-20 20:32:36] Retrieving sequences for splices
[2024-02-20 20:32:39] Indexing splices
Building a SMALL index
[2024-02-20 20:32:39] Mapping left_kept_reads_seg1 to genome segment_juncs with Bowtie2 (1/6)
[2024-02-20 20:32:53] Mapping left_kept_reads_seg2 to genome segment_juncs with Bowtie2 (2/6)
[2024-02-20 20:33:08] Mapping left_kept_reads_seg3 to genome segment_juncs with Bowtie2 (3/6)
[2024-02-20 20:33:24] Mapping left_kept_reads_seg4 to genome segment_juncs with Bowtie2 (4/6)
[2024-02-20 20:33:40] Mapping left_kept_reads_seg5 to genome segment_juncs with Bowtie2 (5/6)
[2024-02-20 20:33:57] Mapping left_kept_reads_seg6 to genome segment_juncs with Bowtie2 (6/6)
[2024-02-20 20:34:20] Joining segment hits
[2024-02-20 20:37:13] Mapping right_kept_reads_seg1 to genome segment_juncs with Bowtie2 (1/6)
[2024-02-20 20:37:31] Mapping right_kept_reads_seg2 to genome segment_juncs with Bowtie2 (2/6)
[2024-02-20 20:37:48] Mapping right_kept_reads_seg3 to genome segment_juncs with Bowtie2 (3/6)
[2024-02-20 20:38:06] Mapping right_kept_reads_seg4 to genome segment_juncs with Bowtie2 (4/6)
[2024-02-20 20:38:29] Mapping right_kept_reads_seg5 to genome segment_juncs with Bowtie2 (5/6)
[2024-02-20 20:38:54] Mapping right_kept_reads_seg6 to genome segment_juncs with Bowtie2 (6/6)
[2024-02-20 20:39:26] Joining segment hits
[2024-02-20 20:42:26] Reporting output tracks
-----------------------------------------------
[2024-02-20 20:43:35] A summary of the alignment counts can be found in ./tophat_out/align_summary.txt
[2024-02-20 20:43:35] Run complete: 00:17:08 elapsed
```
