1. 第一种方法
文件会随着时间的推移而改变
CREATE TABLE `hg19`.`a` (
`ID` int(10) unsigned NOT NULL AUTO_INCREMENT,
`chrom` varchar(255) NOT NULL DEFAULT '',
`start` int(10) unsigned NOT NULL DEFAULT '0',
`end` int(10) unsigned NOT NULL DEFAULT '0',
`linkID` int(10) unsigned NOT NULL DEFAULT '0',
`value` float NOT NULL DEFAULT '0',
`dirFlag` tinyint(4) NOT NULL DEFAULT '-1',
PRIMARY KEY (`ID`),
KEY `chrom` (`chrom`(16),`start`),
KEY `chrom_2` (`chrom`(16),`end`),
KEY `linkID` (`linkID`)
) ENGINE=InnoDB;
LOAD DATA LOCAL INFILE "/tmp/give/Intersection_1.bed" INTO TABLE `hg19`.`a`;
INSERT INTO `hg19`.`trackDb` VALUES (
'a',
'interaction',
21,
NULL,
NULL,
'interactions',
'{
"group":"interactions", -- 分组的名字,来源于 grp 数据库的 name 字段
"shortLabel":"interactions_a", -- 在浏览器中显示长基因的名字
"priority":21,
"longLabel":"interactions_a", -- 在浏览器中显示短基因的名字
"track":"a", -- 在 data-hub 中显示基因的名字
"type":"interaction", -- 固定不变的
"quantiles": [ -- 固定不变的
10,
60, 110,
160, 210,
260, 310,
360, 410,
460, 510,
560, 610,
660, 710,
760, 810,
860, 910,
960, 1010
],
"visibility":"hide" -- 固定不变的, 用于显示作用, 如果没有,则在 data-hub 中只能看见 Type 字段, 其它字段看不见
}'
);
浏览的时候发现不支持多选
**在 singleChoice 中设置是否同意单选,不同意设为 0 便可以多选**
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/f658765a499ea717ea2c600e3d39e175.png)
执行下面的 sql 语句
use hg19;
UPDATE grp SET singleChoice = "0" where name = "interactions";
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/8d07c2b4d364eeae75b13ca775105ea6.png)
1. 第二种方法 (推荐)
bash add_track_interaction.sh -u root -p Admin2015 -r hg19 -t "interaction" -g "interaction" -l "interaction" -s "interaction" -o 6 -v full -q "0.37,1.32,1.78,2.19,2.60,2.97,3.43,3.85,4.34,4.90,5.48,6.16,6.94,8.01,9.05,10.41,12.37,14.88,19.84,31.77,290.17" -f /tmp/give/interaction/interaction.bed;