上一页 1 ··· 265 266 267 268 269 270 271 272 273 ··· 403 下一页
摘要: 1、问题 ubuntu中解压rar文件, 如下: root@PC1:/home/test2# ls test.rar root@PC1:/home/test2# unrar e test.rar -bash: /usr/bin/unrar: No such file or directory 2、解 阅读全文
posted @ 2021-12-16 21:52 小鲨鱼2018 阅读(2582) 评论(0) 推荐(0)
摘要: sort命令 -g选项忽略字母 1、测试数据 root@PC1:/home/test# ls a.txt root@PC1:/home/test# cat a.txt name gender score ddd 2 8 aa 1 87 ff 2 3 ss 1 23 root@PC1:/home/te 阅读全文
posted @ 2021-12-15 23:28 小鲨鱼2018 阅读(290) 评论(0) 推荐(0)
摘要: 1、在a.txt中每行匹配的最后一个e替换为xxx(每行都有e的情况) dat <- read.table("a.txt", header = F) dat index <- data.frame() ## 创建数据框,储存匹配结果 for (i in 1:nrow(dat)) { count = 阅读全文
posted @ 2021-12-15 20:48 小鲨鱼2018 阅读(175) 评论(0) 推荐(0)
摘要: 1、测试数据 root@PC1:/home/test/test# ls test.txt root@PC1:/home/test/test# cat test.txt ## 实现将每行最后一个e替换为xxx e r e y e u e e e g e 3 h r 1 3 e g e y e e s 阅读全文
posted @ 2021-12-15 00:23 小鲨鱼2018 阅读(2215) 评论(0) 推荐(0)
摘要: 1、创建测试数据 root@PC1:/home/test/test# seq -f %02g 40 | awk '{if(NR % 4 == 0) {print $0} else {printf("%s ", $0)}}' ## 利用seq命令产生连续数字,然后利用awk分配行 01 02 03 0 阅读全文
posted @ 2021-12-15 00:01 小鲨鱼2018 阅读(223) 评论(0) 推荐(0)
摘要: plink软件中 --update-map 用于更新snp的物理位置。 1、测试数据 root@PC1:/home/test# ls new.pos outcome.map outcome.ped root@PC1:/home/test# cat outcome.map ## 一共10个snp 1 阅读全文
posted @ 2021-12-14 23:51 小鲨鱼2018 阅读(785) 评论(0) 推荐(0)
摘要: R语言中统计数据框中指定字符出现的次数 1、利用unlist + sum实现 dat <- read.table("a.txt", header = F) ## 统计a.txt中e出现的次数 dat dat2 <- unlist(dat) sum(dat2 == "e") 2、利用for循环遍历实现 阅读全文
posted @ 2021-12-14 22:24 小鲨鱼2018 阅读(3360) 评论(0) 推荐(0)
摘要: linux shell中统计文本中指定单词出现的次数 1、测试数据, 统计 a.txt中e出现的总次数 root@PC1:/home/test/test# cat a.txt e r e y e u e e e g e 3 h r 1 3 e g e y e e s e e e e e 2、awk实 阅读全文
posted @ 2021-12-14 22:13 小鲨鱼2018 阅读(1340) 评论(0) 推荐(0)
摘要: 1、测试数据如下, 实现将每行的第3个e及其以后的e替换为g root@PC1:/home/test/test# cat a.txt e r e y e u e e e g e 3 h r 1 3 e g e y e e s e e e e e 3、 root@PC1:/home/test/test 阅读全文
posted @ 2021-12-14 21:59 小鲨鱼2018 阅读(260) 评论(0) 推荐(0)
摘要: plink中 --set-missing-var-ids 用于对缺失snpID的snp设定名称 1、测试数据 root@PC1:/home/test# ls outcome.map outcome.ped root@PC1:/home/test# cat outcome.ped DOR 1 0 0 阅读全文
posted @ 2021-12-14 20:25 小鲨鱼2018 阅读(1105) 评论(1) 推荐(0)
上一页 1 ··· 265 266 267 268 269 270 271 272 273 ··· 403 下一页