refresh-bio / KMC

Fast and frugal disk based k-mer counter
266 stars 73 forks source link

Error message: Error: Cannot open temporary file tmp/kmc_00000.bin #51

Closed niuyushuo closed 6 years ago

niuyushuo commented 6 years ago

Dear marekkokot,

I am new to Linux, so this problem may look like sully. I download the KMC3 file and make it. In the bin fold, I could see the three files: kmc, kmc_dump and kmc_tools. But when I run the command line : /home/niu/KMC-3.0.1/bin/kmc -k20 reads.fq kmers1 tmp. I got the error like: Error: Cannot open temporary file tmp/kmc_00000.bin. I tried several times and got the same error. I also chenked my tmp, it still has 50G space. So could you help me to figure this problem? Thank you very much.

Best, Tim

tseemann commented 6 years ago

@niuyushuo you need to make the directory tmp that you told it to use. it does not make it itself I discovered :(

Try

mkdir tmp_kmc
/home/niu/KMC-3.0.1/bin/kmc -k20 reads.fq kmers1 tmp_kmc
niuyushuo commented 6 years ago

@tseemann Thanks for your response. This problem solved. I just find another problem, does KMC3 has some kind of memory limitation? Right now, I use ubuntu to do the test and I only set around 8G for the Memory and 100GB for the Hard Disk. So if my test fa/fq file is about more than 100kb, the program will give the Error: Wrong input file! If I just run some very small fa/fq files which around 10kb, it works well. Could you tell me the reason?

marekkokot commented 6 years ago

Hello @niuyushuo, thanks for using KMC3. KMC in default mode can use up to 12GB of RAM (despite rare cases of really huge input, but it is not your case). You may change default value with -m option (for example -m4 for 4GB of RAM). Nevertheless, I think the problem is related to your file content. KMC can read from following input file formats:

In which format your input file is? For long reads (from 3rd generation sequencing, which are usually in fasta format as far as I know) there is a bug in KMC (see #40), but there is a simple workaround, instead of using -fa you may run KMC with -fm. This bug will be fixed in the near (I hope) future.

Let me know if it helped.

niuyushuo commented 6 years ago

@marekkokot Thank you very much for your response. The -fm saved my life. Right now the KMC3 works very well on my laptop.

marekkokot commented 6 years ago

Long reads problem was solved with d1dfea438f56bbe09101c6a83481933b9cc7eb06