How to remove the squished track in Give AlignmentTrack()
1
0
Entering edit mode
5.9 years ago
gundalav ▴ 380

I have the following code:

library(Gviz)
library(Mus.musculus)
library(data.table)
library(OrganismDbi)
library(TxDb.Mmusculus.UCSC.mm10.knownGene)
txdb <- TxDb.Mmusculus.UCSC.mm10.knownGene


# Define bam file -----

adipose_bam <- "myfile.bam"

# Define region -----------------------------------------------------------
thechr <- "chr3"
st <- 116.108e6L
en <- 116.1317e6L 



# Define track ------------------------------------------------------------

itrack <- IdeogramTrack(
  genome = "mm10", chromosome = thechr
)

grtrack <- GeneRegionTrack(
  txdb,
  chromosome = thechr, start = st, end = en,
  showId = TRUE,
  name = "Gene Annotation"
)



gtrack <- GenomeAxisTrack(cex = 1) # set the font size larger

adipose_altrack <- AlignmentsTrack(
  adipose_bam,
  isPaired = TRUE, col.mates = "deeppink",
  name = "Adipose", fill = "blue", col = "blue"
)


plotTracks(
  list(itrack, gtrack, adipose_altrack, grtrack),
  from = st, to = en
)

It produces this plot:enter image description here

As define in the image how can I remove the squished track?

RNA-Seq • 1.1k views
ADD COMMENT
1
Entering edit mode
5.0 years ago
kathka ▴ 30

This is probably way to late, but this post put me on the right track with my own work, so will provide this answer for others in the future..

Instead of using the AlignmentTracks class, use the DataTrack class to make a histogram coverage plot

adipose_covtrack <- DataTrack(test.bam,
                   genome = "mm10",
                   type = "h",  ## For histograms
                   name = "Adipose")

I haven't played around with the aesthetics, but the default setting provides blue fill.

ADD COMMENT

Login before adding your answer.

Traffic: 2113 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6