Entering edit mode
Hi,
When I tried the groHMM package tutorial, I was able to get everything to work. When I try it with real data, I keep getting this error "the score must be numeric, without any NA's". I appreciate any help because I have been searching the internet and trying to figure this out on my own for several days.
For data processing, I used cutadapt to remove adapters and low quality reads. I aligned to hg19 with bwa, and coverted the resulting sam file to a bam file with samtools. When I load it into R for groHMM analysis, this is what happens:
> SRR5364056 <- as(readGAlignments("SRR5364056.bam"), "GRanges")
> writeWiggle(reads=SRR5364056, file="SRR5364056_Plus.wig", fileType="wig", strand="+",
+ reverse=FALSE)
Error in .local(object, con, format, ...) :
The score must be numeric, without any NA's
In addition: Warning messages:
1: In mclapply(readsList, function(x) { :
all scheduled cores encountered errors in user code
2: In DataFrame(..., check.names = FALSE) : NAs introduced by coercion
> writeWiggle(reads=SRR5364056, file="SRR5364056_Minus.wig", fileType="wig", strand="-",
+ reverse=TRUE)
Error in .local(object, con, format, ...) :
The score must be numeric, without any NA's
In addition: Warning messages:
1: In mclapply(readsList, function(x) { :
all scheduled cores encountered errors in user code
2: In DataFrame(..., check.names = FALSE) : NAs introduced by coercion
> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.5 LTS
Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats4 parallel stats graphics grDevices utils datasets
[8] methods base
other attached packages:
[1] groHMM_1.14.0 rtracklayer_1.40.6
[3] GenomicAlignments_1.16.0 Rsamtools_1.32.3
[5] Biostrings_2.48.0 XVector_0.20.0
[7] SummarizedExperiment_1.10.1 DelayedArray_0.6.5
[9] BiocParallel_1.14.2 matrixStats_0.54.0
[11] Biobase_2.40.0 GenomicRanges_1.32.6
[13] GenomeInfoDb_1.16.0 IRanges_2.14.11
[15] S4Vectors_0.18.3 BiocGenerics_0.26.0
[17] MASS_7.3-50
loaded via a namespace (and not attached):
[1] zlibbioc_1.26.0 lattice_0.20-35 tools_3.5.1
[4] grid_3.5.1 Matrix_1.2-14 GenomeInfoDbData_1.1.0
[7] bitops_1.0-6 RCurl_1.95-4.11 compiler_3.5.1
[10] XML_3.98-1.16
> SRR5364056
GRanges object with 18253707 ranges and 0 metadata columns:
seqnames ranges strand
<Rle> <IRanges> <Rle>
[1] chr10 67286-67336 +
[2] chr10 82341-82391 +
[3] chr10 84427-84477 +
[4] chr10 84434-84484 +
[5] chr10 84564-84614 +
... ... ... ...
[18253703] chrY 59360648-59360698 +
[18253704] chrY 59360705-59360755 +
[18253705] chrY 59360705-59360755 +
[18253706] chrY 59360705-59360755 +
[18253707] chrY 59360706-59360756 +
-------
seqinfo: 93 sequences from an unspecified genome
>
Thanks a million!

Hello,
Can you try including just the standard chromosomes and then execute the writeWiggle step.
gr <- keepStandardChromosomes(SRR5364056)
or if you are using R 3.4.4
THANK YOU!!!!!!!