Skip to content
Snippets Groups Projects
Commit f29af901 authored by Brandi Cantarel's avatar Brandi Cantarel
Browse files

update cnv kit filter

parent 4fe8bcaf
No related merge requests found
...@@ -18,9 +18,8 @@ while (my $line = <ENT_ENS>){ ...@@ -18,9 +18,8 @@ while (my $line = <ENT_ENS>){
} }
close ENT_ENS; close ENT_ENS;
open ENT_SYM, "</project/shared/bicf_workflow_ref/gene_info.human.txt" or die $!; open ENT_SYM, "</project/shared/bicf_workflow_ref/gene_info.human.txt" or die $!;
my %entrez; $ent_header = <ENT_SYM>;
my $ent_header = <ENT_ENS>; while (my $line = <ENT_SYM>){
while (my $line = <ENT_ENS>){
chomp $line; chomp $line;
my @row = split(/\t/, $line); my @row = split(/\t/, $line);
$entrez{$row[2]}=$row[1]; $entrez{$row[2]}=$row[1];
...@@ -49,17 +48,16 @@ while (my $line = <IN>) { ...@@ -49,17 +48,16 @@ while (my $line = <IN>) {
$genes{$value} = 1 if $keep{$value}; $genes{$value} = 1 if $keep{$value};
} }
} }
my $newgeneids = join(";", keys %genes);
my $len = sprintf("%.1f",($end-$start)/1000); my $len = sprintf("%.1f",($end-$start)/1000);
next if ($cn == 2) || scalar(keys %genes) < 1; next if ($cn == 2) || scalar(keys %genes) < 1;
my $abtype = 'amplification'; my $abtype = 'amplification';
$abtype = 'loss' if ($cn < 2); $abtype = 'loss' if ($cn < 2);
foreach $gene (keys %gene) { foreach $gene (keys %genes) {
$cn_cbio = $cn -2; $cn_cbio = $cn -2;
$cn_cbio = 2 if ($cn > 4); $cn_cbio = 2 if ($cn > 4);
print BIO join("\t",$gene,$entrez{$gene},$cn_cbio),"\n"; print BIO join("\t",$gene,$entrez{$gene},$cn_cbio),"\n";
print OUT join("\t",$gene,$chr,$start,$end,$abtype,$cn,$weight),"\n";
} }
print OUT join("\t",$newgeneids,$chr,$start,$end,$abtype,$cn,$weight),"\n";
} }
close IN; close IN;
close OUT; close OUT;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment