checkBlastVar: Check if an object was imported using 'readBlast' or import...

Description Usage Arguments Value Examples

View source: R/checkBlastVar.R

Description

Check if an object was imported using readBlast or import an object using readBlast

Usage

1
checkBlastVar(bvar, bform = "outfmt6")

Arguments

bvar

either a path to a Blast result table (gerenated with outfmt=6) or such a table imported with the readBlast function

bform

character string. Currently can only be "outfmt6"

Value

a Blast result table imported with the readBlast function

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
## Not run: 
## Create a basic data frame with the right columns
df <- data.frame("QueryACC" = "MyVector",
                 "SubjectACC" = "Read1",
                 "PercentID" = "97.5",
                 "AlnLength" = 2530,
                 "NumMismatch" = 20,
                 "NumGapOpen" = 30,
                 "QueryStart" = 1,
                 "QueryEnd" = 2500,
                 "SubjectStart" = 102490,
                 "SubjectEnd" = 100000,
                 "evalue" = 0.0,
                 "bitscore" = 3000,
                 "Strand")
## checkBlastVar returns the object itself
mytab <- checkBlastVar(df)
## If we mofidy a column name
colnames(df)[1] <- "newcolname"
## then checkBlastVar throws an error
\dontrun{
mytab <- checkBlastVar(df)
}

## End(Not run)

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