-
Notifications
You must be signed in to change notification settings - Fork 2
/
grexome-TIMC-secondary_runAll.pl
executable file
·73 lines (60 loc) · 3.03 KB
/
grexome-TIMC-secondary_runAll.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/usr/bin/perl
############################################################################################
# Copyright (C) Nicolas Thierry-Mieg, 2019-2024
#
# This file is part of grexome-TIMC-Secondary, written by Nicolas Thierry-Mieg
# (CNRS, France) [email protected]
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with this program.
# If not, see <https://www.gnu.org/licenses/>.
############################################################################################
# 26/08/2021
# NTM
# Wrapper for running grexome-TIMC-Secondary.pl in parallel on
# all variant-caller GVCFs.
# This script is very much install-specific and can't be re-used as-is,
# but it serves as a full-blown example since this is how we use the pipeline
# routinely: when we obtain new samples we simply update $primDate, $secDate and
# $cnvFile , then run the script.
use strict;
use warnings;
my $primDate = "220517";
my $secDate = "220518";
my $cnvFile = "/data/septiera/InfertilityCohort_Results/Calling_results_ExomeDepth_220427_574pat/CNVResults_ExomeDepth_574samples_220428.vcf";
my $canon = "";
# set to "--canonical" to limit to canonical transcripts
# $canon = "--canonical";
($canon) || ($secDate .= "_AllTranscripts");
my $metaPath = "/home/nthierry/VariantCalling/GrexomeFauve/Grexome_Metadata/";
my $binPath = "/home/nthierry/Software/Grexome-TIMC/grexome-TIMC-Secondary/";
foreach my $caller ("Strelka", "GATK") {
my $callerLow = lc($caller);
my $com = "perl $binPath/grexome-TIMC-secondary.pl --samples=$metaPath/patient_summary.xlsx ";
$com .= "--pathologies=$metaPath/3-CandidateGenes/pathologies.xlsx ";
$com .= "--candidateGenes=";
foreach my $pathos ("NOA-OA-OMD-POF-DSD", "preprm2", "MMAF-PCD-AST-Necro",
"Globo-Macro-Headless-FF-PreImpA-OATS-Terato", "OG") {
$com .= "$metaPath/3-CandidateGenes/candidateGenes_$pathos.xlsx,";
}
($com =~ s/,$/ /) ||
die "E adding pathos to com: cannot replace trailing comma with space in:\n$com\n";
$com .= "--infile=../GVCFs_grexome/GVCFs_${caller}_Filtered_Merged/grexomes_${callerLow}_merged_$primDate.g.vcf.gz ";
($cnvFile) && ($com .= "--cnvs=$cnvFile ");
$com .= "--outDir=SecondaryAnalyses_${secDate}_$caller ";
$com .= "$canon ";
#$com .= "--debugVep ";
$com .= "2> grexomeTIMCsec_${secDate}_$caller.log ";
# move log into caller results subdir
$com .= "; mv grexomeTIMCsec_${secDate}_$caller.log SecondaryAnalyses_${secDate}_$caller/ ";
# running for all callers in parallel:
$com = "( $com ) &";
system($com);
}