更新indication
parent
5fb3c8d8f0
commit
ede3ac96a3
|
|
@ -6,10 +6,12 @@ die "useage:perl $0 output_dir cancer_type project" unless @ARGV == 3;
|
|||
my ($output_dir, $cancer_type, $project) = @ARGV;
|
||||
|
||||
my $len = length($cancer_type);
|
||||
|
||||
if ($len < 4) {
|
||||
die "cancer_type 非ST开头且4位长度";
|
||||
}
|
||||
else {
|
||||
$cancer_type = substr($cancer_type, 0, 4);
|
||||
}
|
||||
|
||||
my $database_path = defined $ENV{'DATABASE'} ? $ENV{'DATABASE'} : "/dataseq/jmdna/codes/reportbase";
|
||||
|
||||
|
|
@ -31,14 +33,11 @@ while (<DIS>) {
|
|||
|
||||
foreach my $ID ($cancer_type) {
|
||||
my @family;
|
||||
# my @ids = split("", $ID);
|
||||
# for (my $i = 1; $i < @ids; $i = $i + 2) {
|
||||
# push @family, join("", @ids[0 .. $i]);
|
||||
# }
|
||||
# 取前 4位 再加上ST
|
||||
my $match_id = substr($cancer_type, 0, 4);
|
||||
push @family, (grep {/^$match_id/} @id);
|
||||
push @family, "ST";
|
||||
my @ids = split("", $ID);
|
||||
for (my $i = 1; $i < @ids; $i = $i + 2) {
|
||||
push @family, join("", @ids[0 .. $i]);
|
||||
}
|
||||
push @family, (grep {/^$ID/} @id);
|
||||
foreach my $t (@family) {
|
||||
push @{$dis2{$ID}}, @{$dis2{$t}};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue