hasindu2008 / f5c

Ultra-fast methylation calling and event alignment tool for nanopore sequencing data (supports CUDA acceleration)
https://hasindu2008.github.io/f5c/docs/overview
MIT License
144 stars 26 forks source link

f5c index error in snakemake #125

Closed Tomcxf closed 1 year ago

Tomcxf commented 1 year ago

Hi Dr.Gamaarachchi ! Thanks for your wonderful f5c tools! But recently I met a problem putting f5c to snakemake. I use

rule slow_index:
    input:
       fastq,
      file.blow5
    output:
      file.slow5.idx
    threads:8
    shell:
        "f5c_x86_64_linux_cuda index --slow5 {input[1]} {input[0]}"

for preparation to nanopolish polya. But I met

MissingOutputException in rule slow_index in file XXX.py, line 147:
Job 10  completed successfully, but some output files are missing. Missing files after 5 seconds. This might be due to filesystem latency. If that is the case, consider to increase the wait time with --latency-wait:

At first I believe that it may be the reason that 'nanopolish polya' doesn't offer a place for idx, but when I fix that the error exist. When I just simply run f5c index in shell, not in snakemake. The command run well. So how can I solve that? Thank you!

hasindu2008 commented 1 year ago

Hi,

I haven't used snakemake, but can it be because of the output file name? Can you make that file.blow5.idx instead of file.slow5.idx?

note relevant to the error: Also if you want to make use of threads, you might have to provide -t {threads} or something

Tomcxf commented 1 year ago

That error solved! But next I met another problem recently. When I continued, it showed

error: could not load the index files for input file ./WT-1/analysis/WT-1.fastq
Please run nanopolish index on your reads (see documentation)

I use f5c to index the blow5 file, and then use 'nanopolish polya' to estimate polyA length. Will they unsuitable? By the way , has f5c add polyA length function? Thank you!

hasindu2008 commented 1 year ago

f5c indexed fastq using slow5 or blow5 can also be used with nanopolish if you can create a .readbb file manually like below. echo -e "*\tpath/to/file.blow5" > ./WT-1/analysis/WT-1.fastq.index.readdb Make sure to replace path/to/ with the appropriate path (relative or absolute path) where the file.blow5 resides.

I have not implemented polyA for f5c.

Tomcxf commented 1 year ago

Thanks for your help! It run well but I encounter the same error again 1025 the result show all is -1.0 and the last column are all READ_FAILED_LOAD

I used the nanopolish version you supply in that issue. It worked before but now it doesn't work again. Thank you!

hasindu2008 commented 1 year ago

Can you attach the readbb file you created?

Tomcxf commented 1 year ago

It shows that ./WT-1/analysis/slow5/file.blow5

Tomcxf commented 1 year ago

It seems that different from the issue mentioned. Will

echo -e "*\tpath/to/file.blow5" > ./WT-1/analysis/WT-1.fastq.index.readdb 

have some problem?

hasindu2008 commented 1 year ago

It should look like this:

*       ./WT-1/analysis/slow5/file.blow5

Isn't the command you run

echo -e "*\t./WT-1/analysis/slow5/file.blow5" > ./WT-1/analysis/WT-1.fastq.index.readdb 

Note that it is a tab, not a space between * and the path.

Tomcxf commented 1 year ago

It works! Thanks for your help! Best wishes!

hasindu2008 commented 1 year ago

Feel free to reopen if you face another issue