Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having issues with combine_vcf.py #5

Open
ilariastewart opened this issue Dec 11, 2023 · 4 comments
Open

Having issues with combine_vcf.py #5

ilariastewart opened this issue Dec 11, 2023 · 4 comments

Comments

@ilariastewart
Copy link

Hi there,
I ran the newest vamos on my cohort and trying to merge the vcf files. I am running into issues with the combine_vcf.py script. I had to make a change to the script to initialize the sample variable and now am getting issues with the readOneVCF function:

python3 combine_vcf.py -i vamos_calls.csv -o vamos_merged_output.vcf
2023-12-11 10:45:34 - INFO - Parsing Input Arguements...
2023-12-11 10:45:34 - INFO - Required Argument - inVCFs: vamos_calls.csv
2023-12-11 10:45:34 - INFO - Required Argument - outVCF: vamos_merged_output.vcf
2023-12-11 10:45:34 - INFO - Parsing Input Arguements Completed

Traceback (most recent call last):
  File "/mnt/scratch/ilaria/VNTR/vamos_sherlock/ADRC_vamos/combine_vcf.py", line 197, in <module>
    samplesAll, header, vcfDict = readAllVCF(inVCFs)
                                  ^^^^^^^^^^^^^^^^^^
  File "/mnt/scratch/ilaria/VNTR/vamos_sherlock/ADRC_vamos/combine_vcf.py", line 160, in readAllVCF
    readOneVCF(vcfs[0],vcfDict)
  File "/mnt/scratch/ilaria/VNTR/vamos_sherlock/ADRC_vamos/combine_vcf.py", line 90, in readOneVCF
    coor, constant, altannoH1, altannoH2 = readOneVCFLine(line,vcfDict)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/scratch/ilaria/VNTR/vamos_sherlock/ADRC_vamos/combine_vcf.py", line 61, in readOneVCFLine
    chr,pos,id,ref,alt,qual,filter,info,_,_ = line.strip().split('\t')
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: not enough values to unpack (expected 10, got 3)

Thank you for any insights you can provide!

@BidaGu
Copy link
Collaborator

BidaGu commented Dec 11, 2023

Hi Ilaria,

Based on the error massage, it seems that the program parsed a strange entry that has only 3 fields as a Tandem Repeat entry line (which should have 10 fields) in the vcf.

The script was written to parse the "sample" (i.e., the sample name of each input vcf) variable directly from input vcfs. The sample name taken from each individual vcf is the last field of the last header line of each vcf. Was there an issue if you run the script without modifying it?

Thanks,
Bida

@ilariastewart
Copy link
Author

ilariastewart commented Dec 12, 2023 via email

@BidaGu
Copy link
Collaborator

BidaGu commented Dec 12, 2023

Hi Ilaria,

Could you please also share the command you used to run vamos? Thanks!

@ilariastewart
Copy link
Author

ilariastewart commented Dec 12, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants