format_fasta_headers: Format fasta headers

Description Usage Arguments Value Examples

Description

format the sequence headers for fasta file obtained from NCBI blast output

Usage

1
format_fasta_headers(fasta_file = NULL, keep_alignemnt_coord = TRUE)

Arguments

fasta_file

string denoting full path of a fasta file.

keep_alignemnt_coord

logical (default : TRUE) decides whether alignment coordinates to keep in headers or not. When TRUE header must contains alignment coordinates in this format :([:digit:]+-[:digit:]+). (e.g. CEJ90625.1:1-252)

Value

sequences as an object of class Biostrings

Examples

1
2
3
4
5
6
7
8
## Not run: 
 f <- system.file("extdata","blast_output_01.fasta" ,package = "phyloR")
 ## existing headers
 Biostrings::readAAStringSet(f) %>% names() %>% head()
 ## new  headers
 f %>% format_fasta_headers() %>% names() %>% head()

## End(Not run)

cparsania/phyloR documentation built on Aug. 6, 2020, 7:28 a.m.