track_alignments | R Documentation |
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.
track_alignments(track_data, assembly)
track_data |
the URL to the BAM/CRAM alignments |
assembly |
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
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/
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.