Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OPERA-MS fails at polishing step with mapping error #67

Open
jnesme opened this issue Sep 14, 2021 · 9 comments
Open

OPERA-MS fails at polishing step with mapping error #67

jnesme opened this issue Sep 14, 2021 · 9 comments

Comments

@jnesme
Copy link

jnesme commented Sep 14, 2021

Hi there,

I have a strange error while running operams. I launched the tool against an already computed assembly.

OPERA-MS --short-read1 FastqIllumina/all.bbdukTrimQ15.SludgeDK_1.fastq.gz --short-read2 FastqIllumina/all.bbdukTrimQ15.SludgeDK_2.fastq.gz --long-read all.rRNA.m64241e_210617_232502.hifi_reads.fasta --out-dir opera-ms_m64241e_210617_232502.hifi_reads_allbbduk15.ShotgunIllumina --polishing --short-read-assembler spades --num-processors 128 --contig-file AssemblyFatNode/final_assembly.fasta

It fails with stating a bwa error but when I open the bwa.err log file, it seems to have finished mapping correctly:

[M::main_mem] read 8989252 sequences (1280000264 bp)...
[M::mem_pestat] # candidate unique pairs for (FF, FR, RF, RR): (167, 2301842, 775, 130)
[M::mem_pestat] analyzing insert size distribution for orientation FF...
[M::mem_pestat] (25, 50, 75) percentile: (128, 213, 447)
[M::mem_pestat] low and high boundaries for computing mean and std.dev: (1, 1085)
[M::mem_pestat] mean and std.dev: (269.87, 238.51)
[M::mem_pestat] low and high boundaries for proper pairs: (1, 1404)
[M::mem_pestat] analyzing insert size distribution for orientation FR...
[M::mem_pestat] (25, 50, 75) percentile: (194, 279, 362)
[M::mem_pestat] low and high boundaries for computing mean and std.dev: (1, 698)
[M::mem_pestat] mean and std.dev: (281.71, 124.19)
[M::mem_pestat] low and high boundaries for proper pairs: (1, 866)
[M::mem_pestat] analyzing insert size distribution for orientation RF...
[M::mem_pestat] (25, 50, 75) percentile: (118, 317, 953)
[M::mem_pestat] low and high boundaries for computing mean and std.dev: (1, 2623)
[M::mem_pestat] mean and std.dev: (527.49, 579.94)
[M::mem_pestat] low and high boundaries for proper pairs: (1, 3458)
[M::mem_pestat] analyzing insert size distribution for orientation RR...
[M::mem_pestat] (25, 50, 75) percentile: (151, 245, 474)
[M::mem_pestat] low and high boundaries for computing mean and std.dev: (1, 1120)
[M::mem_pestat] mean and std.dev: (296.03, 247.69)
[M::mem_pestat] low and high boundaries for proper pairs: (1, 1443)
[M::mem_pestat] skip orientation FF
[M::mem_pestat] skip orientation RF
[M::mem_pestat] skip orientation RR
[M::mem_process_seqs] Processed 8989252 reads in 4328.447 CPU sec, 78.873 real sec

but the bwa.out file is empty. Any idea what may cause this issue and how to solve it ?

@jsgounot
Copy link
Contributor

jsgounot commented Sep 14, 2021

Hi,

is the error appearing during the assembly graph construction or during the polishing step ?

Edit: Sorry it's in your title ... I will come back to you as soon I have a clue of what's happening.

Edit 2: Could you show me the tail of your main log file ?

Regards,
jsgounot

@jnesme
Copy link
Author

jnesme commented Sep 14, 2021

Here are the last lines before dying:

/projects/codon_0000/apps/github/OPERA-MS//tools_opera_ms//bwa mem -t 128 /maps/projects/codon_0000/data/210619_HiFi_TrainingPacbioOdense/Sample02_OSspikedMN/opera-ms_m64241e_210617_232502.hifi_reads_allbbduk15.ShotgunIllumina//intermediate_files/polished_assembly/contigs.fa  /maps/projects/codon_0000/data/210619_HiFi_TrainingPacbioOdense/Sample02_OSspikedMN/FastqIllumina/all.bbdukTrimQ15.SludgeDK_1.fastq.gz /maps/projects/codon_0000/data/210619_HiFi_TrainingPacbioOdense/Sample02_OSspikedMN/FastqIllumina/all.bbdukTrimQ15.SludgeDK_2.fastq.gz 2>> /maps/projects/codon_0000/data/210619_HiFi_TrainingPacbioOdense/Sample02_OSspikedMN/opera-ms_m64241e_210617_232502.hifi_reads_allbbduk15.ShotgunIllumina//intermediate_files/polished_assembly/bwa.err| /projects/codon_0000/apps/github/OPERA-MS//tools_opera_ms//samtools view -Sub - 2>> /maps/projects/codon_0000/data/210619_HiFi_TrainingPacbioOdense/Sample02_OSspikedMN/opera-ms_m64241e_210617_232502.hifi_reads_allbbduk15.ShotgunIllumina//intermediate_files/polished_assembly/bwa.err | /projects/codon_0000/apps/github/OPERA-MS//tools_opera_ms//samtools sort - /maps/projects/codon_0000/data/210619_HiFi_TrainingPacbioOdense/Sample02_OSspikedMN/opera-ms_m64241e_210617_232502.hifi_reads_allbbduk15.ShotgunIllumina//intermediate_files/polished_assembly/contigs.fa > /maps/projects/codon_0000/data/210619_HiFi_TrainingPacbioOdense/Sample02_OSspikedMN/opera-ms_m64241e_210617_232502.hifi_reads_allbbduk15.ShotgunIllumina//intermediate_files/polished_assembly/bwa.out 2>> /maps/projects/codon_0000/data/210619_HiFi_TrainingPacbioOdense/Sample02_OSspikedMN/opera-ms_m64241e_210617_232502.hifi_reads_allbbduk15.ShotgunIllumina//intermediate_files/polished_assembly/bwa.err

Error in during bwa mapping. Please see /maps/projects/codon_0000/data/210619_HiFi_TrainingPacbioOdense/Sample02_OSspikedMN/opera-ms_m64241e_210617_232502.hifi_reads_allbbduk15.ShotgunIllumina//intermediate_files/polished_assembly/bwa.out and /maps/projects/codon_0000/data/210619_HiFi_TrainingPacbioOdense/Sample02_OSspikedMN/opera-ms_m64241e_210617_232502.hifi_reads_allbbduk15.ShotgunIllumina//intermediate_files/polished_assembly/bwa.err for details.

Note to self: maybe not running on 128 cores to avoid RAM issues ? I'll try right now...

@jsgounot
Copy link
Contributor

Ok thanks, did you try to run the command line separately ?

In your case:

/projects/codon_0000/apps/github/OPERA-MS//tools_opera_ms//bwa mem -t 128 /maps/projects/codon_0000/data/210619_HiFi_TrainingPacbioOdense/Sample02_OSspikedMN/opera-ms_m64241e_210617_232502.hifi_reads_allbbduk15.ShotgunIllumina//intermediate_files/polished_assembly/contigs.fa  /maps/projects/codon_0000/data/210619_HiFi_TrainingPacbioOdense/Sample02_OSspikedMN/FastqIllumina/all.bbdukTrimQ15.SludgeDK_1.fastq.gz /maps/projects/codon_0000/data/210619_HiFi_TrainingPacbioOdense/Sample02_OSspikedMN/FastqIllumina/all.bbdukTrimQ15.SludgeDK_2.fastq.gz | /projects/codon_0000/apps/github/OPERA-MS//tools_opera_ms//samtools view -Sub - | /projects/codon_0000/apps/github/OPERA-MS//tools_opera_ms//samtools sort - /maps/projects/codon_0000/data/210619_HiFi_TrainingPacbioOdense/Sample02_OSspikedMN/opera-ms_m64241e_210617_232502.hifi_reads_allbbduk15.ShotgunIllumina//intermediate_files/polished_assembly/contigs.fa

@jnesme
Copy link
Author

jnesme commented Sep 14, 2021

It runs fine indeed and returns on the console the same as what is written at the bottom of the bwa.err file, ie. a completed mapping

@jsgounot
Copy link
Contributor

Ok, did you try to relaunch Opera-MS ?

@jnesme
Copy link
Author

jnesme commented Sep 15, 2021

yes - it does the same error message but I (think) it completes since I have now all of these in the output folder:

-rw-r--r--  1 svc-rapunzl-smrtanl sec-hpc-prj-codon_0000  243 Sep 14 11:21 assembly.stats
-rw-r--r--  1 svc-rapunzl-smrtanl sec-hpc-prj-codon_0000 2.8K Sep 14 11:23 cluster_info.txt
-rw-r--r--  1 svc-rapunzl-smrtanl sec-hpc-prj-codon_0000  33M Sep 14 11:21 contig_info.txt
-rw-r--r--  1 svc-rapunzl-smrtanl sec-hpc-prj-codon_0000 1.4G Sep 14 11:21 contigs.fasta
drwxr-sr-x 11 svc-rapunzl-smrtanl sec-hpc-prj-codon_0000  335 Sep 14 11:23 intermediate_files
drwxr-sr-x  3 svc-rapunzl-smrtanl sec-hpc-prj-codon_0000   21 Sep 14 11:21 opera_ms_clusters
-rw-r--r--  1 svc-rapunzl-smrtanl sec-hpc-prj-codon_0000  884 Sep 14 11:20 opera-ms-utils.config

@jsgounot
Copy link
Contributor

No it's not, you're supposed to have a file named contigs.polished.fasta. This error is very strange since perl is only checking the output of the exact same command line I wrote before. Is it possible that you ran this on a cluster and the configuration is not the same ? Might be a memory / disk space issue. Did you try to run maybe the exact same command line (with stdout and stderr redirection)? Otherwise you can just use the contig.fasta file but these will be results without the pilon polishing.

@jnesme
Copy link
Author

jnesme commented Sep 15, 2021

full disclosure, I'm runnning OPERA-MS in a conda environment (installed with the recipe found in another GitHub issue) and I launch it with a bash alias that is using the conda env perl and the opera-ms.pl file. It's not a cluster, it's all local cores. The disks are network disks though and memory wise, there is 1.5TB RAM to play with and I'm solo on the server so unlikely. It is alos failing when using just 25 cores. I'll make a more precise bug report when running it from scratch and with all proper details. Meanwhile, I'll just Pilon polish the contigs.fasta using standalone Pilon.

Merci beacuoup pour l'aide so far :)

@jsgounot
Copy link
Contributor

Indeed it does not seem an hardware issue. Thanks for the bug report and sorry for the inconvenience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants