[Bioc-sig-seq] pileup() for small RNA sequencing
Martin Morgan
mtmorgan at fhcrc.org
Sat May 9 16:43:36 CEST 2009
"Wu, Xiwei" <XWu at coh.org> writes:
> Dear all,
>
> I have been working on a small RNA sequencing data set. After adapter
> trimming, the length of each tag is different, ranging from 16 to 40.
> While I am using pileup function in SHortRead package to calculate the
> coverage, it only allows a uniform length of tags, which will generate
> inaccurate coverage. Is it possible to set different tag length, or any
> other functions allowing this in other packages? Thanks in advance.
'coverage' does this. There are several different input formats, and
the method you want depends on where you are starting. Try
showMethods(coverage)
?coverage
help("coverage,AlignedRead-method")
The return value will be 'run-length encoded', so that a coverage of 0
for 200 bases followed by coverage of 1 for 10 bases, 2 for 25 bases
and 1 for 10 bases might look like
'numeric' Rle instance of length 245 with 4 runs
Lengths: 200 10 25 10
Values : 0 1 2 1
Rle's can be very convenient for this scale of data and
help("Rle-class") provies an indication of what can be done. But if
you're more comfortable with (very long!) integer vectors then as(rle,
"integer") will get you that. coverage,AlignedRead-method returns a
GenomeData object, which can be treated like a list to get the
coverage of individual contigs.
Hope that helps,
Martin
> Xiwei Wu
> City of Hope
>
>
> ---------------------------------------------------------------------
>
> SECURITY/CONFIDENTIALITY WARNING: \ This message and ...{{dropped:29}}
>
> _______________________________________________
> 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