vincentiusmartin / QBiC-Pred

Quantitative Binding Change Prediction
MIT License
8 stars 7 forks source link

KeyError when running qbic.py #11

Closed yangyxt closed 4 years ago

yangyxt commented 4 years ago

I run the qbic.py to generate TF binding predictions locally. Here is the code: # Run the qbic command python3 ${central_scripts}/QBiC-Pred/qbic-offline/qbic.py \ -i ${table::-4}.qbicinput.vcf \ -g ${qbic_tflist} \ -c hg19 \ -o ${table::-4}.tfpredictons.tsv

I input the VCF format, and it looks like this: image As to the -g argument, the TF list is input as a one-column file and it looks like this: image

Here is the Error Message I got when running this command: image

Pls help debug it. Thanks!

vincentiusmartin commented 4 years ago

The .vcf is in the wrong format. See here https://www.internationalgenome.org/wiki/Analysis/Variant%20Call%20Format/vcf-variant-call-format-version-40/ Also example http://qbic.genome.duke.edu/download/QBiC-vcf-example-MAFK-ASB-variants.vcf

qbic needs the first 5 columns of the .vcf file which is chrom,pos,id,ref,alt. You can just put a dot on id since it's not needed by qbic.

yangyxt commented 4 years ago

The .vcf is in the wrong format. See here https://www.internationalgenome.org/wiki/Analysis/Variant%20Call%20Format/vcf-variant-call-format-version-40/ Also example http://qbic.genome.duke.edu/download/QBiC-vcf-example-MAFK-ASB-variants.vcf

qbic needs the first 5 columns of the .vcf file which is chrom,pos,id,ref,alt. You can just put a dot on id since it's not needed by qbic.

Thanks for the info. I just found the reason by identifying a malformed line in my VCF file. Thanks again!