Skip to content

Commit

Permalink
ruff format
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeHagen authored and jeromekelleher committed Aug 29, 2024
1 parent ffba53f commit 9abb124
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions vcztools/vcf_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,7 @@ def write_vcf(

with open_file_like(output) as output:
if samples and drop_genotypes:
raise ValueError(
"Cannot select samples and drop genotypes."
)
raise ValueError("Cannot select samples and drop genotypes.")
elif drop_genotypes:
sample_ids = []
samples_selection = np.array([])
Expand Down Expand Up @@ -308,7 +306,11 @@ def c_chunk_to_vcf(
info_fields = {}
num_samples = len(samples_selection) if samples_selection is not None else None
for name, array in root.items():
if name.startswith("call_") and not name.startswith("call_genotype") and num_samples != 0:
if (
name.startswith("call_")
and not name.startswith("call_genotype")
and num_samples != 0
):
vcf_name = name[len("call_") :]
format_fields[vcf_name] = get_vchunk_array(
array, v_chunk, v_mask_chunk, samples_selection
Expand Down

0 comments on commit 9abb124

Please sign in to comment.