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

Cnv view calls issue #5

Open
frankbioinfo opened this issue Nov 6, 2017 · 1 comment
Open

Cnv view calls issue #5

frankbioinfo opened this issue Nov 6, 2017 · 1 comment

Comments

@frankbioinfo
Copy link

frankbioinfo commented Nov 6, 2017

Hello @RCollins13 ,

Thank you for great work, I am trying to use this to plot CNV for bam generated from 10x longranger wgs pipeline

Using following steps, I take a random deletion start and end co ordinate from bedpe file (for trial run) and

Step1)
bedtools makewindows -b breakpoints.bed -n 100 -i winnum > windows.bed

Step2)
bedtools coverage -a windows.bed -b sample.bam > coverage.bed

And this is my output, (I just use first 4 columns for CNView)
21 36696996 36706838 80 1799 9842 9842 1.0000000
21 36037582 36047424 13 1366 9842 9842 1.0000000
21 36175370 36185212 27 1252 9842 9842 1.0000000
21 36303316 36313158 40 1278 9842 9842 1.0000000
21 36431262 36441104 53 1699 9842 9842 1.0000000
21 36569050 36578892 67 1510 9842 9842 1.0000000
21 36824942 36834784 93 1566 9842 9842 1.0000000
21 35929320 35939162 2 1581 9842 9842 1.0000000
21 35939162 35949004 3 1579 9842 9842 1.0000000
21 35958846 35968688 5 1581 9842 9842 1.0000000

modify for CNV (trial_1.bed)
Chr Start End SampleA
21 36696996 36706838 80
21 36037582 36047424 13
21 36175370 36185212 27
21 36303316 36313158 40
21 36431262 36441104 53
21 36569050 36578892 67
21 36824942 36834784 93
21 35929320 35939162 2
21 35939162 35949004 3

Rscript CNView.R 21 35919400 36903600 SampleA trial_1.bed sampleAexampleplot.pdf --title "exampleplot"

error:

+-------------------+
| CNView Visualizer |
| (c) 2016 |
+-------------------+
Sample ID file 'SampleA' not found, assuming single sample ID provided
Filtering & loading coverage matrix... Complete
Compressing coverage matrix [29,526 bp bins]... Error in apply(df[, 4:ncol(df)], 2, function(vals, compression) { :
dim(X) must have a positive length
Calls: CNView -> rebin -> apply
Execution halted

not sure where am i am going wrong ...

Thanks.
Frank

@RCollins13
Copy link
Owner

Hi @frankbioinfo,

Thanks for posting some example data and the error message. I hope I can help you out here.

CNView requires a coverage matrix of regularly-sized intervals that extend well beyond (recommended at least ±5Mb) the coordinates of the CNV you wish to plot. Typically, this is done with 100bp intervals. It looks like you've computed 9,842bp bins, which is ok, although I'd recommend dicing up those intervals into 100bp bins.

You will also want to extend this coverage matrix beyond the boundaries of the CNVs. An example of what this input should look like is available here:
https://github.com/RCollins13/CNView#getting-started

Give this a shot and let me know if you still run into issues.

Best,
Ryan

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

No branches or pull requests

2 participants