Closed juanjo255 closed 1 month ago
Hi Juan!
Thanks for your interest in Strainy! It looks like the problem is with the gfa file, but we just added support for input fasta, please try doing a pull and running Strainy with the --fasta_ref parameter (gfa is not needed).
Katya
Hello @katerinakazantseva,
Thanks for the reply!
It worked! unfortunately, I'm facing another problem, I think that maybe it has to do with this issue #75. I tried downgrading to 3.10, but it failed using 10 threads.
The error:
ERROR: Worker thread exception! Cannot save file into a non-existent directory: '/home/jjpiconc/COL-HUMAN-PROJECT/MT/MT_20240815/phasing/strainy_out/intermediate/adj_M'
Traceback (most recent call last):
File "/home/jjpiconc/COL-HUMAN-PROJECT/MT/MT_20240815/phasing/strainy/strainy/phase.py", line 30, in _thread_fun
cluster(i, shared_flye_consensus)
File "/home/jjpiconc/COL-HUMAN-PROJECT/MT/MT_20240815/phasing/strainy/strainy/clustering/cluster.py", line 106, in cluster
m.to_csv("%s/adj_M/adj_M_%s_%s_%s.csv" % (StRainyArgs().output_intermediate, edge, I, StRainyArgs().AF))
File "/home/jjpiconc/.conda/envs/strainy/lib/python3.10/site-packages/pandas/util/_decorators.py", line 333, in wrapper
return func(*args, **kwargs)
File "/home/jjpiconc/.conda/envs/strainy/lib/python3.10/site-packages/pandas/core/generic.py", line 3967, in to_csv
return DataFrameRenderer(formatter).to_csv(
File "/home/jjpiconc/.conda/envs/strainy/lib/python3.10/site-packages/pandas/io/formats/format.py", line 1014, in to_csv
csv_formatter.save()
File "/home/jjpiconc/.conda/envs/strainy/lib/python3.10/site-packages/pandas/io/formats/csvs.py", line 251, in save
with get_handle(
File "/home/jjpiconc/.conda/envs/strainy/lib/python3.10/site-packages/pandas/io/common.py", line 749, in get_handle
check_parent_directory(str(handle))
File "/home/jjpiconc/.conda/envs/strainy/lib/python3.10/site-packages/pandas/io/common.py", line 616, in check_parent_directory
raise OSError(rf"Cannot save file into a non-existent directory: '{parent}'")
OSError: Cannot save file into a non-existent directory: '/home/jjpiconc/COL-HUMAN-PROJECT/MT/MT_20240815/phasing/strainy_out/intermediate/adj_M'
Traceback (most recent call last):
File "/home/jjpiconc/COL-HUMAN-PROJECT/MT/MT_20240815/phasing/strainy/strainy.py", line 32, in <module>
main()
File "/home/jjpiconc/COL-HUMAN-PROJECT/MT/MT_20240815/phasing/strainy/strainy.py", line 26, in main
sys.exit(strainy.main.main())
File "/home/jjpiconc/COL-HUMAN-PROJECT/MT/MT_20240815/phasing/strainy/strainy/main.py", line 127, in main
sys.exit(phase_main(args))
File "/home/jjpiconc/COL-HUMAN-PROJECT/MT/MT_20240815/phasing/strainy/strainy/phase.py", line 134, in phase_main
consensus_dict = phase(StRainyArgs().edges_to_phase, args)
File "/home/jjpiconc/COL-HUMAN-PROJECT/MT/MT_20240815/phasing/strainy/strainy/phase.py", line 57, in phase
raise Exception("Error in worker thread, exiting")
Exception: Error in worker thread, exiting
Juan
Update: Actually, maybe it is not a threads problem, when I used -t 1
It failed too. It was that it was not been able to create the folder intermediate/adj_M
, so I did it manually and it worked, same happened latter with intermediate/graphs/linear_phase_NC_012920.1.png
. Probably a permission issue (?)
Hi Juan, can you please send command you use to run Strainy and log file ({output_dir}/log_phase/phase_root.log)?
Thank you, Katya
Hello developers!
Thanks for this great work.
Due to how Strainy works, I find attractive to try to use it for haplotype assembly of human mitochondrial genome, do you think it might work?
Anyways, when I tried to use it I am facing problems when converting from fasta to gfa it always fail with this:
I tried to add a fasta and I tried converting using
minigraph chrMT.fna MT/MT_20240815/reads_MT_20240815.fastq > chrMT.gfa
, but when I check for thepreprocessing_data
folder, it always shows an emptygfa_converted.fasta
. Maybe this is the cause of the program failing? or it just cannot work in this context?I am using my own VCF file and BAM file.
Here the command:
Thank you very much for the help,
Juan