[BioC] error with pileup function in ShortRead
Simon Anders
anders at ebi.ac.uk
Sat Mar 14 15:38:16 CET 2009
Dear Davide
Davide Cittaro wrote:
> p<-pileup(position(foo), 185, chromLen[chrom], svector, width(foo))
>
> where foo is my AlignData class (filtered on chrom). It happens that I
> have a read on the + strand near the end of the chromosome (156 bp afar)
> that is greater than the specified fragment size (185). pileup complains
> that the chromosome length is too small... I can try to run with a
> shorter fragment size, but is there a way to tell pileup that the
> rightmost read can be smaller than the specified average size?
Instead of the scalar '185', you can pass a vector that gives an
explicit fragment length estimate for each read, e.g.:
p <- pileup(
position(foo),
ifelse( position(foo) < chromLen[chrom] - 185,
185, chromLen[chrom] - position(foo) - 1 ),
chromLen[chrom], svector, width(foo) )
I don't want to claim that this is a very elegant solution.
Best regards
Simon
+---
| Dr. Simon Anders, Dipl. Phys.
| European Bioinformatics Institute, Hinxton, Cambridgeshire, UK
| office phone +44-1223-492680, mobile phone +44-7505-841692
| preferred (permanent) e-mail: sanders at fs.tum.de
More information about the Bioconductor
mailing list