Fast5.Rd
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.
fast5_file
the file.path to the query FAST5 file
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
Fast5$new(fast5_file = NA)
fast5_file
The source FAST5 file.
A new Fast5
object.
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.
Fast5$is_single_fast5()
boolean
promFast5 <- system.file("extdata", "prom.fast5", package="floundeR") promF5 <- Fast5$new(fast5_file=promFast5) promF5$is_single_fast5()
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.
Fast5$is_multi_fast5()
boolean
promFast5 <- system.file("extdata", "prom.fast5", package="floundeR") promF5 <- Fast5$new(fast5_file=promFast5) promF5$is_multi_fast5()
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.
Fast5$get_platform()
vector of platform
promFast5 <- system.file("extdata", "prom.fast5", package="floundeR") promF5 <- Fast5$new(fast5_file=promFast5) promF5$get_platform()
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
Fast5$get_flowcell_id()
vector of flowcell_id
promFast5 <- system.file("extdata", "prom.fast5", package="floundeR") promF5 <- Fast5$new(fast5_file=promFast5) promF5$get_flowcell_id()
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.
Fast5$get_exp_start_time()
vector of experiment_start_time
promFast5 <- system.file("extdata", "prom.fast5", package="floundeR") promF5 <- Fast5$new(fast5_file=promFast5) promF5$get_exp_start_time()
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
Fast5$get_read_count()
integer count of reads
promFast5 <- system.file("extdata", "prom.fast5", package="floundeR") promF5 <- Fast5$new(fast5_file=promFast5) promF5$get_read_count()
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.
Fast5$get_flowcell_type()
vector of flowcell_types
promFast5 <- system.file("extdata", "prom.fast5", package="floundeR") promF5 <- Fast5$new(fast5_file=promFast5) promF5$get_flowcell_type()
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.
Fast5$get_sequencing_kit()
vector of sequencing_kit
promFast5 <- system.file("extdata", "prom.fast5", package="floundeR") promF5 <- Fast5$new(fast5_file=promFast5) promF5$get_sequencing_kit()
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.
Fast5$get_info(atomic = TRUE)
atomic
whether a single entity (multi files only) should be considered (FALSE)
data.frame
promFast5 <- system.file("extdata", "prom.fast5", package="floundeR") promF5 <- Fast5$new(fast5_file=promFast5) promF5$get_info(atomic=FALSE)
print()
print method to override the standard R6 printing
Fast5$print(...)
...
stuff passed onwards
clone()
The objects of this class are cloneable with this method.
Fast5$clone(deep = FALSE)
deep
Whether to make a deep clone.
## ------------------------------------------------ ## 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