R/alignmentCSV2DF.R

Defines functions alignmentCSV2DF

Documented in alignmentCSV2DF

#' Convert an Alignment CSV from BLAST to a Dataframe
#'
#' This function allows you to convert a CSV file generated by a BLAST search to a dataframe compatible with the joinSpacerDFandAlignmentDF function. The function adds the appropriate headers that are not preserved by BLAST export.
#' @param alignmentFile The file location of the CSV you want to convert to a compatible dataframe.
#' @export
#' @examples
#' alignmentCSV2DF()
alignmentCSV2DF = function(alignmentFile){
  read.csv(alignmentFile, col.names = c("query acc.ver", "subject acc.ver", "% identity", "alignment length", "mismatches", "gap opens", "q. start", "q. end", "s. start", "s. end", "evalue", "bit score"), header = FALSE, stringsAsFactors = FALSE)
}
grybnicky/Spacer2PAM documentation built on Jan. 30, 2023, 2:55 a.m.