fasdirdf | R Documentation |
Wrapper around fastodf that reads in all FASTA files in a
directory into a single data.frame. Uses list_files
internally also. At present, fasdirf
requires that all files being read in
are of the same type (DNA or amino acid).
fasdirdf(path = NULL, pat = NULL, seqtype = c("DNA", "AA"), incl_filepath = TRUE)
path |
(character string, mandatory) the path to the directory containing the input FASTA files. |
pat |
(character string, optional) a regex string as used by list.files to specify which file/directory names should be returned. |
seqtype |
(character string, optional) the type of sequence being read in; DNA ("DNA") or amino acid ("AA"). Defaults to "DNA". |
incl_filepath |
(logical, optional) should the path to the file being read
be included in the |
a data.frame with the following columns: seqname
,
seq
, and filename
. If incl_filepath
is set to TRUE, then
filename
will include the full path to the input file. It will be set to
NA
otherwise.
## Not run:
#Input data
inpath <- dirname(system.file("extdata", "cdsearchr_testdata.fasta",
package = "seqvisr", mustWork = TRUE))
#Reading in some sample amino acid sequences
fasdirdf(path = inpath, seqtype = "AA", pat = "*_testdata.fasta")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.