Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ROBIReadfasta

A preliminary R package allowing to read files produced by OBITools4

⚠️ Warning: We highly recommand to use the new obicsv and obimatrix commands to produce CSV files from your fast(a|q) files instead of using this package.

Installation

You first need to install the devtools package.

install.packages("devtools")

Then you can install the ROBIReadfasta package itself.

devtools::install_git("https://git.metabarcoding.org/obitools/obitools4/robireadfasta.git")

Provided functions

The package provides three main functions:

  • read_obifasta(file, keys = NULL, verbose = is_robi_verbose()):

    Reads a FASTA file including annotations inserted in the sequence header by OBITools in JSON format.

  • extract_features(sequences, ..., verbose = is_robi_verbose()):

    Extracts some annotations from the JSON, and adds them as supplentary columns to the returned tibble

  • extract_readcount(sequences, key = "merged_sample"):

    Extracts from then JSON annotation information about the MOTUs abundances per PCR. The function returns a $PCRs \times MOTUs$ matrix.

Usage

A simple example relying on a small sample FASTA file provided with the package.

library(ROBIFastread)
library(tidyverse)
library(magrittr)

filename <- system.file("extdata", 
                        "sample.fasta", 
                        package="ROBIFastread")

sequences <- read_obifasta(filename,
                           keys = c("forward_match","reverse_match"))

sequences %<>% extract_features("forward_score","reverse_score")

reads <- sequences %>% extract_readcount()

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages