Question: ExomeDepth error in getBamCounts when adding a fasta reference
0
gravatar for Francesco
5 months ago by
Francesco10
Erasmus MC (NL)
Francesco10 wrote:

Whenever I try to add a reference fasta file for computing the GC content in the GetBamCounts function:

my.countsV6 <- getBamCounts(bed.frame =AgilentV6,
                            bam.files = BAMFiles,
                            include.chr = TRUE,
                            referenceFasta = "data/hg19.fa"
                          )

I get an error like this:

Reference fasta file provided so ExomeDepth will compute the GC content in each window Error in value[[3L]](cond) : record 38397 (chr11:134201957-134202041) failed file: data/hg19.fa

Everything works fine without the referenceFasta. I tried both with the UCSC and Ensembl build but I get the same error on a different chromosome.

R version 3.6.3 (2020-02-29)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

attached base packages:
[1] parallel  stats4    stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] GenomicRanges_1.38.0 GenomeInfoDb_1.22.1  IRanges_2.20.2       S4Vectors_0.24.4     BiocGenerics_0.32.0 
[6] ExomeDepth_1.1.15    readr_1.3.1
R cnv exomedepth • 170 views
ADD COMMENTlink modified 5 months ago • written 5 months ago by Francesco10
2
gravatar for Francesco
5 months ago by
Francesco10
Erasmus MC (NL)
Francesco10 wrote:

Solved! It's very likely it was an overflow problem that R encounters with files bigger than 2GBs (as the hg19 fasta file) I manually computed the GC content of all the exonic regions with bedtools:

$ bedtools nuc -fi hg19.fa -bed S07604514_hs_hg19/S07604514_Covered_edit.bed | awk '{$4=""; print $0}' > AgilentV6_exons_GC_count.txt

Than I manually added the GC contents column to the my.countsV6 dataframe

ADD COMMENTlink written 5 months ago by Francesco10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 859 users visited in the last hour