indication
parent
2844ff3592
commit
f31e71b0b7
|
|
@ -191,7 +191,8 @@ workflow pipeline {
|
|||
name=tumor,
|
||||
normal=normal,
|
||||
output_dir=workdir,
|
||||
cancer=cancer
|
||||
cancer=cancer,
|
||||
project=project
|
||||
}
|
||||
|
||||
output {
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
use strict;
|
||||
use warnings;
|
||||
|
||||
my ($output_dir, $cancer_type) = @ARGV;
|
||||
die "useage:perl $0 output_dir cancer_type" unless @ARGV == 2;
|
||||
die "useage:perl $0 output_dir cancer_type project" unless @ARGV == 3;
|
||||
my ($output_dir, $cancer_type, $project) = @ARGV;
|
||||
|
||||
my $database_path = defined $ENV{'DATABASE'} ? $ENV{'DATABASE'} : "/dataseq/jmdna/codes/reportbase";
|
||||
|
||||
|
|
@ -76,9 +76,38 @@ while (<THERAPY>) {
|
|||
}
|
||||
}
|
||||
|
||||
my $muts_ref = info();
|
||||
|
||||
my @muts = @$muts_ref;
|
||||
|
||||
for my $gene (sort keys %therapy) {
|
||||
print OUT "$gene\t", join("/", @{$therapy{$gene}}), "\t未检出变异\t", join("/", @{$cancer{$gene}}), "\n";
|
||||
# 是否检测
|
||||
if (grep {$_ eq $gene} @muts) {
|
||||
print OUT "$gene\t", join("/", @{$therapy{$gene}}), "\t未检出变异\t", join("/", @{$cancer{$gene}}), "\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
sub info {
|
||||
|
||||
open INFO, "$database_path/info.csv";
|
||||
# 读取并解析表头
|
||||
my $header = <INFO>;
|
||||
chomp($header);
|
||||
my @column_names = split(',', $header);
|
||||
while (<INFO>) {
|
||||
chomp;
|
||||
my @line = split(/,/, $_);
|
||||
# 将数据与表头对应
|
||||
my %record;
|
||||
@record{@column_names} = @line;
|
||||
if ($record{'project'} eq $project) {
|
||||
if ($record{'mutation'} ne "NA") {
|
||||
@muts = split(/\//, $record{'mutation'});
|
||||
}
|
||||
}
|
||||
}
|
||||
return \@muts
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -10,12 +10,13 @@ task run_post {
|
|||
String? normal
|
||||
String output_dir
|
||||
String cancer
|
||||
String project
|
||||
command <<<
|
||||
|
||||
if [ ! -d ${output_dir}/report ];then
|
||||
mkdir ${output_dir}/report
|
||||
fi
|
||||
indication.pl ${output_dir} ${cancer}
|
||||
indication.pl ${output_dir} ${cancer} ${project}
|
||||
sample_post.py -s ${name} -o ${output_dir}
|
||||
postprocess.py -n ${name} -s ${normal} -c ${output_dir} -o ${output_dir}/report/${name}.merged_file.xlsx
|
||||
>>>
|
||||
|
|
@ -40,6 +41,7 @@ workflow call_postprocess {
|
|||
String? normal
|
||||
String output_dir
|
||||
String cancer
|
||||
String project
|
||||
|
||||
if (run) {
|
||||
call run_post {
|
||||
|
|
@ -54,7 +56,8 @@ workflow call_postprocess {
|
|||
name=name,
|
||||
normal=normal,
|
||||
output_dir=output_dir,
|
||||
cancer=cancer
|
||||
cancer=cancer,
|
||||
project=project
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue