-
Notifications
You must be signed in to change notification settings - Fork 180
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
Forward and reverse reads not paired. #369
Comments
Hi, |
I sorted the bam file myself and run the mergeSAM.py , it works well . Did I have a configuration problem during the installation? How can I solve this problem? Thank you very much. |
No I think that this is more a RAM issue. Samtools sort has crashed because it doesn't have enough memory at some point. |
hi, when I run the mergeSAM.py , an error has occurred: |
samtools index: failed to create index for "mh30_2_clean_R1_nextgraph_pilon_5_1.filter.no.plastid.fa.bwt2merged.bam": No such file or directory Is there something wrong in the path ? does the file exist ? |
I plus the absolute path of bam file and run mergeSAM.py again: mergeBAM.pyforward= /home/linshengnan/03_work/00_dianthus_work/00_30mh_genome/04_hic/00_hicpro/hic-pro-result/bowtie_results/bwt2/sample1/mh30_1_R1_nextgraph_pilon_5_1.filter.no.plastid.fa.bwt2merged.bamreverse= /home/linshengnan/03_work/00_dianthus_work/00_30mh_genome/04_hic/00_hicpro/hic-pro-result/bowtie_results/bwt2/sample1/mh30_1_R2_nextgraph_pilon_5_1.filter.no.plastid.fa.bwt2merged.bamoutput= mh30_1_nextgraph_pilon_5_1.filter.no.plastid.fa.bwt2pairs.bammin mapq= 10report_single= Falsereport_multi= Falseverbose= TrueMerging forward and reverse tags ...[E::idx_find_and_load] Could not retrieve index file for '/home/linshengnan/03_work/00_dianthus_work/00_30mh_genome/04_hic/00_hicpro/hic-pro-result/bowtie_results/bwt2/sample1/mh30_1_R1_nextgraph_pilon_5_1.filter.no.plastid.fa.bwt2merged.bam' 100000020000003000000400000050000006000000700000080000009000000100000001100000012000000130000001400000015000000160000001700000018000000190000002000000021000000220000002300000024000000250000002600000027000000280000002900000030000000310000003200000033000000340000003500000036000000370000003800000039000000400000004100000042000000430000004400000045000000460000004700000048000000490000005000000051000000520000005300000054000000550000005600000057000000580000005900000060000000610000006200000063000000640000006500000066000000670000006800000069000000700000007100000072000000730000007400000075000000760000007700000078000000790000008000000081000000820000008300000084000000850000008600000087000000880000008900000090000000910000009200000093000000940000009500000096000000970000009800000099000000100000000101000000102000000103000000104000000105000000106000000107000000108000000109000000110000000111000000112000000113000000114000000115000000116000000117000000118000000119000000120000000121000000122000000123000000124000000125000000126000000127000000128000000.... 292000000the result also generated *bwt2pairs.bam and *bwt2pairs.pairstat |
I'm sorry to bother you again,but the problem has not been solved. As you said, this is a RAM issue. samtool sort has a problem. But I set the sorted memory to 2000G, there also met the same error: How can I solve this problem, could you give me some advise? Thank you very much! |
Hi, I got the same issue. Looking at the samtools sort mannual, the -m option is counted as memory max per thread. So the usage of memory is actually max_memory*n_threads. As far as I can tell, the previous update changed N_CPU to total CPU use limit. It does use N_CPU/2 for mapping for each end of reads. However, it is still useing N_CPU per end in mergeSAM step, which is causing 2 times more memory usage. In summary, if I am guessing right, the total memory use is SORT_RAM*N_CPU*2. |
Hi, |
Yes. Divide to the factor of N_CPU. Intuitively, I think HiC-Pro should use |
yes. I check the config-hicpro.txt of version 2.11.1, there is no SORT_RAM option, and I remove this option, it works well. |
Thanks guys. Very useful ! |
Hi! I have removed the SORT_RAM option as suggested by linshengnan2020, but I keep getting the same error:
The only difference is that I do not get the "samtools sort: couldn't allocate memory for bam_mem" error in mapping_combine.log. Any idea on how I could fix this? |
Hi |
Sorry to bother you again, I have modified the bowtie_combine.sh script by replacing '-m SORT_RAM' with '-m SORT_RAM/N_CPU'. However, the outputs of 'samtools sort' were not properly sorted and I got an error in the mergeSAM step. Here is my log:
|
To validate actual memory setting in samtools sorting step, check the mapping_combin.log in the log folder. You should be able to see |
This is my mapping_combine.log It seems to me it worked fine, but I'm probably wrong since the file were not sorted. Any advice on now to fix that?
|
Looks like they were sorted. Maybe your fastq input files are not paired? |
Indeed. Could you please show us the first lines of your fastq files please ? |
Yes, sorry, my input fastq were not paired. Silly mistake. Thank you. |
After having checked for read pairing in input fastq, I succeeded with ~30M reads test files I used my whole dataset, that is ~300M reads, using the same settings. The mergeSAM step failed, with the usual error message:
I check the previous step, reported in mapping_combine.log (below),
and I saw that a certain step was killed.
I did not get this 'Killed' message when my test successfully run, so I think that's where the problem might be. Could you please help me with that? Thank you. Federico |
You were allowing to use up to 12G*6cores*2processes memory. When you ran with a small dataset, the whole BAM file can be fit in the memory so no error returns. But if you are running a large dataset, it will keep filling the memory till reach the preset upper limit which in your case more than the system memory. |
This is now included in HiC-pro 3.0.0 |
hi, I run HiC-Pro in my data and I met a error like this:
/home/linshengnan/00_bin/python /home/linshengnan/01_software/hic-pro/HiC-Pro_2.11.4/scripts/mergeSAM.py -q 10 -t -v -f bowtie_results/bwt2/sample1/mh30_1_R1
[E::idx_find_and_load] Could not retrieve index file for 'bowtie_results/bwt2/sample1/mh30_1_R1_nextgraph_pilon_5_1.filter.no.plastid.fa.bwt2merged.bam'
[E::idx_find_and_load] Could not retrieve index file for 'bowtie_results/bwt2/sample1/mh30_1_R2_nextgraph_pilon_5_1.filter.no.plastid.fa.bwt2merged.bam'
mergeBAM.py
forward= bowtie_results/bwt2/sample1/mh30_1_R1_nextgraph_pilon_5_1.filter.no.plastid.fa.bwt2merged.bam
reverse= bowtie_results/bwt2/sample1/mh30_1_R2_nextgraph_pilon_5_1.filter.no.plastid.fa.bwt2merged.bam
output= bowtie_results/bwt2/sample1/mh30_1_nextgraph_pilon_5_1.filter.no.plastid.fa.bwt2pairs.bam
min mapq= 10
report_single= False
report_multi= False
verbose= True
Merging forward and reverse tags ...
Forward and reverse reads not paired. Check that BAM files have the same read names and are sorted.
mergeSAM.log (END)
could you give me some advise ? Thank you very much.
The text was updated successfully, but these errors were encountered: