Extracting CNV data from CNVDetectionResult
4
0
Entering edit mode
@abdulelkadri-8415
Last seen 9.4 years ago
Canada

We have been using cn.mops to run CNV analysis on a whole genome sequencing dataset. Is it possible to extract the data from the CNVDetectionResult object which is used to plot the graph seen through segplot?

We are unsure which CNVDetectionResult Method is appropriate to extract the true copy number variant we are looking for. We are looking to create a dataset which will be used to scan for genomic copy number variants and includes predicted copy number and genomic position. 

Thanks for the replies in advance!

cn.mops • 2.5k views
ADD COMMENT
1
Entering edit mode
@gunter-klambauer-5426
Last seen 3.9 years ago
Austria

Hello Abdul,

I think the question is about extracting and exporting the result of cn.MOPS. Let us assume you have the result of cn.MOPS as the following:

library(cn.mops); data(cn.mops)

result <- calcIntegerCopyNumbers(cn.mops(XRanges))

You can extract the segmentation, the CNVs and the CNV regions with the following:

segm <- as.data.frame(segmentation(result))

CNVs <- as.data.frame(cnvs(result))

CNVRegions <- as.data.frame(cnvr(result))

 

You can export the result with "write.csv" for Excel, LibreOffice Calc etc:

write.csv(segm,file="segmentation.csv")

write.csv(CNVs,file="cnvs.csv")

write.csv(CNVRegions,file="cnvr.csv")

 

This files will include the genomic position, copy number and other information. Does this answer your question?

Regards,

Günter

ADD COMMENT
0
Entering edit mode

Yes it does! We were able to extract the table in a useable format. 

 

Thanks for your help!

ADD REPLY
0
Entering edit mode

which dataframe is  used to generate the segplot?

ADD REPLY
0
Entering edit mode

Works like a charm! Thank you :)

ADD REPLY
0
Entering edit mode
peng.zhang • 0
@pengzhang-9057
Last seen 9.1 years ago
United States

This is very useful for me, it would be great if it can be incorporated in the cn.mops manual.

ADD COMMENT
0
Entering edit mode
@legatiandrea-9377
Last seen 9.0 years ago
Italy

Usefeul also for me, I quote the comment before, it would be great if it can be incorporated in the manual!

ADD COMMENT
0
Entering edit mode
@gunter-klambauer-5426
Last seen 3.9 years ago
Austria

Added to the manual - thanks for the comments!
Regards,

Günter

ADD COMMENT

Login before adding your answer.

Traffic: 459 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