> For the complete documentation index, see [llms.txt](https://zpliu.gitbook.io/booknote/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://zpliu.gitbook.io/booknote/ke-bian-jian-qie/shu-ju-chu-li-liu-cheng/20200213ir-shi-jian-chang-du.md).

# IR事件保守的长度

## 保守的IR事件

| 类型         | 事件数目 | 基因数  |
| ---------- | ---- | ---- |
| At 与 A2保守  | 6474 | 2387 |
| Dt 与 D5 保守 | 7733 | 2814 |
| At与Dt保守    | 6418 | 2494 |
| A2与D5保守    | 6229 | 2418 |

## 保守IR在长度上也相等的数目

```bash
## A2与At
awk -F "_" '$5==$(NF-1){print $0}' A2_At_conserve_IR.txt|wc -l
## Dt与D5
awk -F "_" '$7==$(NF-1){print $1"_"$2}' D5_Dt_conserve_IR.txt|wc -l
## At与Dt
awk -F "_" '$7==$(NF-1){print $1"_"$2}' At_Dt_conserve_IR.txt|wc -l
## A2与D5
awk -F "_" '$5==$(NF-1){print $1}' D5_A2_conserve_IR.txt|wc -l
```

|      类型      | 事件数目 | 长度不相等 | 总事件数 |
| :----------: | :--: | :---: | :--: |
|  At 与 A2长度相等 | 3047 |  3427 | 6474 |
| Dt 与 D5 长度相等 | 3342 |  4391 | 7733 |
|   At与Dt长度相等  | 1644 |  4774 | 6418 |
|   A2与D5长度相等  | 1841 |  4388 | 6229 |

## IR长度不保守时，长度相差的范围

```bash
## At与A2长度不保守时相差范围
awk -F "_" '$5>$(NF-1){print $5-$(NF-1)}$5<$(NF-1){print -$5+$(NF-1)}' A2_At_conserve_IR.txt
## Dt与D5
awk -F "_" '$7>$(NF-1){print $7-$(NF-1)}$7<$(NF-1){print -$7+$(NF-1)}' D5_Dt_conserve_IR.txt
## At与·Dt
awk -F "_" '$7>$(NF-1){print $7-$(NF-1)}$7<$(NF-1){print -$7+$(NF-1)}' At_Dt_conserve_IR.txt
## A2与D5
awk -F "_" '$5>$(NF-1){print $5-$(NF-1)}$5<$(NF-1){print -$5+$(NF-1)}' D5_A2_conserve_IR.txt
```

### 做个饼图

* 1\~10bp
* 10\~50bp
* 50\~100bp
* 100bp以上

```bash
awk '$1<=10{print $0}' ${i}|wc -l
awk '$1<=50&&$1>10{print $0}'  ${i}|wc -l
awk '$1>50&&$1<=100{print $0}'  ${i}|wc -l
awk '$1>100{print $0}'  ${i}|wc -l
```

### 比较多倍化过程中长度的变化

* 多倍化之前的IR长度时一样的
* 多倍化之后其中一个基因组的IR长度发生了变化
* 多倍化之后，两个基因组的IR长度都同时增加或减少

```bash
# A2 D5
awk -F "_" '$5-$(NF-1)>100{print $0}$5-$(NF-1)<-100{print $0}' D5_A2_conserve_IR.txt
# At Dt
awk -F "_" '$7-$(NF-1)>100{print $0}$7-$(NF-1)<-100{print $0}' At_Dt_conserve_IR.txt
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://zpliu.gitbook.io/booknote/ke-bian-jian-qie/shu-ju-chu-li-liu-cheng/20200213ir-shi-jian-chang-du.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
