Entering edit mode
Hello everyone,
I am trying to do some quality trimming on some RNA seq reads
(Illumina,
100 bp, single end). I have been following the pipeline from the UCR
manuals<http: manuals.bioinformatics.ucr.edu="" home="" ht-seq#toc-="" trimming-low-quality-3-tails-from-r="">
but
I have run into an error I can't seem to resolve.
library(ShortRead)
reads <- readFastq("myFile.fastq")
qualityCutoff <- 10 # remove read tails with quality lower than this
seqs <- sread(reads) # get sequence list
qual <- PhredQuality(quality(quality(reads))) # get quality score list
as
PhredQuality
> length(qual) #my length is positive
[1] 39145018
> myqual_mat <- matrix(charToRaw(as.character(unlist(qual))),
nrow=length(qual), byrow=TRUE)
Error in .Call(.NAME, ..., PACKAGE = PACKAGE) :
negative length vectors are not allowed
as(qual, matrix) gives the same error, and as.matrix(qual) does as
well,
not sure how those two commands are different, but tried anyway.
If I run the exact same commands, instead of the full 39145018 reads,
I use
the first 100, it works like a charm. I am working on a linux
cluster, if
that is important
Does anyone have an idea?
Cheers!
--
Sam McInturf
A look at my data:
> seqs
A DNAStringSet instance of length 39145018
width seq
[1] 100
ATCNCAAAGGTATATTTTGAATCAAAAACA...TTCTTTTTCTGGACCTTGAGGGAAAGGGGG
[2] 100
CGANCTTGACCGTTGAGAAATTATCAGCTG...AGCTTCAGTCAATTCCACACAGTCTGAAAA
[3] 100
GATNGTAGGACGGAAAAAGAATNNNNNGTT...GAAANNNGTTGGTCACAACTGTTANNCACC
[4] 100
GCAACGTTATCGGCGATCGCACTGAAGACG...CCAGAGTTCTCCTCCCACTGATCGTCCTGT
[5] 100
GACGATTAAAGGAGCTTATGAGGACTCTTT...TTGTTTGATAGGATTATTCAGAGAGGACAT
... ... ...
[39145014] 100
ACAAGGGATAAAATCAAAGATGGGTGATAA...TGAAGCTTGGTGGCTTGTAGGCAATGAAAC
[39145015] 100
CATGCTTCTCCTTCTCTTTTTCTTTGTGTC...TTGTTCTCCTCCTCAACATCTCTCTCCCTC
[39145016] 100
CAGCGACTATCAGTGTAAACTCCAATCTTG...CTGGCCGTACCAATCCAACCGCATGCTTCA
[39145017] 100
CGTGCGTGGGATGTTTCCGGTGAGGCGTGG...CCGATCCGGTACGAGATCTCACCGCAGACT
[39145018] 100
TACTTGAGGAAATGGTGTTTAGTTGCTGTG...AGCCTCAAGTTCCACGTTACTTCATCTTTG
> qual
A PhredQuality instance of length 39145018
width seq
[1] 100
@@@#4=D?DD<dhgiiiidhhiiiiiighh...=?############################ [2]="" 100="" @@@#4="=A??DHH?BBBBCEGHCHGIIIII...@=AEEAC@??CBCECE@">;?1=5>CCC@C3
[3] 100
##############################...##############################
[4] 100
@@CADDFDFHFGGIIIIIIG=GEIIEGHIH...ACCCA?>>:>A>:<c?<a<a:c@ ?<<?###="" [5]="" 100="" c@bfffffhghhhiiijjjjjjjjiijjji.="" ..giighehhhhffffffceedeeeddddbdd="" ...="" ...="" ...="" [39145014]="" 100="" @@@="?ADD">CFFFBFIIBHIIHF=A??DD<ccdcdddcbbbd3?:@a@c [39145017]="" 100="" ?=":+==2@<CDDDE@BEIDA" ##########...##############################="" [39145018]="" 100="" (;<38="">)<7>@>8=:)2:-=@;)9)=9?.2...##############################
> sessionInfo()
R version 3.0.0 (2013-04-03)
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=C 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] ShortRead_1.18.0 latticeExtra_0.6-24 RColorBrewer_1.0-5
[4] Rsamtools_1.12.3 lattice_0.20-15 Biostrings_2.28.0
[7] GenomicRanges_1.12.3 IRanges_1.18.1 BiocGenerics_0.6.0
loaded via a namespace (and not attached):
[1] Biobase_2.20.0 bitops_1.0-5 grid_3.0.0 hwriter_1.3
stats4_3.0.0
[6] zlibbioc_1.6.0
[[alternative HTML version deleted]]