knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(rbims)
devtools::load_all()
Another tool to use is dbCAN. Here is the function to explore these type of files:
First, load the rbims package.
The function to use that information is read_dbcan3
. This function can parse the information of the dbCAN3 files.
The input should be a path where dbCAN output files should be stored and should have the extension overview.txt. Output data should have 6 columns with the bin names followed by the Genes obtained in every algorithm (HMMER,Hotpep,DIAMOND), column 'Signalp' indcating if a Peptide signal is found and a column '#ofTools" indicating the number of algorithms that found this Gene.
The output format is chosen with the profile
argument. When profile = T, a wide output is obtained.
The write
argument saves the formatted table generated in .tsv extension. When write = F gives you the output but not saves the table in your current directory.
If you want to follow the example you can download the use rbims test file.
dbcan_profile <-read_dbcan3(dbcan_path = "../inst/extdata/test_data/", profile = T, write = F)
head(dbcan_profile)
Or print a long table profile = F.
dbcan_profile<-read_dbcan3(dbcan_path = "../inst/extdata/test_data/", profile = F, write = F)
head(dbcan_profile)
Notice that in both cases, some lines are showed that gives the information recovered from the files input as the total number of genes, remaining genes after the the filtered, and the number of genes that have signals and passed the filtered.
You can export this to a table like this:
write.table(dbcan_profile, "dbcan.tsv", quote = F, sep = "\t", row.names = F, col.names = T)
Or setting write write = T.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.