PhHermann / LDJump

R Package to Estimate Variable Recombination Rates using Population Genetic Data
MIT License
38 stars 6 forks source link

Repeat "Error in opening sequence file" and "Error in data.table::rbindlist(named.list)" #22

Open dannytang666 opened 4 years ago

dannytang666 commented 4 years ago

**Hi,

I'm running LDJump with the following parameters: results = LDJump("/store2/guzr/LDJump/run/data/chr16.SNP.Population.F9-return-rmHighDP.Nomissing.Kola.vcf", chr = 16 , segLength = 10000, cores = 8, accept = T, pathPhi = "/public/guzr/soft/PhiPack/Phi", pathLDhat = "/public/guzr/soft/LDhat-master", format = "vcf", refName = "/store2/guzr/LDJump/run/data/chr16.fa", lengthofseq=6533824, startofseq = 216, endofseq = 6534039)**

But I get the following issue repeatedly: " Run-time error

Error in opening sequence file

..now exiting to system... Run-time error Error in opening sequence file ..now exiting to system... "

When I set the "cores" number to 1, it still happens, but with some differences as follows: " Run-time error Error in opening sequence file ..now exiting to system...

Haplotypes extracted from: samp Number of haplotypes: 3 Sequence length: 10000 Haplotype labels and frequencies: I II III 14 1 1 [1] "0.15% of Segments calculated" [1] "0.46% of Segments calculated" [1] "0.61% of Segments calculated"

Run-time error Error in opening sequence file ..now exiting to system... "

Also, at the end fo the output file, I get this message: " Error in data.table::rbindlist(named.list) : Item 2 has 2 columns, inconsistent with item 1 which has 1 columns. To fill missing columns use fill=TRUE. " But even if I change the codes in the scripts of LDJump.R and vcf_statistics.R, adding "fill=TRUE", I still get this ERROR.

Could anyone help to solve this problem??

fardokhtsadat commented 3 years ago

Hello @dannytang666, I am sorry that there has not been any response to your question. Thank you for taking interest into LDJump. Would you be so kind to provide me with a snippet of your VCF-file? It will help me to better understand what is causing the issue.

davidecarlson commented 3 years ago

I'm actually receiving virtually the same error:

Run-time error

Error in opening sequence file

..now exiting to system...

Except the final data.table error at the end of output is slightly different:

Error in data.table::rbindlist(named.list) :
  Item 7 has 1 columns, inconsistent with item 1 which has 2 columns. To fill missing columns use fill=TRUE.
Calls: LDJump -> vcf_statistics -> <Anonymous>
Execution halted

Here is the command I ran:

#!/usr/bin/env Rscript

library(LDJump)

elata_ref = '/bowman/datahome_migrated/oenothera/genomic/gbs_2020/ddRAD/gatk/results/vcfs/LDJump/fastas/scaff2.fa'
elata_vcf = '/bowman/datahome_migrated/oenothera/genomic/gbs_2020/ddRAD/gatk/results/vcfs/LDJump/5scaff_variants.withIDs.elata.vcf'

#paths
PHI = '/home/progs/PhiPack/Phi'
LDHAT = '/home/progs/LDhat'

startofseq = 1
endofseq = 107610929
chr = 'HiC_scaffold_2'
len = 107610929
out = 'elata_scaff2'

results_scaff2 = LDJump(elata_vcf, alpha = 0.05, chr = chr, pathLDhat = LDHAT, segLength = 20000, quant = 0.35, pathPhi = PHI, accept = TRUE,
            format = 'vcf', refName = elata_ref, cores = 25, lengthofseq = len, startofseq = startofseq, endofseq = endofseq, status = TRUE, out = 'elata_scaff2')

print(results_scaff2)

In case it's useful, I've attached the portion of my VCF file that is used in the above analysis (note that when I ran the analysis, the vcf was not gzipped).

Any ideas what the problem might be? Thanks! Dave sample.vcf.gz

fergsc commented 1 year ago

I am running the current version of LDJump, and still having this issue. Was there ever a solution??

podunn58 commented 1 year ago

I am having this same error, except I am starting with a fasta file, instead of a vcf. Was there ever any solution? my command was:

pathPhi = "/home/usr/Downloads/PhiPack/src/Phi" pathLDhat = "/home/usr/LDJump/LDhat" seqName = "/home/usr/LDJump/WI_Z_cons.fasta" refName = "/home/usr/LDJump/Chr6.fasta"

results = LDJump(seqName, alpha = 0.05, segLength = 1500000, pathLDhat = pathLDhat, pathPhi = pathPhi, format = "fasta", refName = NULL)

Error in data.table::rbindlist(named.list) : Item 2 has 1 columns, inconsistent with item 1 which has 2 columns. To fill missing columns use fill=TRUE.

thanks, Peter