knitr::opts_chunk$set(echo = TRUE)

Make small version of Arabidopsis GFF file for testing bed functions.

This only includes the first ca. 1000 features in the GFF file, which all happen to be on chromosome 1.

# Download gff3
download.file(
  url = "ftp://ftp.ensemblgenomes.org/pub/release-40/plants/gff3/arabidopsis_thaliana/Arabidopsis_thaliana.TAIR10.40.gff3.gz",
  destfile = here::here("data-raw/Arabidopsis_thaliana.TAIR10.40.gff3.gz")
)

# Unzip
R.utils::gunzip(
  filename = here::here("data-raw/Arabidopsis_thaliana.TAIR10.40.gff3.gz"),
  destname = here::here("data-raw/Arabidopsis_thaliana.TAIR10.40.gff3")
)

# Copy first 1000 lines of file to inst/extdata/
arabidopsis_gff <- readr::read_lines(here::here("data-raw/Arabidopsis_thaliana.TAIR10.40.gff3"))

arabidopsis_gff_small <- arabidopsis_gff[1:1000]

readr::write_lines(
  arabidopsis_gff_small,
  here::here("inst/extdata/Arabidopsis_thaliana_TAIR10_40_small.gff3")
)

sessionInfo()


joelnitta/baitfindR documentation built on May 7, 2020, 6:21 p.m.