Hi Michael,

thanks for the reply but I already tried to do setdiff and I get this
message,

Error in as.vector(x) : no method for coercing this S4 class to a vector

My reads are not all of the same length, the read length varies from 18 to
26 bp, these are from a small RNA seq experiment.

Thanks for the help.
Kind regards,
Andreia

On Mon, Jul 4, 2011 at 12:24 AM, Michael Lawrence <lawrence.michael@gene.com
> wrote:

>
>
> On Sat, Jul 2, 2011 at 10:41 PM, Andreia Fonseca <
> andreia.fonseca@gmail.com> wrote:
>
>> Dear all,
>>
>> I have a range list which I have created like this:
>>
>> aln<-readAligned("GHO-23_filtered.fastq_aligned", type="Bowtie")
>> cvg = coverage(aln)
>> islands <- slice(cov, lower = 1)
>> ranges_islands <-slice(cvg, 1, rangesOnly=TRUE)
>>
>> And then I have a GRange object which I have imported
>>
>> genes=import.gff3("Egrandis_162_gene.gff3", asRangedData=FALSE)
>>
>> I want to select the ranges in ranges_islands which do not overlap with
>> genes into object final_ranges and then I want to select the reads from
>> aln
>> which are within or overlapping >50%  with object final_ranges.
>>
>>
> If your reads are of a fixed length, then something like this should work:
>
> final_ranges <- setdiff(ranges_islands, genes)
> final_aln <- aln[!is.na(findOverlaps(as(aln, "GRanges"), final_ranges,
> select = "first", minoverlap = halfReadLength))]
>
> Michael
>
>
>
>> I also would like to export the object final_ranges to a table chr, start,
>> end.
>>
>> Can someone help?
>> Thanks
>> Andreia
>>
>>
>> -----------------------------------------------------------------------------------------------
>> Andreia J. Amaral, PhD
>> BioFIG - Center for Biodiversity, Functional and Integrative Genomics
>> Instituto de Medicina Molecular
>> University of Lisbon
>> Tel: +352 217500000 (ext. office: 28253)
>> email:andreiaamaral@fm.ul.pt ; andreiaamaral@fc.ul.pt
>>
>>        [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> Bioconductor mailing list
>> Bioconductor@r-project.org
>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>> Search the archives:
>> http://news.gmane.org/gmane.science.biology.informatics.conductor
>>
>
>


-- 
---------------------------------------------------------------------------------------------
Andreia J. Amaral, PhD
BioFIG - Center for Biodiversity, Functional and Integrative Genomics
Instituto de Medicina Molecular
University of Lisbon
Tel: +352 217500000 (ext. office: 28253)
email:andreiaamaral@fm.ul.pt ; andreiaamaral@fc.ul.pt

	[[alternative HTML version deleted]]

