view_mutation_igv.Rd
Load bam(s) and view the context around a mutation
view_mutation_igv(
this_mutation,
this_seq_type = "genome",
igv_port = 60506,
socket,
sort_by = "base",
colour_by,
squish = FALSE,
viewaspairs = FALSE
)
Specify the mutation of interest in MAF format.
Specify the seq type, default is genome.
Specify the port IGV is listening on. Default: 60506 (optional if using the default).
Provide the socket variable obtained by running this function with no arguments.
base, quality, sample or readGroup.
Specify how IGV should colour the reads (see IGV documentation).
Force reads to be squished (see IGV documentation). Default is FALSE.
Set to TRUE if you want the reads to be shown as pairs rather than independently (see IGV documentation), default is FALSE.
Path to file (.png).
Load bam(s) and view the context around a mutation. IMPORTANT: you must be running IGV on the host that is running R and you need to have it listening on a port. The simplest scenario is to run this command on a terminal (if using a Mac), assuming you are using R on gphost10 and you have a ssh config that routes gp10 to that host
-X gp10 ssh
then launch IGV (e.e. from a conda installation):
& conda activate igv; igv
Then obtain a socket and run this function as per the example.
if (FALSE) {
socket = make_igv_snapshot() #run with no arguments to get the socket for a running IGV instance
this_mutation = get_coding_ssm(seq_type="capture") %>% head(1)
view_mutation_igv(this_mutation,
socket = socket,
this_seq_type = "capture",
colour_by = "READ_STRAND",
squish = TRUE,
viewaspairs = TRUE)
}