WGLab / PennCNV

Copy number vaiation detection from SNP arrays
http://penncnv.openbioinformatics.org
Other
89 stars 53 forks source link

CNV plot margins #48

Open andrisvAria opened 5 years ago

andrisvAria commented 5 years ago

Hello, I wonder if you can help me with this. I am trying to change the code of visualize_cnv.pl so that the CNV plots dedicate bigger portion to the actual CNV rather than the margins.

I tried changing the following chunk

my $length = $end-$start+1;
$length < $flankinglength and $length = $flankinglength;
if ($pos >= $start-$length and $pos <= $end+$length)
 {  push @{$signal{$chr, $start}}, [$pos, $lrr, $baf]; }

into this

my $length = $end-$start+1;
$temp = round($length / 3);
if ($pos >= $start-$temp and $pos <= $end+$temp) {
      push @{$signal{$chr, $start}}, [$pos, $lrr, $baf];}

So for all figures, I want the left and right margins to be equal to 1/3 of the cnv area. While some of the figures turn out okay, others have unequal margins.

1

2

Does anyone have experience with this or maybe has some advice on what might be wrong? I would appreciate any help, thank you!

kaichop commented 5 years ago

There is an argument in visualize_cnv.pl to change the ratio and you do not need to change source code.

Sent from my iPhone

On Aug 8, 2019, at 5:31 PM, andri90 notifications@github.com wrote:

Hello, I wonder if you can help me with this. I am trying to change the code of visualize_cnv.pl so that the CNV plots dedicate bigger portion to the actual CNV rather than the margins.

I tried changing the following chunk

my $length = $end-$start+1; $length < $flankinglength and $length = $flankinglength; if ($pos >= $start-$length and $pos <= $end+$length) { push @{$signal{$chr, $start}}, [$pos, $lrr, $baf]; } into this

my $length = $end-$start+1; $temp = round($length / 3); if ($pos >= $start-$temp and $pos <= $end+$temp) { push @{$signal{$chr, $start}}, [$pos, $lrr, $baf];} So for all figures, I want the left and right margins to be equal to 1/3 of the cnv area. While some of the figures turn out okay, others have unequal margins.

Does anyone have experience with this or maybe has some advice on what might be wrong? I would appreciate any help, thank you!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.