R 包 methylKit 排錯(cuò)

R 包 methylKit(GitHub - al2na/methylKit: R package for DNA methylation analysis) 是基于bisulfite sequencing 開(kāi)發(fā)的DNA 甲基化和注釋的工具.

image.png

最近下載的時(shí)候老是遇到報(bào)錯(cuò)

methCall.cpp:925:42: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
       c = std::snprintf(cigar_buffer.data(), cigar_buffer.size(), "%i%c", bam_cigar_oplen(cigar_pointer[i]), bam_cigar_opchr(cigar_pointer[i]));
                         ~~~~~~~~~~~~~~~~~^~
In file included from methCall.cpp:4:
/usr/include/stdio.h:354:39: note:   initializing argument 1 of ‘int snprintf(char*, size_t, const char*, ...)’
 extern int snprintf (char *__restrict __s, size_t __maxlen,
                      ~~~~~~~~~~~~~~~~~^~~
methCall.cpp:934:38: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
       std::snprintf(cigar_buffer.data(), c + 1, "%i%c", bam_cigar_oplen(cigar_pointer[i]), bam_cigar_opchr(cigar_pointer[i]));
                     ~~~~~~~~~~~~~~~~~^~
In file included from methCall.cpp:4:
/usr/include/stdio.h:354:39: note:   initializing argument 1 of ‘int snprintf(char*, size_t, const char*, ...)’
 extern int snprintf (char *__restrict __s, size_t __maxlen,
                      ~~~~~~~~~~~~~~~~~^~~
make: *** [/opt/share/Debian-Buster/CRAN-R/R-3.6.1/lib/R/etc/Makeconf:176: methCall.o] Error 1
ERROR: compilation failed for package ‘methylKit’

解決辦法:

首先用conda 安裝

conda install bioconda/label/gcc7::bioconductor-methylkit

然后降低R版本到3.5.2
成功加載:

> library(methylKit)
Le chargement a nécessité le package : GenomicRanges
Le chargement a nécessité le package : stats4
Le chargement a nécessité le package : BiocGenerics
Le chargement a nécessité le package : parallel

Attachement du package : ‘BiocGenerics’

The following objects are masked from ‘package:parallel’:

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from ‘package:stats’:

    IQR, mad, sd, var, xtabs

The following objects are masked from ‘package:base’:

    anyDuplicated, append, as.data.frame, basename, cbind, colMeans,
    colnames, colSums, dirname, do.call, duplicated, eval, evalq,
    Filter, Find, get, grep, grepl, intersect, is.unsorted, lapply,
    lengths, Map, mapply, match, mget, order, paste, pmax, pmax.int,
    pmin, pmin.int, Position, rank, rbind, Reduce, rowMeans, rownames,
    rowSums, sapply, setdiff, sort, table, tapply, union, unique,
    unsplit, which, which.max, which.min

Le chargement a nécessité le package : S4Vectors

Attachement du package : ‘S4Vectors’

The following object is masked from ‘package:base’:

    expand.grid

Le chargement a nécessité le package : IRanges
Le chargement a nécessité le package : GenomeInfoDb
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容