track_alignments {JBrowseR} | R Documentation |
Create an AlignmentsTrack for a custom JBrowse 2 view
Description
Creates the necessary configuration string for an indexed BAM or CRAM alignment so that it can be used in a JBrowse custom linear genome view.
Usage
track_alignments(track_data, assembly)
Arguments
track_data |
the URL to the BAM/CRAM alignments |
assembly |
the config string generated by |
Details
It is important to note that while only the BAM/CRAM file is
passed as an argument, tracks_alignment
assumes that a BAM/CRAM
index of the same name is located with the file
For example:
track_alignments("data/alignments.bam")
Assumes that data/alignments.bam.bai
also exists.
This is a JBrowse 2 convention, and the default naming output of samtools
For more information on creating an index with samtools, visit https://www.htslib.org/
Value
a character vector of stringified AlignmentsTrack JSON configuration
Examples
assembly <- assembly("https://jbrowse.org/genomes/hg19/fasta/hg19.fa.gz", bgzip = TRUE)
track_alignments("alignments.bam", assembly)
track_alignments("alignments.cram", assembly)
[Package JBrowseR version 0.10.2 Index]