[Bioc-sig-seq] trimLRPatterns - adaptor trimming

Martin Morgan mtmorgan at fhcrc.org
Tue Aug 17 18:52:51 CEST 2010


"Harris A. Jaffee" <hj at jhu.edu> writes:

> Hi.  For the record, trimLRPatterns is in Biostrings with an assist
> from IRanges, not ShortRead.  You can view it as a complicated call
> to substr(), having nothing to do with file input or output.
>
> Perhaps nothing was displayed by ?writeFastq because you didn't have
> ShortRead loaded.
>
> In any case, the quality scores of your reads cannot apply to your
> trimmed reads without, at least, trimming them in the same fashion.

Hi Harris -- Probably confusing to Jess, but... ShortRead defines a
method on trimLRPatterns that uses the ranges=TRUE argument, and then
narrows (any) ShortRead object so that, in fact, the quality scores do
reflect the trimming that occurs. See

  library(ShortRead)
  showMethods(trimLRPatterns, class="ShortRead", includeDef=TRUE)

Martin

> But note that trimLRPatterns ignores quality scores, and there is
> no wrapper or alternative (that I know of) that incorporates them.
>
> On Aug 17, 2010, at 10:46 AM, JASREET HUNDAL wrote:
>
>> I am new to R and don't quiet understand this correctly. When I tried
>> ?writeFastq , nothing is displayed.
>> Is there is any other way to export the trimmed reads? I am using this
>> workflow:
>> http://www.bioconductor.org/help/workflows/high-throughput-sequencing/
>>
>> Thanks!
>>
>>
>> On Mon, Aug 16, 2010 at 5:50 PM, Marcus Davy <mdavy86 at gmail.com>
>> wrote:
>>
>>> One option is to try writeFastq to fastq format, I believe it was
>>> working
>>> on recently and is fast.
>>>
>>> exptPath   <- system.file("extdata", package = "ShortRead")
>>> sp         <- SolexaPath(exptPath)
>>> fqpattern  <- "s_1_sequence.txt"
>>> fl         <- file.path(analysisPath(sp), fqpattern)
>>> fq         <- readFastq(sp, fqpattern)
>>>
>>> tf         <- tempfile(tmpdir="/tmp")
>>>
>>> writeFastq(fq, tf)
>>>
>>>
>>> Marcus
>>>
>>>
>>> On Tue, Aug 17, 2010 at 10:42 AM, JASREET HUNDAL
>>> <jasreeth at gmail.com>wrote:
>>>
>>>> Has anyone worked with trimLRPatterns function in the ShortRead
>>>> library
>>>> for
>>>> adaptor trimming?
>>>> What is the best way to export the trimmed reads in a fasta/fastq/
>>>> text
>>>> file?
>>>> I have a large 5,000,000 line fastq file with 50bp reads as input.
>>>> I have tried write.table as well as writeFASTA but nothing seems
>>>> to be
>>>> working.
>>>> Hence, I would appreciate if somebody could help me out as I am
>>>> novice in
>>>> the world of R/Bioconductor.
>>>>
>>>> Thanks
>>>> -Jess
>>>>
>>>>        [[alternative HTML version deleted]]
>>>>
>>>> _______________________________________________
>>>> Bioc-sig-sequencing mailing list
>>>> Bioc-sig-sequencing at r-project.org
>>>> https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing
>>>>
>>>
>>>
>>
>> 	[[alternative HTML version deleted]]
>>
>> _______________________________________________
>> Bioc-sig-sequencing mailing list
>> Bioc-sig-sequencing at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing
>
> _______________________________________________
> Bioc-sig-sequencing mailing list
> Bioc-sig-sequencing at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing

-- 
Martin Morgan
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M1 B861
Phone: (206) 667-2793



More information about the Bioc-sig-sequencing mailing list