Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy Number feature request #72

Open
jessicadlang opened this issue Dec 9, 2022 · 2 comments
Open

Copy Number feature request #72

jessicadlang opened this issue Dec 9, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@jessicadlang
Copy link

I have a use case for plotting HiC and other tracks alongside copy number information for a cancer dataset. It would be great to have code built for plotting log2 transformed copy number values (option to toggle on or off the log transformation depending on the data type), and plot with positive values and negative values in different colors. Additional features like changing the axis to be able to capture a copy-number appropriate range (i.e. so you can see single copy number loss or gain as well as major copy number loss or gain, and maybe representation as segments rather than a smoothed line.

Right now I hacked plotSignal() to plot positive and negative values separately and position them as if they are a single graph, but it's a little clunky and I can't add the additional features mentioned above. The CNA data.frame is essentially in bed format with the column "score" with log2 transformed CN.

plotSignal(
data = CNA,
chrom = "chrX",
range = c(0, 2),
baseline = FALSE,
negData = TRUE,
linecolor = "red",
fill = "red",
alpha = 0.8,
x = 0.25, y = 1, width = 3.5, height = 0.2,
)
plotSignal(
data = CNA,
chrom = "chrX",
range = c(-2, 0),
baseline = FALSE,
negData = TRUE,
linecolor = "blue",
fill = "blue",
alpha = 0.8,
x = 0.25, y = 1.2, width = 3.5, height = 0.2,
)

image

Very cool package!! Thanks for your time developing, maintaining, and sharing!

@nekramer
Copy link
Member

Thanks for checking out plotgardener!! These are great suggestions, so I'm going to keep this issue open with the "enhancement" tag.

Just to note, and forgive me if I'm misunderstanding what you are plotting, but plotSignal can plot two datasets at once within the same plot. This can be useful to plot a negative dataset and positive dataset together. This also allows the option to color them differently. To do so, you would provide your datasets as a list to the data parameter and specify multiple colors in a vector to the linecolor and/or fill arguments. Also, it may help to use the range parameter to specify the y-axis range to capture more of a copy number-appropriate range. I hope this helps some of your plotting setbacks as we continue developing!

Best,
Nicole

@nekramer nekramer added the enhancement New feature or request label Dec 19, 2022
@jessicadlang
Copy link
Author

jessicadlang commented Dec 19, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants