Commit a0c4c839 authored by khalid's avatar khalid
Browse files

change some functions names

parent bcad6fa2
......@@ -6,7 +6,7 @@ suppressMessages(library(RcppParallel,quietly=T))
MBBmakeTaxonomyFasta_RDP <- function(fin, fdb, fout, compress=TRUE) {
# Read in the fasta and pull out the taxonomy entries
sr <- ShortRead::readFasta(fin)
id <- as.character(gsub("\"", "", id(sr)))
id <- as.character(gsub("\"", "", ShortRead::id(sr)))
tax <- sapply(strsplit(id, "\\t"), `[`, 2)
tax <- gsub("^Root;", "", tax)
tax <- strsplit(tax, ";")
......@@ -24,7 +24,7 @@ MBBmakeTaxonomyFasta_RDP <- function(fin, fdb, fout, compress=TRUE) {
tax <- gsub("[^;]*_incertae_sedis;$", "", tax) # Uncertain lowest-level assignment is better to leave blank
tax <- gsub(" ", "_", tax)
# Write to disk
ShortRead::writeFasta(ShortRead(ShortRead::sread(sr), BStringSet::BStringSet(tax)), fout,
ShortRead::writeFasta(ShortRead::ShortRead(ShortRead::sread(sr), Biostrings::BStringSet(tax)), fout,
width=20000L, compress=compress)
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment