This class aims to simplify the handling and exploration of FASTA files and provides simple methods for accessing information that can be used to assess bulk contents from a FASTA file - the analysis framework is provided by Rsamtools (alone).
Super class
floundeR::FloundeR -> Fasta
Active bindings
sequencingsetThe
sequencingsetactive binding returns a sequencingset object that is canonically structured around thepasses_filteringlogical field to allow assessment of sequencing characteristics.
Methods
Method new()
Creates a new Fasta object. This initialisation method performs other sanity checking of the defined file(s) to ensure that it is indeed parseable and creates the required data structures.
Usage
Fasta$new(fasta_file)Method sequence_chunks()
Split the fasta sequence file explored by the package into sequence chunks for e.g. import into a relational database.
Method get_sequence_chunk()
Get a chunk of fasta sequences from a larger monolithic file
Method get_tibble_chunk()
Get a chunk of fasta sequences from a larger monolithic file as a tibble
Method as_tibble()
Export the imported dataset(s) as a tibble
The Fasta R6 object consumes a fasta format file and creates an object in memory that can be explored, sliced and filtered. This method dumps out the in-memory object for further exploration and development.
Examples
## ------------------------------------------------
## Method `Fasta$new`
## ------------------------------------------------
canonical_fasta <- flnDr("cluster_cons.fasta.bgz")
fasta <- Fasta$new(canonical_fasta)
#>
#> ── creating floundR::fasta with [cluster_cons.fasta.bgz] ───────────────────────
#> ℹ index for [cluster_cons.fasta.bgz] found
#> ℹ loading fasta index [cluster_cons.fasta.bgz.idx]
#> ✔ [18656] fasta entries parsed