AnnotateBACreads: Annotate BAC reads

Description Usage Arguments Value Author(s) Examples

View source: R/AnnotateBACreads.R

Description

The function annotates BAC reads based on:

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
AnnotateBACreads(
  blastvec,
  blastGeneA = NULL,
  blastGeneB = NULL,
  pafHost = NULL,
  minHost_mapQ = 10L,
  readLength = NULL,
  vectorSequence = NULL,
  minaln = 1L,
  MinDVDsides = 10000L
)

Arguments

blastvec

Alignment of the vector on the reads. A blast result table imported with readBlast or a path to such a table.

blastGeneA

Alignment of gene A (e.g. 18S) on the reads. A blast result table imported with readBlast or a path to such a table.

blastGeneB

Alignment of gene B (e.g. 28S) on the reads. A blast result table imported with readBlast or a path to such a table.

pafHost

Alignment of the reads on host genome (e.g. E Coli). A table obtained with the read_paf function or a path to a paf file (e.g. obtained with minimap2)

minHost_mapQ

Integer. Minimum mapQ value to consider the alignment to the host genome as significant

readLength

data.frame with 2 colums: ReadName and ReadLength. Provide directly the data frame or the path to the tab-delimited file containing the data (without header).

vectorSequence

Either a DNAStringSet with 1 element or the path to a fasta file

minaln

Integer. Minimum alignment length on GeneA and GeneB

MinDVDsides

Integer. Minimum length on each side of the vector sequence to be considered a DVD read

Value

A tibble

Author(s)

Pascal GP Martin

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
# Using path to files:
## Get the path of the different files:
pathbvec <- system.file("extdata", "BAC02_BlastVector.res", package = "NanoBAC")
pathbgnA <- system.file("extdata", "BAC02_Blast18S.res", package = "NanoBAC")
pathbgnB <- system.file("extdata", "BAC02_Blast25S.res", package = "NanoBAC")
pathpaf <- system.file("extdata", "BAC02_mmap2Ecoli.paf", package = "NanoBAC")
pathRL <- system.file("extdata", "BAC02_ReadLength.tsv", package = "NanoBAC")
pathvecseq <- system.file("extdata", "VectorSequence.fa", package = "NanoBAC")

## Annotate this set of reads:
myannot <- AnnotateBACreads(blastvec = pathbvec,
                            blastGeneA = pathbgnA,
                            blastGeneB = pathbgnB,
                            pafHost = pathpaf,
                            readLength = pathRL,
                            vectorSequence = pathvecseq)

# Import the files first and then use them in AnnoteBACreads:
## Import the files:
blastvec = readBlast(pathbvec)
blastGeneA = readBlast(pathbgnA)
blastGeneB = readBlast(pathbgnB)
pafHost = suppressWarnings(read_paf(pathpaf))
readLength = read.table(pathRL, col.names=c("ReadName", "ReadLength"),
                        sep="\t", header = FALSE, stringsAsFactors = FALSE)
vectorSequence = Biostrings::readDNAStringSet(pathvecseq)[[1]]

## Annotate this set of reads:
myannot <- AnnotateBACreads(blastvec = blastvec,
                            blastGeneA = blastGeneA,
                            blastGeneB = blastGeneA,
                            pafHost = pafHost,
                            readLength = readLength,
                            vectorSequence = vectorSequence)

pgpmartin/NanoBAC documentation built on Dec. 11, 2020, 9:51 a.m.