grab_fasta: read in a fasta file and turn into a tibble

Description Usage Arguments Examples

View source: R/functions.R

Description

This reads in a fasta file and removes the leading ">" from the name of the contig so that it will match stuff in a corresponding VCF or other variant file. It then returns a tibble with columns CHROM and consSeq. Currently this only woks on files that have two line for each sequence, not with files that break the sequence over multiple lines.

Usage

1
grab_fasta(path)

Arguments

path

The path to the fasta file. If it is gzipped, it will automatically be gunzipped on the fly.

Examples

1
grab_fasta(system.file("textdata", "fasta.txt.gz", package = "snps2assays"))

eriqande/snps2assays documentation built on Oct. 9, 2020, 5:22 p.m.