Just before Christmas I sent this issue/question to the oxstatgen mailing list, but this may be a more appropriate place to list it:
I am working on UK Biobank bgen files and trying to get SNP stats for all variants using qctool, but I get an error when using the -snp-stats option. The read-test option works fine (no errors), and so do any of the other options I have used (for instance incl-range combined with -os and -og).
This is my command:
qctool -g ukb_imp_chr22_v2.bgen -s ukb2471_imp_chr22_v2_s487395.sample -snp-stats -osnp snpstats_ukb_chr22.txt
and this is the log:
Welcome to qctool
(version: 2.0-rc7, revision 9445f57)
(C) 2009-2017 University of Oxford
Opening genotype files : [*****] (1/1,1.2s,0.8/s)
Input SAMPLE file(s): "ukb2471_imp_chr22_v2_s487395.sample"
Output SAMPLE file: "(n/a)".
Sample exclusion output file: "(n/a)".
Input GEN file(s):
(1255680 snps) "ukb_imp_chr22_v2.bgen (bgen v1.2; 487409 unnamed samples; zlib compression)"
(total 1255680 snps in 1 sources).
Number of samples: 487409
Output GEN file(s): (n/a)
Output SNP position file(s): (n/a)
Sample filter: .
# of samples in input files: 487409.
# of samples after filtering: 487409 (0 filtered out).
Number of SNPs:
-- in input file(s): 1255680.
-- in output file(s): 0
Number of samples in input file(s): 487409.
!! Error (genfile::MalformedInputError): Source "(chain of 1 sources)" is malformed on line 57303, column 4..
Thank you for using qctool.
I tried the older, stable qctool v2 and the newest (compiled today, we had the same issue with that as Teresa (issue 38) previously, so after your response to her we were able to get it to run here as well). Both versions give this error for all chromosomes from UK Biobank data.
Do you have any idea what causes this error and advise on how to solve this?