Index genome for STAR alignment
Usage
star_genome_index(
genome_path = NULL,
gff_path = NULL,
mappingdir = "results/04_read_mapping",
threads = 2
)
Arguments
- genome_path
Path to the genome .fasta file.
- gff_path
Path to the .gff/.gtf file with annotations.
- mappingdir
Path to the directory where read mapping files (.bam) will be stored.
- threads
Number of threads for STAR aligner. Default: 2.
Value
A 2-column data frame with path to index in the first column and index build status in the second column, with "OK" if the index was built successfully and NA otherwise.
Examples
# \donttest{
genome_path <- system.file("extdata", "Homo_sapiens.GRCh37.75_subset.fa",
package="bears")
gff_path <- system.file("extdata", "Homo_sapiens.GRCh37.75_subset.gtf",
package="bears")
mappingdir <- tempdir()
if(star_is_installed()) {
star_genome_index(genome_path, gff_path, mapping_dir)
}
#> Error in file.path(mappingdir, "genomeIndex"): object 'mapping_dir' not found
# }