ROH-consecutive SNP-based run detection

1进入文件数据文件夹和激活conda

cd /
cd /mnt/d/peng/goat/sixregions
conda activate seletion
R
library(detectRUNS)
genotypeFilePath <- ("/mnt/d/peng/goat/sixregions/Africa.ped")
mapFilePath <- ("/mnt/d/peng/goat/sixregions/Africa.map")

2进行ROH检测(consecutiveRuns method)

consecutiveRuns <- consecutiveRUNS.run(
genotypeFile =genotypeFilePath,
mapFile = mapFilePath,
minSNP = 20,
ROHet = FALSE,
maxGap = 10^6,
minLengthBps = 200000,
maxOppRun = 1,
maxMissRun = 1
)
summaryList <- summaryRuns( runs = consecutiveRuns, mapFile = mapFilePath, genotypeFile = genotypeFilePath, Class = 4, snpInRuns = TRUE)
str (summaryList)

3输出结果

write.csv (summaryList summary_ROH_count_chr, file ="/mnt/d/peng/goat/sixregions/summary_ROH_count_chr.csv", sep =" ", row.names =TRUE, col.names =TRUE, quote =TRUE) write.csv (summaryList summary_ROH_percentage_chr, file ="/mnt/d/peng/goat/sixregions/summary_ROH_percentage_chr.csv", sep =" ", row.names =TRUE, col.names =TRUE, quote =TRUE)
write.csv (summaryList summary_ROH_count , file ="/mnt/d/peng/goat/sixregions/summary_ROH_count .csv", sep =" ", row.names =TRUE, col.names =TRUE, quote =TRUE) write.csv (summaryList summary_ROH_percentage , file ="/mnt/d/peng/goat/sixregions/summary_ROH_percentage .csv", sep =" ", row.names =TRUE, col.names =TRUE, quote =TRUE)
write.csv (summaryList summary_ROH_mean_chr , file ="/mnt/d/peng/goat/sixregions/summary_ROH_mean_chr.csv", sep =" ", row.names =TRUE, col.names =TRUE, quote =TRUE) write.csv (summaryList summary_ROH_mean_class, file ="/mnt/d/peng/goat/sixregions/summary_ROH_mean_class.csv", sep =" ", row.names =TRUE, col.names =TRUE, quote =TRUE)
write.csv (summaryList result_Froh_genome_wide, file ="/mnt/d/peng/goat/sixregions/result_Froh_genome_wide.csv", sep =" ", row.names =TRUE, col.names =TRUE, quote =TRUE) write.csv (summaryList result_Froh_chromosome_wide, file ="/mnt/d/peng/goat/sixregions/result_Froh_chromosome_wide.csv", sep =" ", row.names =TRUE, col.names =TRUE, quote =TRUE)
write.csv (summaryList result_Froh_class, file ="/mnt/d/peng/goat/sixregions/result_Froh_class.csv", sep =" ", row.names =TRUE, col.names =TRUE, quote =TRUE) write.csv (summaryList SNPinRun , file ="/mnt/d/peng/goat/sixregions/SNPinRun-20.csv", sep =" ", row.names =TRUE, col.names =TRUE, quote =TRUE)

最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容