Fixed minor check notes
This commit is contained in:
parent
2ac99025b4
commit
55b3362c58
1 changed files with 3 additions and 3 deletions
|
|
@ -18,12 +18,12 @@
|
||||||
load_fasta <- function(msa, keep.singletons = FALSE) {
|
load_fasta <- function(msa, keep.singletons = FALSE) {
|
||||||
|
|
||||||
# Check inputs
|
# Check inputs
|
||||||
if (class(msa) == "character") {
|
if (is(msa, "character")) {
|
||||||
if (!file.exists(msa)) stop("Invalid msa or the file does not exist!")
|
if (!file.exists(msa)) stop("Invalid msa or the file does not exist!")
|
||||||
seqs <- ape::read.FASTA(msa)
|
seqs <- ape::read.FASTA(msa)
|
||||||
} else if (class(msa) == "matrix") {
|
} else if (is(msa, "matrix")) {
|
||||||
seqs <- ape::as.DNAbin(msa)
|
seqs <- ape::as.DNAbin(msa)
|
||||||
} else if (class(msa) == "DNAbin") {
|
} else if (is(msa, "DNAbin")) {
|
||||||
seqs <- msa
|
seqs <- msa
|
||||||
} else {
|
} else {
|
||||||
stop("incorrect input for msa!")
|
stop("incorrect input for msa!")
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue