extractFasta: Fasta file

View source: R/bioinfo_sequences.R

extractFastaR Documentation

Fasta file

Description

Extract a subset of (possibly several) sequences present in fasta file.

Usage

extractFasta(in.fa, sub.info, out.fa, split.names = " ", verbose = 1)

Arguments

in.fa

path to the input fasta file (can be gzipped)

sub.info

information on the subset to extract, as a data.frame with 3 columns, "seq", "start", "end", where the coordinates are 1-based (a 4th column, "name", can specify the names of the resulting subsequences; by default, these are seq:start-end)

out.fa

path to the output fasta file (can be gzipped); if NULL, the subset of sequences isn't written to a file but simply returned

split.names

if not NULL, specify the character at which the sequence names in in.fa will be split to only keep the first element

verbose

verbosity level (0/1)

Value

subset of sequences (invisible if out.fa isn't NULL)

Author(s)

Timothee Flutre


timflutre/rutilstimflutre documentation built on Feb. 7, 2024, 8:17 a.m.