Entering edit mode
Hello everyone,
Could somebody show how to convert ShortReadQ qualities to characters?
A little detail:
For instance, I can load into memory a ShortReadQ instance,
A <- readFastq('file.fq.gz')
and then I can convert to character either the ID lines or the
sequences,
as.character(id(A))
as.character(sread(A))
For qualities however, the analogous operation cannot be performed,
> as.character(quality(A)
Error in as.character.default(quality(A)) :
no method for coercing this S4 class to a vector
That is very unfortunate. Could somebody enlighten me?
Thank you,
Ivan
Ivan Gregoretti, PhD
Bioinformatics
> sessionInfo()
R Under development (unstable) (2014-06-29 r66051)
Platform: x86_64-unknown-linux-gnu (64-bit)
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] parallel stats graphics grDevices utils datasets
methods
[8] base
other attached packages:
[1] lattice_0.20-29 sqldf_0.4-7.1
RSQLite.extfuns_0.0.1
[4] RSQLite_0.11.4 DBI_0.2-7 gsubfn_0.6-5
[7] proto_0.3-10 stringr_0.6.2 ShortRead_1.22.0
[10] GenomicAlignments_1.0.1 BSgenome_1.32.0 Rsamtools_1.16.1
[13] GenomicRanges_1.16.3 GenomeInfoDb_1.0.2 Biostrings_2.32.0
[16] XVector_0.4.0 IRanges_1.22.9
BiocParallel_0.6.1
[19] BiocGenerics_0.10.0
loaded via a namespace (and not attached):
[1] BatchJobs_1.2 BBmisc_1.7 Biobase_2.24.0
[4] bitops_1.0-6 brew_1.0-6 checkmate_1.1
[7] chron_2.3-45 codetools_0.2-8 digest_0.6.4
[10] fail_1.2 foreach_1.4.2 grid_3.2.0
[13] hwriter_1.3 iterators_1.0.7 latticeExtra_0.6-26
[16] plyr_1.8.1 RColorBrewer_1.0-5 Rcpp_0.11.2
[19] sendmailR_1.1-2 stats4_3.2.0 tcltk_3.2.0
[22] tools_3.2.0 zlibbioc_1.10.0