kamimrcht / ELECTOR

ELECTOR: EvaLuator of Error Correction Tools for lOng Reads
GNU Affero General Public License v3.0
15 stars 3 forks source link

Cannot run successfully without providing reference reads #8

Open HaploKit opened 4 years ago

HaploKit commented 4 years ago

Hi~ I can run ELECTOR successfully on example dataset using this command you provided: python3 -m elector -uncorrected example/uncorrected_reads_elector.fa -perfect example/perfect_reads_elector.fa -corrected example/corrected_reads_elector.fa -output out -split -corrector lordec -simulator simlord

However, I want to run ELECTOR without providing reference reads, so I used this command: python3 -m elector -uncorrected example/uncorrected_reads_elector -reference example/example_reference.fasta -corrected example/corrected_reads_elector.fa -output out -split -corrector lordec -simulator simlord which is refered to: python3 -m elector -reference referenceGenome.fa -uncorrected simulatedReadsPrefix -corrected correctedReads.fa -threads nbThreads -corrector correctorName -simulator simulatorName -output out

However, it returned errors:

Traceback (most recent call last): File "/export/scratch1/home/vincent/software/miniconda3/lib/python3.7/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/export/scratch1/home/vincent/software/miniconda3/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/export/scratch3/vincent/software/xx/ELECTOR/elector/main.py", line 165, in main() File "/export/scratch3/vincent/software/xx/ELECTOR/elector/main.py", line 119, in main clipsNb = readAndSortFiles.processReadsForAlignment(soft, reference, uncorrected, corrected, size, split, simulator, dazzDb) File "/export/scratch3/vincent/software/xx/ELECTOR/elector/readAndSortFiles.py", line 471, in processReadsForAlignment convertSimulationOutputToRefFile(uncorrected, reference, simulator) File "/export/scratch3/vincent/software/xx/ELECTOR/elector/readAndSortFiles.py", line 459, in convertSimulationOutputToRefFile generateRefReadsSimLord(simulatedPrefix + ".sam", referenceGenome, simulatedPrefix + "_reference.fasta") File "/export/scratch3/vincent/software/xx/ELECTOR/elector/readAndSortFiles.py", line 348, in generateRefReadsSimLord f = open(simulatedReads) FileNotFoundError: [Errno 2] No such file or directory: 'example/uncorrected_reads_elector.sam'

Did I miss something? what is the correct command to run ELECTOR without providing reference reads? Can I run it using data simulated by pbsim? In this case, the flag " -simulator " should be omitted, right?

Many thanks.

morispi commented 4 years ago

Hi,

The command you provided seems appropriated:

python3 -m elector -uncorrected example/uncorrected_reads_elector -reference example/example_reference.fasta -corrected example/corrected_reads_elector.fa -output out -split -corrector lordec -simulator simlord

Is indeed the correct way to launch ELECTOR. Did the error you mentioned (" FileNotFoundError: [Errno 2] No such file or directory: 'example/uncorrected_reads_elector.sam'") happened when running ELECTOR with that command? If so, can you tell me the version of SimLoRD you're using?

However, I think the "example" folder you attempted to use is not really up to date anymore, and you should rather check the "reproduce_manuscript_results/" folder to familiarize with ELECTOR. There are a lot more data and experiments in this folder, and it should be easier for you to understand how ELECTOR works with it.

You can run ELECTOR using PBSim data, yes. In that case, you should rather use the flag "-simulator real". Support for PBSim isn't available yet, but we could easily add a few more compatible simulators in the future.

Don't hesitate to contact us again if you encounter other issues.

Best, Pierre

HaploKit commented 4 years ago

Yes. Thank you for your reply. I will look into reproduce_manuscript_results.