上一页 1 ··· 270 271 272 273 274 275 276 277 278 ··· 408 下一页
摘要: 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 阅读(808) 评论(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 阅读(3373) 评论(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 阅读(1349) 评论(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 阅读(265) 评论(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 阅读(1132) 评论(1) 推荐(0)
摘要: 1、问题,莫名其妙出现下面的问题,折腾半天也没有找出原因,后来索性暴力解决,直接解压文件看看咋回事, 解压半天提示文件损坏,。。。。 Error: File read failure. 2、重新下载文件,测试 root@PC1:/home/GWA_tutorial/2_Population_stra 阅读全文
posted @ 2021-12-14 10:25 小鲨鱼2018 阅读(968) 评论(13) 推荐(0)
摘要: 1、在最后一行的下一行追加字符 dat <- read.csv("test.csv", header = T) ## 读取测试数据 dat temp <- c("final", rep("", ncol(dat) - 1)) ## 生成要添加的字符 rbind(dat, temp) ## 利用行合并 阅读全文
posted @ 2021-12-12 22:04 小鲨鱼2018 阅读(549) 评论(0) 推荐(0)
摘要: 1、最后一行末尾追加字符 root@ubuntu01:/home/test2# cat num.txt 1 1 1 2 root@ubuntu01:/home/test2# sed '$ s/$/ final/' num.txt ## 使用sed实现, 第一个$限制最后一行, 第二个$指出替换的位置 阅读全文
posted @ 2021-12-12 21:47 小鲨鱼2018 阅读(5388) 评论(2) 推荐(0)
摘要: windows下如何运行shell脚本 1、安装 git 官网:https://git-scm.com/ 下载安装即可 2、打开git bash 3、进入工作目录 75377@DESKTOP-1N42TVH MINGW64 ~ $ pwd ## 查看当前目录 /c/Users/75377 75377 阅读全文
posted @ 2021-12-12 10:28 小鲨鱼2018 阅读(5557) 评论(0) 推荐(0)
摘要: 1、直接测试,R实现1至4各重复3次 result <- vector() ## 空向量 for (i in 1:4) { result <- c(result, rep(i, 3)) } result 2、可以直接实现 rep(1:4, each = 3) 阅读全文
posted @ 2021-12-11 23:15 小鲨鱼2018 阅读(399) 评论(0) 推荐(1)
上一页 1 ··· 270 271 272 273 274 275 276 277 278 ··· 408 下一页