[BioC] ShortReadQ constructor
Ivan Gregoretti
ivangreg at gmail.com
Tue Oct 8 02:06:42 CEST 2013
Hello Martin,
Great. So,
srq1 <- ShortReadQ(DNAStringSet(c("ACGT", "GGGGACT")),
FastqQuality(c("HHHH", "HHHHHHH")), BStringSet(c("read1", "read2")))
gets me what I wanted. Now I have a part two to my question:
How do I modify srq1's id?
For instance, id(srq1) produces
> id(srq1)
A BStringSet instance of length 2
width seq
[1] 5 read1
[2] 5 read2
but I want to modify srq1's id so that it looks like this
> BStringSet(paste(id(srq1), 'tested'))
A BStringSet instance of length 2
width seq
[1] 12 read1 tested
[2] 12 read2 tested
Please note that I intend not to construct a new instance by passing
FastqQuality(c("HHHH", "HHHHHHH")) and DNAStringSet(c("ACGT",
"GGGGACT")). I intend to copy srq1 to srq2 and then modify srq2.
Alternatively, may I construct a new instance by passing
BStringSet(paste(id(srq1), 'tested')), sread(srq1) and quality(srq1)?
I tried by the constructor complained vociferously when I passed
quality=quality(srq1).
Thank you,
Ivan
Ivan Gregoretti, PhD
Bioinformatics
On Mon, Oct 7, 2013 at 3:44 PM, Martin Morgan <mtmorgan at fhcrc.org> wrote:
> On 10/07/2013 12:28 PM, Ivan Gregoretti wrote:
>>
>> Hello,
>>
>> Could somebody show an example of constructing a ShortReadQ object
>> instance? I can't find an example in the documentation.
>>
>>
>> For example, lets say that I have two records with the following ids,
>> sequences, and Phred qualities
>>
>> c("read1", "read2")
>> c("ACGT", "GGGGACT")
>> c("HHHH", "HHHHHHH")
>>
>> How would you now construct the ShortReadQ instance?
>
>
> Hi Ivan
>
> ShortReadQ(DNAStringSet(c("ACGT", "GGGGACT")),
> FastqQuality(c("HHHH", "HHHHHHH")),
> BStringSet(c("read1", "read2")))
>
> Martin
>
>>
>> Thank you,
>>
>> Ivan
>>
>>
>>
>>
>> Ivan Gregoretti, PhD
>> Bioinformatics
>>
>> _______________________________________________
>> Bioconductor mailing list
>> Bioconductor at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>> Search the archives:
>> http://news.gmane.org/gmane.science.biology.informatics.conductor
>>
>
>
> --
> 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 Bioconductor
mailing list