cytham / nanovar

Structural variant caller for low-depth long-read sequencing data
GNU General Public License v3.0
45 stars 10 forks source link

After run nanovar, we cannot get the vcf results, could you give some advice? #38

Closed zch0803 closed 3 years ago

zch0803 commented 3 years ago

We use command nanovar -t 24 ourbam.bam hg38.fna ourdir to run nanovar. After calculating, we cannot find output vcf in outdir. Here is the output file:

fig GCA_000001405.15_GRCh38_no_alt_analysis_set.counts.obinary NanoVar-251021-1535.log GCA_000001405.15_GRCh38_no_alt_analysis_set.counts genome.sizes

And in the logfile, we cannot find anything wrong, the last log is

"[25/10/2021 20:03:44] - INFO - Re-clustering INS/INV SVs and merging [25/10/2021 20:05:18] - INFO - Neural network inference [25/10/2021 20:05:45] - DEBUG - Creating converter from 3 to 5".

So, we would be very grateful for your help , could you give some advice?

cytham commented 3 years ago

Hi @zch0803,

NanoVar did not finish successfully. May I know what NanoVar version are you using and if there's any error from the standard output?

Thanks

zch0803 commented 3 years ago

Thanks for your reply. The nanovar version is 1.3.9. This morning I found some error report in the standard output:

[26/10/2021 10:01:05] - NanoVar started Checking integrity of input files - - Indexing genome and aligning reads - \ Analyzing read alignments and detecting SVs - \ Clustering SV breakends - / Re-evaluating SVs with BLAST and inferencing - -Traceback (most recent call last): File "/home/zhaochenghui/miniconda3/envs/sv/bin/nanovar", line 494, in main() File "/home/zhaochenghui/miniconda3/envs/sv/bin/nanovar", line 354, in main run.cluster_nn(add_out=sub_run.total_out) File "/home/zhaochenghui/miniconda3/envs/sv/lib/python3.7/site-packages/nanovar/nv_characterize.py", line 127, in cluster_nn self.out_nn = inference(new_cluster_out, new_total_out, self.model) File "/home/zhaochenghui/miniconda3/envs/sv/lib/python3.7/site-packages/nanovar/nv_nn.py", line 40, in inference nnmodel = load_model(model, compile=False) File "/home/zhaochenghui/miniconda3/envs/sv/lib/python3.7/site-packages/tensorflow_core/python/keras/saving/save.py", line 146, in load_model return hdf5_format.load_model_from_hdf5(filepath, custom_objects, compile) File "/home/zhaochenghui/miniconda3/envs/sv/lib/python3.7/site-packages/tensorflow_core/python/keras/saving/hdf5_format.py", line 166, in load_model_from_hdf5 model_config = json.loads(model_config.decode('utf-8')) AttributeError: 'str' object has no attribute 'decode'

I modified the code model_config = json.loads(model_config.decode('utf-8')) to model_config = json.loads(model_config.encode('utf-8').decode('utf-8')) and rerun the command.

Now it is still running, if there is any new problem, I'll share it.

I have solved the problem, thanks very much. The problem was shown in above and after I added encode function before decode function. Nanovar can output the vcf results.

cytham commented 3 years ago

@zch0803 Can you update NanoVar to v1.4.1 and try again? Thanks

cytham commented 3 years ago

@zch0803 Hi, so were you able to obtain the VCF output files?

zch0803 commented 3 years ago

Yes, There are two ways to solve the problem. The first way is to modify the "YourPath/miniconda3/envs/sv/lib/python3.7/site-packages/tensorflow_core/python/keras/saving/hdf5_format.py" file. The second way by updating the nanovar to v1.4.1 is also ok. And the results are no difference.

cytham commented 3 years ago

Thanks @zch0803. Glad that the problem has been resolved.