This class aims to simplify the handling and exploration of FAST5 files and provides simple methods for accessing information that can be used to identify the sequencing platform, flowcell used, sequencing kit and other metainformation that includes whether they are single- or- multi format files.

Public fields

fast5_file

the file.path to the query FAST5 file

Methods

Public methods


Method new()

Creates a new Fast5 object. This initialisation method performs other sanity checking of the defined file to ensure that it is indeed a file, a single file, is in HDF5 format and is either single- or multi-FAST5 compliant

Usage

Fast5$new(fast5_file = NA)

Arguments

fast5_file

The source FAST5 file.

Returns

A new Fast5 object.


Method is_single_fast5()

Check if a provided file corresponds to a single entry FAST5 file

Simple method to check whether the provided file path corresponds to a valid FAST5 file and if this file corresponds to a single FAST5 format.

Usage

Fast5$is_single_fast5()

Returns

boolean

Examples

promFast5 <- system.file("extdata", "prom.fast5", package="floundeR")
promF5 <- Fast5$new(fast5_file=promFast5)
promF5$is_single_fast5()


Method is_multi_fast5()

Check if a provided file corresponds to a multiple entry FAST5 file

Simple method to check whether the provided file path corresponds to a valid FAST5 file and if this file corresponds to a multi FAST5 format.

Usage

Fast5$is_multi_fast5()

Returns

boolean

Examples

promFast5 <- system.file("extdata", "prom.fast5", package="floundeR")
promF5 <- Fast5$new(fast5_file=promFast5)
promF5$is_multi_fast5()


Method get_platform()

Extract the sequencing platform identified within a FAST5 file

This method parses a FAST5 sequence file and extracts the information on specified sequencing platform - this can be used to identify e.g. gridion or promethion based information.

Usage

Fast5$get_platform()

Returns

vector of platform

Examples

promFast5 <- system.file("extdata", "prom.fast5", package="floundeR")
promF5 <- Fast5$new(fast5_file=promFast5)
promF5$get_platform()


Method get_flowcell_id()

Extract the flowcell_id identified within a FAST5 file

This method parses a FAST5 sequence file and extracts the information on specified flowcell_id - this can be used to track flowcells used within a laboratory

Usage

Fast5$get_flowcell_id()

Returns

vector of flowcell_id

Examples

promFast5 <- system.file("extdata", "prom.fast5", package="floundeR")
promF5 <- Fast5$new(fast5_file=promFast5)
promF5$get_flowcell_id()


Method get_exp_start_time()

Extract the experiment start time identified within a FAST5 file

This method parses a FAST5 sequence file and extracts the information on specified experiment start time - this can be used in palaeogenomics of such ancient datasets. Please note that the sampled start time is transformed using lubridate for presentation.

Usage

Fast5$get_exp_start_time()

Returns

vector of experiment_start_time

Examples

promFast5 <- system.file("extdata", "prom.fast5", package="floundeR")
promF5 <- Fast5$new(fast5_file=promFast5)
promF5$get_exp_start_time()


Method get_read_count()

Extract the number of reads identified within a FAST5 file

This method parses a FAST5 sequence file and extracts the information on the read count - this is a simple count only

Usage

Fast5$get_read_count()

Returns

integer count of reads

Examples

promFast5 <- system.file("extdata", "prom.fast5", package="floundeR")
promF5 <- Fast5$new(fast5_file=promFast5)
promF5$get_read_count()


Method get_flowcell_type()

Extract the flowcell type identified within a FAST5 file

This method parses a FAST5 sequence file and extracts the information on the flowcell type - this is based on user entry at start of run.

Usage

Fast5$get_flowcell_type()

Returns

vector of flowcell_types

Examples

promFast5 <- system.file("extdata", "prom.fast5", package="floundeR")
promF5 <- Fast5$new(fast5_file=promFast5)
promF5$get_flowcell_type()


Method get_sequencing_kit()

Extract the sequencing kit identified within a FAST5 file

This method parses a FAST5 sequence file and extracts the information on the sequencing_kit used - this is based on user entry at start of run.

Usage

Fast5$get_sequencing_kit()

Returns

vector of sequencing_kit

Examples

promFast5 <- system.file("extdata", "prom.fast5", package="floundeR")
promF5 <- Fast5$new(fast5_file=promFast5)
promF5$get_sequencing_kit()


Method get_info()

Extract salient experimental information from a FAST5 file

The FAST5 sequence file contains information relating to the sequencing platform, flowcell and library preparation kits used in a study. This method pulls these information into a data.frame.

Usage

Fast5$get_info(atomic = TRUE)

Arguments

atomic

whether a single entity (multi files only) should be considered (FALSE)

Returns

data.frame

Examples

promFast5 <- system.file("extdata", "prom.fast5", package="floundeR")
promF5 <- Fast5$new(fast5_file=promFast5)
promF5$get_info(atomic=FALSE)


Method print()

print method to override the standard R6 printing

Usage

Fast5$print(...)

Arguments

...

stuff passed onwards


Method clone()

The objects of this class are cloneable with this method.

Usage

Fast5$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples


## ------------------------------------------------
## Method `Fast5$is_single_fast5`
## ------------------------------------------------

promFast5 <- system.file("extdata", "prom.fast5", package="floundeR")
promF5 <- Fast5$new(fast5_file=promFast5)
promF5$is_single_fast5()
#> [1] FALSE

## ------------------------------------------------
## Method `Fast5$is_multi_fast5`
## ------------------------------------------------

promFast5 <- system.file("extdata", "prom.fast5", package="floundeR")
promF5 <- Fast5$new(fast5_file=promFast5)
promF5$is_multi_fast5()
#> [1] TRUE

## ------------------------------------------------
## Method `Fast5$get_platform`
## ------------------------------------------------

promFast5 <- system.file("extdata", "prom.fast5", package="floundeR")
promF5 <- Fast5$new(fast5_file=promFast5)
promF5$get_platform()
#> [1] "promethion"

## ------------------------------------------------
## Method `Fast5$get_flowcell_id`
## ------------------------------------------------

promFast5 <- system.file("extdata", "prom.fast5", package="floundeR")
promF5 <- Fast5$new(fast5_file=promFast5)
promF5$get_flowcell_id()
#> [1] ""

## ------------------------------------------------
## Method `Fast5$get_exp_start_time`
## ------------------------------------------------

promFast5 <- system.file("extdata", "prom.fast5", package="floundeR")
promF5 <- Fast5$new(fast5_file=promFast5)
promF5$get_exp_start_time()
#> [1] "2018-05-08 15:53:32 UTC"

## ------------------------------------------------
## Method `Fast5$get_read_count`
## ------------------------------------------------

promFast5 <- system.file("extdata", "prom.fast5", package="floundeR")
promF5 <- Fast5$new(fast5_file=promFast5)
promF5$get_read_count()
#> [1] 25

## ------------------------------------------------
## Method `Fast5$get_flowcell_type`
## ------------------------------------------------

promFast5 <- system.file("extdata", "prom.fast5", package="floundeR")
promF5 <- Fast5$new(fast5_file=promFast5)
promF5$get_flowcell_type()
#> [1] "flo-pro001"

## ------------------------------------------------
## Method `Fast5$get_sequencing_kit`
## ------------------------------------------------

promFast5 <- system.file("extdata", "prom.fast5", package="floundeR")
promF5 <- Fast5$new(fast5_file=promFast5)
promF5$get_sequencing_kit()
#> [1] "sqk-lsk109"

## ------------------------------------------------
## Method `Fast5$get_info`
## ------------------------------------------------

promFast5 <- system.file("extdata", "prom.fast5", package="floundeR")
promF5 <- Fast5$new(fast5_file=promFast5)
promF5$get_info(atomic=FALSE)
#>    device_type flow_cell_id       exp_start_time experiment_type flowcell_type
#> 1   promethion              2018-05-08T15:53:32Z     genomic_dna    flo-pro001
#> 2   promethion              2018-05-08T15:53:32Z     genomic_dna    flo-pro001
#> 3   promethion              2018-05-08T15:53:32Z     genomic_dna    flo-pro001
#> 4   promethion              2018-05-08T15:53:32Z     genomic_dna    flo-pro001
#> 5   promethion              2018-05-08T15:53:32Z     genomic_dna    flo-pro001
#> 6   promethion              2018-05-08T15:53:32Z     genomic_dna    flo-pro001
#> 7   promethion              2018-05-08T15:53:32Z     genomic_dna    flo-pro001
#> 8   promethion              2018-05-08T15:53:32Z     genomic_dna    flo-pro001
#> 9   promethion              2018-05-08T15:53:32Z     genomic_dna    flo-pro001
#> 10  promethion              2018-05-08T15:53:32Z     genomic_dna    flo-pro001
#> 11  promethion              2018-05-08T15:53:32Z     genomic_dna    flo-pro001
#> 12  promethion              2018-05-08T15:53:32Z     genomic_dna    flo-pro001
#> 13  promethion              2018-05-08T15:53:32Z     genomic_dna    flo-pro001
#> 14  promethion              2018-05-08T15:53:32Z     genomic_dna    flo-pro001
#> 15  promethion              2018-05-08T15:53:32Z     genomic_dna    flo-pro001
#> 16  promethion              2018-05-08T15:53:32Z     genomic_dna    flo-pro001
#> 17  promethion              2018-05-08T15:53:32Z     genomic_dna    flo-pro001
#> 18  promethion              2018-05-08T15:53:32Z     genomic_dna    flo-pro001
#> 19  promethion              2018-05-08T15:53:32Z     genomic_dna    flo-pro001
#> 20  promethion              2018-05-08T15:53:32Z     genomic_dna    flo-pro001
#> 21  promethion              2018-05-08T15:53:32Z     genomic_dna    flo-pro001
#> 22  promethion              2018-05-08T15:53:32Z     genomic_dna    flo-pro001
#> 23  promethion              2018-05-08T15:53:32Z     genomic_dna    flo-pro001
#> 24  promethion              2018-05-08T15:53:32Z     genomic_dna    flo-pro001
#> 25  promethion              2018-05-08T15:53:32Z     genomic_dna    flo-pro001
#>    sequencing_kit
#> 1      sqk-lsk109
#> 2      sqk-lsk109
#> 3      sqk-lsk109
#> 4      sqk-lsk109
#> 5      sqk-lsk109
#> 6      sqk-lsk109
#> 7      sqk-lsk109
#> 8      sqk-lsk109
#> 9      sqk-lsk109
#> 10     sqk-lsk109
#> 11     sqk-lsk109
#> 12     sqk-lsk109
#> 13     sqk-lsk109
#> 14     sqk-lsk109
#> 15     sqk-lsk109
#> 16     sqk-lsk109
#> 17     sqk-lsk109
#> 18     sqk-lsk109
#> 19     sqk-lsk109
#> 20     sqk-lsk109
#> 21     sqk-lsk109
#> 22     sqk-lsk109
#> 23     sqk-lsk109
#> 24     sqk-lsk109
#> 25     sqk-lsk109