jkimlab / msPIPE

14 stars 9 forks source link

methylation extraction fails after mapping with multiple cores #3

Closed rockman507 closed 1 year ago

rockman507 commented 1 year ago

I ran 5 samples with --core 40 flag, which made 8 split BAM files during mapping. When moving to the methylation step

https://gyazo.com/658a548660f4cbadee5fe8460430a85f https://gyazo.com/4c182aad4dd44711e1a63e386b9a4b89

I replicated the calls by hand samtools sort -n -o file_out file_in

And adjusted the conf to call post mapping and seems to be running now. Appears to be a potential problem when mapping using multiple cores. Suggest adding -n flag to the merge call post mapping?

line 407 msPIPE.py sortCMD_list.append( [f'{prog.samtools} sort -o {sorted_bamF} -@ {core} {bamF}', f'{libD}/logs/log.sortbam.txt',log_proc ] ) sortCMD_list.append( [f'{prog.samtools} sort -n -o {sorted_bamF} -@ {core} {bamF}', f'{libD}/logs/log.sortbam.txt',log_proc ] )

rockman507 commented 1 year ago

Also just noticed the person using Docker that opened an issue may relate to the same problem. When I get a chance I'll try doing a clean run and verify inserting the -n flag clears the issue up

rockman507 commented 1 year ago

0e0c82a fixes this particular issue, thank you.