This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Tool complains that contig does not exist when using Glow pipe transformer

I am getting errors from the software that contig chr1 does not exist within the header. Does anybody have any insight as to why the infer function might not be inferring contigs?

glow spark pyspark

1 answer

As of release 0.4.1, Glow can only infer FORMAT and INFO header lines from a variant dataframe.

However, you can tell Glow to use the header from the input VCF when calling the command line tool.

Example:

import glow
vcf_path = "<path>"
df = spark.read.format("vcf").load(vcf_path)
glow.transform(
    "pipe",
    df,
    cmd=["tool"],
    input_formatter="vcf",
    in_vcf_header=vcf_path,
    output_formatter="vcf"
)

If this supposed to be an answer for your original question? How would one actually use this in a command line?

Otherwise edit your original question and add this information there.

Log in to answer this question.