ShortRead-methods: Methods extending the ShortRead package functionalities

Description Usage Arguments Details Value Author(s) See Also Examples

Description

These are functions extending the ShortRead packages capabilities:

Usage

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")

Arguments

obj

An object derived from class AlignedRead

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. independent represents barcodes generated by the illumina protocol; i.e. a separate additional sequencing step performed once the first mate has been sequenced. within represents barcodes that are part of the sequenced reads as established by Lefrancois P et al., BMC Genomics, 2009

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

Details

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.

Value

Author(s)

Nicolas Delhomme

See Also

SRFilter AlignedRead

Examples

 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)

easyRNASeq documentation built on April 30, 2020, 2 a.m.