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

Error with VCF file no sample found #176

Closed
poddarharsh15 opened this issue Nov 24, 2023 · 4 comments
Closed

Error with VCF file no sample found #176

poddarharsh15 opened this issue Nov 24, 2023 · 4 comments

Comments

@poddarharsh15
Copy link

Hello,
I am trying to run truvari bench on vcf files generated from MANTA SVcaller but unfortunately I am having errors regarding no samples found. Could you please suggest some ideas?
Screenshot from 2023-11-24 12-39-29

@yusufkizilarslan
Copy link

yusufkizilarslan commented Nov 24, 2023 via email

@poddarharsh15
Copy link
Author

candidateSV.vcf.gz
Hello, thank you for answering as I have checked the .vcf file earlier it has no FORMAT & SAMPLE column present and I read some earlier issues from truvari git and added FORMAT(GT) & SAMPLE(.) in my vcf files manually but I suppose the files aren't compatible with truvari when I add these columns manually.
Screenshot from 2023-11-24 13-41-29

@ACEnglish
Copy link
Owner

There must have been an error in how the format and sample was added. I ran the following script and was able to run on its output VCF.

  • fixer.py:
import sys

for line in sys.stdin:
    if line.startswith("##"):
        sys.stdout.write(line)
    elif line.startswith("#"):
        sys.stdout.write('##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">\n')
        sys.stdout.write(line.strip() + '\tFORMAT\tSAMPLE\n')
    else:
        sys.stdout.write(line.strip() + '\tGT\t.\n')
  • command line
gunzip -c candidateSV.vcf.gz| python fixer.py | bgzip > cand_fix.vcf.gz

@poddarharsh15
Copy link
Author

Thank you so much finally it's working for me now.

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

3 participants