Entering edit mode
klim314
•
0
@klim314-13119
Last seen 7.4 years ago
Hi, I've been having an issue with rendering the tracks when selecting a single transcript. When rendering without from and to fields, the annotation track renders properly, showing only one transcript.
However, when adding to and from to the plotTracks field, this appears to override the filter of the annotation field
How would I be able to both add from and to arguments while maintaining the filters?
Code:
library("data.table") library("biomaRt") library("Gviz") data_dir = "~/work/data/bamsets/igv_b2" plot_type = "histogram" from = 96648967 to = 96670936 ensembl = useMart("ensembl", dataset = "mmusculus_gene_ensembl") biomTrack_hmgcr <- BiomartGeneRegionTrack(genome="GRCm38.p5", symbol = "HMGCR", name="Hmgcr\nstructure", biomart = ensembl, stacking = "squish", filters = list(ensembl_transcript_id = "ENSMUST00000022176", start = from, end = to), #transcriptAnnotation = "transcript" ) hmgcr_sko_table = fread(file.path(data_dir, "hmgcr2", "summarized_bedgraphs", "sko.bedgraph"), col.names = c('chromosome', 'start', 'end', 's1', "s2", "s3")) hmg_sko = DataTrack(range = hmgcr_sko_table, genome="GRCm38.p5", name="test", biomart = ensembl, type = plot_type, ylim = c(0, 135), col.histogram = "#000000") plotTracks(list(biomTrack_hmgcr, hmg_sko), aggregation = "mean", from = from, to = to) plotTracks(list(biomTrack_hmgcr, hmg_sko), aggregation = "mean")