Hi
I am trying to rearrange some of the values and columns in VCF file using python and PyVCF. For example, in certain condition, I want the REF and ALT value to be swapped.
for record in vcf_reader:
if ln(ALT) == 1:
vcf_writer.write_record(record)
In this case,I am trying to swap REF and ALT values to each other and write to output if length of ALT is 1. I am not sure how I can modify "record" so that the arrangement of data can be modified.
Anyone with experience in PyVCF please give me an advice.
I am trying to rearrange some of the values and columns in VCF file using python and PyVCF. For example, in certain condition, I want the REF and ALT value to be swapped.
for record in vcf_reader:
if ln(ALT) == 1:
vcf_writer.write_record(record)
In this case,I am trying to swap REF and ALT values to each other and write to output if length of ALT is 1. I am not sure how I can modify "record" so that the arrangement of data can be modified.
Anyone with experience in PyVCF please give me an advice.