Description Usage Arguments Value Author(s) Examples
Wrapper for bedtools getfasta.
1 | extract_regions_from_fasta(bed_file, fasta_file, out_fasta_file, ...)
|
bed_file |
Path to bed file with locations of regions to extract. bed file is a tab-separated file with columns for chromosome (e.g., chr1), start position (e.g., 1), and end position (e.g., 10), in that order. No column headers are used. |
fasta_file |
Path to file in fasta format to extract regions from. |
out_fasta_file |
Path to write extracted regions (in fasta format). |
... |
Other arguments. Not used by this function, but meant to be used
by |
List; output of processx::run(). Externally, a fasta file will be written to the path specified by 'out_fasta_file'.
Joel H Nitta, joelnitta@gmail.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## Not run:
# First write gene, intron, and exon bed regions out as tsv files
temp_dir <- tempdir()
find_bed_regions(
gff3_file = system.file("extdata", "Arabidopsis_thaliana_TAIR10_40_small.gff3",
package = "baitfindR", mustWork = TRUE),
source_select = "araport11",
out_type = "write_all",
out_dir = temp_dir,
prefix = "arabidopsis"
)
# Extract genes.
extract_regions_from_fasta(
bed_file = fs::path(temp_dir, "arabidopsis_introns"),
fasta_file = system.file("extdata", "Arabidopsis_thaliana_TAIR10_40_small.fasta",
package = "baitfindR", mustWork = TRUE),
out_fasta_file = fs::path(temp_dir, "arabidopsis_gene_seqs.fasta")
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.