I want to use conform-gt to get rid of some REF prefix differences see here. Conform-gt needs the reference FASTA file split by chromosome and in .vcf.gz format. How can I do this?

I already tried faidx with

faidx --transform bed reference/GRCh38_full_analysis_set_plus_decoy_hla.fa > reference/GRCh38_full_analysis_set_plus_decoy_hla.bed

but this produced the following error:

Traceback (most recent call last):
  File "/home/oem/.local/bin/faidx", line 8, in <module>
  File "/home/oem/.local/lib/python3.9/site-packages/pyfaidx/cli.py", line 202, in main
  File "/home/oem/.local/lib/python3.9/site-packages/pyfaidx/cli.py", line 51, in write_sequence
    outfile.write(transform_sequence(args, fasta, name, start, end))
  File "/home/oem/.local/lib/python3.9/site-packages/pyfaidx/cli.py", line 121, in transform_sequence
    line_len = fasta.faidx.index[name].lenc
KeyError: 'HLA-A*01'
  • 2
    $\begingroup$ Can you please edit your question and explain what you mean a bit more? Your title talks about converting fasta (sequences) to bed (regions) which is odd, but could be done if you mean "read the fasta and tell me what regions of a reference genome they map to". But then your question talks about converting fasta to "vcf.gz" format and this doesn't make sense unless you want some sort of gVCF file with an entry for every position of a genome. $\endgroup$
    – terdon
    Nov 9, 2022 at 18:19
  • $\begingroup$ I reconsidered my question. I don't think that I really fully understood what I want to achieve with this format-conversion nor if I really understood what conform-gt really does. Back to the drawing board I guess. I will close this question and hope that the original question in my OP can solve my problem. $\endgroup$
    – mugdi
    Nov 9, 2022 at 20:16


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.