2

数据集 1 -> 外显子:

Start Length adjust_start end
1   1511150 724 723 1447
2   1518357 142 7930    8072
3   1520047 167 9620    9787
4   1520343 213 9916    10129
5   1520808 207 10381   10588
6   1523700 183 13273   13456
7   1523956 129 13529   13658
8   1524695 144 14268   14412
9   1524916 133 14489   14622
10  1525326 96  14899   14995
11  1526077 191 15650   15841
12  1526796 178 16369   16547
13  1558134 200 47707   47907
14  1562116 132 51689   51821
15  1564162 166 53735   53901
16  1566291 131 55864   55995
17  1568334 118 57907   58025
18  1571534 128 61107   61235
19  1580850 92  70423   70515
20  1583386 73  72959   73032
21  1584420 204 73993   74197
22  1586275 146 75848   75994
23  1587304 107 76877   76984
24  1588024 92  77597   77689
25  1589780 176 79353   79529
26  1592318 143 81891   82034
27  1592588 122 82161   82283
28  1602591 222 92164   92386
29  1607297 178 96870   97048
30  1610853 190 100426  100616
31  1612072 105 101645  101750

数据集2-> SNP:

V1
1   1586138
2   1602439
3   1523884
4   1592548
5   1602545
6   1571480
7   1526696
8   1571461
9   1583369
10  1592228
11  1584330
12  1526022
13  1526647
14  1523844
15  1562094
16  1557986
17  1586246
18  1583369
19  1564105
20  1583369
21  1584216
22  1584330
23  1580790
24  1523948
25  1519960
26  1525954
27  1520336

我正在尝试使用 trackViewer 的棒棒糖包(https://bioconductor.org/packages/release/bioc/vignettes/trackViewer/inst/doc/lollipopPlot.html)来绘制它

目前我正在使用实际的外显子开始和长度:

features <- GRanges("chr1", IRanges(c(exons$Start), width=c(exons$Length), names=paste0("exons",1:31)))

然后针对此绘制突变:

sample.gr <- GRanges("chr1", IRanges(SNP, width=1,
                                      ## the name of GRanges object will be used as label
                                      names=paste0("snp", SNP)),
                     ## set the color for lollipop node.
                     color = sample.int(10, length(SNP), replace = TRUE),
                     ## set the lollipop stem color
                     border = sample(c("black", "gray80", "gray30"),
                                     length(SNP), replace=TRUE)
)

features$fill <- c("lightblue")
## define the feature heights
features$height <- c(.1)

## lollipop plot
lolliplot(sample.gr,
          features)

给我:

在此处输入图像描述

这真的很压缩。我真的只想绘制外显子和突变,忽略它们之间的空白。

但是,正如您从外显子数据集中看到的那样,我尝试创建一个“adjusted_start”并在我减去基因总长度 (1510427) 的位置结束。然后,我想将它们首尾相连,但还要通过对第一个表所做的调整量来调整 SNP 数据集,以使其全部融合在一起。下面是一个非常粗略的示例图:

在此处输入图像描述

任何帮助将非常感激。

4

0 回答 0