ngsLD unable to read genotype input file
Closed this issue · 4 comments
Hello,
I'm not sure this was the correct place to post this but I'm having trouble getting ngsLD to run properly and it appears to have a problem with the format of my genotype file. I have a genotype file with samples as columns and rows as sites. Genotypes are denoted by -1, 0, 1, and 2. It's a tab-delimited text file with no headers (I tried with headers as well).
When I run
ngsLD --n_threads 15 --geno snp.ngsld.geno.gz --posH pos.ngsld.txt --n_ind 134 --n_sites 14412 --out mylu.ld
I get the error message:
ERROR: [read_geno] cannot read GZip GENO file. Check GENO file and number of sites!
It also has a bunch of rows of Header found! skipping line....
I have n_sites as 14412 and wc -l snp.ngsld.geno 14412
When I unzip and run it I get the error message
==> BINARY input file (always lkl)
=====
ERROR: [main] invalid/corrupt genotype input file!
Is this something you could help me with?
Thanks,
-Bobby
Can you send me a small example file so I can reproduce the error? Maybe just a couple of SNPs and samples.
Sure, will do. I've attached the position and genotype files containing 10 sites and 6 samples.
sample.pos.txt
sample.snp.txt
Were those files created in windows?
If so, can you try running dos2unix
on them and then compressing the geno file with gzip
?
Hey, sorry for the late reply. It worked! Those files were altered in windows before I tried running ngsld.
Thank you!