library(NIPTeR)
#Gather all bam filepaths in a vector. Corresponds to 1a in figure
bam_filepaths <- list.files(path = "/Path/to/bamfiles/", pattern = ".bam", full.names = T)
#Load all bam files using lapply and feed the results to function as_control_group,
#converting the NIPTSamples to a NIPTControlGroup object. Corresponds to 1b in figure
control_group <- as_control_group(nipt_samples = lapply(X = bam_filepaths, bin_bam_sample,
do_sort = F, separate_strands = F))
根据官方文档运行以上代码时,总是提示报错:
NIPTeR Error: BAM file appears to be unsorted
谷歌了半天,发现不止一个人遇到这个问题:
有人建议:分开来写
s1<-bin_bam_sample("./sample1.bam", do_sort = F, separate_strands = F, custom_name = NULL)
s2<-bin_bam_sample("./sample2.bam", do_sort = F, separate_strands = F, custom_nam

在使用NIPTeR包进行NIPT分析时遇到BAM文件未排序错误,尝试了多种解决方案,包括分开写入和更换其他来源的BAM文件。最终发现NCBI下载的样本可能不适用于此方法,建议使用正常人的外基因数据部分进行实验,或者针对NCBI数据采用不同分析策略。
最低0.47元/天 解锁文章
1257

被折叠的 条评论
为什么被折叠?



