我在rStudio中进行了如下尝试:
if(F){
- dbSNPAnn_file="E:\\科研相关\\孟德尔随机化\\练习资料\\common_all_20180423.vcf.gz"
- data_SNPAnn<-read.table(dbSNPAnn_file,header=T,sep="\t",comment.char="",skip=56)
- data_SNPAnn<-data_SNPAnn[,c(1:5)]
- write.table(
- data_SNPAnn,
- file="E:\\科研相关\\孟德尔随机化\\练习资料\\dbSNP151_GRCh37_only_chr_bp_rsID.txt",
- sep="\t",
- row.names=FALSE,
- col.names=TRUE,
- quote=FALSE
- )
- }
运行上述代码后系统未报错,但是没有结果,
系统环境如下:
R version 4.3.2 (2023-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 11 x64 (build 22621)
Matrix products: default
locale:
[1] LC_COLLATE=Chinese (Simplified)China.utf8 LC_CTYPE=Chinese (Simplified)China.utf8
[3] LC_MONETARY=Chinese (Simplified)China.utf8 LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)China.utf8
time zone: Asia/Shanghai
tzcode source: internal
attached base packages:
[1] stats4 stats graphics grDevices utils datasets methods base
other attached packages:
[1] Biostrings_2.70.2 GenomeInfoDb_1.38.7 XVector_0.42.0 IRanges_2.36.0
[5] S4Vectors_0.40.2 BiocGenerics_0.48.1 BiocManager_1.30.22
loaded via a namespace (and not attached):
[1] zlibbioc_1.48.0 compiler_4.3.2 tools_4.3.2
[4] GenomeInfoDbData_1.2.11 RCurl_1.98-1.14 rstudioapi_0.15.0