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.
the URL to the BAM/CRAM alignments
the config string generated by
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
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/
a character vector of stringified AlignmentTrack JSON configuration
assembly <- assembly("https://jbrowse.org/genomes/hg19/fasta/hg19.fa.gz", bgzip = TRUE) track_alignments("alignments.bam", assembly) track_alignments("alignments.cram", assembly)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.