I ran into a small error when attempting to run the preprocessing script using the input list option for multiple VCF files. The following line results in a TypeError when running PharmCAT_VCF_Preprocess.py with the --input_list option.
Casting i to a string allowed the script to complete:
temp_output_prefix = output_prefix + '_' + str(i)
Command used and error message
>python ~/data/gen4r/PharmCAT/src/scripts/preprocessor/PharmCAT_VCF_Preprocess.py --input_list input-list.txt --output_folder .
Saving output to .
Using default FASTA reference at ./reference.fasta.bgz
Processing /home/gcalendo/data/gen4r/data/vcf/shapeit2-duohmm-phased/chr1.vcf.gz
Traceback (most recent call last):
File "/home/gcalendo/data/gen4r/PharmCAT/src/scripts/preprocessor/PharmCAT_VCF_Preprocess.py", line 217, in <module>
run(args)
File "/home/gcalendo/data/gen4r/PharmCAT/src/scripts/preprocessor/PharmCAT_VCF_Preprocess.py", line 136, in run
vcf_pgx_regions = util.extract_regions_from_multiple_files(bcftools_path, tabix_path, bgzip_path, input_list,
File "/mnt/data/data_gc/gen4r/PharmCAT/src/scripts/preprocessor/vcf_preprocess_utilities.py", line 313, in extract_regions_from_m
ultiple_files
temp_output_prefix = output_prefix + '_' + i
TypeError: can only concatenate str (not "int") to str
Hello,
I ran into a small error when attempting to run the preprocessing script using the input list option for multiple VCF files. The following line results in a TypeError when running
PharmCAT_VCF_Preprocess.py
with the--input_list
option.https://github.com/PharmGKB/PharmCAT/blob/12f409d64c554b27bd7ba4d6c49081d5395830a3/src/scripts/preprocessor/vcf_preprocess_utilities.py#L313
Casting
i
to a string allowed the script to complete:temp_output_prefix = output_prefix + '_' + str(i)
Command used and error message
Where
input-list.txt
contains:Version Info