Skip to content

Commit f48d6da

Browse files
committed
Minor changes
1 parent 8ef8c41 commit f48d6da

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

src/svtk/svtk/standardize/std_dragen_cnv.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,16 @@ def standardize_records(self):
2121
"""
2222

2323
# Iterate over records
24-
n = 0
2524
for record in self.filter_raw_vcf():
26-
# Skip records that are reference
25+
# Skip records that are reference
2726
if 'SVTYPE' not in record.info:
2827
continue
2928

3029
# Reset filters
3130
record.filter.clear()
32-
31+
3332
yield self.standardize_record(record)
34-
33+
3534
def standardize_info(self, std_rec, raw_rec):
3635
"""
3736
Standardize Dragen CNV record.
@@ -69,7 +68,7 @@ def standardize_info(self, std_rec, raw_rec):
6968

7069
# Define ALGORITHMS
7170
std_rec.info['ALGORITHMS'] = ['depth']
72-
71+
7372
return std_rec
7473

7574
def standardize_alts(self, std_rec, raw_rec):
@@ -90,22 +89,22 @@ def standardize_alts(self, std_rec, raw_rec):
9089
std_rec.stop = stop
9190

9291
return std_rec
93-
92+
9493
def standardize_format(self, std_rec, raw_rec):
9594
"""
9695
Parse ./1 GTs for DUPs into 1/1.
9796
"""
98-
97+
9998
source = std_rec.info['ALGORITHMS'][0]
100-
99+
101100
for sample, std_sample in zip(raw_rec.samples, self.std_sample_names):
102101
gt = raw_rec.samples[sample]['GT']
103102
if self.call_null_sites:
104103
if gt == (None, None):
105104
gt = (0, 1)
106105
if gt == (None,):
107106
gt = (1,)
108-
107+
109108
if None in gt or any(allele == "." for allele in gt):
110109
gt = (1, 1)
111110
std_rec.samples[std_sample]['GT'] = gt
@@ -116,5 +115,3 @@ def standardize_format(self, std_rec, raw_rec):
116115
std_rec.samples[std_sample][source] = 0
117116

118117
return std_rec
119-
120-

src/svtk/svtk/standardize/std_manta.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def standardize_info(self, std_rec, raw_rec):
8080
if pos == 54564370:
8181
print(f"{std_rec.id}: {end}")
8282
print(f"{std_rec.id}: {std_rec.stop}")
83-
83+
8484
# Strand parsing
8585
if svtype == 'INV':
8686
if 'INV3' in raw_rec.info.keys():

wdl/DefragmentCnvsVcf.wdl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ workflow DefragmentCnvsVcf {
44
input {
55
File vcf # Input VCF
66
File vcf_idx # Input VCF index file
7-
Float? max_dist # Maximum distance for merging CNVs
7+
Float? max_dist # Maximum distance for merging CNVs
88
String prefix # Prefix for output files
99
1010
String sv_pipeline_docker # Docker image path
@@ -14,6 +14,7 @@ workflow DefragmentCnvsVcf {
1414
input:
1515
vcf = vcf,
1616
vcf_idx = vcf_idx,
17+
prefix = prefix,
1718
sv_pipeline_docker = sv_pipeline_docker
1819
}
1920
@@ -30,6 +31,7 @@ workflow DefragmentCnvsVcf {
3031
vcf = vcf,
3132
vcf_idx = vcf_idx,
3233
bed = DefragmentCnvs.bed_out,
34+
prefix = prefix,
3335
sv_pipeline_docker = sv_pipeline_docker
3436
}
3537

0 commit comments

Comments
 (0)