I have found the htSeqTools methods useful for creating PCA plots of
samples. The filtering of reads to remove those that are deemed to be
over amplified looks very interesting.
The function is called like this:
# BAM to IRanges object:
reads01 <- readAligned(dirPath , "reads01.bam", type='BAM')
ranges01 <- RangedData(ranges=IRanges(position(reads01),position(reads
01)+width(reads01)), space=chromosome(reads01),
strand=strand(reads01))
ranges01Fil <- filterDuplReads(ranges01, fdrOverAmp=0.01)
However, how can i get the filtered reads (ranges01Fil) out as BED
formatted files?
Thank you!
Ian
[[alternative HTML version deleted]]
Not familiar with htSeqTools, but it's probably as easy as:
*rtracklayer::export(ranges01Fil*, "filtered_reads.bed")
But I am not sure if you really want to use a BED file for the reads?
It
seems we really need an ID-based filterBam function.
Michael
On Fri, Jan 27, 2012 at 3:56 AM, Ian Donaldson <
Ian.Donaldson@manchester.ac.uk> wrote:
> I have found the htSeqTools methods useful for creating PCA plots
of
> samples. The filtering of reads to remove those that are deemed to
be over
> amplified looks very interesting.
>
> The function is called like this:
> # BAM to IRanges object:
> *reads01 <- readAligned(dirPath , "reads01.bam", type='BAM')
>
> ranges01 <-
RangedData(ranges=IRanges(position(**reads01**),position(**
> reads01**)+width(**reads01**)), space=chromosome(**reads01**),
> strand=strand(**reads01**))*
>
> *ranges01Fil <- filterDuplReads(ranges01, fdrOverAmp=0.01)*
>
> However, how can i get the filtered reads (ranges01Fil) out as BED
> formatted files?
>
> Thank you!
> Ian
>
[[alternative HTML version deleted]]