Skip to contents

Parse FLAMES' GFF ouputs into a Genomic Ranges List

Usage

get_GRangesList(file)

Arguments

file

the GFF file to parse

Value

A Genomic Ranges List

Examples

temp_path <- tempfile()
bfc <- BiocFileCache::BiocFileCache(temp_path, ask = FALSE)
file_url <- "https://raw.githubusercontent.com/OliverVoogd/FLAMESData/master/data"
fastq1 <- bfc[[names(BiocFileCache::bfcadd(bfc, "Fastq1", paste(file_url, "fastq/sample1.fastq.gz", sep = "/")))]]
genome_fa <- bfc[[names(BiocFileCache::bfcadd(bfc, "genome.fa", paste(file_url, "SIRV_isoforms_multi-fasta_170612a.fasta", sep = "/")))]]
annotation <- bfc[[names(BiocFileCache::bfcadd(bfc, "annot.gtf", paste(file_url, "SIRV_isoforms_multi-fasta-annotation_C_170612a.gtf", sep = "/")))]]
outdir <- tempfile()
dir.create(outdir)
config <- jsonlite::fromJSON(
  system.file("extdata", "config_sclr_nanopore_3end.json", package = "FLAMES"))
minimap2_align(
  config = config,
  fa_file = genome_fa,
  fq_in = fastq1,
  annot = annotation,
  outdir = outdir
)
#> 02:13:27 AM Fri Oct 25 2024 minimap2_align
#>                                                   total mapped primary
#> /tmp/RtmpoS7Kzz/file1f6d51fada3e/align2genome.bam  2503   1772    2500
#>                                                   secondary
#> /tmp/RtmpoS7Kzz/file1f6d51fada3e/align2genome.bam         0
find_isoform(
  annotation = annotation, genome_fa = genome_fa,
  genome_bam = file.path(outdir, "align2genome.bam"),
  outdir = outdir, config = config
)
#> 02:13:30 AM Fri Oct 25 2024 find_isoform
#> [1] "/tmp/RtmpoS7Kzz/file1f6d51fada3e/transcript_assembly.fa.fai"
grlist <- get_GRangesList(file = file.path(outdir, "isoform_annotated.gff3"))