This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Visualization of Amplification and deletion data with genes : CNV

Hello all,

I'm working with CNV data. I wanted to visualize CNV Gistic thresholded data. It looks like following.

Gene    A95S    A9GS    A9GT    A9GU    A9GV    A9GW   A9GX
ACAP3   1        2         0     -2      1       0     -1
ACTRT   1        2         0     -2      1       0     -1
AGRN    1        2         0     -2      1       0     -1
ANKRD65 1        2         0     -2      1       0     -1

I wanted to generate a plot which looks like this Figure1A (https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3198787/figure/F1/)

Previously I had used some R packages for this but it doesn't show any Gene Names, like shown in the above link. Can anyone tell me how to generate such plot. Are there any R packages or any tools?

Thank you

visualization cnv genes

You can take a look at this thread. However, if you are intending to plot something that is in the paper you have to read the paper and see what all packages they used to make such visualization. If it is not provided you can always try to reason it looking at the plot. If you see it is a two ordinate plot. Where you have the chr numbers at x-axis and 2 y-axes consist of FDR value and the other is some sort of scoring. Your data needs to be prepared in that fashion to have such kinds of plot else you will not be able to do it. If you still cannot figure out then you can contact the authors. Probably they might have also provided the codes in the open and you can take a look at them to understand what data they used it and how they made the plot. Also, take a look at GevVisR

Thank you. I will look at that. Can you please tell me if there is a copy number loss of some genes and how to check whether the genes are copy number regulated or not? Any idea how to get such plot?

if I see from the data chunk you provided, it seems that ACAP3 gene has 1 copy gain in sample A95S , 2 gains in A9GS, neutral in A9GTm loss of 2 copy in A9GU, 1 gain in A9GV, neutral in A9GW and loss of one copy in A9GX. Is this my correct interpretation? The data you have now is more like something that you can plot in a heatmap stating which genes have what CNVs across different samples and to what extent they have differential CNVs or similar ones that will cluster together. You already have the data with you as I can see. It is just that your CNVs across different samples are pretty heterogeneous. You also do not have to perform the heatmap with any z-score transformation so scale=" none" since I see the values are pretty scaled, just switch on the clustering of row and column and plot the heatmap. Your data should be as it is and have rows as genes and columns as samples with number of copies for that gene in each of the samples. So just plot them to see how the data behaves and what hypothesis does it let you drive.

That is what I said in my answer. Read it carefully and understand. Have done heat maps of data let's say RNAseq? If so you should be able to do that and also understand my reply. Otherwise you need to take some R lessons of quantitative or qualitative data analysis and visualizations. When you try to make one picture try to understand the motivation for it and what are the tools and methods employed. If you try to reason my earlier comment you will find plenty of resources on the internet with code snippets to do that.

Yes I understood what I said. I just thought of showing an example plot. That is why I posted the link.

if so then just take the data you have put in the post, read in R or any tool you want. The plot in the paper link is not what I said. It is a correlation heatmap. In that case, you have to transform the data and plot the heatmap on the correlation matrix. I was more trying to answer what your previous question was. You have to understand the motivation of what you intend to see. Do you have a clear hypothesis of what you want to see, then please clarify otherwise we can go round and round. Thanks

Sorry, I was confused. Its not correlation. I want to see the copy number regulation of genes which show copy number loss. I have the CNV data with me.

then just read the file in R and with header=T and rownames=1 (means genes as rows) and plot with any heatmap package the same dataframe without scaling and with scaling to compare and see what you get. Otherwise, come up with the code and say what you tried and where you falter. If I send the code here it will be not the best way for you to learn and reason. I hope you understand that. ;)

So, now I generated a heatmap showing amplifications and deletions of genes.

Copy <- read.delim("cnv_data",as.is = T) Copy2 <- data.frame(Copy[,-1], row.names=Copy[,1]) heatmap.3(Copy2)

does it work? you can put some imageloader to show the heatmap.

Yes, it worked. But it is with 20k genes so its huge. not able to showup here.

If so then you should upvote the comments that helped you in solving your problems. That is how the forum works. Just as a query. 20k gene is a lot. How did you retrieve so many genes have CNVs at the first place. That number of genes is roughly what is expressed in human or mice if these are the data from them. Probably you should recheck what your matrix is having. Ideally, even if you do whole exome or whole genome data and find CNV regions for each sample, significant CNVs should not be seen across all genes. Fractionally very few regions should have CNVs which should translate into few genes in the end. Then you can perform a test to find for all samples what are genes with CNV, take a union of them which can be a few hundred and then make the matrix which you have shown. Never seen such a data with 20k genes having CNVs . Usually its for expression data having so many observations.

0 answers

No answers yet.

Log in to answer this question.