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

#### 操作步骤

1. 使用PuTTY工具，以root用户登录服务器。
2. 执行以下命令进入pysam源代码目录下的“pysam-0.15.4/tests/pysam_data/”文件夹，找到算例“example_aligned_pairs.sam”。

```
cd tests/pysam_data/
```


3. 执行以下命令运行pysam。

```
python3
import pysam
samfile = pysam.AlignmentFile("example_aligned_pairs.sam")
samfile.count()
```


  输出结果示例52，成功运行pysam解析“sam”文件。
