Calculate the transcript count matrix by parsing the re-alignment file.
Usage
quantify_transcript_flames(
annotation,
outdir,
config,
pipeline = "sc_single_sample",
samples
)
Arguments
- annotation
The file path to the annotation file in GFF3 format
- outdir
The path to directory to store all output files.
- config
Parsed FLAMES configurations.
- pipeline
The pipeline type as a character string, either
sc_single_sample
(single-cell, single-sample),- samples
A vector of sample names, required for
sc_multi_sample
pipeline.bulk
(bulk, single or multi-sample), orsc_multi_sample
(single-cell, multiple samples)
Value
A SingleCellExperiment
object for single-cell pipeline, a list of SingleCellExperiment
objects for multi-sample pipeline, or a SummarizedExperiment
object for bulk pipeline.
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)
fasta <- annotation_to_fasta(annotation, genome_fa, outdir)
#> Import genomic features from the file as a GRanges object ...
#> OK
#> Prepare the 'metadata' data frame ...
#> OK
#> Make the TxDb object ...
#> Warning: The "phase" metadata column contains non-NA values for features of type
#> exon. This information was ignored.
#> OK
config <- jsonlite::fromJSON(create_config(outdir, bambu_isoform_identification = TRUE, min_tr_coverage = 0.1, min_read_coverage = 0.1, min_sup_cnt = 1))
#> Writing configuration parameters to: /tmp/RtmpoS7Kzz/file1f6d36c84b3a/config_file_8045.json
file.copy(annotation, file.path(outdir, "isoform_annotated.gtf"))
#> [1] TRUE
if (FALSE) { # \dontrun{
if (!any(is.na(find_bin(c("minimap2", "k8"))))) {
minimap2_realign(
config = config, outdir = outdir,
fq_in = fastq1
)
quantify_transcript_flames(annotation, outdir, config, pipeline = "bulk")
}
} # }