Description Usage Arguments Details Value Author(s) See Also Examples
These are functions extending the ShortRead packages capabilities:
1 2 3 4 5 6 | demultiplex(obj,barcodes=c(),barcodes.qty=12,barcode.length=6,
edition.dist=2,type=c("independant","within"),index.only=FALSE,mc.cores=1L)
barcodePlot(obj,barcodes=c(),type=c("independant","within"),
barcode.length=6,show.barcode=20,...)
chastityFilter(.name="Illumina Chastity Filter")
naPositionFilter(.name="NA Position Filter")
|
obj |
An object derived from class |
barcodes |
A character vector describing the multiplex (i.e. barcode) sequences used in the experiment. |
barcodes.qty |
An integer describing the number of barcodes |
barcode.length |
An integer describing the barcode length in bp |
edition.dist |
The maximal edition distance (i.e. the number of changes to apply), to accept an incorrectly sequenced barcode. |
type |
The type of barcode used. |
index.only |
simply return the index and not the barcode themselves. |
mc.cores |
A parameter ultimately passed to srdistance to enable parallel processing on mc.cores. On linux and Mac only, windows task remain serially processed. |
.name |
An internal string describing the filter |
show.barcode |
An integer specifying how many barcodes should be displayed in the final output. |
... |
additional graphic parameters |
barcodePlot
Creates a plot showing the barcode
distribution of a multiplexed sequencing library.
chastityFilter
Creates a SRFilter
instance
that filters SolexaExport read according to the chastity filtering value.
demultiplex
Split a single AlignedRead
object into a list of AlignedRead
objects according to
the barcodes provided by the user. It supports multicore processing
but has a default serial behaviour.
naPositionFilter
Creates a
SRFilter
instance that filters SolexaExport read
having an NA position.
When demultiplexing, the function if provided with just the
AlignedRead
will try to find out how many barcodes
were used and what they are. This is unwise to do as many barcodes will get
wrongly sequenced and not always the most frequent ones are the one you
used! It's therefore strongly advised to specify the barcodes' sequences
that were used.
barcodePlot
returns invisibly the barcode
frequencies.
chastityFilter
returns a
SRFilter
instance.
demultiplex
returns a
list of AlignedRead
objects.
naPositionFilter
returns a SRFilter
instance.
Nicolas Delhomme
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | ## Not run:
# the barcode
barcodes=c("ACACTG","ACTAGC","ATGGCT","TTGCGA")
invisible(download.file(paste0("https://github.com/UPSCb/UPSCb/raw/",
"master/tutorial/easyRNASeq/multiplex_export.txt.gz"),
"multiplex_export.txt.gz"))
# the multiplexed data
alns <- readAligned(".",
pattern="multiplex_export",
filter=compose(
chastityFilter(),
nFilter(2),
chromosomeFilter(regex="chr")),
type="SolexaExport",
withAll=TRUE)
# barcode plot
barcodePlot(alns,
barcodes=barcodes,
type="within",
barcode.length=6,
show.barcode=20,
main="All samples",
xlim=c(0,0.5))
# demultiplexing
dem.alns <- demultiplex(alns,
barcodes=barcodes,
edition.dist=2,
barcodes.qty=4,
type="within")
# plotting again
par(mfrow=c(2,2))
barcode.frequencies <- lapply(
names(dem.alns$barcodes),
function(barcode,alns){
barcodePlot(
alns$barcodes[[barcode]],
barcodes=barcode,
type="within",barcode.length=6,
show.barcode=20,
main=paste(
"Expected barcode:",
barcode))
},dem.alns)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.