Skip to content

Commit

Permalink
removed unused GT formatting logic
Browse files Browse the repository at this point in the history
  • Loading branch information
anand-imcm committed Apr 12, 2024
1 parent 4118b07 commit 33777f9
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions scripts/extract_vcf_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,6 @@ def extract_vcf_info(vcf_file, extract, ped):
extra_info = "TYPED_ONLY"
out.write(f"{chrom}:{pos}:{ref}:{alt}\t{chrom}\t{pos}\t{ref}\t{alt}\t{af}\t{maf}\t{r2}\t{er2}\t{extra_info}\n")
if option == 'GT' and not ped:
# to print the vcf encoded genotype
# info = ['|'.join(map(str, sample['GT'])) if sample['GT'] is not None else 'NA' for sample in record.samples.values()]
# to print translated genotype without reordering:
# info = [''.join(record.alleles[i] if i is not None else 'NA' for i in sample['GT']) for sample in record.samples.values()]
# to print genotypes based of custom reorder
info = []
for sample in record.samples.values():
if sample['GT'] is not None:
Expand Down

0 comments on commit 33777f9

Please sign in to comment.