R软件修改染色体和位置为RS号
命令如下
library(dplyr)
a = read.table("exposure.csv",header=T,check.names=F,sep=",")
match = read.table("snp150_hg19.txt",header=T,check.names=F,sep=",")
need=dplyr::left_join(a,match,by="chromosome:start")
运行完need后报错如下
Error in dplyr::left_join()
:
! Join columns in x
must be present in the data.
✖ Problem with chromosome:start
.
Run rlang::last_error()
to see where the error occurred.
rlang::last_error()
Error indplyr::left_join()
:
! Join columns inx
must be present in the data.
✖ Problem withchromosome:start
.
Backtrace:
rlang::last_trace()
to see the full context.基于Monster 组和GPT的调写:
这个问题似乎是因为 a 数据框中没有名为 chromosome:start 的列,导致左连接失败。你需要检查一下 a 数据框中列名的拼写是否正确,并确认是否存在 chromosome:start 这个列名。
此外,你在读取 match 数据框时使用的分隔符是 ,,但是根据你提供的代码和数据文件名字,snp150_hg19.txt 文件可能是以制表符或其他分隔符分隔的。你可以尝试修改 read.table 中的 sep 参数为对应的分隔符,例如 sep = "\t"(表示制表符分隔)或 sep = " "(表示空格分隔)等。
请问楼主是用的多大内存的服务器跑的?